OSDN Git Service

Replace strdup() with pstrdup(), to avoid leaking memory.
[pg-rex/syncrep.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.63 for PostgreSQL 9.1beta1.
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-2011, 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.1beta1'
602 PACKAGE_STRING='PostgreSQL 9.1beta1'
603 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
604
605 ac_unique_file="src/backend/access/common/heaptuple.c"
606 ac_default_prefix=/usr/local/pgsql
607 # Factoring default headers for most tests.
608 ac_includes_default="\
609 #include <stdio.h>
610 #ifdef HAVE_SYS_TYPES_H
611 # include <sys/types.h>
612 #endif
613 #ifdef HAVE_SYS_STAT_H
614 # include <sys/stat.h>
615 #endif
616 #ifdef STDC_HEADERS
617 # include <stdlib.h>
618 # include <stddef.h>
619 #else
620 # ifdef HAVE_STDLIB_H
621 #  include <stdlib.h>
622 # endif
623 #endif
624 #ifdef HAVE_STRING_H
625 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
626 #  include <memory.h>
627 # endif
628 # include <string.h>
629 #endif
630 #ifdef HAVE_STRINGS_H
631 # include <strings.h>
632 #endif
633 #ifdef HAVE_INTTYPES_H
634 # include <inttypes.h>
635 #endif
636 #ifdef HAVE_STDINT_H
637 # include <stdint.h>
638 #endif
639 #ifdef HAVE_UNISTD_H
640 # include <unistd.h>
641 #endif"
642
643 ac_subst_vars='LTLIBOBJS
644 vpath_build
645 OSX
646 XSLTPROC
647 COLLATEINDEX
648 DOCBOOKSTYLE
649 have_docbook
650 JADE
651 NSGMLS
652 TCL_SHLIB_LD_LIBS
653 TCL_SHARED_BUILD
654 TCL_LIB_SPEC
655 TCL_LIBS
656 TCL_LIB_FILE
657 TCL_INCLUDE_SPEC
658 TCL_CONFIG_SH
659 TCLSH
660 XGETTEXT
661 MSGMERGE
662 MSGFMT
663 HAVE_POSIX_SIGNALS
664 LDAP_LIBS_BE
665 LDAP_LIBS_FE
666 PTHREAD_CFLAGS
667 PTHREAD_LIBS
668 PTHREAD_CC
669 acx_pthread_config
670 have_win32_dbghelp
671 HAVE_IPV6
672 LIBOBJS
673 OSSP_UUID_LIBS
674 ZIC
675 python_additional_libs
676 python_libspec
677 python_libdir
678 python_includespec
679 python_configdir
680 python_version
681 python_majorversion
682 PYTHON
683 perl_embed_ldflags
684 perl_useshrplib
685 perl_privlibexp
686 perl_archlibexp
687 PERL
688 FLEXFLAGS
689 FLEX
690 BISONFLAGS
691 BISON
692 MKDIR_P
693 AWK
694 LN_S
695 TAR
696 WINDRES
697 DLLWRAP
698 DLLTOOL
699 AR
700 STRIP_SHARED_LIB
701 STRIP_STATIC_LIB
702 STRIP
703 RANLIB
704 ld_R_works
705 with_gnu_ld
706 LD
707 LDFLAGS_SL
708 LDFLAGS_EX
709 ELF_SYS
710 EGREP
711 GREP
712 with_zlib
713 with_system_tzdata
714 with_libxslt
715 with_libxml
716 XML2_CONFIG
717 with_ossp_uuid
718 with_selinux
719 with_openssl
720 with_bonjour
721 with_ldap
722 with_pam
723 krb_srvtab
724 with_krb5
725 with_gssapi
726 with_python
727 with_perl
728 with_tcl
729 enable_thread_safety
730 INCLUDES
731 autodepend
732 TAS
733 GCC
734 CPP
735 SUN_STUDIO_CC
736 OBJEXT
737 EXEEXT
738 ac_ct_CC
739 CPPFLAGS
740 LDFLAGS
741 CFLAGS
742 CC
743 enable_dtrace
744 DTRACEFLAGS
745 DTRACE
746 enable_coverage
747 GENHTML
748 LCOV
749 GCOV
750 enable_profiling
751 enable_debug
752 enable_rpath
753 enable_shared
754 default_port
755 WANTED_LANGUAGES
756 enable_nls
757 PORTNAME
758 host_os
759 host_vendor
760 host_cpu
761 host
762 build_os
763 build_vendor
764 build_cpu
765 build
766 PG_MAJORVERSION
767 configure_args
768 target_alias
769 host_alias
770 build_alias
771 LIBS
772 ECHO_T
773 ECHO_N
774 ECHO_C
775 DEFS
776 mandir
777 localedir
778 libdir
779 psdir
780 pdfdir
781 dvidir
782 htmldir
783 infodir
784 docdir
785 oldincludedir
786 includedir
787 localstatedir
788 sharedstatedir
789 sysconfdir
790 datadir
791 datarootdir
792 libexecdir
793 sbindir
794 bindir
795 program_transform_name
796 prefix
797 exec_prefix
798 PACKAGE_BUGREPORT
799 PACKAGE_STRING
800 PACKAGE_VERSION
801 PACKAGE_TARNAME
802 PACKAGE_NAME
803 PATH_SEPARATOR
804 SHELL'
805 ac_subst_files=''
806 ac_user_opts='
807 enable_option_checking
808 with_template
809 with_includes
810 with_libraries
811 with_libs
812 enable_integer_datetimes
813 enable_nls
814 with_pgport
815 enable_shared
816 enable_rpath
817 enable_spinlocks
818 enable_debug
819 enable_profiling
820 enable_coverage
821 enable_dtrace
822 with_blocksize
823 with_segsize
824 with_wal_blocksize
825 with_wal_segsize
826 with_CC
827 enable_depend
828 enable_cassert
829 enable_thread_safety
830 with_tcl
831 with_tclconfig
832 with_perl
833 with_python
834 with_gssapi
835 with_krb5
836 with_krb_srvnam
837 with_pam
838 with_ldap
839 with_bonjour
840 with_openssl
841 with_selinux
842 with_readline
843 with_libedit_preferred
844 with_ossp_uuid
845 with_libxml
846 with_libxslt
847 with_system_tzdata
848 with_zlib
849 with_gnu_ld
850 enable_largefile
851 enable_float4_byval
852 enable_float8_byval
853 '
854       ac_precious_vars='build_alias
855 host_alias
856 target_alias
857 CC
858 CFLAGS
859 LDFLAGS
860 LIBS
861 CPPFLAGS
862 CPP
863 LDFLAGS_EX
864 LDFLAGS_SL
865 DOCBOOKSTYLE'
866
867
868 # Initialize some variables set by options.
869 ac_init_help=
870 ac_init_version=false
871 ac_unrecognized_opts=
872 ac_unrecognized_sep=
873 # The variables have the same names as the options, with
874 # dashes changed to underlines.
875 cache_file=/dev/null
876 exec_prefix=NONE
877 no_create=
878 no_recursion=
879 prefix=NONE
880 program_prefix=NONE
881 program_suffix=NONE
882 program_transform_name=s,x,x,
883 silent=
884 site=
885 srcdir=
886 verbose=
887 x_includes=NONE
888 x_libraries=NONE
889
890 # Installation directory options.
891 # These are left unexpanded so users can "make install exec_prefix=/foo"
892 # and all the variables that are supposed to be based on exec_prefix
893 # by default will actually change.
894 # Use braces instead of parens because sh, perl, etc. also accept them.
895 # (The list follows the same order as the GNU Coding Standards.)
896 bindir='${exec_prefix}/bin'
897 sbindir='${exec_prefix}/sbin'
898 libexecdir='${exec_prefix}/libexec'
899 datarootdir='${prefix}/share'
900 datadir='${datarootdir}'
901 sysconfdir='${prefix}/etc'
902 sharedstatedir='${prefix}/com'
903 localstatedir='${prefix}/var'
904 includedir='${prefix}/include'
905 oldincludedir='/usr/include'
906 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
907 infodir='${datarootdir}/info'
908 htmldir='${docdir}'
909 dvidir='${docdir}'
910 pdfdir='${docdir}'
911 psdir='${docdir}'
912 libdir='${exec_prefix}/lib'
913 localedir='${datarootdir}/locale'
914 mandir='${datarootdir}/man'
915
916 ac_prev=
917 ac_dashdash=
918 for ac_option
919 do
920   # If the previous option needs an argument, assign it.
921   if test -n "$ac_prev"; then
922     eval $ac_prev=\$ac_option
923     ac_prev=
924     continue
925   fi
926
927   case $ac_option in
928   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
929   *)    ac_optarg=yes ;;
930   esac
931
932   # Accept the important Cygnus configure options, so we can diagnose typos.
933
934   case $ac_dashdash$ac_option in
935   --)
936     ac_dashdash=yes ;;
937
938   -bindir | --bindir | --bindi | --bind | --bin | --bi)
939     ac_prev=bindir ;;
940   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
941     bindir=$ac_optarg ;;
942
943   -build | --build | --buil | --bui | --bu)
944     ac_prev=build_alias ;;
945   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
946     build_alias=$ac_optarg ;;
947
948   -cache-file | --cache-file | --cache-fil | --cache-fi \
949   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
950     ac_prev=cache_file ;;
951   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
952   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
953     cache_file=$ac_optarg ;;
954
955   --config-cache | -C)
956     cache_file=config.cache ;;
957
958   -datadir | --datadir | --datadi | --datad)
959     ac_prev=datadir ;;
960   -datadir=* | --datadir=* | --datadi=* | --datad=*)
961     datadir=$ac_optarg ;;
962
963   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
964   | --dataroo | --dataro | --datar)
965     ac_prev=datarootdir ;;
966   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
967   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
968     datarootdir=$ac_optarg ;;
969
970   -disable-* | --disable-*)
971     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
972     # Reject names that are not valid shell variable names.
973     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
974       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
975    { (exit 1); exit 1; }; }
976     ac_useropt_orig=$ac_useropt
977     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
978     case $ac_user_opts in
979       *"
980 "enable_$ac_useropt"
981 "*) ;;
982       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
983          ac_unrecognized_sep=', ';;
984     esac
985     eval enable_$ac_useropt=no ;;
986
987   -docdir | --docdir | --docdi | --doc | --do)
988     ac_prev=docdir ;;
989   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
990     docdir=$ac_optarg ;;
991
992   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
993     ac_prev=dvidir ;;
994   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
995     dvidir=$ac_optarg ;;
996
997   -enable-* | --enable-*)
998     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
999     # Reject names that are not valid shell variable names.
1000     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1001       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
1002    { (exit 1); exit 1; }; }
1003     ac_useropt_orig=$ac_useropt
1004     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1005     case $ac_user_opts in
1006       *"
1007 "enable_$ac_useropt"
1008 "*) ;;
1009       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1010          ac_unrecognized_sep=', ';;
1011     esac
1012     eval enable_$ac_useropt=\$ac_optarg ;;
1013
1014   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1015   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1016   | --exec | --exe | --ex)
1017     ac_prev=exec_prefix ;;
1018   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1019   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1020   | --exec=* | --exe=* | --ex=*)
1021     exec_prefix=$ac_optarg ;;
1022
1023   -gas | --gas | --ga | --g)
1024     # Obsolete; use --with-gas.
1025     with_gas=yes ;;
1026
1027   -help | --help | --hel | --he | -h)
1028     ac_init_help=long ;;
1029   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1030     ac_init_help=recursive ;;
1031   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1032     ac_init_help=short ;;
1033
1034   -host | --host | --hos | --ho)
1035     ac_prev=host_alias ;;
1036   -host=* | --host=* | --hos=* | --ho=*)
1037     host_alias=$ac_optarg ;;
1038
1039   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1040     ac_prev=htmldir ;;
1041   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1042   | --ht=*)
1043     htmldir=$ac_optarg ;;
1044
1045   -includedir | --includedir | --includedi | --included | --include \
1046   | --includ | --inclu | --incl | --inc)
1047     ac_prev=includedir ;;
1048   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1049   | --includ=* | --inclu=* | --incl=* | --inc=*)
1050     includedir=$ac_optarg ;;
1051
1052   -infodir | --infodir | --infodi | --infod | --info | --inf)
1053     ac_prev=infodir ;;
1054   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1055     infodir=$ac_optarg ;;
1056
1057   -libdir | --libdir | --libdi | --libd)
1058     ac_prev=libdir ;;
1059   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1060     libdir=$ac_optarg ;;
1061
1062   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1063   | --libexe | --libex | --libe)
1064     ac_prev=libexecdir ;;
1065   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1066   | --libexe=* | --libex=* | --libe=*)
1067     libexecdir=$ac_optarg ;;
1068
1069   -localedir | --localedir | --localedi | --localed | --locale)
1070     ac_prev=localedir ;;
1071   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1072     localedir=$ac_optarg ;;
1073
1074   -localstatedir | --localstatedir | --localstatedi | --localstated \
1075   | --localstate | --localstat | --localsta | --localst | --locals)
1076     ac_prev=localstatedir ;;
1077   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1078   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1079     localstatedir=$ac_optarg ;;
1080
1081   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1082     ac_prev=mandir ;;
1083   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1084     mandir=$ac_optarg ;;
1085
1086   -nfp | --nfp | --nf)
1087     # Obsolete; use --without-fp.
1088     with_fp=no ;;
1089
1090   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1091   | --no-cr | --no-c | -n)
1092     no_create=yes ;;
1093
1094   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1095   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1096     no_recursion=yes ;;
1097
1098   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1099   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1100   | --oldin | --oldi | --old | --ol | --o)
1101     ac_prev=oldincludedir ;;
1102   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1103   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1104   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1105     oldincludedir=$ac_optarg ;;
1106
1107   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1108     ac_prev=prefix ;;
1109   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1110     prefix=$ac_optarg ;;
1111
1112   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1113   | --program-pre | --program-pr | --program-p)
1114     ac_prev=program_prefix ;;
1115   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1116   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1117     program_prefix=$ac_optarg ;;
1118
1119   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1120   | --program-suf | --program-su | --program-s)
1121     ac_prev=program_suffix ;;
1122   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1123   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1124     program_suffix=$ac_optarg ;;
1125
1126   -program-transform-name | --program-transform-name \
1127   | --program-transform-nam | --program-transform-na \
1128   | --program-transform-n | --program-transform- \
1129   | --program-transform | --program-transfor \
1130   | --program-transfo | --program-transf \
1131   | --program-trans | --program-tran \
1132   | --progr-tra | --program-tr | --program-t)
1133     ac_prev=program_transform_name ;;
1134   -program-transform-name=* | --program-transform-name=* \
1135   | --program-transform-nam=* | --program-transform-na=* \
1136   | --program-transform-n=* | --program-transform-=* \
1137   | --program-transform=* | --program-transfor=* \
1138   | --program-transfo=* | --program-transf=* \
1139   | --program-trans=* | --program-tran=* \
1140   | --progr-tra=* | --program-tr=* | --program-t=*)
1141     program_transform_name=$ac_optarg ;;
1142
1143   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1144     ac_prev=pdfdir ;;
1145   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1146     pdfdir=$ac_optarg ;;
1147
1148   -psdir | --psdir | --psdi | --psd | --ps)
1149     ac_prev=psdir ;;
1150   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1151     psdir=$ac_optarg ;;
1152
1153   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1154   | -silent | --silent | --silen | --sile | --sil)
1155     silent=yes ;;
1156
1157   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1158     ac_prev=sbindir ;;
1159   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1160   | --sbi=* | --sb=*)
1161     sbindir=$ac_optarg ;;
1162
1163   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1164   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1165   | --sharedst | --shareds | --shared | --share | --shar \
1166   | --sha | --sh)
1167     ac_prev=sharedstatedir ;;
1168   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1169   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1170   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1171   | --sha=* | --sh=*)
1172     sharedstatedir=$ac_optarg ;;
1173
1174   -site | --site | --sit)
1175     ac_prev=site ;;
1176   -site=* | --site=* | --sit=*)
1177     site=$ac_optarg ;;
1178
1179   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1180     ac_prev=srcdir ;;
1181   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1182     srcdir=$ac_optarg ;;
1183
1184   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1185   | --syscon | --sysco | --sysc | --sys | --sy)
1186     ac_prev=sysconfdir ;;
1187   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1188   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1189     sysconfdir=$ac_optarg ;;
1190
1191   -target | --target | --targe | --targ | --tar | --ta | --t)
1192     ac_prev=target_alias ;;
1193   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1194     target_alias=$ac_optarg ;;
1195
1196   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1197     verbose=yes ;;
1198
1199   -version | --version | --versio | --versi | --vers | -V)
1200     ac_init_version=: ;;
1201
1202   -with-* | --with-*)
1203     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1204     # Reject names that are not valid shell variable names.
1205     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1206       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1207    { (exit 1); exit 1; }; }
1208     ac_useropt_orig=$ac_useropt
1209     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1210     case $ac_user_opts in
1211       *"
1212 "with_$ac_useropt"
1213 "*) ;;
1214       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1215          ac_unrecognized_sep=', ';;
1216     esac
1217     eval with_$ac_useropt=\$ac_optarg ;;
1218
1219   -without-* | --without-*)
1220     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1221     # Reject names that are not valid shell variable names.
1222     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1223       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1224    { (exit 1); exit 1; }; }
1225     ac_useropt_orig=$ac_useropt
1226     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1227     case $ac_user_opts in
1228       *"
1229 "with_$ac_useropt"
1230 "*) ;;
1231       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1232          ac_unrecognized_sep=', ';;
1233     esac
1234     eval with_$ac_useropt=no ;;
1235
1236   --x)
1237     # Obsolete; use --with-x.
1238     with_x=yes ;;
1239
1240   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1241   | --x-incl | --x-inc | --x-in | --x-i)
1242     ac_prev=x_includes ;;
1243   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1244   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1245     x_includes=$ac_optarg ;;
1246
1247   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1248   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1249     ac_prev=x_libraries ;;
1250   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1251   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1252     x_libraries=$ac_optarg ;;
1253
1254   -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1255 Try \`$0 --help' for more information." >&2
1256    { (exit 1); exit 1; }; }
1257     ;;
1258
1259   *=*)
1260     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1261     # Reject names that are not valid shell variable names.
1262     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1263       { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1264    { (exit 1); exit 1; }; }
1265     eval $ac_envvar=\$ac_optarg
1266     export $ac_envvar ;;
1267
1268   *)
1269     # FIXME: should be removed in autoconf 3.0.
1270     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1271     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1272       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1273     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1274     ;;
1275
1276   esac
1277 done
1278
1279 if test -n "$ac_prev"; then
1280   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1281   { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1282    { (exit 1); exit 1; }; }
1283 fi
1284
1285 if test -n "$ac_unrecognized_opts"; then
1286   case $enable_option_checking in
1287     no) ;;
1288     fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1289    { (exit 1); exit 1; }; } ;;
1290     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1291   esac
1292 fi
1293
1294 # Check all directory arguments for consistency.
1295 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1296                 datadir sysconfdir sharedstatedir localstatedir includedir \
1297                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1298                 libdir localedir mandir
1299 do
1300   eval ac_val=\$$ac_var
1301   # Remove trailing slashes.
1302   case $ac_val in
1303     */ )
1304       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1305       eval $ac_var=\$ac_val;;
1306   esac
1307   # Be sure to have absolute directory names.
1308   case $ac_val in
1309     [\\/$]* | ?:[\\/]* )  continue;;
1310     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1311   esac
1312   { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1313    { (exit 1); exit 1; }; }
1314 done
1315
1316 # There might be people who depend on the old broken behavior: `$host'
1317 # used to hold the argument of --host etc.
1318 # FIXME: To remove some day.
1319 build=$build_alias
1320 host=$host_alias
1321 target=$target_alias
1322
1323 # FIXME: To remove some day.
1324 if test "x$host_alias" != x; then
1325   if test "x$build_alias" = x; then
1326     cross_compiling=maybe
1327     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1328     If a cross compiler is detected then cross compile mode will be used." >&2
1329   elif test "x$build_alias" != "x$host_alias"; then
1330     cross_compiling=yes
1331   fi
1332 fi
1333
1334 ac_tool_prefix=
1335 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1336
1337 test "$silent" = yes && exec 6>/dev/null
1338
1339
1340 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1341 ac_ls_di=`ls -di .` &&
1342 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1343   { $as_echo "$as_me: error: working directory cannot be determined" >&2
1344    { (exit 1); exit 1; }; }
1345 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1346   { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1347    { (exit 1); exit 1; }; }
1348
1349
1350 # Find the source files, if location was not specified.
1351 if test -z "$srcdir"; then
1352   ac_srcdir_defaulted=yes
1353   # Try the directory containing this script, then the parent directory.
1354   ac_confdir=`$as_dirname -- "$as_myself" ||
1355 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1356          X"$as_myself" : 'X\(//\)[^/]' \| \
1357          X"$as_myself" : 'X\(//\)$' \| \
1358          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1359 $as_echo X"$as_myself" |
1360     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1361             s//\1/
1362             q
1363           }
1364           /^X\(\/\/\)[^/].*/{
1365             s//\1/
1366             q
1367           }
1368           /^X\(\/\/\)$/{
1369             s//\1/
1370             q
1371           }
1372           /^X\(\/\).*/{
1373             s//\1/
1374             q
1375           }
1376           s/.*/./; q'`
1377   srcdir=$ac_confdir
1378   if test ! -r "$srcdir/$ac_unique_file"; then
1379     srcdir=..
1380   fi
1381 else
1382   ac_srcdir_defaulted=no
1383 fi
1384 if test ! -r "$srcdir/$ac_unique_file"; then
1385   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1386   { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1387    { (exit 1); exit 1; }; }
1388 fi
1389 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1390 ac_abs_confdir=`(
1391         cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1392    { (exit 1); exit 1; }; }
1393         pwd)`
1394 # When building in place, set srcdir=.
1395 if test "$ac_abs_confdir" = "$ac_pwd"; then
1396   srcdir=.
1397 fi
1398 # Remove unnecessary trailing slashes from srcdir.
1399 # Double slashes in file names in object file debugging info
1400 # mess up M-x gdb in Emacs.
1401 case $srcdir in
1402 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1403 esac
1404 for ac_var in $ac_precious_vars; do
1405   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1406   eval ac_env_${ac_var}_value=\$${ac_var}
1407   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1408   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1409 done
1410
1411 #
1412 # Report the --help message.
1413 #
1414 if test "$ac_init_help" = "long"; then
1415   # Omit some internal or obsolete options to make the list less imposing.
1416   # This message is too long to be a string in the A/UX 3.1 sh.
1417   cat <<_ACEOF
1418 \`configure' configures PostgreSQL 9.1beta1 to adapt to many kinds of systems.
1419
1420 Usage: $0 [OPTION]... [VAR=VALUE]...
1421
1422 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1423 VAR=VALUE.  See below for descriptions of some of the useful variables.
1424
1425 Defaults for the options are specified in brackets.
1426
1427 Configuration:
1428   -h, --help              display this help and exit
1429       --help=short        display options specific to this package
1430       --help=recursive    display the short help of all the included packages
1431   -V, --version           display version information and exit
1432   -q, --quiet, --silent   do not print \`checking...' messages
1433       --cache-file=FILE   cache test results in FILE [disabled]
1434   -C, --config-cache      alias for \`--cache-file=config.cache'
1435   -n, --no-create         do not create output files
1436       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1437
1438 Installation directories:
1439   --prefix=PREFIX         install architecture-independent files in PREFIX
1440                           [$ac_default_prefix]
1441   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1442                           [PREFIX]
1443
1444 By default, \`make install' will install all the files in
1445 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1446 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1447 for instance \`--prefix=\$HOME'.
1448
1449 For better control, use the options below.
1450
1451 Fine tuning of the installation directories:
1452   --bindir=DIR            user executables [EPREFIX/bin]
1453   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1454   --libexecdir=DIR        program executables [EPREFIX/libexec]
1455   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1456   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1457   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1458   --libdir=DIR            object code libraries [EPREFIX/lib]
1459   --includedir=DIR        C header files [PREFIX/include]
1460   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1461   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1462   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1463   --infodir=DIR           info documentation [DATAROOTDIR/info]
1464   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1465   --mandir=DIR            man documentation [DATAROOTDIR/man]
1466   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1467   --htmldir=DIR           html documentation [DOCDIR]
1468   --dvidir=DIR            dvi documentation [DOCDIR]
1469   --pdfdir=DIR            pdf documentation [DOCDIR]
1470   --psdir=DIR             ps documentation [DOCDIR]
1471 _ACEOF
1472
1473   cat <<\_ACEOF
1474
1475 System types:
1476   --build=BUILD     configure for building on BUILD [guessed]
1477   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1478 _ACEOF
1479 fi
1480
1481 if test -n "$ac_init_help"; then
1482   case $ac_init_help in
1483      short | recursive ) echo "Configuration of PostgreSQL 9.1beta1:";;
1484    esac
1485   cat <<\_ACEOF
1486
1487 Optional Features:
1488   --disable-option-checking  ignore unrecognized --enable/--with options
1489   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1490   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1491   --disable-integer-datetimes
1492                           disable 64-bit integer date/time support
1493   --enable-nls[=LANGUAGES]
1494                           enable Native Language Support
1495   --disable-shared        do not build shared libraries
1496   --disable-rpath         do not embed shared library search path in
1497                           executables
1498   --disable-spinlocks     do not use spinlocks
1499   --enable-debug          build with debugging symbols (-g)
1500   --enable-profiling      build with profiling enabled
1501   --enable-coverage       build with coverage testing instrumentation
1502   --enable-dtrace         build with DTrace support
1503   --enable-depend         turn on automatic dependency tracking
1504   --enable-cassert        enable assertion checks (for debugging)
1505   --disable-thread-safety disable thread-safety in client libraries
1506   --disable-largefile     omit support for large files
1507   --disable-float4-byval  disable float4 passed by value
1508   --disable-float8-byval  disable float8 passed by value
1509
1510 Optional Packages:
1511   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1512   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1513   --with-template=NAME    override operating system template
1514   --with-includes=DIRS    look for additional header files in DIRS
1515   --with-libraries=DIRS   look for additional libraries in DIRS
1516   --with-libs=DIRS        alternative spelling of --with-libraries
1517   --with-pgport=PORTNUM   set default port number [5432]
1518   --with-blocksize=BLOCKSIZE
1519                           set table block size in kB [8]
1520   --with-segsize=SEGSIZE  set table segment size in GB [1]
1521   --with-wal-blocksize=BLOCKSIZE
1522                           set WAL block size in kB [8]
1523   --with-wal-segsize=SEGSIZE
1524                           set WAL segment size in MB [16]
1525   --with-CC=CMD           set compiler (deprecated)
1526   --with-tcl              build Tcl modules (PL/Tcl)
1527   --with-tclconfig=DIR    tclConfig.sh is in DIR
1528   --with-perl             build Perl modules (PL/Perl)
1529   --with-python           build Python modules (PL/Python)
1530   --with-gssapi           build with GSSAPI support
1531   --with-krb5             build with Kerberos 5 support
1532   --with-krb-srvnam=NAME  default service principal name in Kerberos
1533                           [postgres]
1534   --with-pam              build with PAM support
1535   --with-ldap             build with LDAP support
1536   --with-bonjour          build with Bonjour support
1537   --with-openssl          build with OpenSSL support
1538   --with-selinux          build with SELinux support
1539   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1540   --with-libedit-preferred
1541                           prefer BSD Libedit over GNU Readline
1542   --with-ossp-uuid        use OSSP UUID library when building
1543                           contrib/uuid-ossp
1544   --with-libxml           build with XML support
1545   --with-libxslt          use XSLT support when building contrib/xml2
1546   --with-system-tzdata=DIR
1547                           use system time zone data in DIR
1548   --without-zlib          do not use Zlib
1549   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1550
1551 Some influential environment variables:
1552   CC          C compiler command
1553   CFLAGS      C compiler flags
1554   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1555               nonstandard directory <lib dir>
1556   LIBS        libraries to pass to the linker, e.g. -l<library>
1557   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1558               you have headers in a nonstandard directory <include dir>
1559   CPP         C preprocessor
1560   LDFLAGS_EX  extra linker flags for linking executables only
1561   LDFLAGS_SL  extra linker flags for linking shared libraries only
1562   DOCBOOKSTYLE
1563               location of DocBook stylesheets
1564
1565 Use these variables to override the choices made by `configure' or to help
1566 it to find libraries and programs with nonstandard names/locations.
1567
1568 Report bugs to <pgsql-bugs@postgresql.org>.
1569 _ACEOF
1570 ac_status=$?
1571 fi
1572
1573 if test "$ac_init_help" = "recursive"; then
1574   # If there are subdirs, report their specific --help.
1575   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1576     test -d "$ac_dir" ||
1577       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1578       continue
1579     ac_builddir=.
1580
1581 case "$ac_dir" in
1582 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1583 *)
1584   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1585   # A ".." for each directory in $ac_dir_suffix.
1586   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1587   case $ac_top_builddir_sub in
1588   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1589   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1590   esac ;;
1591 esac
1592 ac_abs_top_builddir=$ac_pwd
1593 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1594 # for backward compatibility:
1595 ac_top_builddir=$ac_top_build_prefix
1596
1597 case $srcdir in
1598   .)  # We are building in place.
1599     ac_srcdir=.
1600     ac_top_srcdir=$ac_top_builddir_sub
1601     ac_abs_top_srcdir=$ac_pwd ;;
1602   [\\/]* | ?:[\\/]* )  # Absolute name.
1603     ac_srcdir=$srcdir$ac_dir_suffix;
1604     ac_top_srcdir=$srcdir
1605     ac_abs_top_srcdir=$srcdir ;;
1606   *) # Relative name.
1607     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1608     ac_top_srcdir=$ac_top_build_prefix$srcdir
1609     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1610 esac
1611 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1612
1613     cd "$ac_dir" || { ac_status=$?; continue; }
1614     # Check for guested configure.
1615     if test -f "$ac_srcdir/configure.gnu"; then
1616       echo &&
1617       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1618     elif test -f "$ac_srcdir/configure"; then
1619       echo &&
1620       $SHELL "$ac_srcdir/configure" --help=recursive
1621     else
1622       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1623     fi || ac_status=$?
1624     cd "$ac_pwd" || { ac_status=$?; break; }
1625   done
1626 fi
1627
1628 test -n "$ac_init_help" && exit $ac_status
1629 if $ac_init_version; then
1630   cat <<\_ACEOF
1631 PostgreSQL configure 9.1beta1
1632 generated by GNU Autoconf 2.63
1633
1634 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1635 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1636 This configure script is free software; the Free Software Foundation
1637 gives unlimited permission to copy, distribute and modify it.
1638
1639 Copyright (c) 1996-2011, PostgreSQL Global Development Group
1640 _ACEOF
1641   exit
1642 fi
1643 cat >config.log <<_ACEOF
1644 This file contains any messages produced by compilers while
1645 running configure, to aid debugging if configure makes a mistake.
1646
1647 It was created by PostgreSQL $as_me 9.1beta1, which was
1648 generated by GNU Autoconf 2.63.  Invocation command line was
1649
1650   $ $0 $@
1651
1652 _ACEOF
1653 exec 5>>config.log
1654 {
1655 cat <<_ASUNAME
1656 ## --------- ##
1657 ## Platform. ##
1658 ## --------- ##
1659
1660 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1661 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1662 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1663 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1664 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1665
1666 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1667 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1668
1669 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1670 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1671 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1672 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1673 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1674 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1675 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1676
1677 _ASUNAME
1678
1679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1680 for as_dir in $PATH
1681 do
1682   IFS=$as_save_IFS
1683   test -z "$as_dir" && as_dir=.
1684   $as_echo "PATH: $as_dir"
1685 done
1686 IFS=$as_save_IFS
1687
1688 } >&5
1689
1690 cat >&5 <<_ACEOF
1691
1692
1693 ## ----------- ##
1694 ## Core tests. ##
1695 ## ----------- ##
1696
1697 _ACEOF
1698
1699
1700 # Keep a trace of the command line.
1701 # Strip out --no-create and --no-recursion so they do not pile up.
1702 # Strip out --silent because we don't want to record it for future runs.
1703 # Also quote any args containing shell meta-characters.
1704 # Make two passes to allow for proper duplicate-argument suppression.
1705 ac_configure_args=
1706 ac_configure_args0=
1707 ac_configure_args1=
1708 ac_must_keep_next=false
1709 for ac_pass in 1 2
1710 do
1711   for ac_arg
1712   do
1713     case $ac_arg in
1714     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1715     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1716     | -silent | --silent | --silen | --sile | --sil)
1717       continue ;;
1718     *\'*)
1719       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1720     esac
1721     case $ac_pass in
1722     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1723     2)
1724       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1725       if test $ac_must_keep_next = true; then
1726         ac_must_keep_next=false # Got value, back to normal.
1727       else
1728         case $ac_arg in
1729           *=* | --config-cache | -C | -disable-* | --disable-* \
1730           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1731           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1732           | -with-* | --with-* | -without-* | --without-* | --x)
1733             case "$ac_configure_args0 " in
1734               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1735             esac
1736             ;;
1737           -* ) ac_must_keep_next=true ;;
1738         esac
1739       fi
1740       ac_configure_args="$ac_configure_args '$ac_arg'"
1741       ;;
1742     esac
1743   done
1744 done
1745 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1746 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1747
1748 # When interrupted or exit'd, cleanup temporary files, and complete
1749 # config.log.  We remove comments because anyway the quotes in there
1750 # would cause problems or look ugly.
1751 # WARNING: Use '\'' to represent an apostrophe within the trap.
1752 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1753 trap 'exit_status=$?
1754   # Save into config.log some information that might help in debugging.
1755   {
1756     echo
1757
1758     cat <<\_ASBOX
1759 ## ---------------- ##
1760 ## Cache variables. ##
1761 ## ---------------- ##
1762 _ASBOX
1763     echo
1764     # The following way of writing the cache mishandles newlines in values,
1765 (
1766   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1767     eval ac_val=\$$ac_var
1768     case $ac_val in #(
1769     *${as_nl}*)
1770       case $ac_var in #(
1771       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1772 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1773       esac
1774       case $ac_var in #(
1775       _ | IFS | as_nl) ;; #(
1776       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1777       *) $as_unset $ac_var ;;
1778       esac ;;
1779     esac
1780   done
1781   (set) 2>&1 |
1782     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1783     *${as_nl}ac_space=\ *)
1784       sed -n \
1785         "s/'\''/'\''\\\\'\'''\''/g;
1786           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1787       ;; #(
1788     *)
1789       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1790       ;;
1791     esac |
1792     sort
1793 )
1794     echo
1795
1796     cat <<\_ASBOX
1797 ## ----------------- ##
1798 ## Output variables. ##
1799 ## ----------------- ##
1800 _ASBOX
1801     echo
1802     for ac_var in $ac_subst_vars
1803     do
1804       eval ac_val=\$$ac_var
1805       case $ac_val in
1806       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1807       esac
1808       $as_echo "$ac_var='\''$ac_val'\''"
1809     done | sort
1810     echo
1811
1812     if test -n "$ac_subst_files"; then
1813       cat <<\_ASBOX
1814 ## ------------------- ##
1815 ## File substitutions. ##
1816 ## ------------------- ##
1817 _ASBOX
1818       echo
1819       for ac_var in $ac_subst_files
1820       do
1821         eval ac_val=\$$ac_var
1822         case $ac_val in
1823         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1824         esac
1825         $as_echo "$ac_var='\''$ac_val'\''"
1826       done | sort
1827       echo
1828     fi
1829
1830     if test -s confdefs.h; then
1831       cat <<\_ASBOX
1832 ## ----------- ##
1833 ## confdefs.h. ##
1834 ## ----------- ##
1835 _ASBOX
1836       echo
1837       cat confdefs.h
1838       echo
1839     fi
1840     test "$ac_signal" != 0 &&
1841       $as_echo "$as_me: caught signal $ac_signal"
1842     $as_echo "$as_me: exit $exit_status"
1843   } >&5
1844   rm -f core *.core core.conftest.* &&
1845     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1846     exit $exit_status
1847 ' 0
1848 for ac_signal in 1 2 13 15; do
1849   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1850 done
1851 ac_signal=0
1852
1853 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1854 rm -f -r conftest* confdefs.h
1855
1856 # Predefined preprocessor variables.
1857
1858 cat >>confdefs.h <<_ACEOF
1859 #define PACKAGE_NAME "$PACKAGE_NAME"
1860 _ACEOF
1861
1862
1863 cat >>confdefs.h <<_ACEOF
1864 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1865 _ACEOF
1866
1867
1868 cat >>confdefs.h <<_ACEOF
1869 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1870 _ACEOF
1871
1872
1873 cat >>confdefs.h <<_ACEOF
1874 #define PACKAGE_STRING "$PACKAGE_STRING"
1875 _ACEOF
1876
1877
1878 cat >>confdefs.h <<_ACEOF
1879 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1880 _ACEOF
1881
1882
1883 # Let the site file select an alternate cache file if it wants to.
1884 # Prefer an explicitly selected file to automatically selected ones.
1885 ac_site_file1=NONE
1886 ac_site_file2=NONE
1887 if test -n "$CONFIG_SITE"; then
1888   ac_site_file1=$CONFIG_SITE
1889 elif test "x$prefix" != xNONE; then
1890   ac_site_file1=$prefix/share/config.site
1891   ac_site_file2=$prefix/etc/config.site
1892 else
1893   ac_site_file1=$ac_default_prefix/share/config.site
1894   ac_site_file2=$ac_default_prefix/etc/config.site
1895 fi
1896 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1897 do
1898   test "x$ac_site_file" = xNONE && continue
1899   if test -r "$ac_site_file"; then
1900     { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1901 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1902     sed 's/^/| /' "$ac_site_file" >&5
1903     . "$ac_site_file"
1904   fi
1905 done
1906
1907 if test -r "$cache_file"; then
1908   # Some versions of bash will fail to source /dev/null (special
1909   # files actually), so we avoid doing that.
1910   if test -f "$cache_file"; then
1911     { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1912 $as_echo "$as_me: loading cache $cache_file" >&6;}
1913     case $cache_file in
1914       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1915       *)                      . "./$cache_file";;
1916     esac
1917   fi
1918 else
1919   { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1920 $as_echo "$as_me: creating cache $cache_file" >&6;}
1921   >$cache_file
1922 fi
1923
1924 # Check that the precious variables saved in the cache have kept the same
1925 # value.
1926 ac_cache_corrupted=false
1927 for ac_var in $ac_precious_vars; do
1928   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1929   eval ac_new_set=\$ac_env_${ac_var}_set
1930   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1931   eval ac_new_val=\$ac_env_${ac_var}_value
1932   case $ac_old_set,$ac_new_set in
1933     set,)
1934       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1935 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1936       ac_cache_corrupted=: ;;
1937     ,set)
1938       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1939 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1940       ac_cache_corrupted=: ;;
1941     ,);;
1942     *)
1943       if test "x$ac_old_val" != "x$ac_new_val"; then
1944         # differences in whitespace do not lead to failure.
1945         ac_old_val_w=`echo x $ac_old_val`
1946         ac_new_val_w=`echo x $ac_new_val`
1947         if test "$ac_old_val_w" != "$ac_new_val_w"; then
1948           { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1949 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1950           ac_cache_corrupted=:
1951         else
1952           { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1953 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1954           eval $ac_var=\$ac_old_val
1955         fi
1956         { $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
1957 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1958         { $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
1959 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1960       fi;;
1961   esac
1962   # Pass precious variables to config.status.
1963   if test "$ac_new_set" = set; then
1964     case $ac_new_val in
1965     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1966     *) ac_arg=$ac_var=$ac_new_val ;;
1967     esac
1968     case " $ac_configure_args " in
1969       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1970       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1971     esac
1972   fi
1973 done
1974 if $ac_cache_corrupted; then
1975   { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1976 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1977   { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1978 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1979   { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1980 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1981    { (exit 1); exit 1; }; }
1982 fi
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008 ac_ext=c
2009 ac_cpp='$CPP $CPPFLAGS'
2010 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2011 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2012 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2013
2014
2015
2016
2017
2018
2019 ac_aux_dir=
2020 for ac_dir in config "$srcdir"/config; do
2021   if 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/install.sh"; then
2026     ac_aux_dir=$ac_dir
2027     ac_install_sh="$ac_aux_dir/install.sh -c"
2028     break
2029   elif test -f "$ac_dir/shtool"; then
2030     ac_aux_dir=$ac_dir
2031     ac_install_sh="$ac_aux_dir/shtool install -c"
2032     break
2033   fi
2034 done
2035 if test -z "$ac_aux_dir"; then
2036   { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
2037 $as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
2038    { (exit 1); exit 1; }; }
2039 fi
2040
2041 # These three variables are undocumented and unsupported,
2042 # and are intended to be withdrawn in a future Autoconf release.
2043 # They can cause serious problems if a builder's source tree is in a directory
2044 # whose full name contains unusual characters.
2045 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2046 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2047 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2048
2049
2050
2051 configure_args=$ac_configure_args
2052
2053
2054
2055 cat >>confdefs.h <<_ACEOF
2056 #define PG_VERSION "$PACKAGE_VERSION"
2057 _ACEOF
2058
2059 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2060
2061
2062 cat >>confdefs.h <<_ACEOF
2063 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2064 _ACEOF
2065
2066
2067 # Make sure we can run config.sub.
2068 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2069   { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2070 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2071    { (exit 1); exit 1; }; }
2072
2073 { $as_echo "$as_me:$LINENO: checking build system type" >&5
2074 $as_echo_n "checking build system type... " >&6; }
2075 if test "${ac_cv_build+set}" = set; then
2076   $as_echo_n "(cached) " >&6
2077 else
2078   ac_build_alias=$build_alias
2079 test "x$ac_build_alias" = x &&
2080   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2081 test "x$ac_build_alias" = x &&
2082   { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2083 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2084    { (exit 1); exit 1; }; }
2085 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2086   { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2087 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2088    { (exit 1); exit 1; }; }
2089
2090 fi
2091 { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2092 $as_echo "$ac_cv_build" >&6; }
2093 case $ac_cv_build in
2094 *-*-*) ;;
2095 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2096 $as_echo "$as_me: error: invalid value of canonical build" >&2;}
2097    { (exit 1); exit 1; }; };;
2098 esac
2099 build=$ac_cv_build
2100 ac_save_IFS=$IFS; IFS='-'
2101 set x $ac_cv_build
2102 shift
2103 build_cpu=$1
2104 build_vendor=$2
2105 shift; shift
2106 # Remember, the first character of IFS is used to create $*,
2107 # except with old shells:
2108 build_os=$*
2109 IFS=$ac_save_IFS
2110 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2111
2112
2113 { $as_echo "$as_me:$LINENO: checking host system type" >&5
2114 $as_echo_n "checking host system type... " >&6; }
2115 if test "${ac_cv_host+set}" = set; then
2116   $as_echo_n "(cached) " >&6
2117 else
2118   if test "x$host_alias" = x; then
2119   ac_cv_host=$ac_cv_build
2120 else
2121   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2122     { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2123 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2124    { (exit 1); exit 1; }; }
2125 fi
2126
2127 fi
2128 { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2129 $as_echo "$ac_cv_host" >&6; }
2130 case $ac_cv_host in
2131 *-*-*) ;;
2132 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2133 $as_echo "$as_me: error: invalid value of canonical host" >&2;}
2134    { (exit 1); exit 1; }; };;
2135 esac
2136 host=$ac_cv_host
2137 ac_save_IFS=$IFS; IFS='-'
2138 set x $ac_cv_host
2139 shift
2140 host_cpu=$1
2141 host_vendor=$2
2142 shift; shift
2143 # Remember, the first character of IFS is used to create $*,
2144 # except with old shells:
2145 host_os=$*
2146 IFS=$ac_save_IFS
2147 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2148
2149
2150
2151 template=
2152 { $as_echo "$as_me:$LINENO: checking which template to use" >&5
2153 $as_echo_n "checking which template to use... " >&6; }
2154
2155
2156
2157
2158 # Check whether --with-template was given.
2159 if test "${with_template+set}" = set; then
2160   withval=$with_template;
2161   case $withval in
2162     yes)
2163       { { $as_echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
2164 $as_echo "$as_me: error: argument required for --with-template option" >&2;}
2165    { (exit 1); exit 1; }; }
2166       ;;
2167     no)
2168       { { $as_echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
2169 $as_echo "$as_me: error: argument required for --with-template option" >&2;}
2170    { (exit 1); exit 1; }; }
2171       ;;
2172     *)
2173
2174   case $withval in
2175     list)   echo; ls "$srcdir/src/template"; exit;;
2176     *)      if test -f "$srcdir/src/template/$with_template" ; then
2177               template=$withval
2178             else
2179               { { $as_echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
2180 $as_echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
2181    { (exit 1); exit 1; }; }
2182             fi;;
2183   esac
2184
2185       ;;
2186   esac
2187
2188 else
2189
2190 # --with-template not given
2191
2192 case $host_os in
2193      aix*) template=aix ;;
2194     bsdi*) template=bsdi ;;
2195   cygwin*) template=cygwin ;;
2196   darwin*) template=darwin ;;
2197 dragonfly*) template=netbsd ;;
2198     dgux*) template=dgux ;;
2199  freebsd*) template=freebsd ;;
2200     hpux*) template=hpux ;;
2201     irix*) template=irix ;;
2202  linux*|gnu*|k*bsd*-gnu)
2203            template=linux ;;
2204    mingw*) template=win32 ;;
2205   netbsd*) template=netbsd ;;
2206 nextstep*) template=nextstep ;;
2207  openbsd*) template=openbsd ;;
2208      osf*) template=osf ;;
2209      sco*) template=sco ;;
2210  solaris*) template=solaris ;;
2211    sunos*) template=sunos4 ;;
2212  sysv4.2*)
2213         case $host_vendor in
2214           univel) template=univel ;;
2215         esac ;;
2216    sysv4*) template=svr4 ;;
2217    sysv5*) template=unixware ;;
2218   ultrix*) template=ultrix4 ;;
2219 esac
2220
2221   if test x"$template" = x"" ; then
2222     { { $as_echo "$as_me:$LINENO: error:
2223 *******************************************************************
2224 PostgreSQL has apparently not been ported to your platform yet.
2225 To try a manual configuration, look into the src/template directory
2226 for a similar platform and use the '--with-template=' option.
2227
2228 Please also contact <pgsql-bugs@postgresql.org> to see about
2229 rectifying this.  Include the above 'checking host system type...'
2230 line.
2231 *******************************************************************
2232 " >&5
2233 $as_echo "$as_me: error:
2234 *******************************************************************
2235 PostgreSQL has apparently not been ported to your platform yet.
2236 To try a manual configuration, look into the src/template directory
2237 for a similar platform and use the '--with-template=' option.
2238
2239 Please also contact <pgsql-bugs@postgresql.org> to see about
2240 rectifying this.  Include the above 'checking host system type...'
2241 line.
2242 *******************************************************************
2243 " >&2;}
2244    { (exit 1); exit 1; }; }
2245   fi
2246
2247
2248 fi
2249
2250
2251
2252 { $as_echo "$as_me:$LINENO: result: $template" >&5
2253 $as_echo "$template" >&6; }
2254
2255 PORTNAME=$template
2256
2257
2258 # Initialize default assumption that we do not need separate assembly code
2259 # for TAS (test-and-set).  This can be overridden by the template file
2260 # when it's executed.
2261 need_tas=no
2262 tas_file=dummy.s
2263
2264
2265
2266 ##
2267 ## Command line options
2268 ##
2269
2270 #
2271 # Add non-standard directories to the include path
2272 #
2273
2274
2275
2276 # Check whether --with-includes was given.
2277 if test "${with_includes+set}" = set; then
2278   withval=$with_includes;
2279   case $withval in
2280     yes)
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     no)
2286       { { $as_echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2287 $as_echo "$as_me: error: argument required for --with-includes option" >&2;}
2288    { (exit 1); exit 1; }; }
2289       ;;
2290     *)
2291
2292       ;;
2293   esac
2294
2295 fi
2296
2297
2298
2299
2300 #
2301 # Add non-standard directories to the library search path
2302 #
2303
2304
2305
2306 # Check whether --with-libraries was given.
2307 if test "${with_libraries+set}" = set; then
2308   withval=$with_libraries;
2309   case $withval in
2310     yes)
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     no)
2316       { { $as_echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2317 $as_echo "$as_me: error: argument required for --with-libraries option" >&2;}
2318    { (exit 1); exit 1; }; }
2319       ;;
2320     *)
2321       LIBRARY_DIRS=$withval
2322       ;;
2323   esac
2324
2325 fi
2326
2327
2328
2329
2330
2331
2332 # Check whether --with-libs was given.
2333 if test "${with_libs+set}" = set; then
2334   withval=$with_libs;
2335   case $withval in
2336     yes)
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     no)
2342       { { $as_echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2343 $as_echo "$as_me: error: argument required for --with-libs option" >&2;}
2344    { (exit 1); exit 1; }; }
2345       ;;
2346     *)
2347       LIBRARY_DIRS=$withval
2348       ;;
2349   esac
2350
2351 fi
2352
2353
2354
2355
2356 #
2357 # 64-bit integer date/time storage: enabled by default.
2358 #
2359 { $as_echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
2360 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2361
2362
2363 # Check whether --enable-integer-datetimes was given.
2364 if test "${enable_integer_datetimes+set}" = set; then
2365   enableval=$enable_integer_datetimes;
2366   case $enableval in
2367     yes)
2368
2369 cat >>confdefs.h <<\_ACEOF
2370 #define USE_INTEGER_DATETIMES 1
2371 _ACEOF
2372
2373       ;;
2374     no)
2375       :
2376       ;;
2377     *)
2378       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
2379 $as_echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
2380    { (exit 1); exit 1; }; }
2381       ;;
2382   esac
2383
2384 else
2385   enable_integer_datetimes=yes
2386
2387 cat >>confdefs.h <<\_ACEOF
2388 #define USE_INTEGER_DATETIMES 1
2389 _ACEOF
2390
2391 fi
2392
2393
2394 { $as_echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
2395 $as_echo "$enable_integer_datetimes" >&6; }
2396
2397
2398 #
2399 # NLS
2400 #
2401 { $as_echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
2402 $as_echo_n "checking whether NLS is wanted... " >&6; }
2403
2404
2405 # Check whether --enable-nls was given.
2406 if test "${enable_nls+set}" = set; then
2407   enableval=$enable_nls;
2408   case $enableval in
2409     yes)
2410       :
2411       ;;
2412     no)
2413       :
2414       ;;
2415     *)
2416       enable_nls=yes
2417 WANTED_LANGUAGES=$enableval
2418       ;;
2419   esac
2420
2421 else
2422   enable_nls=no
2423 fi
2424
2425
2426
2427 if test "$enable_nls" = yes; then
2428
2429 cat >>confdefs.h <<\_ACEOF
2430 #define ENABLE_NLS 1
2431 _ACEOF
2432
2433 fi
2434
2435 { $as_echo "$as_me:$LINENO: result: $enable_nls" >&5
2436 $as_echo "$enable_nls" >&6; }
2437
2438
2439
2440 #
2441 # Default port number (--with-pgport), default 5432
2442 #
2443 { $as_echo "$as_me:$LINENO: checking for default port number" >&5
2444 $as_echo_n "checking for default port number... " >&6; }
2445
2446
2447
2448 # Check whether --with-pgport was given.
2449 if test "${with_pgport+set}" = set; then
2450   withval=$with_pgport;
2451   case $withval in
2452     yes)
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     no)
2458       { { $as_echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2459 $as_echo "$as_me: error: argument required for --with-pgport option" >&2;}
2460    { (exit 1); exit 1; }; }
2461       ;;
2462     *)
2463       default_port=$withval
2464       ;;
2465   esac
2466
2467 else
2468   default_port=5432
2469 fi
2470
2471
2472 { $as_echo "$as_me:$LINENO: result: $default_port" >&5
2473 $as_echo "$default_port" >&6; }
2474 # Need both of these because some places want an integer and some a string
2475
2476 cat >>confdefs.h <<_ACEOF
2477 #define DEF_PGPORT ${default_port}
2478 _ACEOF
2479
2480
2481 cat >>confdefs.h <<_ACEOF
2482 #define DEF_PGPORT_STR "${default_port}"
2483 _ACEOF
2484
2485
2486
2487 #
2488 # Option to disable shared libraries
2489 #
2490
2491
2492 # Check whether --enable-shared was given.
2493 if test "${enable_shared+set}" = set; then
2494   enableval=$enable_shared;
2495   case $enableval in
2496     yes)
2497       :
2498       ;;
2499     no)
2500       :
2501       ;;
2502     *)
2503       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
2504 $as_echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
2505    { (exit 1); exit 1; }; }
2506       ;;
2507   esac
2508
2509 else
2510   enable_shared=yes
2511
2512 fi
2513
2514
2515
2516
2517 #
2518 # '-rpath'-like feature can be disabled
2519 #
2520
2521
2522 # Check whether --enable-rpath was given.
2523 if test "${enable_rpath+set}" = set; then
2524   enableval=$enable_rpath;
2525   case $enableval in
2526     yes)
2527       :
2528       ;;
2529     no)
2530       :
2531       ;;
2532     *)
2533       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
2534 $as_echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
2535    { (exit 1); exit 1; }; }
2536       ;;
2537   esac
2538
2539 else
2540   enable_rpath=yes
2541
2542 fi
2543
2544
2545
2546
2547 #
2548 # Spinlocks
2549 #
2550
2551
2552 # Check whether --enable-spinlocks was given.
2553 if test "${enable_spinlocks+set}" = set; then
2554   enableval=$enable_spinlocks;
2555   case $enableval in
2556     yes)
2557       :
2558       ;;
2559     no)
2560       :
2561       ;;
2562     *)
2563       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
2564 $as_echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
2565    { (exit 1); exit 1; }; }
2566       ;;
2567   esac
2568
2569 else
2570   enable_spinlocks=yes
2571
2572 fi
2573
2574
2575
2576 #
2577 # --enable-debug adds -g to compiler flags
2578 #
2579
2580
2581 # Check whether --enable-debug was given.
2582 if test "${enable_debug+set}" = set; then
2583   enableval=$enable_debug;
2584   case $enableval in
2585     yes)
2586       :
2587       ;;
2588     no)
2589       :
2590       ;;
2591     *)
2592       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
2593 $as_echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
2594    { (exit 1); exit 1; }; }
2595       ;;
2596   esac
2597
2598 else
2599   enable_debug=no
2600
2601 fi
2602
2603
2604
2605
2606 #
2607 # --enable-profiling enables gcc profiling
2608 #
2609
2610
2611 # Check whether --enable-profiling was given.
2612 if test "${enable_profiling+set}" = set; then
2613   enableval=$enable_profiling;
2614   case $enableval in
2615     yes)
2616       :
2617       ;;
2618     no)
2619       :
2620       ;;
2621     *)
2622       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-profiling option" >&5
2623 $as_echo "$as_me: error: no argument expected for --enable-profiling option" >&2;}
2624    { (exit 1); exit 1; }; }
2625       ;;
2626   esac
2627
2628 else
2629   enable_profiling=no
2630
2631 fi
2632
2633
2634
2635
2636 #
2637 # --enable-coverage enables generation of code coverage metrics with gcov
2638 #
2639
2640
2641 # Check whether --enable-coverage was given.
2642 if test "${enable_coverage+set}" = set; then
2643   enableval=$enable_coverage;
2644   case $enableval in
2645     yes)
2646       for ac_prog in gcov
2647 do
2648   # Extract the first word of "$ac_prog", so it can be a program name with args.
2649 set dummy $ac_prog; ac_word=$2
2650 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2651 $as_echo_n "checking for $ac_word... " >&6; }
2652 if test "${ac_cv_prog_GCOV+set}" = set; then
2653   $as_echo_n "(cached) " >&6
2654 else
2655   if test -n "$GCOV"; then
2656   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
2657 else
2658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2659 for as_dir in $PATH
2660 do
2661   IFS=$as_save_IFS
2662   test -z "$as_dir" && as_dir=.
2663   for ac_exec_ext in '' $ac_executable_extensions; do
2664   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2665     ac_cv_prog_GCOV="$ac_prog"
2666     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2667     break 2
2668   fi
2669 done
2670 done
2671 IFS=$as_save_IFS
2672
2673 fi
2674 fi
2675 GCOV=$ac_cv_prog_GCOV
2676 if test -n "$GCOV"; then
2677   { $as_echo "$as_me:$LINENO: result: $GCOV" >&5
2678 $as_echo "$GCOV" >&6; }
2679 else
2680   { $as_echo "$as_me:$LINENO: result: no" >&5
2681 $as_echo "no" >&6; }
2682 fi
2683
2684
2685   test -n "$GCOV" && break
2686 done
2687
2688 if test -z "$GCOV"; then
2689   { { $as_echo "$as_me:$LINENO: error: gcov not found" >&5
2690 $as_echo "$as_me: error: gcov not found" >&2;}
2691    { (exit 1); exit 1; }; }
2692 fi
2693 for ac_prog in lcov
2694 do
2695   # Extract the first word of "$ac_prog", so it can be a program name with args.
2696 set dummy $ac_prog; ac_word=$2
2697 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2698 $as_echo_n "checking for $ac_word... " >&6; }
2699 if test "${ac_cv_prog_LCOV+set}" = set; then
2700   $as_echo_n "(cached) " >&6
2701 else
2702   if test -n "$LCOV"; then
2703   ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
2704 else
2705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2706 for as_dir in $PATH
2707 do
2708   IFS=$as_save_IFS
2709   test -z "$as_dir" && as_dir=.
2710   for ac_exec_ext in '' $ac_executable_extensions; do
2711   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2712     ac_cv_prog_LCOV="$ac_prog"
2713     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2714     break 2
2715   fi
2716 done
2717 done
2718 IFS=$as_save_IFS
2719
2720 fi
2721 fi
2722 LCOV=$ac_cv_prog_LCOV
2723 if test -n "$LCOV"; then
2724   { $as_echo "$as_me:$LINENO: result: $LCOV" >&5
2725 $as_echo "$LCOV" >&6; }
2726 else
2727   { $as_echo "$as_me:$LINENO: result: no" >&5
2728 $as_echo "no" >&6; }
2729 fi
2730
2731
2732   test -n "$LCOV" && break
2733 done
2734
2735 if test -z "$LCOV"; then
2736   { { $as_echo "$as_me:$LINENO: error: lcov not found" >&5
2737 $as_echo "$as_me: error: lcov not found" >&2;}
2738    { (exit 1); exit 1; }; }
2739 fi
2740 for ac_prog in genhtml
2741 do
2742   # Extract the first word of "$ac_prog", so it can be a program name with args.
2743 set dummy $ac_prog; ac_word=$2
2744 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2745 $as_echo_n "checking for $ac_word... " >&6; }
2746 if test "${ac_cv_prog_GENHTML+set}" = set; then
2747   $as_echo_n "(cached) " >&6
2748 else
2749   if test -n "$GENHTML"; then
2750   ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
2751 else
2752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2753 for as_dir in $PATH
2754 do
2755   IFS=$as_save_IFS
2756   test -z "$as_dir" && as_dir=.
2757   for ac_exec_ext in '' $ac_executable_extensions; do
2758   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2759     ac_cv_prog_GENHTML="$ac_prog"
2760     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2761     break 2
2762   fi
2763 done
2764 done
2765 IFS=$as_save_IFS
2766
2767 fi
2768 fi
2769 GENHTML=$ac_cv_prog_GENHTML
2770 if test -n "$GENHTML"; then
2771   { $as_echo "$as_me:$LINENO: result: $GENHTML" >&5
2772 $as_echo "$GENHTML" >&6; }
2773 else
2774   { $as_echo "$as_me:$LINENO: result: no" >&5
2775 $as_echo "no" >&6; }
2776 fi
2777
2778
2779   test -n "$GENHTML" && break
2780 done
2781
2782 if test -z "$GENHTML"; then
2783   { { $as_echo "$as_me:$LINENO: error: genhtml not found" >&5
2784 $as_echo "$as_me: error: genhtml not found" >&2;}
2785    { (exit 1); exit 1; }; }
2786 fi
2787       ;;
2788     no)
2789       :
2790       ;;
2791     *)
2792       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-coverage option" >&5
2793 $as_echo "$as_me: error: no argument expected for --enable-coverage option" >&2;}
2794    { (exit 1); exit 1; }; }
2795       ;;
2796   esac
2797
2798 else
2799   enable_coverage=no
2800
2801 fi
2802
2803
2804
2805
2806 #
2807 # DTrace
2808 #
2809
2810
2811 # Check whether --enable-dtrace was given.
2812 if test "${enable_dtrace+set}" = set; then
2813   enableval=$enable_dtrace;
2814   case $enableval in
2815     yes)
2816
2817 cat >>confdefs.h <<\_ACEOF
2818 #define ENABLE_DTRACE 1
2819 _ACEOF
2820
2821 for ac_prog in dtrace
2822 do
2823   # Extract the first word of "$ac_prog", so it can be a program name with args.
2824 set dummy $ac_prog; ac_word=$2
2825 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2826 $as_echo_n "checking for $ac_word... " >&6; }
2827 if test "${ac_cv_prog_DTRACE+set}" = set; then
2828   $as_echo_n "(cached) " >&6
2829 else
2830   if test -n "$DTRACE"; then
2831   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
2832 else
2833 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2834 for as_dir in $PATH
2835 do
2836   IFS=$as_save_IFS
2837   test -z "$as_dir" && as_dir=.
2838   for ac_exec_ext in '' $ac_executable_extensions; do
2839   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2840     ac_cv_prog_DTRACE="$ac_prog"
2841     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2842     break 2
2843   fi
2844 done
2845 done
2846 IFS=$as_save_IFS
2847
2848 fi
2849 fi
2850 DTRACE=$ac_cv_prog_DTRACE
2851 if test -n "$DTRACE"; then
2852   { $as_echo "$as_me:$LINENO: result: $DTRACE" >&5
2853 $as_echo "$DTRACE" >&6; }
2854 else
2855   { $as_echo "$as_me:$LINENO: result: no" >&5
2856 $as_echo "no" >&6; }
2857 fi
2858
2859
2860   test -n "$DTRACE" && break
2861 done
2862
2863 if test -z "$DTRACE"; then
2864   { { $as_echo "$as_me:$LINENO: error: dtrace not found" >&5
2865 $as_echo "$as_me: error: dtrace not found" >&2;}
2866    { (exit 1); exit 1; }; }
2867 fi
2868
2869       ;;
2870     no)
2871       :
2872       ;;
2873     *)
2874       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2875 $as_echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2876    { (exit 1); exit 1; }; }
2877       ;;
2878   esac
2879
2880 else
2881   enable_dtrace=no
2882
2883 fi
2884
2885
2886
2887
2888 #
2889 # Block size
2890 #
2891 { $as_echo "$as_me:$LINENO: checking for block size" >&5
2892 $as_echo_n "checking for block size... " >&6; }
2893
2894
2895
2896 # Check whether --with-blocksize was given.
2897 if test "${with_blocksize+set}" = set; then
2898   withval=$with_blocksize;
2899   case $withval in
2900     yes)
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     no)
2906       { { $as_echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
2907 $as_echo "$as_me: error: argument required for --with-blocksize option" >&2;}
2908    { (exit 1); exit 1; }; }
2909       ;;
2910     *)
2911       blocksize=$withval
2912       ;;
2913   esac
2914
2915 else
2916   blocksize=8
2917 fi
2918
2919
2920 case ${blocksize} in
2921   1) BLCKSZ=1024;;
2922   2) BLCKSZ=2048;;
2923   4) BLCKSZ=4096;;
2924   8) BLCKSZ=8192;;
2925  16) BLCKSZ=16384;;
2926  32) BLCKSZ=32768;;
2927   *) { { $as_echo "$as_me:$LINENO: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&5
2928 $as_echo "$as_me: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&2;}
2929    { (exit 1); exit 1; }; }
2930 esac
2931 { $as_echo "$as_me:$LINENO: result: ${blocksize}kB" >&5
2932 $as_echo "${blocksize}kB" >&6; }
2933
2934
2935 cat >>confdefs.h <<_ACEOF
2936 #define BLCKSZ ${BLCKSZ}
2937 _ACEOF
2938
2939
2940 #
2941 # Relation segment size
2942 #
2943 { $as_echo "$as_me:$LINENO: checking for segment size" >&5
2944 $as_echo_n "checking for segment size... " >&6; }
2945
2946
2947
2948 # Check whether --with-segsize was given.
2949 if test "${with_segsize+set}" = set; then
2950   withval=$with_segsize;
2951   case $withval in
2952     yes)
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     no)
2958       { { $as_echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
2959 $as_echo "$as_me: error: argument required for --with-segsize option" >&2;}
2960    { (exit 1); exit 1; }; }
2961       ;;
2962     *)
2963       segsize=$withval
2964       ;;
2965   esac
2966
2967 else
2968   segsize=1
2969 fi
2970
2971
2972 # this expression is set up to avoid unnecessary integer overflow
2973 # blocksize is already guaranteed to be a factor of 1024
2974 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
2975 test $? -eq 0 || exit 1
2976 { $as_echo "$as_me:$LINENO: result: ${segsize}GB" >&5
2977 $as_echo "${segsize}GB" >&6; }
2978
2979
2980 cat >>confdefs.h <<_ACEOF
2981 #define RELSEG_SIZE ${RELSEG_SIZE}
2982 _ACEOF
2983
2984
2985 #
2986 # WAL block size
2987 #
2988 { $as_echo "$as_me:$LINENO: checking for WAL block size" >&5
2989 $as_echo_n "checking for WAL block size... " >&6; }
2990
2991
2992
2993 # Check whether --with-wal-blocksize was given.
2994 if test "${with_wal_blocksize+set}" = set; then
2995   withval=$with_wal_blocksize;
2996   case $withval in
2997     yes)
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     no)
3003       { { $as_echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
3004 $as_echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
3005    { (exit 1); exit 1; }; }
3006       ;;
3007     *)
3008       wal_blocksize=$withval
3009       ;;
3010   esac
3011
3012 else
3013   wal_blocksize=8
3014 fi
3015
3016
3017 case ${wal_blocksize} in
3018   1) XLOG_BLCKSZ=1024;;
3019   2) XLOG_BLCKSZ=2048;;
3020   4) XLOG_BLCKSZ=4096;;
3021   8) XLOG_BLCKSZ=8192;;
3022  16) XLOG_BLCKSZ=16384;;
3023  32) XLOG_BLCKSZ=32768;;
3024  64) XLOG_BLCKSZ=65536;;
3025   *) { { $as_echo "$as_me:$LINENO: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&5
3026 $as_echo "$as_me: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&2;}
3027    { (exit 1); exit 1; }; }
3028 esac
3029 { $as_echo "$as_me:$LINENO: result: ${wal_blocksize}kB" >&5
3030 $as_echo "${wal_blocksize}kB" >&6; }
3031
3032
3033 cat >>confdefs.h <<_ACEOF
3034 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3035 _ACEOF
3036
3037
3038 #
3039 # WAL segment size
3040 #
3041 { $as_echo "$as_me:$LINENO: checking for WAL segment size" >&5
3042 $as_echo_n "checking for WAL segment size... " >&6; }
3043
3044
3045
3046 # Check whether --with-wal-segsize was given.
3047 if test "${with_wal_segsize+set}" = set; then
3048   withval=$with_wal_segsize;
3049   case $withval in
3050     yes)
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     no)
3056       { { $as_echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
3057 $as_echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
3058    { (exit 1); exit 1; }; }
3059       ;;
3060     *)
3061       wal_segsize=$withval
3062       ;;
3063   esac
3064
3065 else
3066   wal_segsize=16
3067 fi
3068
3069
3070 case ${wal_segsize} in
3071   1) ;;
3072   2) ;;
3073   4) ;;
3074   8) ;;
3075  16) ;;
3076  32) ;;
3077  64) ;;
3078   *) { { $as_echo "$as_me:$LINENO: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&5
3079 $as_echo "$as_me: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&2;}
3080    { (exit 1); exit 1; }; }
3081 esac
3082 { $as_echo "$as_me:$LINENO: result: ${wal_segsize}MB" >&5
3083 $as_echo "${wal_segsize}MB" >&6; }
3084
3085
3086 cat >>confdefs.h <<_ACEOF
3087 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3088 _ACEOF
3089
3090
3091 #
3092 # C compiler
3093 #
3094
3095 # For historical reasons you can also use --with-CC to specify the C compiler
3096 # to use, although the standard way to do this is to set the CC environment
3097 # variable.
3098
3099
3100
3101 # Check whether --with-CC was given.
3102 if test "${with_CC+set}" = set; then
3103   withval=$with_CC;
3104   case $withval in
3105     yes)
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     no)
3111       { { $as_echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
3112 $as_echo "$as_me: error: argument required for --with-CC option" >&2;}
3113    { (exit 1); exit 1; }; }
3114       ;;
3115     *)
3116       CC=$with_CC
3117       ;;
3118   esac
3119
3120 fi
3121
3122
3123
3124 case $template in
3125   aix) pgac_cc_list="gcc xlc";;
3126  irix) pgac_cc_list="cc";; # no gcc
3127     *) pgac_cc_list="gcc cc";;
3128 esac
3129
3130 ac_ext=c
3131 ac_cpp='$CPP $CPPFLAGS'
3132 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3133 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3134 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3135 if test -n "$ac_tool_prefix"; then
3136   for ac_prog in $pgac_cc_list
3137   do
3138     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3139 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3140 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3141 $as_echo_n "checking for $ac_word... " >&6; }
3142 if test "${ac_cv_prog_CC+set}" = set; then
3143   $as_echo_n "(cached) " >&6
3144 else
3145   if test -n "$CC"; then
3146   ac_cv_prog_CC="$CC" # Let the user override the test.
3147 else
3148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3149 for as_dir in $PATH
3150 do
3151   IFS=$as_save_IFS
3152   test -z "$as_dir" && as_dir=.
3153   for ac_exec_ext in '' $ac_executable_extensions; do
3154   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3155     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3156     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3157     break 2
3158   fi
3159 done
3160 done
3161 IFS=$as_save_IFS
3162
3163 fi
3164 fi
3165 CC=$ac_cv_prog_CC
3166 if test -n "$CC"; then
3167   { $as_echo "$as_me:$LINENO: result: $CC" >&5
3168 $as_echo "$CC" >&6; }
3169 else
3170   { $as_echo "$as_me:$LINENO: result: no" >&5
3171 $as_echo "no" >&6; }
3172 fi
3173
3174
3175     test -n "$CC" && break
3176   done
3177 fi
3178 if test -z "$CC"; then
3179   ac_ct_CC=$CC
3180   for ac_prog in $pgac_cc_list
3181 do
3182   # Extract the first word of "$ac_prog", so it can be a program name with args.
3183 set dummy $ac_prog; ac_word=$2
3184 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3185 $as_echo_n "checking for $ac_word... " >&6; }
3186 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3187   $as_echo_n "(cached) " >&6
3188 else
3189   if test -n "$ac_ct_CC"; then
3190   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3191 else
3192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3193 for as_dir in $PATH
3194 do
3195   IFS=$as_save_IFS
3196   test -z "$as_dir" && as_dir=.
3197   for ac_exec_ext in '' $ac_executable_extensions; do
3198   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3199     ac_cv_prog_ac_ct_CC="$ac_prog"
3200     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3201     break 2
3202   fi
3203 done
3204 done
3205 IFS=$as_save_IFS
3206
3207 fi
3208 fi
3209 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3210 if test -n "$ac_ct_CC"; then
3211   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3212 $as_echo "$ac_ct_CC" >&6; }
3213 else
3214   { $as_echo "$as_me:$LINENO: result: no" >&5
3215 $as_echo "no" >&6; }
3216 fi
3217
3218
3219   test -n "$ac_ct_CC" && break
3220 done
3221
3222   if test "x$ac_ct_CC" = x; then
3223     CC=""
3224   else
3225     case $cross_compiling:$ac_tool_warned in
3226 yes:)
3227 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
3228 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3229 ac_tool_warned=yes ;;
3230 esac
3231     CC=$ac_ct_CC
3232   fi
3233 fi
3234
3235
3236 test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3237 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3238 { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3239 See \`config.log' for more details." >&5
3240 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH
3241 See \`config.log' for more details." >&2;}
3242    { (exit 1); exit 1; }; }; }
3243
3244 # Provide some information about the compiler.
3245 $as_echo "$as_me:$LINENO: checking for C compiler version" >&5
3246 set X $ac_compile
3247 ac_compiler=$2
3248 { (ac_try="$ac_compiler --version >&5"
3249 case "(($ac_try" in
3250   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3251   *) ac_try_echo=$ac_try;;
3252 esac
3253 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3254 $as_echo "$ac_try_echo") >&5
3255   (eval "$ac_compiler --version >&5") 2>&5
3256   ac_status=$?
3257   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3258   (exit $ac_status); }
3259 { (ac_try="$ac_compiler -v >&5"
3260 case "(($ac_try" in
3261   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3262   *) ac_try_echo=$ac_try;;
3263 esac
3264 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3265 $as_echo "$ac_try_echo") >&5
3266   (eval "$ac_compiler -v >&5") 2>&5
3267   ac_status=$?
3268   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3269   (exit $ac_status); }
3270 { (ac_try="$ac_compiler -V >&5"
3271 case "(($ac_try" in
3272   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3273   *) ac_try_echo=$ac_try;;
3274 esac
3275 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3276 $as_echo "$ac_try_echo") >&5
3277   (eval "$ac_compiler -V >&5") 2>&5
3278   ac_status=$?
3279   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3280   (exit $ac_status); }
3281
3282 cat >conftest.$ac_ext <<_ACEOF
3283 /* confdefs.h.  */
3284 _ACEOF
3285 cat confdefs.h >>conftest.$ac_ext
3286 cat >>conftest.$ac_ext <<_ACEOF
3287 /* end confdefs.h.  */
3288
3289 int
3290 main ()
3291 {
3292
3293   ;
3294   return 0;
3295 }
3296 _ACEOF
3297 ac_clean_files_save=$ac_clean_files
3298 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3299 # Try to create an executable without -o first, disregard a.out.
3300 # It will help us diagnose broken compilers, and finding out an intuition
3301 # of exeext.
3302 { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3303 $as_echo_n "checking for C compiler default output file name... " >&6; }
3304 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3305
3306 # The possible output files:
3307 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3308
3309 ac_rmfiles=
3310 for ac_file in $ac_files
3311 do
3312   case $ac_file in
3313     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3314     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3315   esac
3316 done
3317 rm -f $ac_rmfiles
3318
3319 if { (ac_try="$ac_link_default"
3320 case "(($ac_try" in
3321   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3322   *) ac_try_echo=$ac_try;;
3323 esac
3324 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3325 $as_echo "$ac_try_echo") >&5
3326   (eval "$ac_link_default") 2>&5
3327   ac_status=$?
3328   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3329   (exit $ac_status); }; then
3330   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3331 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3332 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3333 # so that the user can short-circuit this test for compilers unknown to
3334 # Autoconf.
3335 for ac_file in $ac_files ''
3336 do
3337   test -f "$ac_file" || continue
3338   case $ac_file in
3339     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3340         ;;
3341     [ab].out )
3342         # We found the default executable, but exeext='' is most
3343         # certainly right.
3344         break;;
3345     *.* )
3346         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3347         then :; else
3348            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3349         fi
3350         # We set ac_cv_exeext here because the later test for it is not
3351         # safe: cross compilers may not add the suffix if given an `-o'
3352         # argument, so we may need to know it at that point already.
3353         # Even if this section looks crufty: it has the advantage of
3354         # actually working.
3355         break;;
3356     * )
3357         break;;
3358   esac
3359 done
3360 test "$ac_cv_exeext" = no && ac_cv_exeext=
3361
3362 else
3363   ac_file=''
3364 fi
3365
3366 { $as_echo "$as_me:$LINENO: result: $ac_file" >&5
3367 $as_echo "$ac_file" >&6; }
3368 if test -z "$ac_file"; then
3369   $as_echo "$as_me: failed program was:" >&5
3370 sed 's/^/| /' conftest.$ac_ext >&5
3371
3372 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3373 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3374 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
3375 See \`config.log' for more details." >&5
3376 $as_echo "$as_me: error: C compiler cannot create executables
3377 See \`config.log' for more details." >&2;}
3378    { (exit 77); exit 77; }; }; }
3379 fi
3380
3381 ac_exeext=$ac_cv_exeext
3382
3383 # Check that the compiler produces executables we can run.  If not, either
3384 # the compiler is broken, or we cross compile.
3385 { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3386 $as_echo_n "checking whether the C compiler works... " >&6; }
3387 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3388 # If not cross compiling, check that we can run a simple program.
3389 if test "$cross_compiling" != yes; then
3390   if { ac_try='./$ac_file'
3391   { (case "(($ac_try" in
3392   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3393   *) ac_try_echo=$ac_try;;
3394 esac
3395 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3396 $as_echo "$ac_try_echo") >&5
3397   (eval "$ac_try") 2>&5
3398   ac_status=$?
3399   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3400   (exit $ac_status); }; }; then
3401     cross_compiling=no
3402   else
3403     if test "$cross_compiling" = maybe; then
3404         cross_compiling=yes
3405     else
3406         { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3407 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3408 { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
3409 If you meant to cross compile, use \`--host'.
3410 See \`config.log' for more details." >&5
3411 $as_echo "$as_me: error: cannot run C compiled programs.
3412 If you meant to cross compile, use \`--host'.
3413 See \`config.log' for more details." >&2;}
3414    { (exit 1); exit 1; }; }; }
3415     fi
3416   fi
3417 fi
3418 { $as_echo "$as_me:$LINENO: result: yes" >&5
3419 $as_echo "yes" >&6; }
3420
3421 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3422 ac_clean_files=$ac_clean_files_save
3423 # Check that the compiler produces executables we can run.  If not, either
3424 # the compiler is broken, or we cross compile.
3425 { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3426 $as_echo_n "checking whether we are cross compiling... " >&6; }
3427 { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
3428 $as_echo "$cross_compiling" >&6; }
3429
3430 { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
3431 $as_echo_n "checking for suffix of executables... " >&6; }
3432 if { (ac_try="$ac_link"
3433 case "(($ac_try" in
3434   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3435   *) ac_try_echo=$ac_try;;
3436 esac
3437 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3438 $as_echo "$ac_try_echo") >&5
3439   (eval "$ac_link") 2>&5
3440   ac_status=$?
3441   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3442   (exit $ac_status); }; then
3443   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3444 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3445 # work properly (i.e., refer to `conftest.exe'), while it won't with
3446 # `rm'.
3447 for ac_file in conftest.exe conftest conftest.*; do
3448   test -f "$ac_file" || continue
3449   case $ac_file in
3450     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3451     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3452           break;;
3453     * ) break;;
3454   esac
3455 done
3456 else
3457   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3458 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3459 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3460 See \`config.log' for more details." >&5
3461 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3462 See \`config.log' for more details." >&2;}
3463    { (exit 1); exit 1; }; }; }
3464 fi
3465
3466 rm -f conftest$ac_cv_exeext
3467 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3468 $as_echo "$ac_cv_exeext" >&6; }
3469
3470 rm -f conftest.$ac_ext
3471 EXEEXT=$ac_cv_exeext
3472 ac_exeext=$EXEEXT
3473 { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
3474 $as_echo_n "checking for suffix of object files... " >&6; }
3475 if test "${ac_cv_objext+set}" = set; then
3476   $as_echo_n "(cached) " >&6
3477 else
3478   cat >conftest.$ac_ext <<_ACEOF
3479 /* confdefs.h.  */
3480 _ACEOF
3481 cat confdefs.h >>conftest.$ac_ext
3482 cat >>conftest.$ac_ext <<_ACEOF
3483 /* end confdefs.h.  */
3484
3485 int
3486 main ()
3487 {
3488
3489   ;
3490   return 0;
3491 }
3492 _ACEOF
3493 rm -f conftest.o conftest.obj
3494 if { (ac_try="$ac_compile"
3495 case "(($ac_try" in
3496   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3497   *) ac_try_echo=$ac_try;;
3498 esac
3499 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3500 $as_echo "$ac_try_echo") >&5
3501   (eval "$ac_compile") 2>&5
3502   ac_status=$?
3503   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3504   (exit $ac_status); }; then
3505   for ac_file in conftest.o conftest.obj conftest.*; do
3506   test -f "$ac_file" || continue;
3507   case $ac_file in
3508     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3509     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3510        break;;
3511   esac
3512 done
3513 else
3514   $as_echo "$as_me: failed program was:" >&5
3515 sed 's/^/| /' conftest.$ac_ext >&5
3516
3517 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3518 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3519 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3520 See \`config.log' for more details." >&5
3521 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
3522 See \`config.log' for more details." >&2;}
3523    { (exit 1); exit 1; }; }; }
3524 fi
3525
3526 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3527 fi
3528 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3529 $as_echo "$ac_cv_objext" >&6; }
3530 OBJEXT=$ac_cv_objext
3531 ac_objext=$OBJEXT
3532 { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3533 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3534 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3535   $as_echo_n "(cached) " >&6
3536 else
3537   cat >conftest.$ac_ext <<_ACEOF
3538 /* confdefs.h.  */
3539 _ACEOF
3540 cat confdefs.h >>conftest.$ac_ext
3541 cat >>conftest.$ac_ext <<_ACEOF
3542 /* end confdefs.h.  */
3543
3544 int
3545 main ()
3546 {
3547 #ifndef __GNUC__
3548        choke me
3549 #endif
3550
3551   ;
3552   return 0;
3553 }
3554 _ACEOF
3555 rm -f conftest.$ac_objext
3556 if { (ac_try="$ac_compile"
3557 case "(($ac_try" in
3558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3559   *) ac_try_echo=$ac_try;;
3560 esac
3561 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3562 $as_echo "$ac_try_echo") >&5
3563   (eval "$ac_compile") 2>conftest.er1
3564   ac_status=$?
3565   grep -v '^ *+' conftest.er1 >conftest.err
3566   rm -f conftest.er1
3567   cat conftest.err >&5
3568   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3569   (exit $ac_status); } && {
3570          test -z "$ac_c_werror_flag" ||
3571          test ! -s conftest.err
3572        } && test -s conftest.$ac_objext; then
3573   ac_compiler_gnu=yes
3574 else
3575   $as_echo "$as_me: failed program was:" >&5
3576 sed 's/^/| /' conftest.$ac_ext >&5
3577
3578         ac_compiler_gnu=no
3579 fi
3580
3581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3582 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3583
3584 fi
3585 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3586 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3587 if test $ac_compiler_gnu = yes; then
3588   GCC=yes
3589 else
3590   GCC=
3591 fi
3592 ac_test_CFLAGS=${CFLAGS+set}
3593 ac_save_CFLAGS=$CFLAGS
3594 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3595 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3596 if test "${ac_cv_prog_cc_g+set}" = set; then
3597   $as_echo_n "(cached) " >&6
3598 else
3599   ac_save_c_werror_flag=$ac_c_werror_flag
3600    ac_c_werror_flag=yes
3601    ac_cv_prog_cc_g=no
3602    CFLAGS="-g"
3603    cat >conftest.$ac_ext <<_ACEOF
3604 /* confdefs.h.  */
3605 _ACEOF
3606 cat confdefs.h >>conftest.$ac_ext
3607 cat >>conftest.$ac_ext <<_ACEOF
3608 /* end confdefs.h.  */
3609
3610 int
3611 main ()
3612 {
3613
3614   ;
3615   return 0;
3616 }
3617 _ACEOF
3618 rm -f conftest.$ac_objext
3619 if { (ac_try="$ac_compile"
3620 case "(($ac_try" in
3621   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3622   *) ac_try_echo=$ac_try;;
3623 esac
3624 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3625 $as_echo "$ac_try_echo") >&5
3626   (eval "$ac_compile") 2>conftest.er1
3627   ac_status=$?
3628   grep -v '^ *+' conftest.er1 >conftest.err
3629   rm -f conftest.er1
3630   cat conftest.err >&5
3631   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3632   (exit $ac_status); } && {
3633          test -z "$ac_c_werror_flag" ||
3634          test ! -s conftest.err
3635        } && test -s conftest.$ac_objext; then
3636   ac_cv_prog_cc_g=yes
3637 else
3638   $as_echo "$as_me: failed program was:" >&5
3639 sed 's/^/| /' conftest.$ac_ext >&5
3640
3641         CFLAGS=""
3642       cat >conftest.$ac_ext <<_ACEOF
3643 /* confdefs.h.  */
3644 _ACEOF
3645 cat confdefs.h >>conftest.$ac_ext
3646 cat >>conftest.$ac_ext <<_ACEOF
3647 /* end confdefs.h.  */
3648
3649 int
3650 main ()
3651 {
3652
3653   ;
3654   return 0;
3655 }
3656 _ACEOF
3657 rm -f conftest.$ac_objext
3658 if { (ac_try="$ac_compile"
3659 case "(($ac_try" in
3660   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3661   *) ac_try_echo=$ac_try;;
3662 esac
3663 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3664 $as_echo "$ac_try_echo") >&5
3665   (eval "$ac_compile") 2>conftest.er1
3666   ac_status=$?
3667   grep -v '^ *+' conftest.er1 >conftest.err
3668   rm -f conftest.er1
3669   cat conftest.err >&5
3670   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3671   (exit $ac_status); } && {
3672          test -z "$ac_c_werror_flag" ||
3673          test ! -s conftest.err
3674        } && test -s conftest.$ac_objext; then
3675   :
3676 else
3677   $as_echo "$as_me: failed program was:" >&5
3678 sed 's/^/| /' conftest.$ac_ext >&5
3679
3680         ac_c_werror_flag=$ac_save_c_werror_flag
3681          CFLAGS="-g"
3682          cat >conftest.$ac_ext <<_ACEOF
3683 /* confdefs.h.  */
3684 _ACEOF
3685 cat confdefs.h >>conftest.$ac_ext
3686 cat >>conftest.$ac_ext <<_ACEOF
3687 /* end confdefs.h.  */
3688
3689 int
3690 main ()
3691 {
3692
3693   ;
3694   return 0;
3695 }
3696 _ACEOF
3697 rm -f conftest.$ac_objext
3698 if { (ac_try="$ac_compile"
3699 case "(($ac_try" in
3700   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3701   *) ac_try_echo=$ac_try;;
3702 esac
3703 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3704 $as_echo "$ac_try_echo") >&5
3705   (eval "$ac_compile") 2>conftest.er1
3706   ac_status=$?
3707   grep -v '^ *+' conftest.er1 >conftest.err
3708   rm -f conftest.er1
3709   cat conftest.err >&5
3710   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3711   (exit $ac_status); } && {
3712          test -z "$ac_c_werror_flag" ||
3713          test ! -s conftest.err
3714        } && test -s conftest.$ac_objext; then
3715   ac_cv_prog_cc_g=yes
3716 else
3717   $as_echo "$as_me: failed program was:" >&5
3718 sed 's/^/| /' conftest.$ac_ext >&5
3719
3720
3721 fi
3722
3723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3724 fi
3725
3726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3727 fi
3728
3729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3730    ac_c_werror_flag=$ac_save_c_werror_flag
3731 fi
3732 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3733 $as_echo "$ac_cv_prog_cc_g" >&6; }
3734 if test "$ac_test_CFLAGS" = set; then
3735   CFLAGS=$ac_save_CFLAGS
3736 elif test $ac_cv_prog_cc_g = yes; then
3737   if test "$GCC" = yes; then
3738     CFLAGS="-g -O2"
3739   else
3740     CFLAGS="-g"
3741   fi
3742 else
3743   if test "$GCC" = yes; then
3744     CFLAGS="-O2"
3745   else
3746     CFLAGS=
3747   fi
3748 fi
3749 { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3750 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3751 if test "${ac_cv_prog_cc_c89+set}" = set; then
3752   $as_echo_n "(cached) " >&6
3753 else
3754   ac_cv_prog_cc_c89=no
3755 ac_save_CC=$CC
3756 cat >conftest.$ac_ext <<_ACEOF
3757 /* confdefs.h.  */
3758 _ACEOF
3759 cat confdefs.h >>conftest.$ac_ext
3760 cat >>conftest.$ac_ext <<_ACEOF
3761 /* end confdefs.h.  */
3762 #include <stdarg.h>
3763 #include <stdio.h>
3764 #include <sys/types.h>
3765 #include <sys/stat.h>
3766 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3767 struct buf { int x; };
3768 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3769 static char *e (p, i)
3770      char **p;
3771      int i;
3772 {
3773   return p[i];
3774 }
3775 static char *f (char * (*g) (char **, int), char **p, ...)
3776 {
3777   char *s;
3778   va_list v;
3779   va_start (v,p);
3780   s = g (p, va_arg (v,int));
3781   va_end (v);
3782   return s;
3783 }
3784
3785 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3786    function prototypes and stuff, but not '\xHH' hex character constants.
3787    These don't provoke an error unfortunately, instead are silently treated
3788    as 'x'.  The following induces an error, until -std is added to get
3789    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3790    array size at least.  It's necessary to write '\x00'==0 to get something
3791    that's true only with -std.  */
3792 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3793
3794 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3795    inside strings and character constants.  */
3796 #define FOO(x) 'x'
3797 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3798
3799 int test (int i, double x);
3800 struct s1 {int (*f) (int a);};
3801 struct s2 {int (*f) (double a);};
3802 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3803 int argc;
3804 char **argv;
3805 int
3806 main ()
3807 {
3808 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3809   ;
3810   return 0;
3811 }
3812 _ACEOF
3813 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3814         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3815 do
3816   CC="$ac_save_CC $ac_arg"
3817   rm -f conftest.$ac_objext
3818 if { (ac_try="$ac_compile"
3819 case "(($ac_try" in
3820   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3821   *) ac_try_echo=$ac_try;;
3822 esac
3823 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3824 $as_echo "$ac_try_echo") >&5
3825   (eval "$ac_compile") 2>conftest.er1
3826   ac_status=$?
3827   grep -v '^ *+' conftest.er1 >conftest.err
3828   rm -f conftest.er1
3829   cat conftest.err >&5
3830   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3831   (exit $ac_status); } && {
3832          test -z "$ac_c_werror_flag" ||
3833          test ! -s conftest.err
3834        } && test -s conftest.$ac_objext; then
3835   ac_cv_prog_cc_c89=$ac_arg
3836 else
3837   $as_echo "$as_me: failed program was:" >&5
3838 sed 's/^/| /' conftest.$ac_ext >&5
3839
3840
3841 fi
3842
3843 rm -f core conftest.err conftest.$ac_objext
3844   test "x$ac_cv_prog_cc_c89" != "xno" && break
3845 done
3846 rm -f conftest.$ac_ext
3847 CC=$ac_save_CC
3848
3849 fi
3850 # AC_CACHE_VAL
3851 case "x$ac_cv_prog_cc_c89" in
3852   x)
3853     { $as_echo "$as_me:$LINENO: result: none needed" >&5
3854 $as_echo "none needed" >&6; } ;;
3855   xno)
3856     { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3857 $as_echo "unsupported" >&6; } ;;
3858   *)
3859     CC="$CC $ac_cv_prog_cc_c89"
3860     { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3861 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3862 esac
3863
3864
3865 ac_ext=c
3866 ac_cpp='$CPP $CPPFLAGS'
3867 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3868 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3869 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3870
3871
3872 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
3873 # but has idiosyncrasies of its own.  We assume icc will define
3874 # __INTEL_COMPILER regardless of CFLAGS.
3875
3876 cat >conftest.$ac_ext <<_ACEOF
3877 /* confdefs.h.  */
3878 _ACEOF
3879 cat confdefs.h >>conftest.$ac_ext
3880 cat >>conftest.$ac_ext <<_ACEOF
3881 /* end confdefs.h.  */
3882
3883 int
3884 main ()
3885 {
3886 #ifndef __INTEL_COMPILER
3887 choke me
3888 #endif
3889   ;
3890   return 0;
3891 }
3892 _ACEOF
3893 rm -f conftest.$ac_objext
3894 if { (ac_try="$ac_compile"
3895 case "(($ac_try" in
3896   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3897   *) ac_try_echo=$ac_try;;
3898 esac
3899 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3900 $as_echo "$ac_try_echo") >&5
3901   (eval "$ac_compile") 2>conftest.er1
3902   ac_status=$?
3903   grep -v '^ *+' conftest.er1 >conftest.err
3904   rm -f conftest.er1
3905   cat conftest.err >&5
3906   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3907   (exit $ac_status); } && {
3908          test -z "$ac_c_werror_flag" ||
3909          test ! -s conftest.err
3910        } && test -s conftest.$ac_objext; then
3911   ICC=yes
3912 else
3913   $as_echo "$as_me: failed program was:" >&5
3914 sed 's/^/| /' conftest.$ac_ext >&5
3915
3916         ICC=no
3917 fi
3918
3919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3920
3921 # Check if it's Sun Studio compiler. We assume that
3922 # __SUNPRO_C will be defined for Sun Studio compilers
3923 cat >conftest.$ac_ext <<_ACEOF
3924 /* confdefs.h.  */
3925 _ACEOF
3926 cat confdefs.h >>conftest.$ac_ext
3927 cat >>conftest.$ac_ext <<_ACEOF
3928 /* end confdefs.h.  */
3929
3930 int
3931 main ()
3932 {
3933 #ifndef __SUNPRO_C
3934 choke me
3935 #endif
3936   ;
3937   return 0;
3938 }
3939 _ACEOF
3940 rm -f conftest.$ac_objext
3941 if { (ac_try="$ac_compile"
3942 case "(($ac_try" in
3943   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3944   *) ac_try_echo=$ac_try;;
3945 esac
3946 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3947 $as_echo "$ac_try_echo") >&5
3948   (eval "$ac_compile") 2>conftest.er1
3949   ac_status=$?
3950   grep -v '^ *+' conftest.er1 >conftest.err
3951   rm -f conftest.er1
3952   cat conftest.err >&5
3953   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3954   (exit $ac_status); } && {
3955          test -z "$ac_c_werror_flag" ||
3956          test ! -s conftest.err
3957        } && test -s conftest.$ac_objext; then
3958   SUN_STUDIO_CC=yes
3959 else
3960   $as_echo "$as_me: failed program was:" >&5
3961 sed 's/^/| /' conftest.$ac_ext >&5
3962
3963         SUN_STUDIO_CC=no
3964 fi
3965
3966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3967
3968
3969
3970 unset CFLAGS
3971
3972 #
3973 # Read the template
3974 #
3975 . "$srcdir/src/template/$template" || exit
3976
3977 # CFLAGS are selected so:
3978 # If the user specifies something in the environment, that is used.
3979 # else:  If the template file set something, that is used.
3980 # else:  If coverage was enabled, don't set anything.
3981 # else:  If the compiler is GCC, then we use -O2.
3982 # else:  If the compiler is something else, then we use -O, unless debugging.
3983
3984 if test "$ac_env_CFLAGS_set" = set; then
3985   CFLAGS=$ac_env_CFLAGS_value
3986 elif test "${CFLAGS+set}" = set; then
3987   : # (keep what template set)
3988 elif test "$enable_coverage" = yes; then
3989   : # no optimization by default
3990 elif test "$GCC" = yes; then
3991   CFLAGS="-O2"
3992 else
3993   # if the user selected debug mode, don't use -O
3994   if test "$enable_debug" != yes; then
3995     CFLAGS="-O"
3996   fi
3997 fi
3998
3999 # Some versions of GCC support some additional useful warning flags.
4000 # Check whether they are supported, and add them to CFLAGS if so.
4001 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4002 # but has its own.  Also check other compiler-specific flags here.
4003
4004 if test "$GCC" = yes -a "$ICC" = no; then
4005   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
4006   # These work in some but not all gcc versions
4007   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wdeclaration-after-statement" >&5
4008 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4009 if test "${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+set}" = set; then
4010   $as_echo_n "(cached) " >&6
4011 else
4012   pgac_save_CFLAGS=$CFLAGS
4013 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4014 cat >conftest.$ac_ext <<_ACEOF
4015 /* confdefs.h.  */
4016 _ACEOF
4017 cat confdefs.h >>conftest.$ac_ext
4018 cat >>conftest.$ac_ext <<_ACEOF
4019 /* end confdefs.h.  */
4020
4021 int
4022 main ()
4023 {
4024
4025   ;
4026   return 0;
4027 }
4028 _ACEOF
4029 rm -f conftest.$ac_objext
4030 if { (ac_try="$ac_compile"
4031 case "(($ac_try" in
4032   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4033   *) ac_try_echo=$ac_try;;
4034 esac
4035 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4036 $as_echo "$ac_try_echo") >&5
4037   (eval "$ac_compile") 2>conftest.er1
4038   ac_status=$?
4039   grep -v '^ *+' conftest.er1 >conftest.err
4040   rm -f conftest.er1
4041   cat conftest.err >&5
4042   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4043   (exit $ac_status); } && {
4044          test -z "$ac_c_werror_flag" ||
4045          test ! -s conftest.err
4046        } && test -s conftest.$ac_objext; then
4047   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4048 else
4049   $as_echo "$as_me: failed program was:" >&5
4050 sed 's/^/| /' conftest.$ac_ext >&5
4051
4052         pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4053 fi
4054
4055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4056 CFLAGS="$pgac_save_CFLAGS"
4057 fi
4058 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4059 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4060 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4061   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4062 fi
4063
4064   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wendif-labels" >&5
4065 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4066 if test "${pgac_cv_prog_cc_cflags__Wendif_labels+set}" = set; then
4067   $as_echo_n "(cached) " >&6
4068 else
4069   pgac_save_CFLAGS=$CFLAGS
4070 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4071 cat >conftest.$ac_ext <<_ACEOF
4072 /* confdefs.h.  */
4073 _ACEOF
4074 cat confdefs.h >>conftest.$ac_ext
4075 cat >>conftest.$ac_ext <<_ACEOF
4076 /* end confdefs.h.  */
4077
4078 int
4079 main ()
4080 {
4081
4082   ;
4083   return 0;
4084 }
4085 _ACEOF
4086 rm -f conftest.$ac_objext
4087 if { (ac_try="$ac_compile"
4088 case "(($ac_try" in
4089   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4090   *) ac_try_echo=$ac_try;;
4091 esac
4092 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4093 $as_echo "$ac_try_echo") >&5
4094   (eval "$ac_compile") 2>conftest.er1
4095   ac_status=$?
4096   grep -v '^ *+' conftest.er1 >conftest.err
4097   rm -f conftest.er1
4098   cat conftest.err >&5
4099   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4100   (exit $ac_status); } && {
4101          test -z "$ac_c_werror_flag" ||
4102          test ! -s conftest.err
4103        } && test -s conftest.$ac_objext; then
4104   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4105 else
4106   $as_echo "$as_me: failed program was:" >&5
4107 sed 's/^/| /' conftest.$ac_ext >&5
4108
4109         pgac_cv_prog_cc_cflags__Wendif_labels=no
4110 fi
4111
4112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4113 CFLAGS="$pgac_save_CFLAGS"
4114 fi
4115 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4116 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4117 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4118   CFLAGS="$CFLAGS -Wendif-labels"
4119 fi
4120
4121   # This was included in -Wall/-Wformat in older GCC versions
4122   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wformat-security" >&5
4123 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4124 if test "${pgac_cv_prog_cc_cflags__Wformat_security+set}" = set; then
4125   $as_echo_n "(cached) " >&6
4126 else
4127   pgac_save_CFLAGS=$CFLAGS
4128 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4129 cat >conftest.$ac_ext <<_ACEOF
4130 /* confdefs.h.  */
4131 _ACEOF
4132 cat confdefs.h >>conftest.$ac_ext
4133 cat >>conftest.$ac_ext <<_ACEOF
4134 /* end confdefs.h.  */
4135
4136 int
4137 main ()
4138 {
4139
4140   ;
4141   return 0;
4142 }
4143 _ACEOF
4144 rm -f conftest.$ac_objext
4145 if { (ac_try="$ac_compile"
4146 case "(($ac_try" in
4147   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4148   *) ac_try_echo=$ac_try;;
4149 esac
4150 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4151 $as_echo "$ac_try_echo") >&5
4152   (eval "$ac_compile") 2>conftest.er1
4153   ac_status=$?
4154   grep -v '^ *+' conftest.er1 >conftest.err
4155   rm -f conftest.er1
4156   cat conftest.err >&5
4157   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4158   (exit $ac_status); } && {
4159          test -z "$ac_c_werror_flag" ||
4160          test ! -s conftest.err
4161        } && test -s conftest.$ac_objext; then
4162   pgac_cv_prog_cc_cflags__Wformat_security=yes
4163 else
4164   $as_echo "$as_me: failed program was:" >&5
4165 sed 's/^/| /' conftest.$ac_ext >&5
4166
4167         pgac_cv_prog_cc_cflags__Wformat_security=no
4168 fi
4169
4170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4171 CFLAGS="$pgac_save_CFLAGS"
4172 fi
4173 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4174 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4175 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4176   CFLAGS="$CFLAGS -Wformat-security"
4177 fi
4178
4179   # Disable strict-aliasing rules; needed for gcc 3.3+
4180   { $as_echo "$as_me:$LINENO: checking whether $CC supports -fno-strict-aliasing" >&5
4181 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4182 if test "${pgac_cv_prog_cc_cflags__fno_strict_aliasing+set}" = set; then
4183   $as_echo_n "(cached) " >&6
4184 else
4185   pgac_save_CFLAGS=$CFLAGS
4186 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4187 cat >conftest.$ac_ext <<_ACEOF
4188 /* confdefs.h.  */
4189 _ACEOF
4190 cat confdefs.h >>conftest.$ac_ext
4191 cat >>conftest.$ac_ext <<_ACEOF
4192 /* end confdefs.h.  */
4193
4194 int
4195 main ()
4196 {
4197
4198   ;
4199   return 0;
4200 }
4201 _ACEOF
4202 rm -f conftest.$ac_objext
4203 if { (ac_try="$ac_compile"
4204 case "(($ac_try" in
4205   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4206   *) ac_try_echo=$ac_try;;
4207 esac
4208 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4209 $as_echo "$ac_try_echo") >&5
4210   (eval "$ac_compile") 2>conftest.er1
4211   ac_status=$?
4212   grep -v '^ *+' conftest.er1 >conftest.err
4213   rm -f conftest.er1
4214   cat conftest.err >&5
4215   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4216   (exit $ac_status); } && {
4217          test -z "$ac_c_werror_flag" ||
4218          test ! -s conftest.err
4219        } && test -s conftest.$ac_objext; then
4220   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4221 else
4222   $as_echo "$as_me: failed program was:" >&5
4223 sed 's/^/| /' conftest.$ac_ext >&5
4224
4225         pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4226 fi
4227
4228 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4229 CFLAGS="$pgac_save_CFLAGS"
4230 fi
4231 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4232 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4233 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4234   CFLAGS="$CFLAGS -fno-strict-aliasing"
4235 fi
4236
4237   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4238   { $as_echo "$as_me:$LINENO: checking whether $CC supports -fwrapv" >&5
4239 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4240 if test "${pgac_cv_prog_cc_cflags__fwrapv+set}" = set; then
4241   $as_echo_n "(cached) " >&6
4242 else
4243   pgac_save_CFLAGS=$CFLAGS
4244 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4245 cat >conftest.$ac_ext <<_ACEOF
4246 /* confdefs.h.  */
4247 _ACEOF
4248 cat confdefs.h >>conftest.$ac_ext
4249 cat >>conftest.$ac_ext <<_ACEOF
4250 /* end confdefs.h.  */
4251
4252 int
4253 main ()
4254 {
4255
4256   ;
4257   return 0;
4258 }
4259 _ACEOF
4260 rm -f conftest.$ac_objext
4261 if { (ac_try="$ac_compile"
4262 case "(($ac_try" in
4263   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4264   *) ac_try_echo=$ac_try;;
4265 esac
4266 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4267 $as_echo "$ac_try_echo") >&5
4268   (eval "$ac_compile") 2>conftest.er1
4269   ac_status=$?
4270   grep -v '^ *+' conftest.er1 >conftest.err
4271   rm -f conftest.er1
4272   cat conftest.err >&5
4273   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4274   (exit $ac_status); } && {
4275          test -z "$ac_c_werror_flag" ||
4276          test ! -s conftest.err
4277        } && test -s conftest.$ac_objext; then
4278   pgac_cv_prog_cc_cflags__fwrapv=yes
4279 else
4280   $as_echo "$as_me: failed program was:" >&5
4281 sed 's/^/| /' conftest.$ac_ext >&5
4282
4283         pgac_cv_prog_cc_cflags__fwrapv=no
4284 fi
4285
4286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4287 CFLAGS="$pgac_save_CFLAGS"
4288 fi
4289 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4290 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4291 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4292   CFLAGS="$CFLAGS -fwrapv"
4293 fi
4294
4295 elif test "$ICC" = yes; then
4296   # Intel's compiler has a bug/misoptimization in checking for
4297   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4298   { $as_echo "$as_me:$LINENO: checking whether $CC supports -mp1" >&5
4299 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4300 if test "${pgac_cv_prog_cc_cflags__mp1+set}" = set; then
4301   $as_echo_n "(cached) " >&6
4302 else
4303   pgac_save_CFLAGS=$CFLAGS
4304 CFLAGS="$pgac_save_CFLAGS -mp1"
4305 cat >conftest.$ac_ext <<_ACEOF
4306 /* confdefs.h.  */
4307 _ACEOF
4308 cat confdefs.h >>conftest.$ac_ext
4309 cat >>conftest.$ac_ext <<_ACEOF
4310 /* end confdefs.h.  */
4311
4312 int
4313 main ()
4314 {
4315
4316   ;
4317   return 0;
4318 }
4319 _ACEOF
4320 rm -f conftest.$ac_objext
4321 if { (ac_try="$ac_compile"
4322 case "(($ac_try" in
4323   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4324   *) ac_try_echo=$ac_try;;
4325 esac
4326 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4327 $as_echo "$ac_try_echo") >&5
4328   (eval "$ac_compile") 2>conftest.er1
4329   ac_status=$?
4330   grep -v '^ *+' conftest.er1 >conftest.err
4331   rm -f conftest.er1
4332   cat conftest.err >&5
4333   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4334   (exit $ac_status); } && {
4335          test -z "$ac_c_werror_flag" ||
4336          test ! -s conftest.err
4337        } && test -s conftest.$ac_objext; then
4338   pgac_cv_prog_cc_cflags__mp1=yes
4339 else
4340   $as_echo "$as_me: failed program was:" >&5
4341 sed 's/^/| /' conftest.$ac_ext >&5
4342
4343         pgac_cv_prog_cc_cflags__mp1=no
4344 fi
4345
4346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4347 CFLAGS="$pgac_save_CFLAGS"
4348 fi
4349 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4350 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4351 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4352   CFLAGS="$CFLAGS -mp1"
4353 fi
4354
4355   # Make sure strict aliasing is off (though this is said to be the default)
4356   { $as_echo "$as_me:$LINENO: checking whether $CC supports -fno-strict-aliasing" >&5
4357 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4358 if test "${pgac_cv_prog_cc_cflags__fno_strict_aliasing+set}" = set; then
4359   $as_echo_n "(cached) " >&6
4360 else
4361   pgac_save_CFLAGS=$CFLAGS
4362 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4363 cat >conftest.$ac_ext <<_ACEOF
4364 /* confdefs.h.  */
4365 _ACEOF
4366 cat confdefs.h >>conftest.$ac_ext
4367 cat >>conftest.$ac_ext <<_ACEOF
4368 /* end confdefs.h.  */
4369
4370 int
4371 main ()
4372 {
4373
4374   ;
4375   return 0;
4376 }
4377 _ACEOF
4378 rm -f conftest.$ac_objext
4379 if { (ac_try="$ac_compile"
4380 case "(($ac_try" in
4381   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4382   *) ac_try_echo=$ac_try;;
4383 esac
4384 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4385 $as_echo "$ac_try_echo") >&5
4386   (eval "$ac_compile") 2>conftest.er1
4387   ac_status=$?
4388   grep -v '^ *+' conftest.er1 >conftest.err
4389   rm -f conftest.er1
4390   cat conftest.err >&5
4391   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4392   (exit $ac_status); } && {
4393          test -z "$ac_c_werror_flag" ||
4394          test ! -s conftest.err
4395        } && test -s conftest.$ac_objext; then
4396   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4397 else
4398   $as_echo "$as_me: failed program was:" >&5
4399 sed 's/^/| /' conftest.$ac_ext >&5
4400
4401         pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4402 fi
4403
4404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4405 CFLAGS="$pgac_save_CFLAGS"
4406 fi
4407 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4408 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4409 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4410   CFLAGS="$CFLAGS -fno-strict-aliasing"
4411 fi
4412
4413 elif test "$PORTNAME" = "aix"; then
4414   # AIX's xlc has to have strict aliasing turned off too
4415   { $as_echo "$as_me:$LINENO: checking whether $CC supports -qnoansialias" >&5
4416 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4417 if test "${pgac_cv_prog_cc_cflags__qnoansialias+set}" = set; then
4418   $as_echo_n "(cached) " >&6
4419 else
4420   pgac_save_CFLAGS=$CFLAGS
4421 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4422 cat >conftest.$ac_ext <<_ACEOF
4423 /* confdefs.h.  */
4424 _ACEOF
4425 cat confdefs.h >>conftest.$ac_ext
4426 cat >>conftest.$ac_ext <<_ACEOF
4427 /* end confdefs.h.  */
4428
4429 int
4430 main ()
4431 {
4432
4433   ;
4434   return 0;
4435 }
4436 _ACEOF
4437 rm -f conftest.$ac_objext
4438 if { (ac_try="$ac_compile"
4439 case "(($ac_try" in
4440   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4441   *) ac_try_echo=$ac_try;;
4442 esac
4443 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4444 $as_echo "$ac_try_echo") >&5
4445   (eval "$ac_compile") 2>conftest.er1
4446   ac_status=$?
4447   grep -v '^ *+' conftest.er1 >conftest.err
4448   rm -f conftest.er1
4449   cat conftest.err >&5
4450   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4451   (exit $ac_status); } && {
4452          test -z "$ac_c_werror_flag" ||
4453          test ! -s conftest.err
4454        } && test -s conftest.$ac_objext; then
4455   pgac_cv_prog_cc_cflags__qnoansialias=yes
4456 else
4457   $as_echo "$as_me: failed program was:" >&5
4458 sed 's/^/| /' conftest.$ac_ext >&5
4459
4460         pgac_cv_prog_cc_cflags__qnoansialias=no
4461 fi
4462
4463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4464 CFLAGS="$pgac_save_CFLAGS"
4465 fi
4466 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4467 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4468 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4469   CFLAGS="$CFLAGS -qnoansialias"
4470 fi
4471
4472 fi
4473
4474 # supply -g if --enable-debug
4475 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4476   CFLAGS="$CFLAGS -g"
4477 fi
4478
4479 # enable code coverage if --enable-coverage
4480 if test "$enable_coverage" = yes; then
4481   if test "$GCC" = yes; then
4482     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4483   else
4484     { { $as_echo "$as_me:$LINENO: error: --enable-coverage is supported only when using GCC" >&5
4485 $as_echo "$as_me: error: --enable-coverage is supported only when using GCC" >&2;}
4486    { (exit 1); exit 1; }; }
4487   fi
4488 fi
4489
4490 # enable profiling if --enable-profiling
4491 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4492   if test "$GCC" = yes; then
4493
4494 cat >>confdefs.h <<\_ACEOF
4495 #define PROFILE_PID_DIR 1
4496 _ACEOF
4497
4498     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4499   else
4500     { { $as_echo "$as_me:$LINENO: error: --enable-profiling is supported only when using GCC" >&5
4501 $as_echo "$as_me: error: --enable-profiling is supported only when using GCC" >&2;}
4502    { (exit 1); exit 1; }; }
4503   fi
4504 fi
4505
4506 # We already have this in Makefile.win32, but configure needs it too
4507 if test "$PORTNAME" = "win32"; then
4508   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4509 fi
4510
4511 # Check if the compiler still works with the template settings
4512 { $as_echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
4513 $as_echo_n "checking whether the C compiler still works... " >&6; }
4514 cat >conftest.$ac_ext <<_ACEOF
4515 /* confdefs.h.  */
4516 _ACEOF
4517 cat confdefs.h >>conftest.$ac_ext
4518 cat >>conftest.$ac_ext <<_ACEOF
4519 /* end confdefs.h.  */
4520
4521 int
4522 main ()
4523 {
4524 return 0;
4525   ;
4526   return 0;
4527 }
4528 _ACEOF
4529 rm -f conftest.$ac_objext conftest$ac_exeext
4530 if { (ac_try="$ac_link"
4531 case "(($ac_try" in
4532   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4533   *) ac_try_echo=$ac_try;;
4534 esac
4535 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4536 $as_echo "$ac_try_echo") >&5
4537   (eval "$ac_link") 2>conftest.er1
4538   ac_status=$?
4539   grep -v '^ *+' conftest.er1 >conftest.err
4540   rm -f conftest.er1
4541   cat conftest.err >&5
4542   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4543   (exit $ac_status); } && {
4544          test -z "$ac_c_werror_flag" ||
4545          test ! -s conftest.err
4546        } && test -s conftest$ac_exeext && {
4547          test "$cross_compiling" = yes ||
4548          $as_test_x conftest$ac_exeext
4549        }; then
4550   { $as_echo "$as_me:$LINENO: result: yes" >&5
4551 $as_echo "yes" >&6; }
4552 else
4553   $as_echo "$as_me: failed program was:" >&5
4554 sed 's/^/| /' conftest.$ac_ext >&5
4555
4556         { $as_echo "$as_me:$LINENO: result: no" >&5
4557 $as_echo "no" >&6; }
4558    { { $as_echo "$as_me:$LINENO: error: cannot proceed" >&5
4559 $as_echo "$as_me: error: cannot proceed" >&2;}
4560    { (exit 1); exit 1; }; }
4561 fi
4562
4563 rm -rf conftest.dSYM
4564 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4565       conftest$ac_exeext conftest.$ac_ext
4566
4567 # Defend against gcc -ffast-math
4568 if test "$GCC" = yes; then
4569 cat >conftest.$ac_ext <<_ACEOF
4570 /* confdefs.h.  */
4571 _ACEOF
4572 cat confdefs.h >>conftest.$ac_ext
4573 cat >>conftest.$ac_ext <<_ACEOF
4574 /* end confdefs.h.  */
4575
4576 int
4577 main ()
4578 {
4579 #ifdef __FAST_MATH__
4580 choke me
4581 #endif
4582   ;
4583   return 0;
4584 }
4585 _ACEOF
4586 rm -f conftest.$ac_objext
4587 if { (ac_try="$ac_compile"
4588 case "(($ac_try" in
4589   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4590   *) ac_try_echo=$ac_try;;
4591 esac
4592 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4593 $as_echo "$ac_try_echo") >&5
4594   (eval "$ac_compile") 2>conftest.er1
4595   ac_status=$?
4596   grep -v '^ *+' conftest.er1 >conftest.err
4597   rm -f conftest.er1
4598   cat conftest.err >&5
4599   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4600   (exit $ac_status); } && {
4601          test -z "$ac_c_werror_flag" ||
4602          test ! -s conftest.err
4603        } && test -s conftest.$ac_objext; then
4604   :
4605 else
4606   $as_echo "$as_me: failed program was:" >&5
4607 sed 's/^/| /' conftest.$ac_ext >&5
4608
4609         { { $as_echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
4610 $as_echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
4611    { (exit 1); exit 1; }; }
4612 fi
4613
4614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4615 fi
4616
4617 ac_ext=c
4618 ac_cpp='$CPP $CPPFLAGS'
4619 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4620 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4621 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4622 { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4623 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4624 # On Suns, sometimes $CPP names a directory.
4625 if test -n "$CPP" && test -d "$CPP"; then
4626   CPP=
4627 fi
4628 if test -z "$CPP"; then
4629   if test "${ac_cv_prog_CPP+set}" = set; then
4630   $as_echo_n "(cached) " >&6
4631 else
4632       # Double quotes because CPP needs to be expanded
4633     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4634     do
4635       ac_preproc_ok=false
4636 for ac_c_preproc_warn_flag in '' yes
4637 do
4638   # Use a header file that comes with gcc, so configuring glibc
4639   # with a fresh cross-compiler works.
4640   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4641   # <limits.h> exists even on freestanding compilers.
4642   # On the NeXT, cc -E runs the code through the compiler's parser,
4643   # not just through cpp. "Syntax error" is here to catch this case.
4644   cat >conftest.$ac_ext <<_ACEOF
4645 /* confdefs.h.  */
4646 _ACEOF
4647 cat confdefs.h >>conftest.$ac_ext
4648 cat >>conftest.$ac_ext <<_ACEOF
4649 /* end confdefs.h.  */
4650 #ifdef __STDC__
4651 # include <limits.h>
4652 #else
4653 # include <assert.h>
4654 #endif
4655                      Syntax error
4656 _ACEOF
4657 if { (ac_try="$ac_cpp conftest.$ac_ext"
4658 case "(($ac_try" in
4659   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4660   *) ac_try_echo=$ac_try;;
4661 esac
4662 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4663 $as_echo "$ac_try_echo") >&5
4664   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4665   ac_status=$?
4666   grep -v '^ *+' conftest.er1 >conftest.err
4667   rm -f conftest.er1
4668   cat conftest.err >&5
4669   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4670   (exit $ac_status); } >/dev/null && {
4671          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4672          test ! -s conftest.err
4673        }; then
4674   :
4675 else
4676   $as_echo "$as_me: failed program was:" >&5
4677 sed 's/^/| /' conftest.$ac_ext >&5
4678
4679   # Broken: fails on valid input.
4680 continue
4681 fi
4682
4683 rm -f conftest.err conftest.$ac_ext
4684
4685   # OK, works on sane cases.  Now check whether nonexistent headers
4686   # can be detected and how.
4687   cat >conftest.$ac_ext <<_ACEOF
4688 /* confdefs.h.  */
4689 _ACEOF
4690 cat confdefs.h >>conftest.$ac_ext
4691 cat >>conftest.$ac_ext <<_ACEOF
4692 /* end confdefs.h.  */
4693 #include <ac_nonexistent.h>
4694 _ACEOF
4695 if { (ac_try="$ac_cpp conftest.$ac_ext"
4696 case "(($ac_try" in
4697   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4698   *) ac_try_echo=$ac_try;;
4699 esac
4700 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4701 $as_echo "$ac_try_echo") >&5
4702   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4703   ac_status=$?
4704   grep -v '^ *+' conftest.er1 >conftest.err
4705   rm -f conftest.er1
4706   cat conftest.err >&5
4707   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4708   (exit $ac_status); } >/dev/null && {
4709          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4710          test ! -s conftest.err
4711        }; then
4712   # Broken: success on invalid input.
4713 continue
4714 else
4715   $as_echo "$as_me: failed program was:" >&5
4716 sed 's/^/| /' conftest.$ac_ext >&5
4717
4718   # Passes both tests.
4719 ac_preproc_ok=:
4720 break
4721 fi
4722
4723 rm -f conftest.err conftest.$ac_ext
4724
4725 done
4726 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4727 rm -f conftest.err conftest.$ac_ext
4728 if $ac_preproc_ok; then
4729   break
4730 fi
4731
4732     done
4733     ac_cv_prog_CPP=$CPP
4734
4735 fi
4736   CPP=$ac_cv_prog_CPP
4737 else
4738   ac_cv_prog_CPP=$CPP
4739 fi
4740 { $as_echo "$as_me:$LINENO: result: $CPP" >&5
4741 $as_echo "$CPP" >&6; }
4742 ac_preproc_ok=false
4743 for ac_c_preproc_warn_flag in '' yes
4744 do
4745   # Use a header file that comes with gcc, so configuring glibc
4746   # with a fresh cross-compiler works.
4747   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4748   # <limits.h> exists even on freestanding compilers.
4749   # On the NeXT, cc -E runs the code through the compiler's parser,
4750   # not just through cpp. "Syntax error" is here to catch this case.
4751   cat >conftest.$ac_ext <<_ACEOF
4752 /* confdefs.h.  */
4753 _ACEOF
4754 cat confdefs.h >>conftest.$ac_ext
4755 cat >>conftest.$ac_ext <<_ACEOF
4756 /* end confdefs.h.  */
4757 #ifdef __STDC__
4758 # include <limits.h>
4759 #else
4760 # include <assert.h>
4761 #endif
4762                      Syntax error
4763 _ACEOF
4764 if { (ac_try="$ac_cpp conftest.$ac_ext"
4765 case "(($ac_try" in
4766   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4767   *) ac_try_echo=$ac_try;;
4768 esac
4769 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4770 $as_echo "$ac_try_echo") >&5
4771   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4772   ac_status=$?
4773   grep -v '^ *+' conftest.er1 >conftest.err
4774   rm -f conftest.er1
4775   cat conftest.err >&5
4776   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4777   (exit $ac_status); } >/dev/null && {
4778          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4779          test ! -s conftest.err
4780        }; then
4781   :
4782 else
4783   $as_echo "$as_me: failed program was:" >&5
4784 sed 's/^/| /' conftest.$ac_ext >&5
4785
4786   # Broken: fails on valid input.
4787 continue
4788 fi
4789
4790 rm -f conftest.err conftest.$ac_ext
4791
4792   # OK, works on sane cases.  Now check whether nonexistent headers
4793   # can be detected and how.
4794   cat >conftest.$ac_ext <<_ACEOF
4795 /* confdefs.h.  */
4796 _ACEOF
4797 cat confdefs.h >>conftest.$ac_ext
4798 cat >>conftest.$ac_ext <<_ACEOF
4799 /* end confdefs.h.  */
4800 #include <ac_nonexistent.h>
4801 _ACEOF
4802 if { (ac_try="$ac_cpp conftest.$ac_ext"
4803 case "(($ac_try" in
4804   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4805   *) ac_try_echo=$ac_try;;
4806 esac
4807 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4808 $as_echo "$ac_try_echo") >&5
4809   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4810   ac_status=$?
4811   grep -v '^ *+' conftest.er1 >conftest.err
4812   rm -f conftest.er1
4813   cat conftest.err >&5
4814   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815   (exit $ac_status); } >/dev/null && {
4816          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4817          test ! -s conftest.err
4818        }; then
4819   # Broken: success on invalid input.
4820 continue
4821 else
4822   $as_echo "$as_me: failed program was:" >&5
4823 sed 's/^/| /' conftest.$ac_ext >&5
4824
4825   # Passes both tests.
4826 ac_preproc_ok=:
4827 break
4828 fi
4829
4830 rm -f conftest.err conftest.$ac_ext
4831
4832 done
4833 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4834 rm -f conftest.err conftest.$ac_ext
4835 if $ac_preproc_ok; then
4836   :
4837 else
4838   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
4839 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4840 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4841 See \`config.log' for more details." >&5
4842 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4843 See \`config.log' for more details." >&2;}
4844    { (exit 1); exit 1; }; }; }
4845 fi
4846
4847 ac_ext=c
4848 ac_cpp='$CPP $CPPFLAGS'
4849 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4850 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4851 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4852
4853
4854
4855
4856 #
4857 # Set up TAS assembly code if needed; the template file has now had its
4858 # chance to request this.
4859 #
4860 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
4861
4862
4863 if test "$need_tas" = yes ; then
4864   TAS=tas.o
4865 else
4866   TAS=""
4867 fi
4868
4869
4870
4871 #
4872 # Automatic dependency tracking
4873 #
4874
4875
4876 # Check whether --enable-depend was given.
4877 if test "${enable_depend+set}" = set; then
4878   enableval=$enable_depend;
4879   case $enableval in
4880     yes)
4881       autodepend=yes
4882       ;;
4883     no)
4884       :
4885       ;;
4886     *)
4887       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
4888 $as_echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
4889    { (exit 1); exit 1; }; }
4890       ;;
4891   esac
4892
4893 else
4894   enable_depend=no
4895
4896 fi
4897
4898
4899
4900
4901
4902 #
4903 # Enable assert checks
4904 #
4905
4906
4907 # Check whether --enable-cassert was given.
4908 if test "${enable_cassert+set}" = set; then
4909   enableval=$enable_cassert;
4910   case $enableval in
4911     yes)
4912
4913 cat >>confdefs.h <<\_ACEOF
4914 #define USE_ASSERT_CHECKING 1
4915 _ACEOF
4916
4917       ;;
4918     no)
4919       :
4920       ;;
4921     *)
4922       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
4923 $as_echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
4924    { (exit 1); exit 1; }; }
4925       ;;
4926   esac
4927
4928 else
4929   enable_cassert=no
4930
4931 fi
4932
4933
4934
4935
4936 #
4937 # Include directories
4938 #
4939 ac_save_IFS=$IFS
4940 IFS="${IFS}${PATH_SEPARATOR}"
4941 # SRCH_INC comes from the template file
4942 for dir in $with_includes $SRCH_INC; do
4943   if test -d "$dir"; then
4944     INCLUDES="$INCLUDES -I$dir"
4945   else
4946     { $as_echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
4947 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
4948   fi
4949 done
4950 IFS=$ac_save_IFS
4951
4952
4953
4954 #
4955 # Library directories
4956 #
4957 ac_save_IFS=$IFS
4958 IFS="${IFS}${PATH_SEPARATOR}"
4959 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
4960 for dir in $LIBRARY_DIRS $SRCH_LIB; do
4961   if test -d "$dir"; then
4962     LIBDIRS="$LIBDIRS -L$dir"
4963   else
4964     { $as_echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
4965 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
4966   fi
4967 done
4968 IFS=$ac_save_IFS
4969
4970 #
4971 # Enable thread-safe client libraries
4972 #
4973 { $as_echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
4974 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
4975
4976
4977 # Check whether --enable-thread-safety was given.
4978 if test "${enable_thread_safety+set}" = set; then
4979   enableval=$enable_thread_safety;
4980   case $enableval in
4981     yes)
4982       :
4983       ;;
4984     no)
4985       :
4986       ;;
4987     *)
4988       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
4989 $as_echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
4990    { (exit 1); exit 1; }; }
4991       ;;
4992   esac
4993
4994 else
4995   enable_thread_safety=yes
4996
4997 fi
4998
4999
5000 if test "$enable_thread_safety" = yes; then
5001
5002 cat >>confdefs.h <<\_ACEOF
5003 #define ENABLE_THREAD_SAFETY 1
5004 _ACEOF
5005
5006 fi
5007 { $as_echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
5008 $as_echo "$enable_thread_safety" >&6; }
5009
5010
5011 #
5012 # Optionally build Tcl modules (PL/Tcl)
5013 #
5014 { $as_echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
5015 $as_echo_n "checking whether to build with Tcl... " >&6; }
5016
5017
5018
5019 # Check whether --with-tcl was given.
5020 if test "${with_tcl+set}" = set; then
5021   withval=$with_tcl;
5022   case $withval in
5023     yes)
5024       :
5025       ;;
5026     no)
5027       :
5028       ;;
5029     *)
5030       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
5031 $as_echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
5032    { (exit 1); exit 1; }; }
5033       ;;
5034   esac
5035
5036 else
5037   with_tcl=no
5038
5039 fi
5040
5041
5042 { $as_echo "$as_me:$LINENO: result: $with_tcl" >&5
5043 $as_echo "$with_tcl" >&6; }
5044
5045
5046 # We see if the path to the Tcl/Tk configuration scripts is specified.
5047 # This will override the use of tclsh to find the paths to search.
5048
5049
5050
5051
5052 # Check whether --with-tclconfig was given.
5053 if test "${with_tclconfig+set}" = set; then
5054   withval=$with_tclconfig;
5055   case $withval in
5056     yes)
5057       { { $as_echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
5058 $as_echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
5059    { (exit 1); exit 1; }; }
5060       ;;
5061     no)
5062       { { $as_echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
5063 $as_echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
5064    { (exit 1); exit 1; }; }
5065       ;;
5066     *)
5067
5068       ;;
5069   esac
5070
5071 fi
5072
5073
5074
5075 #
5076 # Optionally build Perl modules (PL/Perl)
5077 #
5078 { $as_echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
5079 $as_echo_n "checking whether to build Perl modules... " >&6; }
5080
5081
5082
5083 # Check whether --with-perl was given.
5084 if test "${with_perl+set}" = set; then
5085   withval=$with_perl;
5086   case $withval in
5087     yes)
5088       :
5089       ;;
5090     no)
5091       :
5092       ;;
5093     *)
5094       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
5095 $as_echo "$as_me: error: no argument expected for --with-perl option" >&2;}
5096    { (exit 1); exit 1; }; }
5097       ;;
5098   esac
5099
5100 else
5101   with_perl=no
5102
5103 fi
5104
5105
5106 { $as_echo "$as_me:$LINENO: result: $with_perl" >&5
5107 $as_echo "$with_perl" >&6; }
5108
5109
5110 #
5111 # Optionally build Python modules (PL/Python)
5112 #
5113 { $as_echo "$as_me:$LINENO: checking whether to build Python modules" >&5
5114 $as_echo_n "checking whether to build Python modules... " >&6; }
5115
5116
5117
5118 # Check whether --with-python was given.
5119 if test "${with_python+set}" = set; then
5120   withval=$with_python;
5121   case $withval in
5122     yes)
5123       :
5124       ;;
5125     no)
5126       :
5127       ;;
5128     *)
5129       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
5130 $as_echo "$as_me: error: no argument expected for --with-python option" >&2;}
5131    { (exit 1); exit 1; }; }
5132       ;;
5133   esac
5134
5135 else
5136   with_python=no
5137
5138 fi
5139
5140
5141 { $as_echo "$as_me:$LINENO: result: $with_python" >&5
5142 $as_echo "$with_python" >&6; }
5143
5144
5145 #
5146 # GSSAPI
5147 #
5148 { $as_echo "$as_me:$LINENO: checking whether to build with GSSAPI support" >&5
5149 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5150
5151
5152
5153 # Check whether --with-gssapi was given.
5154 if test "${with_gssapi+set}" = set; then
5155   withval=$with_gssapi;
5156   case $withval in
5157     yes)
5158
5159
5160 cat >>confdefs.h <<\_ACEOF
5161 #define ENABLE_GSS 1
5162 _ACEOF
5163
5164   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5165
5166       ;;
5167     no)
5168       :
5169       ;;
5170     *)
5171       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-gssapi option" >&5
5172 $as_echo "$as_me: error: no argument expected for --with-gssapi option" >&2;}
5173    { (exit 1); exit 1; }; }
5174       ;;
5175   esac
5176
5177 else
5178   with_gssapi=no
5179
5180 fi
5181
5182
5183 { $as_echo "$as_me:$LINENO: result: $with_gssapi" >&5
5184 $as_echo "$with_gssapi" >&6; }
5185
5186
5187 #
5188 # Kerberos 5
5189 #
5190 { $as_echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
5191 $as_echo_n "checking whether to build with Kerberos 5 support... " >&6; }
5192
5193
5194
5195 # Check whether --with-krb5 was given.
5196 if test "${with_krb5+set}" = set; then
5197   withval=$with_krb5;
5198   case $withval in
5199     yes)
5200
5201
5202 cat >>confdefs.h <<\_ACEOF
5203 #define KRB5 1
5204 _ACEOF
5205
5206   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5207
5208       ;;
5209     no)
5210       :
5211       ;;
5212     *)
5213       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
5214 $as_echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
5215    { (exit 1); exit 1; }; }
5216       ;;
5217   esac
5218
5219 else
5220   with_krb5=no
5221
5222 fi
5223
5224
5225 { $as_echo "$as_me:$LINENO: result: $with_krb5" >&5
5226 $as_echo "$with_krb5" >&6; }
5227
5228
5229
5230
5231
5232
5233 #
5234 # Kerberos configuration parameters
5235 #
5236
5237
5238
5239 # Check whether --with-krb-srvnam was given.
5240 if test "${with_krb_srvnam+set}" = set; then
5241   withval=$with_krb_srvnam;
5242   case $withval in
5243     yes)
5244       { { $as_echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
5245 $as_echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
5246    { (exit 1); exit 1; }; }
5247       ;;
5248     no)
5249       { { $as_echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
5250 $as_echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
5251    { (exit 1); exit 1; }; }
5252       ;;
5253     *)
5254
5255       ;;
5256   esac
5257
5258 else
5259   with_krb_srvnam="postgres"
5260 fi
5261
5262
5263
5264 cat >>confdefs.h <<_ACEOF
5265 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5266 _ACEOF
5267
5268
5269
5270 #
5271 # PAM
5272 #
5273 { $as_echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
5274 $as_echo_n "checking whether to build with PAM support... " >&6; }
5275
5276
5277
5278 # Check whether --with-pam was given.
5279 if test "${with_pam+set}" = set; then
5280   withval=$with_pam;
5281   case $withval in
5282     yes)
5283
5284 cat >>confdefs.h <<\_ACEOF
5285 #define USE_PAM 1
5286 _ACEOF
5287
5288       ;;
5289     no)
5290       :
5291       ;;
5292     *)
5293       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
5294 $as_echo "$as_me: error: no argument expected for --with-pam option" >&2;}
5295    { (exit 1); exit 1; }; }
5296       ;;
5297   esac
5298
5299 else
5300   with_pam=no
5301
5302 fi
5303
5304
5305 { $as_echo "$as_me:$LINENO: result: $with_pam" >&5
5306 $as_echo "$with_pam" >&6; }
5307
5308
5309
5310 #
5311 # LDAP
5312 #
5313 { $as_echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
5314 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5315
5316
5317
5318 # Check whether --with-ldap was given.
5319 if test "${with_ldap+set}" = set; then
5320   withval=$with_ldap;
5321   case $withval in
5322     yes)
5323
5324 cat >>confdefs.h <<\_ACEOF
5325 #define USE_LDAP 1
5326 _ACEOF
5327
5328       ;;
5329     no)
5330       :
5331       ;;
5332     *)
5333       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
5334 $as_echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
5335    { (exit 1); exit 1; }; }
5336       ;;
5337   esac
5338
5339 else
5340   with_ldap=no
5341
5342 fi
5343
5344
5345 { $as_echo "$as_me:$LINENO: result: $with_ldap" >&5
5346 $as_echo "$with_ldap" >&6; }
5347
5348
5349
5350 #
5351 # Bonjour
5352 #
5353 { $as_echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
5354 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5355
5356
5357
5358 # Check whether --with-bonjour was given.
5359 if test "${with_bonjour+set}" = set; then
5360   withval=$with_bonjour;
5361   case $withval in
5362     yes)
5363
5364 cat >>confdefs.h <<\_ACEOF
5365 #define USE_BONJOUR 1
5366 _ACEOF
5367
5368       ;;
5369     no)
5370       :
5371       ;;
5372     *)
5373       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
5374 $as_echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
5375    { (exit 1); exit 1; }; }
5376       ;;
5377   esac
5378
5379 else
5380   with_bonjour=no
5381
5382 fi
5383
5384
5385 { $as_echo "$as_me:$LINENO: result: $with_bonjour" >&5
5386 $as_echo "$with_bonjour" >&6; }
5387
5388
5389
5390 #
5391 # OpenSSL
5392 #
5393 { $as_echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
5394 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5395
5396
5397
5398 # Check whether --with-openssl was given.
5399 if test "${with_openssl+set}" = set; then
5400   withval=$with_openssl;
5401   case $withval in
5402     yes)
5403
5404 cat >>confdefs.h <<\_ACEOF
5405 #define USE_SSL 1
5406 _ACEOF
5407
5408       ;;
5409     no)
5410       :
5411       ;;
5412     *)
5413       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
5414 $as_echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
5415    { (exit 1); exit 1; }; }
5416       ;;
5417   esac
5418
5419 else
5420   with_openssl=no
5421
5422 fi
5423
5424
5425 { $as_echo "$as_me:$LINENO: result: $with_openssl" >&5
5426 $as_echo "$with_openssl" >&6; }
5427
5428
5429 #
5430 # SELinux
5431 #
5432 { $as_echo "$as_me:$LINENO: checking whether to build with SELinux support" >&5
5433 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5434
5435
5436
5437 # Check whether --with-selinux was given.
5438 if test "${with_selinux+set}" = set; then
5439   withval=$with_selinux;
5440   case $withval in
5441     yes)
5442       :
5443       ;;
5444     no)
5445       :
5446       ;;
5447     *)
5448       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-selinux option" >&5
5449 $as_echo "$as_me: error: no argument expected for --with-selinux option" >&2;}
5450    { (exit 1); exit 1; }; }
5451       ;;
5452   esac
5453
5454 else
5455   with_selinux=no
5456
5457 fi
5458
5459
5460
5461 { $as_echo "$as_me:$LINENO: result: $with_selinux" >&5
5462 $as_echo "$with_selinux" >&6; }
5463
5464 #
5465 # Readline
5466 #
5467
5468
5469
5470 # Check whether --with-readline was given.
5471 if test "${with_readline+set}" = set; then
5472   withval=$with_readline;
5473   case $withval in
5474     yes)
5475       :
5476       ;;
5477     no)
5478       :
5479       ;;
5480     *)
5481       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
5482 $as_echo "$as_me: error: no argument expected for --with-readline option" >&2;}
5483    { (exit 1); exit 1; }; }
5484       ;;
5485   esac
5486
5487 else
5488   with_readline=yes
5489
5490 fi
5491
5492
5493 # readline on MinGW has problems with backslashes in psql and other bugs.
5494 # This is particularly a problem with non-US code pages.
5495 # Therefore disable its use until we understand the cause. 2004-07-20
5496 if test "$PORTNAME" = "win32"; then
5497   if test "$with_readline" = yes; then
5498     { $as_echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5499 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5500     with_readline=no
5501   fi
5502 fi
5503
5504
5505 #
5506 # Prefer libedit
5507 #
5508
5509
5510
5511 # Check whether --with-libedit-preferred was given.
5512 if test "${with_libedit_preferred+set}" = set; then
5513   withval=$with_libedit_preferred;
5514   case $withval in
5515     yes)
5516       :
5517       ;;
5518     no)
5519       :
5520       ;;
5521     *)
5522       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
5523 $as_echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
5524    { (exit 1); exit 1; }; }
5525       ;;
5526   esac
5527
5528 else
5529   with_libedit_preferred=no
5530
5531 fi
5532
5533
5534
5535
5536 #
5537 # OSSP UUID library
5538 #
5539
5540
5541
5542 # Check whether --with-ossp-uuid was given.
5543 if test "${with_ossp_uuid+set}" = set; then
5544   withval=$with_ossp_uuid;
5545   case $withval in
5546     yes)
5547       :
5548       ;;
5549     no)
5550       :
5551       ;;
5552     *)
5553       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-ossp-uuid option" >&5
5554 $as_echo "$as_me: error: no argument expected for --with-ossp-uuid option" >&2;}
5555    { (exit 1); exit 1; }; }
5556       ;;
5557   esac
5558
5559 else
5560   with_ossp_uuid=no
5561
5562 fi
5563
5564
5565
5566
5567
5568 #
5569 # XML
5570 #
5571
5572
5573
5574 # Check whether --with-libxml was given.
5575 if test "${with_libxml+set}" = set; then
5576   withval=$with_libxml;
5577   case $withval in
5578     yes)
5579
5580 cat >>confdefs.h <<\_ACEOF
5581 #define USE_LIBXML 1
5582 _ACEOF
5583
5584       ;;
5585     no)
5586       :
5587       ;;
5588     *)
5589       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-libxml option" >&5
5590 $as_echo "$as_me: error: no argument expected for --with-libxml option" >&2;}
5591    { (exit 1); exit 1; }; }
5592       ;;
5593   esac
5594
5595 else
5596   with_libxml=no
5597
5598 fi
5599
5600
5601
5602 if test "$with_libxml" = yes ; then
5603   for ac_prog in xml2-config
5604 do
5605   # Extract the first word of "$ac_prog", so it can be a program name with args.
5606 set dummy $ac_prog; ac_word=$2
5607 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5608 $as_echo_n "checking for $ac_word... " >&6; }
5609 if test "${ac_cv_prog_XML2_CONFIG+set}" = set; then
5610   $as_echo_n "(cached) " >&6
5611 else
5612   if test -n "$XML2_CONFIG"; then
5613   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5614 else
5615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5616 for as_dir in $PATH
5617 do
5618   IFS=$as_save_IFS
5619   test -z "$as_dir" && as_dir=.
5620   for ac_exec_ext in '' $ac_executable_extensions; do
5621   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5622     ac_cv_prog_XML2_CONFIG="$ac_prog"
5623     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5624     break 2
5625   fi
5626 done
5627 done
5628 IFS=$as_save_IFS
5629
5630 fi
5631 fi
5632 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5633 if test -n "$XML2_CONFIG"; then
5634   { $as_echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5
5635 $as_echo "$XML2_CONFIG" >&6; }
5636 else
5637   { $as_echo "$as_me:$LINENO: result: no" >&5
5638 $as_echo "no" >&6; }
5639 fi
5640
5641
5642   test -n "$XML2_CONFIG" && break
5643 done
5644
5645   if test -n "$XML2_CONFIG"; then
5646     for pgac_option in `$XML2_CONFIG --cflags`; do
5647       case $pgac_option in
5648         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5649       esac
5650     done
5651     for pgac_option in `$XML2_CONFIG --libs`; do
5652       case $pgac_option in
5653         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5654       esac
5655     done
5656   fi
5657 fi
5658
5659
5660
5661 #
5662 # XSLT
5663 #
5664
5665
5666
5667 # Check whether --with-libxslt was given.
5668 if test "${with_libxslt+set}" = set; then
5669   withval=$with_libxslt;
5670   case $withval in
5671     yes)
5672
5673 cat >>confdefs.h <<\_ACEOF
5674 #define USE_LIBXSLT 1
5675 _ACEOF
5676
5677       ;;
5678     no)
5679       :
5680       ;;
5681     *)
5682       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-libxslt option" >&5
5683 $as_echo "$as_me: error: no argument expected for --with-libxslt option" >&2;}
5684    { (exit 1); exit 1; }; }
5685       ;;
5686   esac
5687
5688 else
5689   with_libxslt=no
5690
5691 fi
5692
5693
5694
5695
5696
5697
5698 #
5699 # tzdata
5700 #
5701
5702
5703
5704 # Check whether --with-system-tzdata was given.
5705 if test "${with_system_tzdata+set}" = set; then
5706   withval=$with_system_tzdata;
5707   case $withval in
5708     yes)
5709       { { $as_echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
5710 $as_echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
5711    { (exit 1); exit 1; }; }
5712       ;;
5713     no)
5714       { { $as_echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
5715 $as_echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
5716    { (exit 1); exit 1; }; }
5717       ;;
5718     *)
5719
5720       ;;
5721   esac
5722
5723 fi
5724
5725
5726
5727
5728 #
5729 # Zlib
5730 #
5731
5732
5733
5734 # Check whether --with-zlib was given.
5735 if test "${with_zlib+set}" = set; then
5736   withval=$with_zlib;
5737   case $withval in
5738     yes)
5739       :
5740       ;;
5741     no)
5742       :
5743       ;;
5744     *)
5745       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
5746 $as_echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
5747    { (exit 1); exit 1; }; }
5748       ;;
5749   esac
5750
5751 else
5752   with_zlib=yes
5753
5754 fi
5755
5756
5757
5758
5759 #
5760 # Elf
5761 #
5762
5763 # Assume system is ELF if it predefines __ELF__ as 1,
5764 # otherwise believe host_os based default.
5765 case $host_os in
5766     freebsd1*|freebsd2*) elf=no;;
5767     freebsd3*|freebsd4*) elf=yes;;
5768 esac
5769
5770
5771 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
5772 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5773 if test "${ac_cv_path_GREP+set}" = set; then
5774   $as_echo_n "(cached) " >&6
5775 else
5776   if test -z "$GREP"; then
5777   ac_path_GREP_found=false
5778   # Loop through the user's path and test for each of PROGNAME-LIST
5779   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5780 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5781 do
5782   IFS=$as_save_IFS
5783   test -z "$as_dir" && as_dir=.
5784   for ac_prog in grep ggrep; do
5785     for ac_exec_ext in '' $ac_executable_extensions; do
5786       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5787       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5788 # Check for GNU ac_path_GREP and select it if it is found.
5789   # Check for GNU $ac_path_GREP
5790 case `"$ac_path_GREP" --version 2>&1` in
5791 *GNU*)
5792   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5793 *)
5794   ac_count=0
5795   $as_echo_n 0123456789 >"conftest.in"
5796   while :
5797   do
5798     cat "conftest.in" "conftest.in" >"conftest.tmp"
5799     mv "conftest.tmp" "conftest.in"
5800     cp "conftest.in" "conftest.nl"
5801     $as_echo 'GREP' >> "conftest.nl"
5802     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5803     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5804     ac_count=`expr $ac_count + 1`
5805     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5806       # Best one so far, save it but keep looking for a better one
5807       ac_cv_path_GREP="$ac_path_GREP"
5808       ac_path_GREP_max=$ac_count
5809     fi
5810     # 10*(2^10) chars as input seems more than enough
5811     test $ac_count -gt 10 && break
5812   done
5813   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5814 esac
5815
5816       $ac_path_GREP_found && break 3
5817     done
5818   done
5819 done
5820 IFS=$as_save_IFS
5821   if test -z "$ac_cv_path_GREP"; then
5822     { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5823 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5824    { (exit 1); exit 1; }; }
5825   fi
5826 else
5827   ac_cv_path_GREP=$GREP
5828 fi
5829
5830 fi
5831 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
5832 $as_echo "$ac_cv_path_GREP" >&6; }
5833  GREP="$ac_cv_path_GREP"
5834
5835
5836 { $as_echo "$as_me:$LINENO: checking for egrep" >&5
5837 $as_echo_n "checking for egrep... " >&6; }
5838 if test "${ac_cv_path_EGREP+set}" = set; then
5839   $as_echo_n "(cached) " >&6
5840 else
5841   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5842    then ac_cv_path_EGREP="$GREP -E"
5843    else
5844      if test -z "$EGREP"; then
5845   ac_path_EGREP_found=false
5846   # Loop through the user's path and test for each of PROGNAME-LIST
5847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5848 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5849 do
5850   IFS=$as_save_IFS
5851   test -z "$as_dir" && as_dir=.
5852   for ac_prog in egrep; do
5853     for ac_exec_ext in '' $ac_executable_extensions; do
5854       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5855       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5856 # Check for GNU ac_path_EGREP and select it if it is found.
5857   # Check for GNU $ac_path_EGREP
5858 case `"$ac_path_EGREP" --version 2>&1` in
5859 *GNU*)
5860   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5861 *)
5862   ac_count=0
5863   $as_echo_n 0123456789 >"conftest.in"
5864   while :
5865   do
5866     cat "conftest.in" "conftest.in" >"conftest.tmp"
5867     mv "conftest.tmp" "conftest.in"
5868     cp "conftest.in" "conftest.nl"
5869     $as_echo 'EGREP' >> "conftest.nl"
5870     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5871     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5872     ac_count=`expr $ac_count + 1`
5873     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5874       # Best one so far, save it but keep looking for a better one
5875       ac_cv_path_EGREP="$ac_path_EGREP"
5876       ac_path_EGREP_max=$ac_count
5877     fi
5878     # 10*(2^10) chars as input seems more than enough
5879     test $ac_count -gt 10 && break
5880   done
5881   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5882 esac
5883
5884       $ac_path_EGREP_found && break 3
5885     done
5886   done
5887 done
5888 IFS=$as_save_IFS
5889   if test -z "$ac_cv_path_EGREP"; then
5890     { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5891 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5892    { (exit 1); exit 1; }; }
5893   fi
5894 else
5895   ac_cv_path_EGREP=$EGREP
5896 fi
5897
5898    fi
5899 fi
5900 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
5901 $as_echo "$ac_cv_path_EGREP" >&6; }
5902  EGREP="$ac_cv_path_EGREP"
5903
5904
5905 cat >conftest.$ac_ext <<_ACEOF
5906 /* confdefs.h.  */
5907 _ACEOF
5908 cat confdefs.h >>conftest.$ac_ext
5909 cat >>conftest.$ac_ext <<_ACEOF
5910 /* end confdefs.h.  */
5911 #if __ELF__
5912   yes
5913 #endif
5914
5915 _ACEOF
5916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5917   $EGREP "yes" >/dev/null 2>&1; then
5918   ELF_SYS=true
5919 else
5920   if test "X$elf" = "Xyes" ; then
5921   ELF_SYS=true
5922 else
5923   ELF_SYS=
5924 fi
5925 fi
5926 rm -f conftest*
5927
5928
5929
5930 #
5931 # Assignments
5932 #
5933
5934 CPPFLAGS="$CPPFLAGS $INCLUDES"
5935 LDFLAGS="$LDFLAGS $LIBDIRS"
5936
5937
5938
5939
5940
5941 # Check whether --with-gnu-ld was given.
5942 if test "${with_gnu_ld+set}" = set; then
5943   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5944 else
5945   with_gnu_ld=no
5946 fi
5947
5948 ac_prog=ld
5949 if test "$GCC" = yes; then
5950   # Check if gcc -print-prog-name=ld gives a path.
5951   { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5
5952 $as_echo_n "checking for ld used by GCC... " >&6; }
5953   case $host in
5954   *-*-mingw*)
5955     # gcc leaves a trailing carriage return which upsets mingw
5956     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5957   *)
5958     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5959   esac
5960   case "$ac_prog" in
5961     # Accept absolute paths.
5962     [\\/]* | [A-Za-z]:[\\/]*)
5963       re_direlt='/[^/][^/]*/\.\./'
5964       # Canonicalize the path of ld
5965       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
5966       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5967         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
5968       done
5969       test -z "$LD" && LD="$ac_prog"
5970       ;;
5971   "")
5972     # If it fails, then pretend we aren't using GCC.
5973     ac_prog=ld
5974     ;;
5975   *)
5976     # If it is relative, then search for the first ld in PATH.
5977     with_gnu_ld=unknown
5978     ;;
5979   esac
5980 elif test "$with_gnu_ld" = yes; then
5981   { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
5982 $as_echo_n "checking for GNU ld... " >&6; }
5983 else
5984   { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
5985 $as_echo_n "checking for non-GNU ld... " >&6; }
5986 fi
5987 if test "${ac_cv_path_LD+set}" = set; then
5988   $as_echo_n "(cached) " >&6
5989 else
5990   if test -z "$LD"; then
5991   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
5992   for ac_dir in $PATH; do
5993     test -z "$ac_dir" && ac_dir=.
5994     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5995       ac_cv_path_LD="$ac_dir/$ac_prog"
5996       # Check to see if the program is GNU ld.  I'd rather use --version,
5997       # but apparently some GNU ld's only accept -v.
5998       # Break only if it was the GNU/non-GNU ld that we prefer.
5999       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6000         test "$with_gnu_ld" != no && break
6001       else
6002         test "$with_gnu_ld" != yes && break
6003       fi
6004     fi
6005   done
6006   IFS="$ac_save_ifs"
6007 else
6008   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6009 fi
6010 fi
6011
6012 LD="$ac_cv_path_LD"
6013 if test -n "$LD"; then
6014   { $as_echo "$as_me:$LINENO: result: $LD" >&5
6015 $as_echo "$LD" >&6; }
6016 else
6017   { $as_echo "$as_me:$LINENO: result: no" >&5
6018 $as_echo "no" >&6; }
6019 fi
6020 test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
6021 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
6022    { (exit 1); exit 1; }; }
6023 { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
6024 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6025 if test "${ac_cv_prog_gnu_ld+set}" = set; then
6026   $as_echo_n "(cached) " >&6
6027 else
6028   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6029 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6030   ac_cv_prog_gnu_ld=yes
6031 else
6032   ac_cv_prog_gnu_ld=no
6033 fi
6034 fi
6035 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
6036 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6037 with_gnu_ld=$ac_cv_prog_gnu_ld
6038
6039
6040
6041
6042 case $host_os in sysv5*)
6043   { $as_echo "$as_me:$LINENO: checking whether ld -R works" >&5
6044 $as_echo_n "checking whether ld -R works... " >&6; }
6045 if test "${pgac_cv_prog_ld_R+set}" = set; then
6046   $as_echo_n "(cached) " >&6
6047 else
6048
6049     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6050     cat >conftest.$ac_ext <<_ACEOF
6051 /* confdefs.h.  */
6052 _ACEOF
6053 cat confdefs.h >>conftest.$ac_ext
6054 cat >>conftest.$ac_ext <<_ACEOF
6055 /* end confdefs.h.  */
6056
6057 int
6058 main ()
6059 {
6060
6061   ;
6062   return 0;
6063 }
6064 _ACEOF
6065 rm -f conftest.$ac_objext conftest$ac_exeext
6066 if { (ac_try="$ac_link"
6067 case "(($ac_try" in
6068   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6069   *) ac_try_echo=$ac_try;;
6070 esac
6071 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6072 $as_echo "$ac_try_echo") >&5
6073   (eval "$ac_link") 2>conftest.er1
6074   ac_status=$?
6075   grep -v '^ *+' conftest.er1 >conftest.err
6076   rm -f conftest.er1
6077   cat conftest.err >&5
6078   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6079   (exit $ac_status); } && {
6080          test -z "$ac_c_werror_flag" ||
6081          test ! -s conftest.err
6082        } && test -s conftest$ac_exeext && {
6083          test "$cross_compiling" = yes ||
6084          $as_test_x conftest$ac_exeext
6085        }; then
6086   pgac_cv_prog_ld_R=yes
6087 else
6088   $as_echo "$as_me: failed program was:" >&5
6089 sed 's/^/| /' conftest.$ac_ext >&5
6090
6091         pgac_cv_prog_ld_R=no
6092 fi
6093
6094 rm -rf conftest.dSYM
6095 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6096       conftest$ac_exeext conftest.$ac_ext
6097     LDFLAGS=$pgac_save_LDFLAGS
6098
6099 fi
6100 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
6101 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6102   ld_R_works=$pgac_cv_prog_ld_R
6103
6104 esac
6105 if test -n "$ac_tool_prefix"; then
6106   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6107 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6108 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6109 $as_echo_n "checking for $ac_word... " >&6; }
6110 if test "${ac_cv_prog_RANLIB+set}" = set; then
6111   $as_echo_n "(cached) " >&6
6112 else
6113   if test -n "$RANLIB"; then
6114   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6115 else
6116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6117 for as_dir in $PATH
6118 do
6119   IFS=$as_save_IFS
6120   test -z "$as_dir" && as_dir=.
6121   for ac_exec_ext in '' $ac_executable_extensions; do
6122   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6123     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6124     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6125     break 2
6126   fi
6127 done
6128 done
6129 IFS=$as_save_IFS
6130
6131 fi
6132 fi
6133 RANLIB=$ac_cv_prog_RANLIB
6134 if test -n "$RANLIB"; then
6135   { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
6136 $as_echo "$RANLIB" >&6; }
6137 else
6138   { $as_echo "$as_me:$LINENO: result: no" >&5
6139 $as_echo "no" >&6; }
6140 fi
6141
6142
6143 fi
6144 if test -z "$ac_cv_prog_RANLIB"; then
6145   ac_ct_RANLIB=$RANLIB
6146   # Extract the first word of "ranlib", so it can be a program name with args.
6147 set dummy ranlib; ac_word=$2
6148 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6149 $as_echo_n "checking for $ac_word... " >&6; }
6150 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6151   $as_echo_n "(cached) " >&6
6152 else
6153   if test -n "$ac_ct_RANLIB"; then
6154   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6155 else
6156 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6157 for as_dir in $PATH
6158 do
6159   IFS=$as_save_IFS
6160   test -z "$as_dir" && as_dir=.
6161   for ac_exec_ext in '' $ac_executable_extensions; do
6162   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6163     ac_cv_prog_ac_ct_RANLIB="ranlib"
6164     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6165     break 2
6166   fi
6167 done
6168 done
6169 IFS=$as_save_IFS
6170
6171 fi
6172 fi
6173 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6174 if test -n "$ac_ct_RANLIB"; then
6175   { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6176 $as_echo "$ac_ct_RANLIB" >&6; }
6177 else
6178   { $as_echo "$as_me:$LINENO: result: no" >&5
6179 $as_echo "no" >&6; }
6180 fi
6181
6182   if test "x$ac_ct_RANLIB" = x; then
6183     RANLIB=":"
6184   else
6185     case $cross_compiling:$ac_tool_warned in
6186 yes:)
6187 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6188 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6189 ac_tool_warned=yes ;;
6190 esac
6191     RANLIB=$ac_ct_RANLIB
6192   fi
6193 else
6194   RANLIB="$ac_cv_prog_RANLIB"
6195 fi
6196
6197
6198   if test -n "$ac_tool_prefix"; then
6199   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6200 set dummy ${ac_tool_prefix}strip; ac_word=$2
6201 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6202 $as_echo_n "checking for $ac_word... " >&6; }
6203 if test "${ac_cv_prog_STRIP+set}" = set; then
6204   $as_echo_n "(cached) " >&6
6205 else
6206   if test -n "$STRIP"; then
6207   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6208 else
6209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6210 for as_dir in $PATH
6211 do
6212   IFS=$as_save_IFS
6213   test -z "$as_dir" && as_dir=.
6214   for ac_exec_ext in '' $ac_executable_extensions; do
6215   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6216     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6217     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6218     break 2
6219   fi
6220 done
6221 done
6222 IFS=$as_save_IFS
6223
6224 fi
6225 fi
6226 STRIP=$ac_cv_prog_STRIP
6227 if test -n "$STRIP"; then
6228   { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
6229 $as_echo "$STRIP" >&6; }
6230 else
6231   { $as_echo "$as_me:$LINENO: result: no" >&5
6232 $as_echo "no" >&6; }
6233 fi
6234
6235
6236 fi
6237 if test -z "$ac_cv_prog_STRIP"; then
6238   ac_ct_STRIP=$STRIP
6239   # Extract the first word of "strip", so it can be a program name with args.
6240 set dummy strip; ac_word=$2
6241 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6242 $as_echo_n "checking for $ac_word... " >&6; }
6243 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6244   $as_echo_n "(cached) " >&6
6245 else
6246   if test -n "$ac_ct_STRIP"; then
6247   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6248 else
6249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6250 for as_dir in $PATH
6251 do
6252   IFS=$as_save_IFS
6253   test -z "$as_dir" && as_dir=.
6254   for ac_exec_ext in '' $ac_executable_extensions; do
6255   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6256     ac_cv_prog_ac_ct_STRIP="strip"
6257     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6258     break 2
6259   fi
6260 done
6261 done
6262 IFS=$as_save_IFS
6263
6264 fi
6265 fi
6266 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6267 if test -n "$ac_ct_STRIP"; then
6268   { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6269 $as_echo "$ac_ct_STRIP" >&6; }
6270 else
6271   { $as_echo "$as_me:$LINENO: result: no" >&5
6272 $as_echo "no" >&6; }
6273 fi
6274
6275   if test "x$ac_ct_STRIP" = x; then
6276     STRIP=":"
6277   else
6278     case $cross_compiling:$ac_tool_warned in
6279 yes:)
6280 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6281 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6282 ac_tool_warned=yes ;;
6283 esac
6284     STRIP=$ac_ct_STRIP
6285   fi
6286 else
6287   STRIP="$ac_cv_prog_STRIP"
6288 fi
6289
6290
6291   { $as_echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
6292 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6293   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6294     STRIP_STATIC_LIB="$STRIP -x"
6295     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6296     { $as_echo "$as_me:$LINENO: result: yes" >&5
6297 $as_echo "yes" >&6; }
6298   else
6299     STRIP_STATIC_LIB=:
6300     STRIP_SHARED_LIB=:
6301     { $as_echo "$as_me:$LINENO: result: no" >&5
6302 $as_echo "no" >&6; }
6303   fi
6304
6305
6306
6307 if test -n "$ac_tool_prefix"; then
6308   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6309 set dummy ${ac_tool_prefix}ar; ac_word=$2
6310 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6311 $as_echo_n "checking for $ac_word... " >&6; }
6312 if test "${ac_cv_prog_AR+set}" = set; then
6313   $as_echo_n "(cached) " >&6
6314 else
6315   if test -n "$AR"; then
6316   ac_cv_prog_AR="$AR" # Let the user override the test.
6317 else
6318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6319 for as_dir in $PATH
6320 do
6321   IFS=$as_save_IFS
6322   test -z "$as_dir" && as_dir=.
6323   for ac_exec_ext in '' $ac_executable_extensions; do
6324   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6325     ac_cv_prog_AR="${ac_tool_prefix}ar"
6326     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6327     break 2
6328   fi
6329 done
6330 done
6331 IFS=$as_save_IFS
6332
6333 fi
6334 fi
6335 AR=$ac_cv_prog_AR
6336 if test -n "$AR"; then
6337   { $as_echo "$as_me:$LINENO: result: $AR" >&5
6338 $as_echo "$AR" >&6; }
6339 else
6340   { $as_echo "$as_me:$LINENO: result: no" >&5
6341 $as_echo "no" >&6; }
6342 fi
6343
6344
6345 fi
6346 if test -z "$ac_cv_prog_AR"; then
6347   ac_ct_AR=$AR
6348   # Extract the first word of "ar", so it can be a program name with args.
6349 set dummy ar; ac_word=$2
6350 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6351 $as_echo_n "checking for $ac_word... " >&6; }
6352 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
6353   $as_echo_n "(cached) " >&6
6354 else
6355   if test -n "$ac_ct_AR"; then
6356   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6357 else
6358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6359 for as_dir in $PATH
6360 do
6361   IFS=$as_save_IFS
6362   test -z "$as_dir" && as_dir=.
6363   for ac_exec_ext in '' $ac_executable_extensions; do
6364   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6365     ac_cv_prog_ac_ct_AR="ar"
6366     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6367     break 2
6368   fi
6369 done
6370 done
6371 IFS=$as_save_IFS
6372
6373 fi
6374 fi
6375 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6376 if test -n "$ac_ct_AR"; then
6377   { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
6378 $as_echo "$ac_ct_AR" >&6; }
6379 else
6380   { $as_echo "$as_me:$LINENO: result: no" >&5
6381 $as_echo "no" >&6; }
6382 fi
6383
6384   if test "x$ac_ct_AR" = x; then
6385     AR="ar"
6386   else
6387     case $cross_compiling:$ac_tool_warned in
6388 yes:)
6389 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6390 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6391 ac_tool_warned=yes ;;
6392 esac
6393     AR=$ac_ct_AR
6394   fi
6395 else
6396   AR="$ac_cv_prog_AR"
6397 fi
6398
6399 if test "$PORTNAME" = "win32"; then
6400   if test -n "$ac_tool_prefix"; then
6401   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6402 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6403 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6404 $as_echo_n "checking for $ac_word... " >&6; }
6405 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
6406   $as_echo_n "(cached) " >&6
6407 else
6408   if test -n "$DLLTOOL"; then
6409   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6410 else
6411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6412 for as_dir in $PATH
6413 do
6414   IFS=$as_save_IFS
6415   test -z "$as_dir" && as_dir=.
6416   for ac_exec_ext in '' $ac_executable_extensions; do
6417   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6418     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6419     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6420     break 2
6421   fi
6422 done
6423 done
6424 IFS=$as_save_IFS
6425
6426 fi
6427 fi
6428 DLLTOOL=$ac_cv_prog_DLLTOOL
6429 if test -n "$DLLTOOL"; then
6430   { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5
6431 $as_echo "$DLLTOOL" >&6; }
6432 else
6433   { $as_echo "$as_me:$LINENO: result: no" >&5
6434 $as_echo "no" >&6; }
6435 fi
6436
6437
6438 fi
6439 if test -z "$ac_cv_prog_DLLTOOL"; then
6440   ac_ct_DLLTOOL=$DLLTOOL
6441   # Extract the first word of "dlltool", so it can be a program name with args.
6442 set dummy dlltool; ac_word=$2
6443 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6444 $as_echo_n "checking for $ac_word... " >&6; }
6445 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
6446   $as_echo_n "(cached) " >&6
6447 else
6448   if test -n "$ac_ct_DLLTOOL"; then
6449   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6450 else
6451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6452 for as_dir in $PATH
6453 do
6454   IFS=$as_save_IFS
6455   test -z "$as_dir" && as_dir=.
6456   for ac_exec_ext in '' $ac_executable_extensions; do
6457   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6458     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6459     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6460     break 2
6461   fi
6462 done
6463 done
6464 IFS=$as_save_IFS
6465
6466 fi
6467 fi
6468 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6469 if test -n "$ac_ct_DLLTOOL"; then
6470   { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
6471 $as_echo "$ac_ct_DLLTOOL" >&6; }
6472 else
6473   { $as_echo "$as_me:$LINENO: result: no" >&5
6474 $as_echo "no" >&6; }
6475 fi
6476
6477   if test "x$ac_ct_DLLTOOL" = x; then
6478     DLLTOOL="dlltool"
6479   else
6480     case $cross_compiling:$ac_tool_warned in
6481 yes:)
6482 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6483 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6484 ac_tool_warned=yes ;;
6485 esac
6486     DLLTOOL=$ac_ct_DLLTOOL
6487   fi
6488 else
6489   DLLTOOL="$ac_cv_prog_DLLTOOL"
6490 fi
6491
6492   if test -n "$ac_tool_prefix"; then
6493   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6494 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6495 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6496 $as_echo_n "checking for $ac_word... " >&6; }
6497 if test "${ac_cv_prog_DLLWRAP+set}" = set; then
6498   $as_echo_n "(cached) " >&6
6499 else
6500   if test -n "$DLLWRAP"; then
6501   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6502 else
6503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6504 for as_dir in $PATH
6505 do
6506   IFS=$as_save_IFS
6507   test -z "$as_dir" && as_dir=.
6508   for ac_exec_ext in '' $ac_executable_extensions; do
6509   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6510     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6511     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6512     break 2
6513   fi
6514 done
6515 done
6516 IFS=$as_save_IFS
6517
6518 fi
6519 fi
6520 DLLWRAP=$ac_cv_prog_DLLWRAP
6521 if test -n "$DLLWRAP"; then
6522   { $as_echo "$as_me:$LINENO: result: $DLLWRAP" >&5
6523 $as_echo "$DLLWRAP" >&6; }
6524 else
6525   { $as_echo "$as_me:$LINENO: result: no" >&5
6526 $as_echo "no" >&6; }
6527 fi
6528
6529
6530 fi
6531 if test -z "$ac_cv_prog_DLLWRAP"; then
6532   ac_ct_DLLWRAP=$DLLWRAP
6533   # Extract the first word of "dllwrap", so it can be a program name with args.
6534 set dummy dllwrap; ac_word=$2
6535 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6536 $as_echo_n "checking for $ac_word... " >&6; }
6537 if test "${ac_cv_prog_ac_ct_DLLWRAP+set}" = set; then
6538   $as_echo_n "(cached) " >&6
6539 else
6540   if test -n "$ac_ct_DLLWRAP"; then
6541   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6542 else
6543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6544 for as_dir in $PATH
6545 do
6546   IFS=$as_save_IFS
6547   test -z "$as_dir" && as_dir=.
6548   for ac_exec_ext in '' $ac_executable_extensions; do
6549   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6550     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6551     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6552     break 2
6553   fi
6554 done
6555 done
6556 IFS=$as_save_IFS
6557
6558 fi
6559 fi
6560 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6561 if test -n "$ac_ct_DLLWRAP"; then
6562   { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLWRAP" >&5
6563 $as_echo "$ac_ct_DLLWRAP" >&6; }
6564 else
6565   { $as_echo "$as_me:$LINENO: result: no" >&5
6566 $as_echo "no" >&6; }
6567 fi
6568
6569   if test "x$ac_ct_DLLWRAP" = x; then
6570     DLLWRAP="dllwrap"
6571   else
6572     case $cross_compiling:$ac_tool_warned in
6573 yes:)
6574 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6575 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6576 ac_tool_warned=yes ;;
6577 esac
6578     DLLWRAP=$ac_ct_DLLWRAP
6579   fi
6580 else
6581   DLLWRAP="$ac_cv_prog_DLLWRAP"
6582 fi
6583
6584   if test -n "$ac_tool_prefix"; then
6585   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6586 set dummy ${ac_tool_prefix}windres; ac_word=$2
6587 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6588 $as_echo_n "checking for $ac_word... " >&6; }
6589 if test "${ac_cv_prog_WINDRES+set}" = set; then
6590   $as_echo_n "(cached) " >&6
6591 else
6592   if test -n "$WINDRES"; then
6593   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6594 else
6595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6596 for as_dir in $PATH
6597 do
6598   IFS=$as_save_IFS
6599   test -z "$as_dir" && as_dir=.
6600   for ac_exec_ext in '' $ac_executable_extensions; do
6601   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6602     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6603     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6604     break 2
6605   fi
6606 done
6607 done
6608 IFS=$as_save_IFS
6609
6610 fi
6611 fi
6612 WINDRES=$ac_cv_prog_WINDRES
6613 if test -n "$WINDRES"; then
6614   { $as_echo "$as_me:$LINENO: result: $WINDRES" >&5
6615 $as_echo "$WINDRES" >&6; }
6616 else
6617   { $as_echo "$as_me:$LINENO: result: no" >&5
6618 $as_echo "no" >&6; }
6619 fi
6620
6621
6622 fi
6623 if test -z "$ac_cv_prog_WINDRES"; then
6624   ac_ct_WINDRES=$WINDRES
6625   # Extract the first word of "windres", so it can be a program name with args.
6626 set dummy windres; ac_word=$2
6627 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6628 $as_echo_n "checking for $ac_word... " >&6; }
6629 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
6630   $as_echo_n "(cached) " >&6
6631 else
6632   if test -n "$ac_ct_WINDRES"; then
6633   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6634 else
6635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6636 for as_dir in $PATH
6637 do
6638   IFS=$as_save_IFS
6639   test -z "$as_dir" && as_dir=.
6640   for ac_exec_ext in '' $ac_executable_extensions; do
6641   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6642     ac_cv_prog_ac_ct_WINDRES="windres"
6643     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6644     break 2
6645   fi
6646 done
6647 done
6648 IFS=$as_save_IFS
6649
6650 fi
6651 fi
6652 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6653 if test -n "$ac_ct_WINDRES"; then
6654   { $as_echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
6655 $as_echo "$ac_ct_WINDRES" >&6; }
6656 else
6657   { $as_echo "$as_me:$LINENO: result: no" >&5
6658 $as_echo "no" >&6; }
6659 fi
6660
6661   if test "x$ac_ct_WINDRES" = x; then
6662     WINDRES="windres"
6663   else
6664     case $cross_compiling:$ac_tool_warned in
6665 yes:)
6666 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6667 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6668 ac_tool_warned=yes ;;
6669 esac
6670     WINDRES=$ac_ct_WINDRES
6671   fi
6672 else
6673   WINDRES="$ac_cv_prog_WINDRES"
6674 fi
6675
6676 fi
6677
6678 # Extract the first word of "tar", so it can be a program name with args.
6679 set dummy tar; ac_word=$2
6680 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6681 $as_echo_n "checking for $ac_word... " >&6; }
6682 if test "${ac_cv_path_TAR+set}" = set; then
6683   $as_echo_n "(cached) " >&6
6684 else
6685   case $TAR in
6686   [\\/]* | ?:[\\/]*)
6687   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6688   ;;
6689   *)
6690   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6691 for as_dir in $PATH
6692 do
6693   IFS=$as_save_IFS
6694   test -z "$as_dir" && as_dir=.
6695   for ac_exec_ext in '' $ac_executable_extensions; do
6696   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6697     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6698     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6699     break 2
6700   fi
6701 done
6702 done
6703 IFS=$as_save_IFS
6704
6705   ;;
6706 esac
6707 fi
6708 TAR=$ac_cv_path_TAR
6709 if test -n "$TAR"; then
6710   { $as_echo "$as_me:$LINENO: result: $TAR" >&5
6711 $as_echo "$TAR" >&6; }
6712 else
6713   { $as_echo "$as_me:$LINENO: result: no" >&5
6714 $as_echo "no" >&6; }
6715 fi
6716
6717
6718 { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
6719 $as_echo_n "checking whether ln -s works... " >&6; }
6720 LN_S=$as_ln_s
6721 if test "$LN_S" = "ln -s"; then
6722   { $as_echo "$as_me:$LINENO: result: yes" >&5
6723 $as_echo "yes" >&6; }
6724 else
6725   { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
6726 $as_echo "no, using $LN_S" >&6; }
6727 fi
6728
6729 for ac_prog in gawk mawk nawk awk
6730 do
6731   # Extract the first word of "$ac_prog", so it can be a program name with args.
6732 set dummy $ac_prog; ac_word=$2
6733 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6734 $as_echo_n "checking for $ac_word... " >&6; }
6735 if test "${ac_cv_prog_AWK+set}" = set; then
6736   $as_echo_n "(cached) " >&6
6737 else
6738   if test -n "$AWK"; then
6739   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6740 else
6741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6742 for as_dir in $PATH
6743 do
6744   IFS=$as_save_IFS
6745   test -z "$as_dir" && as_dir=.
6746   for ac_exec_ext in '' $ac_executable_extensions; do
6747   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6748     ac_cv_prog_AWK="$ac_prog"
6749     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6750     break 2
6751   fi
6752 done
6753 done
6754 IFS=$as_save_IFS
6755
6756 fi
6757 fi
6758 AWK=$ac_cv_prog_AWK
6759 if test -n "$AWK"; then
6760   { $as_echo "$as_me:$LINENO: result: $AWK" >&5
6761 $as_echo "$AWK" >&6; }
6762 else
6763   { $as_echo "$as_me:$LINENO: result: no" >&5
6764 $as_echo "no" >&6; }
6765 fi
6766
6767
6768   test -n "$AWK" && break
6769 done
6770
6771 { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
6772 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6773 if test -z "$MKDIR_P"; then
6774   if test "${ac_cv_path_mkdir+set}" = set; then
6775   $as_echo_n "(cached) " >&6
6776 else
6777   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6778 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6779 do
6780   IFS=$as_save_IFS
6781   test -z "$as_dir" && as_dir=.
6782   for ac_prog in mkdir gmkdir; do
6783          for ac_exec_ext in '' $ac_executable_extensions; do
6784            { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
6785            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6786              'mkdir (GNU coreutils) '* | \
6787              'mkdir (coreutils) '* | \
6788              'mkdir (fileutils) '4.1*)
6789                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6790                break 3;;
6791            esac
6792          done
6793        done
6794 done
6795 IFS=$as_save_IFS
6796
6797 fi
6798
6799   if test "${ac_cv_path_mkdir+set}" = set; then
6800     MKDIR_P="$ac_cv_path_mkdir -p"
6801   else
6802     # As a last resort, use the slow shell script.  Don't cache a
6803     # value for MKDIR_P within a source directory, because that will
6804     # break other packages using the cache if that directory is
6805     # removed, or if the value is a relative name.
6806     test -d ./--version && rmdir ./--version
6807     MKDIR_P="$ac_install_sh -d"
6808   fi
6809 fi
6810 { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
6811 $as_echo "$MKDIR_P" >&6; }
6812
6813 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
6814 # a relative path to it in each makefile where it subsitutes it. This clashes
6815 # with our Makefile.global concept. This workaround helps.
6816 case $MKDIR_P in
6817   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
6818 esac
6819
6820 # Let the user override the search
6821 if test -z "$BISON"; then
6822   for ac_prog in bison
6823 do
6824   # Extract the first word of "$ac_prog", so it can be a program name with args.
6825 set dummy $ac_prog; ac_word=$2
6826 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6827 $as_echo_n "checking for $ac_word... " >&6; }
6828 if test "${ac_cv_path_BISON+set}" = set; then
6829   $as_echo_n "(cached) " >&6
6830 else
6831   case $BISON in
6832   [\\/]* | ?:[\\/]*)
6833   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
6834   ;;
6835   *)
6836   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6837 for as_dir in $PATH
6838 do
6839   IFS=$as_save_IFS
6840   test -z "$as_dir" && as_dir=.
6841   for ac_exec_ext in '' $ac_executable_extensions; do
6842   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6843     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
6844     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6845     break 2
6846   fi
6847 done
6848 done
6849 IFS=$as_save_IFS
6850
6851   ;;
6852 esac
6853 fi
6854 BISON=$ac_cv_path_BISON
6855 if test -n "$BISON"; then
6856   { $as_echo "$as_me:$LINENO: result: $BISON" >&5
6857 $as_echo "$BISON" >&6; }
6858 else
6859   { $as_echo "$as_me:$LINENO: result: no" >&5
6860 $as_echo "no" >&6; }
6861 fi
6862
6863
6864   test -n "$BISON" && break
6865 done
6866
6867 fi
6868
6869 if test "$BISON"; then
6870   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
6871   { $as_echo "$as_me:$LINENO: using $pgac_bison_version" >&5
6872 $as_echo "$as_me: using $pgac_bison_version" >&6;}
6873   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
6874   then
6875     { $as_echo "$as_me:$LINENO: WARNING:
6876 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
6877 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
6878 $as_echo "$as_me: WARNING:
6879 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
6880 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
6881     BISON=""
6882   fi
6883 fi
6884
6885 if test -z "$BISON"; then
6886   { $as_echo "$as_me:$LINENO: WARNING:
6887 *** Without Bison you will not be able to build PostgreSQL from Git nor
6888 *** change any of the parser definition files.  You can obtain Bison from
6889 *** a GNU mirror site.  (If you are using the official distribution of
6890 *** PostgreSQL then you do not need to worry about this, because the Bison
6891 *** output is pre-generated.)" >&5
6892 $as_echo "$as_me: WARNING:
6893 *** Without Bison you will not be able to build PostgreSQL from Git nor
6894 *** change any of the parser definition files.  You can obtain Bison from
6895 *** a GNU mirror site.  (If you are using the official distribution of
6896 *** PostgreSQL then you do not need to worry about this, because the Bison
6897 *** output is pre-generated.)" >&2;}
6898 fi
6899 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
6900
6901
6902 { $as_echo "$as_me:$LINENO: checking for flex" >&5
6903 $as_echo_n "checking for flex... " >&6; }
6904 if test "${pgac_cv_path_flex+set}" = set; then
6905   $as_echo_n "(cached) " >&6
6906 else
6907   # Let the user override the test
6908 if test -n "$FLEX"; then
6909   pgac_cv_path_flex=$FLEX
6910 else
6911   pgac_save_IFS=$IFS
6912   IFS=$PATH_SEPARATOR
6913   for pgac_dir in $PATH; do
6914     IFS=$pgac_save_IFS
6915     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
6916       pgac_dir=`pwd`
6917     fi
6918     for pgac_prog in flex lex; do
6919       pgac_candidate="$pgac_dir/$pgac_prog"
6920       if test -f "$pgac_candidate" \
6921         && $pgac_candidate --version </dev/null >/dev/null 2>&1
6922       then
6923         echo '%%'  > conftest.l
6924         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
6925           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
6926           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
6927           then
6928             pgac_cv_path_flex=$pgac_candidate
6929             break 2
6930           else
6931             { $as_echo "$as_me:$LINENO: WARNING:
6932 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
6933 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
6934 $as_echo "$as_me: WARNING:
6935 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
6936 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
6937           fi
6938         fi
6939       fi
6940     done
6941   done
6942   rm -f conftest.l lex.yy.c
6943   : ${pgac_cv_path_flex=no}
6944 fi
6945
6946 fi
6947 { $as_echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
6948 $as_echo "$pgac_cv_path_flex" >&6; }
6949 if test x"$pgac_cv_path_flex" = x"no"; then
6950   { $as_echo "$as_me:$LINENO: WARNING:
6951 *** Without Flex you will not be able to build PostgreSQL from Git nor
6952 *** change any of the scanner definition files.  You can obtain Flex from
6953 *** a GNU mirror site.  (If you are using the official distribution of
6954 *** PostgreSQL then you do not need to worry about this because the Flex
6955 *** output is pre-generated.)" >&5
6956 $as_echo "$as_me: WARNING:
6957 *** Without Flex you will not be able to build PostgreSQL from Git nor
6958 *** change any of the scanner definition files.  You can obtain Flex from
6959 *** a GNU mirror site.  (If you are using the official distribution of
6960 *** PostgreSQL then you do not need to worry about this because the Flex
6961 *** output is pre-generated.)" >&2;}
6962
6963   FLEX=
6964 else
6965   FLEX=$pgac_cv_path_flex
6966   pgac_flex_version=`$FLEX --version 2>/dev/null`
6967   { $as_echo "$as_me:$LINENO: using $pgac_flex_version" >&5
6968 $as_echo "$as_me: using $pgac_flex_version" >&6;}
6969 fi
6970
6971
6972
6973
6974
6975 # Let the user override the search
6976 if test -z "$PERL"; then
6977   # Extract the first word of "perl", so it can be a program name with args.
6978 set dummy perl; ac_word=$2
6979 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6980 $as_echo_n "checking for $ac_word... " >&6; }
6981 if test "${ac_cv_path_PERL+set}" = set; then
6982   $as_echo_n "(cached) " >&6
6983 else
6984   case $PERL in
6985   [\\/]* | ?:[\\/]*)
6986   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
6987   ;;
6988   *)
6989   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6990 for as_dir in $PATH
6991 do
6992   IFS=$as_save_IFS
6993   test -z "$as_dir" && as_dir=.
6994   for ac_exec_ext in '' $ac_executable_extensions; do
6995   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6996     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
6997     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6998     break 2
6999   fi
7000 done
7001 done
7002 IFS=$as_save_IFS
7003
7004   ;;
7005 esac
7006 fi
7007 PERL=$ac_cv_path_PERL
7008 if test -n "$PERL"; then
7009   { $as_echo "$as_me:$LINENO: result: $PERL" >&5
7010 $as_echo "$PERL" >&6; }
7011 else
7012   { $as_echo "$as_me:$LINENO: result: no" >&5
7013 $as_echo "no" >&6; }
7014 fi
7015
7016
7017 fi
7018
7019 if test "$PERL"; then
7020   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'`
7021   { $as_echo "$as_me:$LINENO: using perl $pgac_perl_version" >&5
7022 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7023   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7024     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7025   then
7026     { $as_echo "$as_me:$LINENO: WARNING:
7027 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7028 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7029 $as_echo "$as_me: WARNING:
7030 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7031 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7032     PERL=""
7033   fi
7034 fi
7035
7036 if test -z "$PERL"; then
7037   { $as_echo "$as_me:$LINENO: WARNING:
7038 *** Without Perl you will not be able to build PostgreSQL from Git.
7039 *** You can obtain Perl from any CPAN mirror site.
7040 *** (If you are using the official distribution of PostgreSQL then you do not
7041 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7042 $as_echo "$as_me: WARNING:
7043 *** Without Perl you will not be able to build PostgreSQL from Git.
7044 *** You can obtain Perl from any CPAN mirror site.
7045 *** (If you are using the official distribution of PostgreSQL then you do not
7046 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7047 fi
7048
7049 if test "$with_perl" = yes; then
7050   if test -z "$PERL"; then
7051     { { $as_echo "$as_me:$LINENO: error: Perl not found" >&5
7052 $as_echo "$as_me: error: Perl not found" >&2;}
7053    { (exit 1); exit 1; }; }
7054   fi
7055
7056 { $as_echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
7057 $as_echo_n "checking for Perl archlibexp... " >&6; }
7058 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7059 { $as_echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
7060 $as_echo "$perl_archlibexp" >&6; }
7061 { $as_echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
7062 $as_echo_n "checking for Perl privlibexp... " >&6; }
7063 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7064 { $as_echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
7065 $as_echo "$perl_privlibexp" >&6; }
7066 { $as_echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
7067 $as_echo_n "checking for Perl useshrplib... " >&6; }
7068 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7069 { $as_echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
7070 $as_echo "$perl_useshrplib" >&6; }
7071
7072 { $as_echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
7073 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7074 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7075 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7076 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7077 if test -z "$perl_embed_ldflags" ; then
7078         { $as_echo "$as_me:$LINENO: result: no" >&5
7079 $as_echo "no" >&6; }
7080         { { $as_echo "$as_me:$LINENO: error: could not determine flags for linking embedded Perl.
7081 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7082 installed." >&5
7083 $as_echo "$as_me: error: could not determine flags for linking embedded Perl.
7084 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7085 installed." >&2;}
7086    { (exit 1); exit 1; }; }
7087 else
7088         { $as_echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
7089 $as_echo "$perl_embed_ldflags" >&6; }
7090 fi
7091
7092 fi
7093
7094 if test "$with_python" = yes; then
7095   # Extract the first word of "python", so it can be a program name with args.
7096 set dummy python; ac_word=$2
7097 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7098 $as_echo_n "checking for $ac_word... " >&6; }
7099 if test "${ac_cv_path_PYTHON+set}" = set; then
7100   $as_echo_n "(cached) " >&6
7101 else
7102   case $PYTHON in
7103   [\\/]* | ?:[\\/]*)
7104   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7105   ;;
7106   *)
7107   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7108 for as_dir in $PATH
7109 do
7110   IFS=$as_save_IFS
7111   test -z "$as_dir" && as_dir=.
7112   for ac_exec_ext in '' $ac_executable_extensions; do
7113   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7114     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7115     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7116     break 2
7117   fi
7118 done
7119 done
7120 IFS=$as_save_IFS
7121
7122   ;;
7123 esac
7124 fi
7125 PYTHON=$ac_cv_path_PYTHON
7126 if test -n "$PYTHON"; then
7127   { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5
7128 $as_echo "$PYTHON" >&6; }
7129 else
7130   { $as_echo "$as_me:$LINENO: result: no" >&5
7131 $as_echo "no" >&6; }
7132 fi
7133
7134
7135 if test x"$PYTHON" = x""; then
7136   { { $as_echo "$as_me:$LINENO: error: Python not found" >&5
7137 $as_echo "$as_me: error: Python not found" >&2;}
7138    { (exit 1); exit 1; }; }
7139 fi
7140
7141
7142 { $as_echo "$as_me:$LINENO: checking for Python distutils module" >&5
7143 $as_echo_n "checking for Python distutils module... " >&6; }
7144 if "${PYTHON}" -c 'import distutils' 2>&5
7145 then
7146     { $as_echo "$as_me:$LINENO: result: yes" >&5
7147 $as_echo "yes" >&6; }
7148 else
7149     { $as_echo "$as_me:$LINENO: result: no" >&5
7150 $as_echo "no" >&6; }
7151     { { $as_echo "$as_me:$LINENO: error: distutils module not found" >&5
7152 $as_echo "$as_me: error: distutils module not found" >&2;}
7153    { (exit 1); exit 1; }; }
7154 fi
7155 { $as_echo "$as_me:$LINENO: checking Python configuration directory" >&5
7156 $as_echo_n "checking Python configuration directory... " >&6; }
7157 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7158 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7159 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'))"`
7160 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print('-I'+distutils.sysconfig.get_python_inc())"`
7161
7162 # This should be enough of a message.
7163 { $as_echo "$as_me:$LINENO: result: $python_configdir" >&5
7164 $as_echo "$python_configdir" >&6; }
7165
7166
7167 { $as_echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
7168 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7169
7170 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7171 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7172 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7173 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7174
7175 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7176 then
7177         # New way: use the official shared library
7178         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7179         python_libspec="-L${python_libdir} -l${ldlibrary}"
7180 else
7181         # Old way: use libpython from python_configdir
7182         python_libdir="${python_configdir}"
7183         python_libspec="-L${python_libdir} -lpython${python_version}"
7184 fi
7185
7186 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7187
7188 { $as_echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
7189 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7190
7191
7192 # threaded python is not supported on bsd's
7193 { $as_echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
7194 $as_echo_n "checking whether Python is compiled with thread support... " >&6; }
7195 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
7196 if test "$pythreads" = "1"; then
7197   { $as_echo "$as_me:$LINENO: result: yes" >&5
7198 $as_echo "yes" >&6; }
7199   case $host_os in
7200   openbsd*|freebsd*)
7201     { { $as_echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
7202 $as_echo "$as_me: error: threaded Python not supported on this platform" >&2;}
7203    { (exit 1); exit 1; }; }
7204     ;;
7205   esac
7206 else
7207   { $as_echo "$as_me:$LINENO: result: no" >&5
7208 $as_echo "no" >&6; }
7209 fi
7210
7211
7212 fi
7213
7214 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7215   # Extract the first word of "zic", so it can be a program name with args.
7216 set dummy zic; ac_word=$2
7217 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7218 $as_echo_n "checking for $ac_word... " >&6; }
7219 if test "${ac_cv_path_ZIC+set}" = set; then
7220   $as_echo_n "(cached) " >&6
7221 else
7222   case $ZIC in
7223   [\\/]* | ?:[\\/]*)
7224   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7225   ;;
7226   *)
7227   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7228 for as_dir in $PATH
7229 do
7230   IFS=$as_save_IFS
7231   test -z "$as_dir" && as_dir=.
7232   for ac_exec_ext in '' $ac_executable_extensions; do
7233   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7234     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7235     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7236     break 2
7237   fi
7238 done
7239 done
7240 IFS=$as_save_IFS
7241
7242   ;;
7243 esac
7244 fi
7245 ZIC=$ac_cv_path_ZIC
7246 if test -n "$ZIC"; then
7247   { $as_echo "$as_me:$LINENO: result: $ZIC" >&5
7248 $as_echo "$ZIC" >&6; }
7249 else
7250   { $as_echo "$as_me:$LINENO: result: no" >&5
7251 $as_echo "no" >&6; }
7252 fi
7253
7254
7255   if test -z "$ZIC"; then
7256     { { $as_echo "$as_me:$LINENO: error:
7257 When cross-compiling, either use the option --with-system-tzdata to use
7258 existing time-zone data, or set the environment variable ZIC to a zic
7259 program to use during the build." >&5
7260 $as_echo "$as_me: error:
7261 When cross-compiling, either use the option --with-system-tzdata to use
7262 existing time-zone data, or set the environment variable ZIC to a zic
7263 program to use during the build." >&2;}
7264    { (exit 1); exit 1; }; }
7265   fi
7266 fi
7267
7268
7269 ##
7270 ## Libraries
7271 ##
7272 ## Most libraries are included only if they demonstrably provide a function
7273 ## we need, but libm is an exception: always include it, because there are
7274 ## too many compilers that play cute optimization games that will break
7275 ## probes for standard functions such as pow().
7276 ##
7277
7278
7279 { $as_echo "$as_me:$LINENO: checking for main in -lm" >&5
7280 $as_echo_n "checking for main in -lm... " >&6; }
7281 if test "${ac_cv_lib_m_main+set}" = set; then
7282   $as_echo_n "(cached) " >&6
7283 else
7284   ac_check_lib_save_LIBS=$LIBS
7285 LIBS="-lm  $LIBS"
7286 cat >conftest.$ac_ext <<_ACEOF
7287 /* confdefs.h.  */
7288 _ACEOF
7289 cat confdefs.h >>conftest.$ac_ext
7290 cat >>conftest.$ac_ext <<_ACEOF
7291 /* end confdefs.h.  */
7292
7293
7294 int
7295 main ()
7296 {
7297 return main ();
7298   ;
7299   return 0;
7300 }
7301 _ACEOF
7302 rm -f conftest.$ac_objext conftest$ac_exeext
7303 if { (ac_try="$ac_link"
7304 case "(($ac_try" in
7305   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7306   *) ac_try_echo=$ac_try;;
7307 esac
7308 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7309 $as_echo "$ac_try_echo") >&5
7310   (eval "$ac_link") 2>conftest.er1
7311   ac_status=$?
7312   grep -v '^ *+' conftest.er1 >conftest.err
7313   rm -f conftest.er1
7314   cat conftest.err >&5
7315   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7316   (exit $ac_status); } && {
7317          test -z "$ac_c_werror_flag" ||
7318          test ! -s conftest.err
7319        } && test -s conftest$ac_exeext && {
7320          test "$cross_compiling" = yes ||
7321          $as_test_x conftest$ac_exeext
7322        }; then
7323   ac_cv_lib_m_main=yes
7324 else
7325   $as_echo "$as_me: failed program was:" >&5
7326 sed 's/^/| /' conftest.$ac_ext >&5
7327
7328         ac_cv_lib_m_main=no
7329 fi
7330
7331 rm -rf conftest.dSYM
7332 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7333       conftest$ac_exeext conftest.$ac_ext
7334 LIBS=$ac_check_lib_save_LIBS
7335 fi
7336 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
7337 $as_echo "$ac_cv_lib_m_main" >&6; }
7338 if test "x$ac_cv_lib_m_main" = x""yes; then
7339   cat >>confdefs.h <<_ACEOF
7340 #define HAVE_LIBM 1
7341 _ACEOF
7342
7343   LIBS="-lm $LIBS"
7344
7345 fi
7346
7347 { $as_echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
7348 $as_echo_n "checking for library containing setproctitle... " >&6; }
7349 if test "${ac_cv_search_setproctitle+set}" = set; then
7350   $as_echo_n "(cached) " >&6
7351 else
7352   ac_func_search_save_LIBS=$LIBS
7353 cat >conftest.$ac_ext <<_ACEOF
7354 /* confdefs.h.  */
7355 _ACEOF
7356 cat confdefs.h >>conftest.$ac_ext
7357 cat >>conftest.$ac_ext <<_ACEOF
7358 /* end confdefs.h.  */
7359
7360 /* Override any GCC internal prototype to avoid an error.
7361    Use char because int might match the return type of a GCC
7362    builtin and then its argument prototype would still apply.  */
7363 #ifdef __cplusplus
7364 extern "C"
7365 #endif
7366 char setproctitle ();
7367 int
7368 main ()
7369 {
7370 return setproctitle ();
7371   ;
7372   return 0;
7373 }
7374 _ACEOF
7375 for ac_lib in '' util; do
7376   if test -z "$ac_lib"; then
7377     ac_res="none required"
7378   else
7379     ac_res=-l$ac_lib
7380     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7381   fi
7382   rm -f conftest.$ac_objext conftest$ac_exeext
7383 if { (ac_try="$ac_link"
7384 case "(($ac_try" in
7385   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7386   *) ac_try_echo=$ac_try;;
7387 esac
7388 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7389 $as_echo "$ac_try_echo") >&5
7390   (eval "$ac_link") 2>conftest.er1
7391   ac_status=$?
7392   grep -v '^ *+' conftest.er1 >conftest.err
7393   rm -f conftest.er1
7394   cat conftest.err >&5
7395   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7396   (exit $ac_status); } && {
7397          test -z "$ac_c_werror_flag" ||
7398          test ! -s conftest.err
7399        } && test -s conftest$ac_exeext && {
7400          test "$cross_compiling" = yes ||
7401          $as_test_x conftest$ac_exeext
7402        }; then
7403   ac_cv_search_setproctitle=$ac_res
7404 else
7405   $as_echo "$as_me: failed program was:" >&5
7406 sed 's/^/| /' conftest.$ac_ext >&5
7407
7408
7409 fi
7410
7411 rm -rf conftest.dSYM
7412 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7413       conftest$ac_exeext
7414   if test "${ac_cv_search_setproctitle+set}" = set; then
7415   break
7416 fi
7417 done
7418 if test "${ac_cv_search_setproctitle+set}" = set; then
7419   :
7420 else
7421   ac_cv_search_setproctitle=no
7422 fi
7423 rm conftest.$ac_ext
7424 LIBS=$ac_func_search_save_LIBS
7425 fi
7426 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
7427 $as_echo "$ac_cv_search_setproctitle" >&6; }
7428 ac_res=$ac_cv_search_setproctitle
7429 if test "$ac_res" != no; then
7430   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7431
7432 fi
7433
7434 { $as_echo "$as_me:$LINENO: checking for library containing dlopen" >&5
7435 $as_echo_n "checking for library containing dlopen... " >&6; }
7436 if test "${ac_cv_search_dlopen+set}" = set; then
7437   $as_echo_n "(cached) " >&6
7438 else
7439   ac_func_search_save_LIBS=$LIBS
7440 cat >conftest.$ac_ext <<_ACEOF
7441 /* confdefs.h.  */
7442 _ACEOF
7443 cat confdefs.h >>conftest.$ac_ext
7444 cat >>conftest.$ac_ext <<_ACEOF
7445 /* end confdefs.h.  */
7446
7447 /* Override any GCC internal prototype to avoid an error.
7448    Use char because int might match the return type of a GCC
7449    builtin and then its argument prototype would still apply.  */
7450 #ifdef __cplusplus
7451 extern "C"
7452 #endif
7453 char dlopen ();
7454 int
7455 main ()
7456 {
7457 return dlopen ();
7458   ;
7459   return 0;
7460 }
7461 _ACEOF
7462 for ac_lib in '' dl; do
7463   if test -z "$ac_lib"; then
7464     ac_res="none required"
7465   else
7466     ac_res=-l$ac_lib
7467     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7468   fi
7469   rm -f conftest.$ac_objext conftest$ac_exeext
7470 if { (ac_try="$ac_link"
7471 case "(($ac_try" in
7472   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7473   *) ac_try_echo=$ac_try;;
7474 esac
7475 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7476 $as_echo "$ac_try_echo") >&5
7477   (eval "$ac_link") 2>conftest.er1
7478   ac_status=$?
7479   grep -v '^ *+' conftest.er1 >conftest.err
7480   rm -f conftest.er1
7481   cat conftest.err >&5
7482   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483   (exit $ac_status); } && {
7484          test -z "$ac_c_werror_flag" ||
7485          test ! -s conftest.err
7486        } && test -s conftest$ac_exeext && {
7487          test "$cross_compiling" = yes ||
7488          $as_test_x conftest$ac_exeext
7489        }; then
7490   ac_cv_search_dlopen=$ac_res
7491 else
7492   $as_echo "$as_me: failed program was:" >&5
7493 sed 's/^/| /' conftest.$ac_ext >&5
7494
7495
7496 fi
7497
7498 rm -rf conftest.dSYM
7499 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7500       conftest$ac_exeext
7501   if test "${ac_cv_search_dlopen+set}" = set; then
7502   break
7503 fi
7504 done
7505 if test "${ac_cv_search_dlopen+set}" = set; then
7506   :
7507 else
7508   ac_cv_search_dlopen=no
7509 fi
7510 rm conftest.$ac_ext
7511 LIBS=$ac_func_search_save_LIBS
7512 fi
7513 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
7514 $as_echo "$ac_cv_search_dlopen" >&6; }
7515 ac_res=$ac_cv_search_dlopen
7516 if test "$ac_res" != no; then
7517   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7518
7519 fi
7520
7521 { $as_echo "$as_me:$LINENO: checking for library containing socket" >&5
7522 $as_echo_n "checking for library containing socket... " >&6; }
7523 if test "${ac_cv_search_socket+set}" = set; then
7524   $as_echo_n "(cached) " >&6
7525 else
7526   ac_func_search_save_LIBS=$LIBS
7527 cat >conftest.$ac_ext <<_ACEOF
7528 /* confdefs.h.  */
7529 _ACEOF
7530 cat confdefs.h >>conftest.$ac_ext
7531 cat >>conftest.$ac_ext <<_ACEOF
7532 /* end confdefs.h.  */
7533
7534 /* Override any GCC internal prototype to avoid an error.
7535    Use char because int might match the return type of a GCC
7536    builtin and then its argument prototype would still apply.  */
7537 #ifdef __cplusplus
7538 extern "C"
7539 #endif
7540 char socket ();
7541 int
7542 main ()
7543 {
7544 return socket ();
7545   ;
7546   return 0;
7547 }
7548 _ACEOF
7549 for ac_lib in '' socket wsock32; do
7550   if test -z "$ac_lib"; then
7551     ac_res="none required"
7552   else
7553     ac_res=-l$ac_lib
7554     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7555   fi
7556   rm -f conftest.$ac_objext conftest$ac_exeext
7557 if { (ac_try="$ac_link"
7558 case "(($ac_try" in
7559   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7560   *) ac_try_echo=$ac_try;;
7561 esac
7562 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7563 $as_echo "$ac_try_echo") >&5
7564   (eval "$ac_link") 2>conftest.er1
7565   ac_status=$?
7566   grep -v '^ *+' conftest.er1 >conftest.err
7567   rm -f conftest.er1
7568   cat conftest.err >&5
7569   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7570   (exit $ac_status); } && {
7571          test -z "$ac_c_werror_flag" ||
7572          test ! -s conftest.err
7573        } && test -s conftest$ac_exeext && {
7574          test "$cross_compiling" = yes ||
7575          $as_test_x conftest$ac_exeext
7576        }; then
7577   ac_cv_search_socket=$ac_res
7578 else
7579   $as_echo "$as_me: failed program was:" >&5
7580 sed 's/^/| /' conftest.$ac_ext >&5
7581
7582
7583 fi
7584
7585 rm -rf conftest.dSYM
7586 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7587       conftest$ac_exeext
7588   if test "${ac_cv_search_socket+set}" = set; then
7589   break
7590 fi
7591 done
7592 if test "${ac_cv_search_socket+set}" = set; then
7593   :
7594 else
7595   ac_cv_search_socket=no
7596 fi
7597 rm conftest.$ac_ext
7598 LIBS=$ac_func_search_save_LIBS
7599 fi
7600 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
7601 $as_echo "$ac_cv_search_socket" >&6; }
7602 ac_res=$ac_cv_search_socket
7603 if test "$ac_res" != no; then
7604   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7605
7606 fi
7607
7608 { $as_echo "$as_me:$LINENO: checking for library containing shl_load" >&5
7609 $as_echo_n "checking for library containing shl_load... " >&6; }
7610 if test "${ac_cv_search_shl_load+set}" = set; then
7611   $as_echo_n "(cached) " >&6
7612 else
7613   ac_func_search_save_LIBS=$LIBS
7614 cat >conftest.$ac_ext <<_ACEOF
7615 /* confdefs.h.  */
7616 _ACEOF
7617 cat confdefs.h >>conftest.$ac_ext
7618 cat >>conftest.$ac_ext <<_ACEOF
7619 /* end confdefs.h.  */
7620
7621 /* Override any GCC internal prototype to avoid an error.
7622    Use char because int might match the return type of a GCC
7623    builtin and then its argument prototype would still apply.  */
7624 #ifdef __cplusplus
7625 extern "C"
7626 #endif
7627 char shl_load ();
7628 int
7629 main ()
7630 {
7631 return shl_load ();
7632   ;
7633   return 0;
7634 }
7635 _ACEOF
7636 for ac_lib in '' dld; do
7637   if test -z "$ac_lib"; then
7638     ac_res="none required"
7639   else
7640     ac_res=-l$ac_lib
7641     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7642   fi
7643   rm -f conftest.$ac_objext conftest$ac_exeext
7644 if { (ac_try="$ac_link"
7645 case "(($ac_try" in
7646   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7647   *) ac_try_echo=$ac_try;;
7648 esac
7649 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7650 $as_echo "$ac_try_echo") >&5
7651   (eval "$ac_link") 2>conftest.er1
7652   ac_status=$?
7653   grep -v '^ *+' conftest.er1 >conftest.err
7654   rm -f conftest.er1
7655   cat conftest.err >&5
7656   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7657   (exit $ac_status); } && {
7658          test -z "$ac_c_werror_flag" ||
7659          test ! -s conftest.err
7660        } && test -s conftest$ac_exeext && {
7661          test "$cross_compiling" = yes ||
7662          $as_test_x conftest$ac_exeext
7663        }; then
7664   ac_cv_search_shl_load=$ac_res
7665 else
7666   $as_echo "$as_me: failed program was:" >&5
7667 sed 's/^/| /' conftest.$ac_ext >&5
7668
7669
7670 fi
7671
7672 rm -rf conftest.dSYM
7673 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7674       conftest$ac_exeext
7675   if test "${ac_cv_search_shl_load+set}" = set; then
7676   break
7677 fi
7678 done
7679 if test "${ac_cv_search_shl_load+set}" = set; then
7680   :
7681 else
7682   ac_cv_search_shl_load=no
7683 fi
7684 rm conftest.$ac_ext
7685 LIBS=$ac_func_search_save_LIBS
7686 fi
7687 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
7688 $as_echo "$ac_cv_search_shl_load" >&6; }
7689 ac_res=$ac_cv_search_shl_load
7690 if test "$ac_res" != no; then
7691   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7692
7693 fi
7694
7695 # We only use libld in port/dynloader/aix.c
7696 case $host_os in
7697      aix*)
7698         { $as_echo "$as_me:$LINENO: checking for library containing ldopen" >&5
7699 $as_echo_n "checking for library containing ldopen... " >&6; }
7700 if test "${ac_cv_search_ldopen+set}" = set; then
7701   $as_echo_n "(cached) " >&6
7702 else
7703   ac_func_search_save_LIBS=$LIBS
7704 cat >conftest.$ac_ext <<_ACEOF
7705 /* confdefs.h.  */
7706 _ACEOF
7707 cat confdefs.h >>conftest.$ac_ext
7708 cat >>conftest.$ac_ext <<_ACEOF
7709 /* end confdefs.h.  */
7710
7711 /* Override any GCC internal prototype to avoid an error.
7712    Use char because int might match the return type of a GCC
7713    builtin and then its argument prototype would still apply.  */
7714 #ifdef __cplusplus
7715 extern "C"
7716 #endif
7717 char ldopen ();
7718 int
7719 main ()
7720 {
7721 return ldopen ();
7722   ;
7723   return 0;
7724 }
7725 _ACEOF
7726 for ac_lib in '' ld; do
7727   if test -z "$ac_lib"; then
7728     ac_res="none required"
7729   else
7730     ac_res=-l$ac_lib
7731     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7732   fi
7733   rm -f conftest.$ac_objext conftest$ac_exeext
7734 if { (ac_try="$ac_link"
7735 case "(($ac_try" in
7736   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7737   *) ac_try_echo=$ac_try;;
7738 esac
7739 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7740 $as_echo "$ac_try_echo") >&5
7741   (eval "$ac_link") 2>conftest.er1
7742   ac_status=$?
7743   grep -v '^ *+' conftest.er1 >conftest.err
7744   rm -f conftest.er1
7745   cat conftest.err >&5
7746   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7747   (exit $ac_status); } && {
7748          test -z "$ac_c_werror_flag" ||
7749          test ! -s conftest.err
7750        } && test -s conftest$ac_exeext && {
7751          test "$cross_compiling" = yes ||
7752          $as_test_x conftest$ac_exeext
7753        }; then
7754   ac_cv_search_ldopen=$ac_res
7755 else
7756   $as_echo "$as_me: failed program was:" >&5
7757 sed 's/^/| /' conftest.$ac_ext >&5
7758
7759
7760 fi
7761
7762 rm -rf conftest.dSYM
7763 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7764       conftest$ac_exeext
7765   if test "${ac_cv_search_ldopen+set}" = set; then
7766   break
7767 fi
7768 done
7769 if test "${ac_cv_search_ldopen+set}" = set; then
7770   :
7771 else
7772   ac_cv_search_ldopen=no
7773 fi
7774 rm conftest.$ac_ext
7775 LIBS=$ac_func_search_save_LIBS
7776 fi
7777 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
7778 $as_echo "$ac_cv_search_ldopen" >&6; }
7779 ac_res=$ac_cv_search_ldopen
7780 if test "$ac_res" != no; then
7781   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7782
7783 fi
7784
7785         ;;
7786 esac
7787 { $as_echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
7788 $as_echo_n "checking for library containing getopt_long... " >&6; }
7789 if test "${ac_cv_search_getopt_long+set}" = set; then
7790   $as_echo_n "(cached) " >&6
7791 else
7792   ac_func_search_save_LIBS=$LIBS
7793 cat >conftest.$ac_ext <<_ACEOF
7794 /* confdefs.h.  */
7795 _ACEOF
7796 cat confdefs.h >>conftest.$ac_ext
7797 cat >>conftest.$ac_ext <<_ACEOF
7798 /* end confdefs.h.  */
7799
7800 /* Override any GCC internal prototype to avoid an error.
7801    Use char because int might match the return type of a GCC
7802    builtin and then its argument prototype would still apply.  */
7803 #ifdef __cplusplus
7804 extern "C"
7805 #endif
7806 char getopt_long ();
7807 int
7808 main ()
7809 {
7810 return getopt_long ();
7811   ;
7812   return 0;
7813 }
7814 _ACEOF
7815 for ac_lib in '' getopt gnugetopt; do
7816   if test -z "$ac_lib"; then
7817     ac_res="none required"
7818   else
7819     ac_res=-l$ac_lib
7820     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7821   fi
7822   rm -f conftest.$ac_objext conftest$ac_exeext
7823 if { (ac_try="$ac_link"
7824 case "(($ac_try" in
7825   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7826   *) ac_try_echo=$ac_try;;
7827 esac
7828 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7829 $as_echo "$ac_try_echo") >&5
7830   (eval "$ac_link") 2>conftest.er1
7831   ac_status=$?
7832   grep -v '^ *+' conftest.er1 >conftest.err
7833   rm -f conftest.er1
7834   cat conftest.err >&5
7835   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7836   (exit $ac_status); } && {
7837          test -z "$ac_c_werror_flag" ||
7838          test ! -s conftest.err
7839        } && test -s conftest$ac_exeext && {
7840          test "$cross_compiling" = yes ||
7841          $as_test_x conftest$ac_exeext
7842        }; then
7843   ac_cv_search_getopt_long=$ac_res
7844 else
7845   $as_echo "$as_me: failed program was:" >&5
7846 sed 's/^/| /' conftest.$ac_ext >&5
7847
7848
7849 fi
7850
7851 rm -rf conftest.dSYM
7852 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7853       conftest$ac_exeext
7854   if test "${ac_cv_search_getopt_long+set}" = set; then
7855   break
7856 fi
7857 done
7858 if test "${ac_cv_search_getopt_long+set}" = set; then
7859   :
7860 else
7861   ac_cv_search_getopt_long=no
7862 fi
7863 rm conftest.$ac_ext
7864 LIBS=$ac_func_search_save_LIBS
7865 fi
7866 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
7867 $as_echo "$ac_cv_search_getopt_long" >&6; }
7868 ac_res=$ac_cv_search_getopt_long
7869 if test "$ac_res" != no; then
7870   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7871
7872 fi
7873
7874 { $as_echo "$as_me:$LINENO: checking for library containing crypt" >&5
7875 $as_echo_n "checking for library containing crypt... " >&6; }
7876 if test "${ac_cv_search_crypt+set}" = set; then
7877   $as_echo_n "(cached) " >&6
7878 else
7879   ac_func_search_save_LIBS=$LIBS
7880 cat >conftest.$ac_ext <<_ACEOF
7881 /* confdefs.h.  */
7882 _ACEOF
7883 cat confdefs.h >>conftest.$ac_ext
7884 cat >>conftest.$ac_ext <<_ACEOF
7885 /* end confdefs.h.  */
7886
7887 /* Override any GCC internal prototype to avoid an error.
7888    Use char because int might match the return type of a GCC
7889    builtin and then its argument prototype would still apply.  */
7890 #ifdef __cplusplus
7891 extern "C"
7892 #endif
7893 char crypt ();
7894 int
7895 main ()
7896 {
7897 return crypt ();
7898   ;
7899   return 0;
7900 }
7901 _ACEOF
7902 for ac_lib in '' crypt; do
7903   if test -z "$ac_lib"; then
7904     ac_res="none required"
7905   else
7906     ac_res=-l$ac_lib
7907     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7908   fi
7909   rm -f conftest.$ac_objext conftest$ac_exeext
7910 if { (ac_try="$ac_link"
7911 case "(($ac_try" in
7912   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7913   *) ac_try_echo=$ac_try;;
7914 esac
7915 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7916 $as_echo "$ac_try_echo") >&5
7917   (eval "$ac_link") 2>conftest.er1
7918   ac_status=$?
7919   grep -v '^ *+' conftest.er1 >conftest.err
7920   rm -f conftest.er1
7921   cat conftest.err >&5
7922   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7923   (exit $ac_status); } && {
7924          test -z "$ac_c_werror_flag" ||
7925          test ! -s conftest.err
7926        } && test -s conftest$ac_exeext && {
7927          test "$cross_compiling" = yes ||
7928          $as_test_x conftest$ac_exeext
7929        }; then
7930   ac_cv_search_crypt=$ac_res
7931 else
7932   $as_echo "$as_me: failed program was:" >&5
7933 sed 's/^/| /' conftest.$ac_ext >&5
7934
7935
7936 fi
7937
7938 rm -rf conftest.dSYM
7939 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7940       conftest$ac_exeext
7941   if test "${ac_cv_search_crypt+set}" = set; then
7942   break
7943 fi
7944 done
7945 if test "${ac_cv_search_crypt+set}" = set; then
7946   :
7947 else
7948   ac_cv_search_crypt=no
7949 fi
7950 rm conftest.$ac_ext
7951 LIBS=$ac_func_search_save_LIBS
7952 fi
7953 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
7954 $as_echo "$ac_cv_search_crypt" >&6; }
7955 ac_res=$ac_cv_search_crypt
7956 if test "$ac_res" != no; then
7957   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7958
7959 fi
7960
7961 # Solaris:
7962 { $as_echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
7963 $as_echo_n "checking for library containing fdatasync... " >&6; }
7964 if test "${ac_cv_search_fdatasync+set}" = set; then
7965   $as_echo_n "(cached) " >&6
7966 else
7967   ac_func_search_save_LIBS=$LIBS
7968 cat >conftest.$ac_ext <<_ACEOF
7969 /* confdefs.h.  */
7970 _ACEOF
7971 cat confdefs.h >>conftest.$ac_ext
7972 cat >>conftest.$ac_ext <<_ACEOF
7973 /* end confdefs.h.  */
7974
7975 /* Override any GCC internal prototype to avoid an error.
7976    Use char because int might match the return type of a GCC
7977    builtin and then its argument prototype would still apply.  */
7978 #ifdef __cplusplus
7979 extern "C"
7980 #endif
7981 char fdatasync ();
7982 int
7983 main ()
7984 {
7985 return fdatasync ();
7986   ;
7987   return 0;
7988 }
7989 _ACEOF
7990 for ac_lib in '' rt posix4; do
7991   if test -z "$ac_lib"; then
7992     ac_res="none required"
7993   else
7994     ac_res=-l$ac_lib
7995     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7996   fi
7997   rm -f conftest.$ac_objext conftest$ac_exeext
7998 if { (ac_try="$ac_link"
7999 case "(($ac_try" in
8000   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8001   *) ac_try_echo=$ac_try;;
8002 esac
8003 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8004 $as_echo "$ac_try_echo") >&5
8005   (eval "$ac_link") 2>conftest.er1
8006   ac_status=$?
8007   grep -v '^ *+' conftest.er1 >conftest.err
8008   rm -f conftest.er1
8009   cat conftest.err >&5
8010   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8011   (exit $ac_status); } && {
8012          test -z "$ac_c_werror_flag" ||
8013          test ! -s conftest.err
8014        } && test -s conftest$ac_exeext && {
8015          test "$cross_compiling" = yes ||
8016          $as_test_x conftest$ac_exeext
8017        }; then
8018   ac_cv_search_fdatasync=$ac_res
8019 else
8020   $as_echo "$as_me: failed program was:" >&5
8021 sed 's/^/| /' conftest.$ac_ext >&5
8022
8023
8024 fi
8025
8026 rm -rf conftest.dSYM
8027 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8028       conftest$ac_exeext
8029   if test "${ac_cv_search_fdatasync+set}" = set; then
8030   break
8031 fi
8032 done
8033 if test "${ac_cv_search_fdatasync+set}" = set; then
8034   :
8035 else
8036   ac_cv_search_fdatasync=no
8037 fi
8038 rm conftest.$ac_ext
8039 LIBS=$ac_func_search_save_LIBS
8040 fi
8041 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
8042 $as_echo "$ac_cv_search_fdatasync" >&6; }
8043 ac_res=$ac_cv_search_fdatasync
8044 if test "$ac_res" != no; then
8045   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8046
8047 fi
8048
8049 # Required for thread_test.c on Solaris 2.5:
8050 # Other ports use it too (HP-UX) so test unconditionally
8051 { $as_echo "$as_me:$LINENO: checking for library containing gethostbyname_r" >&5
8052 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
8053 if test "${ac_cv_search_gethostbyname_r+set}" = set; then
8054   $as_echo_n "(cached) " >&6
8055 else
8056   ac_func_search_save_LIBS=$LIBS
8057 cat >conftest.$ac_ext <<_ACEOF
8058 /* confdefs.h.  */
8059 _ACEOF
8060 cat confdefs.h >>conftest.$ac_ext
8061 cat >>conftest.$ac_ext <<_ACEOF
8062 /* end confdefs.h.  */
8063
8064 /* Override any GCC internal prototype to avoid an error.
8065    Use char because int might match the return type of a GCC
8066    builtin and then its argument prototype would still apply.  */
8067 #ifdef __cplusplus
8068 extern "C"
8069 #endif
8070 char gethostbyname_r ();
8071 int
8072 main ()
8073 {
8074 return gethostbyname_r ();
8075   ;
8076   return 0;
8077 }
8078 _ACEOF
8079 for ac_lib in '' nsl; do
8080   if test -z "$ac_lib"; then
8081     ac_res="none required"
8082   else
8083     ac_res=-l$ac_lib
8084     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8085   fi
8086   rm -f conftest.$ac_objext conftest$ac_exeext
8087 if { (ac_try="$ac_link"
8088 case "(($ac_try" in
8089   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8090   *) ac_try_echo=$ac_try;;
8091 esac
8092 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8093 $as_echo "$ac_try_echo") >&5
8094   (eval "$ac_link") 2>conftest.er1
8095   ac_status=$?
8096   grep -v '^ *+' conftest.er1 >conftest.err
8097   rm -f conftest.er1
8098   cat conftest.err >&5
8099   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8100   (exit $ac_status); } && {
8101          test -z "$ac_c_werror_flag" ||
8102          test ! -s conftest.err
8103        } && test -s conftest$ac_exeext && {
8104          test "$cross_compiling" = yes ||
8105          $as_test_x conftest$ac_exeext
8106        }; then
8107   ac_cv_search_gethostbyname_r=$ac_res
8108 else
8109   $as_echo "$as_me: failed program was:" >&5
8110 sed 's/^/| /' conftest.$ac_ext >&5
8111
8112
8113 fi
8114
8115 rm -rf conftest.dSYM
8116 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8117       conftest$ac_exeext
8118   if test "${ac_cv_search_gethostbyname_r+set}" = set; then
8119   break
8120 fi
8121 done
8122 if test "${ac_cv_search_gethostbyname_r+set}" = set; then
8123   :
8124 else
8125   ac_cv_search_gethostbyname_r=no
8126 fi
8127 rm conftest.$ac_ext
8128 LIBS=$ac_func_search_save_LIBS
8129 fi
8130 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname_r" >&5
8131 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8132 ac_res=$ac_cv_search_gethostbyname_r
8133 if test "$ac_res" != no; then
8134   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8135
8136 fi
8137
8138 # Cygwin:
8139 { $as_echo "$as_me:$LINENO: checking for library containing shmget" >&5
8140 $as_echo_n "checking for library containing shmget... " >&6; }
8141 if test "${ac_cv_search_shmget+set}" = set; then
8142   $as_echo_n "(cached) " >&6
8143 else
8144   ac_func_search_save_LIBS=$LIBS
8145 cat >conftest.$ac_ext <<_ACEOF
8146 /* confdefs.h.  */
8147 _ACEOF
8148 cat confdefs.h >>conftest.$ac_ext
8149 cat >>conftest.$ac_ext <<_ACEOF
8150 /* end confdefs.h.  */
8151
8152 /* Override any GCC internal prototype to avoid an error.
8153    Use char because int might match the return type of a GCC
8154    builtin and then its argument prototype would still apply.  */
8155 #ifdef __cplusplus
8156 extern "C"
8157 #endif
8158 char shmget ();
8159 int
8160 main ()
8161 {
8162 return shmget ();
8163   ;
8164   return 0;
8165 }
8166 _ACEOF
8167 for ac_lib in '' cygipc; do
8168   if test -z "$ac_lib"; then
8169     ac_res="none required"
8170   else
8171     ac_res=-l$ac_lib
8172     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8173   fi
8174   rm -f conftest.$ac_objext conftest$ac_exeext
8175 if { (ac_try="$ac_link"
8176 case "(($ac_try" in
8177   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8178   *) ac_try_echo=$ac_try;;
8179 esac
8180 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8181 $as_echo "$ac_try_echo") >&5
8182   (eval "$ac_link") 2>conftest.er1
8183   ac_status=$?
8184   grep -v '^ *+' conftest.er1 >conftest.err
8185   rm -f conftest.er1
8186   cat conftest.err >&5
8187   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8188   (exit $ac_status); } && {
8189          test -z "$ac_c_werror_flag" ||
8190          test ! -s conftest.err
8191        } && test -s conftest$ac_exeext && {
8192          test "$cross_compiling" = yes ||
8193          $as_test_x conftest$ac_exeext
8194        }; then
8195   ac_cv_search_shmget=$ac_res
8196 else
8197   $as_echo "$as_me: failed program was:" >&5
8198 sed 's/^/| /' conftest.$ac_ext >&5
8199
8200
8201 fi
8202
8203 rm -rf conftest.dSYM
8204 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8205       conftest$ac_exeext
8206   if test "${ac_cv_search_shmget+set}" = set; then
8207   break
8208 fi
8209 done
8210 if test "${ac_cv_search_shmget+set}" = set; then
8211   :
8212 else
8213   ac_cv_search_shmget=no
8214 fi
8215 rm conftest.$ac_ext
8216 LIBS=$ac_func_search_save_LIBS
8217 fi
8218 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
8219 $as_echo "$ac_cv_search_shmget" >&6; }
8220 ac_res=$ac_cv_search_shmget
8221 if test "$ac_res" != no; then
8222   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8223
8224 fi
8225
8226
8227 if test "$with_readline" = yes; then
8228
8229
8230 { $as_echo "$as_me:$LINENO: checking for library containing readline" >&5
8231 $as_echo_n "checking for library containing readline... " >&6; }
8232 if test "${pgac_cv_check_readline+set}" = set; then
8233   $as_echo_n "(cached) " >&6
8234 else
8235   pgac_cv_check_readline=no
8236 pgac_save_LIBS=$LIBS
8237 if test x"$with_libedit_preferred" != x"yes"
8238 then    READLINE_ORDER="-lreadline -ledit"
8239 else    READLINE_ORDER="-ledit -lreadline"
8240 fi
8241 for pgac_rllib in $READLINE_ORDER ; do
8242   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8243     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8244     cat >conftest.$ac_ext <<_ACEOF
8245 /* confdefs.h.  */
8246 _ACEOF
8247 cat confdefs.h >>conftest.$ac_ext
8248 cat >>conftest.$ac_ext <<_ACEOF
8249 /* end confdefs.h.  */
8250
8251 /* Override any GCC internal prototype to avoid an error.
8252    Use char because int might match the return type of a GCC
8253    builtin and then its argument prototype would still apply.  */
8254 #ifdef __cplusplus
8255 extern "C"
8256 #endif
8257 char readline ();
8258 int
8259 main ()
8260 {
8261 return readline ();
8262   ;
8263   return 0;
8264 }
8265 _ACEOF
8266 rm -f conftest.$ac_objext conftest$ac_exeext
8267 if { (ac_try="$ac_link"
8268 case "(($ac_try" in
8269   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8270   *) ac_try_echo=$ac_try;;
8271 esac
8272 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8273 $as_echo "$ac_try_echo") >&5
8274   (eval "$ac_link") 2>conftest.er1
8275   ac_status=$?
8276   grep -v '^ *+' conftest.er1 >conftest.err
8277   rm -f conftest.er1
8278   cat conftest.err >&5
8279   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8280   (exit $ac_status); } && {
8281          test -z "$ac_c_werror_flag" ||
8282          test ! -s conftest.err
8283        } && test -s conftest$ac_exeext && {
8284          test "$cross_compiling" = yes ||
8285          $as_test_x conftest$ac_exeext
8286        }; then
8287
8288       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8289       # recognize dependent libraries; assume curses is needed if we didn't
8290       # find any dependency.
8291       case $host_os in
8292         netbsd* | openbsd* | irix*)
8293           if test x"$pgac_lib" = x"" ; then
8294             pgac_lib=" -lcurses"
8295           fi ;;
8296       esac
8297
8298       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8299       break
8300
8301 else
8302   $as_echo "$as_me: failed program was:" >&5
8303 sed 's/^/| /' conftest.$ac_ext >&5
8304
8305
8306 fi
8307
8308 rm -rf conftest.dSYM
8309 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8310       conftest$ac_exeext conftest.$ac_ext
8311   done
8312   if test "$pgac_cv_check_readline" != no ; then
8313     break
8314   fi
8315 done
8316 LIBS=$pgac_save_LIBS
8317
8318 fi
8319 { $as_echo "$as_me:$LINENO: result: $pgac_cv_check_readline" >&5
8320 $as_echo "$pgac_cv_check_readline" >&6; }
8321 if test "$pgac_cv_check_readline" != no ; then
8322   LIBS="$pgac_cv_check_readline $LIBS"
8323
8324 cat >>confdefs.h <<\_ACEOF
8325 #define HAVE_LIBREADLINE 1
8326 _ACEOF
8327
8328 fi
8329
8330
8331   if test x"$pgac_cv_check_readline" = x"no"; then
8332     { { $as_echo "$as_me:$LINENO: error: readline library not found
8333 If you have readline already installed, see config.log for details on the
8334 failure.  It is possible the compiler isn't looking in the proper directory.
8335 Use --without-readline to disable readline support." >&5
8336 $as_echo "$as_me: error: readline library not found
8337 If you have readline already installed, see config.log for details on the
8338 failure.  It is possible the compiler isn't looking in the proper directory.
8339 Use --without-readline to disable readline support." >&2;}
8340    { (exit 1); exit 1; }; }
8341   fi
8342 fi
8343
8344 if test "$with_zlib" = yes; then
8345
8346 { $as_echo "$as_me:$LINENO: checking for inflate in -lz" >&5
8347 $as_echo_n "checking for inflate in -lz... " >&6; }
8348 if test "${ac_cv_lib_z_inflate+set}" = set; then
8349   $as_echo_n "(cached) " >&6
8350 else
8351   ac_check_lib_save_LIBS=$LIBS
8352 LIBS="-lz  $LIBS"
8353 cat >conftest.$ac_ext <<_ACEOF
8354 /* confdefs.h.  */
8355 _ACEOF
8356 cat confdefs.h >>conftest.$ac_ext
8357 cat >>conftest.$ac_ext <<_ACEOF
8358 /* end confdefs.h.  */
8359
8360 /* Override any GCC internal prototype to avoid an error.
8361    Use char because int might match the return type of a GCC
8362    builtin and then its argument prototype would still apply.  */
8363 #ifdef __cplusplus
8364 extern "C"
8365 #endif
8366 char inflate ();
8367 int
8368 main ()
8369 {
8370 return inflate ();
8371   ;
8372   return 0;
8373 }
8374 _ACEOF
8375 rm -f conftest.$ac_objext conftest$ac_exeext
8376 if { (ac_try="$ac_link"
8377 case "(($ac_try" in
8378   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8379   *) ac_try_echo=$ac_try;;
8380 esac
8381 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8382 $as_echo "$ac_try_echo") >&5
8383   (eval "$ac_link") 2>conftest.er1
8384   ac_status=$?
8385   grep -v '^ *+' conftest.er1 >conftest.err
8386   rm -f conftest.er1
8387   cat conftest.err >&5
8388   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8389   (exit $ac_status); } && {
8390          test -z "$ac_c_werror_flag" ||
8391          test ! -s conftest.err
8392        } && test -s conftest$ac_exeext && {
8393          test "$cross_compiling" = yes ||
8394          $as_test_x conftest$ac_exeext
8395        }; then
8396   ac_cv_lib_z_inflate=yes
8397 else
8398   $as_echo "$as_me: failed program was:" >&5
8399 sed 's/^/| /' conftest.$ac_ext >&5
8400
8401         ac_cv_lib_z_inflate=no
8402 fi
8403
8404 rm -rf conftest.dSYM
8405 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8406       conftest$ac_exeext conftest.$ac_ext
8407 LIBS=$ac_check_lib_save_LIBS
8408 fi
8409 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
8410 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8411 if test "x$ac_cv_lib_z_inflate" = x""yes; then
8412   cat >>confdefs.h <<_ACEOF
8413 #define HAVE_LIBZ 1
8414 _ACEOF
8415
8416   LIBS="-lz $LIBS"
8417
8418 else
8419   { { $as_echo "$as_me:$LINENO: error: zlib library not found
8420 If you have zlib already installed, see config.log for details on the
8421 failure.  It is possible the compiler isn't looking in the proper directory.
8422 Use --without-zlib to disable zlib support." >&5
8423 $as_echo "$as_me: error: zlib library not found
8424 If you have zlib already installed, see config.log for details on the
8425 failure.  It is possible the compiler isn't looking in the proper directory.
8426 Use --without-zlib to disable zlib support." >&2;}
8427    { (exit 1); exit 1; }; }
8428 fi
8429
8430 fi
8431
8432 if test "$enable_spinlocks" = yes; then
8433
8434 cat >>confdefs.h <<\_ACEOF
8435 #define HAVE_SPINLOCKS 1
8436 _ACEOF
8437
8438 else
8439   { $as_echo "$as_me:$LINENO: WARNING:
8440 *** Not using spinlocks will cause poor performance." >&5
8441 $as_echo "$as_me: WARNING:
8442 *** Not using spinlocks will cause poor performance." >&2;}
8443 fi
8444
8445 if test "$with_gssapi" = yes ; then
8446   if test "$PORTNAME" != "win32"; then
8447     { $as_echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5
8448 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8449 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8450   $as_echo_n "(cached) " >&6
8451 else
8452   ac_func_search_save_LIBS=$LIBS
8453 cat >conftest.$ac_ext <<_ACEOF
8454 /* confdefs.h.  */
8455 _ACEOF
8456 cat confdefs.h >>conftest.$ac_ext
8457 cat >>conftest.$ac_ext <<_ACEOF
8458 /* end confdefs.h.  */
8459
8460 /* Override any GCC internal prototype to avoid an error.
8461    Use char because int might match the return type of a GCC
8462    builtin and then its argument prototype would still apply.  */
8463 #ifdef __cplusplus
8464 extern "C"
8465 #endif
8466 char gss_init_sec_context ();
8467 int
8468 main ()
8469 {
8470 return gss_init_sec_context ();
8471   ;
8472   return 0;
8473 }
8474 _ACEOF
8475 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8476   if test -z "$ac_lib"; then
8477     ac_res="none required"
8478   else
8479     ac_res=-l$ac_lib
8480     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8481   fi
8482   rm -f conftest.$ac_objext conftest$ac_exeext
8483 if { (ac_try="$ac_link"
8484 case "(($ac_try" in
8485   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8486   *) ac_try_echo=$ac_try;;
8487 esac
8488 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8489 $as_echo "$ac_try_echo") >&5
8490   (eval "$ac_link") 2>conftest.er1
8491   ac_status=$?
8492   grep -v '^ *+' conftest.er1 >conftest.err
8493   rm -f conftest.er1
8494   cat conftest.err >&5
8495   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496   (exit $ac_status); } && {
8497          test -z "$ac_c_werror_flag" ||
8498          test ! -s conftest.err
8499        } && test -s conftest$ac_exeext && {
8500          test "$cross_compiling" = yes ||
8501          $as_test_x conftest$ac_exeext
8502        }; then
8503   ac_cv_search_gss_init_sec_context=$ac_res
8504 else
8505   $as_echo "$as_me: failed program was:" >&5
8506 sed 's/^/| /' conftest.$ac_ext >&5
8507
8508
8509 fi
8510
8511 rm -rf conftest.dSYM
8512 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8513       conftest$ac_exeext
8514   if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8515   break
8516 fi
8517 done
8518 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8519   :
8520 else
8521   ac_cv_search_gss_init_sec_context=no
8522 fi
8523 rm conftest.$ac_ext
8524 LIBS=$ac_func_search_save_LIBS
8525 fi
8526 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5
8527 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8528 ac_res=$ac_cv_search_gss_init_sec_context
8529 if test "$ac_res" != no; then
8530   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8531
8532 else
8533   { { $as_echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5
8534 $as_echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;}
8535    { (exit 1); exit 1; }; }
8536 fi
8537
8538   else
8539     LIBS="$LIBS -lgssapi32"
8540   fi
8541 fi
8542
8543 if test "$with_krb5" = yes ; then
8544   if test "$PORTNAME" != "win32"; then
8545      { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
8546 $as_echo_n "checking for library containing com_err... " >&6; }
8547 if test "${ac_cv_search_com_err+set}" = set; then
8548   $as_echo_n "(cached) " >&6
8549 else
8550   ac_func_search_save_LIBS=$LIBS
8551 cat >conftest.$ac_ext <<_ACEOF
8552 /* confdefs.h.  */
8553 _ACEOF
8554 cat confdefs.h >>conftest.$ac_ext
8555 cat >>conftest.$ac_ext <<_ACEOF
8556 /* end confdefs.h.  */
8557
8558 /* Override any GCC internal prototype to avoid an error.
8559    Use char because int might match the return type of a GCC
8560    builtin and then its argument prototype would still apply.  */
8561 #ifdef __cplusplus
8562 extern "C"
8563 #endif
8564 char com_err ();
8565 int
8566 main ()
8567 {
8568 return com_err ();
8569   ;
8570   return 0;
8571 }
8572 _ACEOF
8573 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err 'com_err -lssl -lcrypto'; do
8574   if test -z "$ac_lib"; then
8575     ac_res="none required"
8576   else
8577     ac_res=-l$ac_lib
8578     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8579   fi
8580   rm -f conftest.$ac_objext conftest$ac_exeext
8581 if { (ac_try="$ac_link"
8582 case "(($ac_try" in
8583   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8584   *) ac_try_echo=$ac_try;;
8585 esac
8586 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8587 $as_echo "$ac_try_echo") >&5
8588   (eval "$ac_link") 2>conftest.er1
8589   ac_status=$?
8590   grep -v '^ *+' conftest.er1 >conftest.err
8591   rm -f conftest.er1
8592   cat conftest.err >&5
8593   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8594   (exit $ac_status); } && {
8595          test -z "$ac_c_werror_flag" ||
8596          test ! -s conftest.err
8597        } && test -s conftest$ac_exeext && {
8598          test "$cross_compiling" = yes ||
8599          $as_test_x conftest$ac_exeext
8600        }; then
8601   ac_cv_search_com_err=$ac_res
8602 else
8603   $as_echo "$as_me: failed program was:" >&5
8604 sed 's/^/| /' conftest.$ac_ext >&5
8605
8606
8607 fi
8608
8609 rm -rf conftest.dSYM
8610 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8611       conftest$ac_exeext
8612   if test "${ac_cv_search_com_err+set}" = set; then
8613   break
8614 fi
8615 done
8616 if test "${ac_cv_search_com_err+set}" = set; then
8617   :
8618 else
8619   ac_cv_search_com_err=no
8620 fi
8621 rm conftest.$ac_ext
8622 LIBS=$ac_func_search_save_LIBS
8623 fi
8624 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
8625 $as_echo "$ac_cv_search_com_err" >&6; }
8626 ac_res=$ac_cv_search_com_err
8627 if test "$ac_res" != no; then
8628   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8629
8630 else
8631   { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
8632 $as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
8633    { (exit 1); exit 1; }; }
8634 fi
8635
8636      { $as_echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
8637 $as_echo_n "checking for library containing krb5_sendauth... " >&6; }
8638 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
8639   $as_echo_n "(cached) " >&6
8640 else
8641   ac_func_search_save_LIBS=$LIBS
8642 cat >conftest.$ac_ext <<_ACEOF
8643 /* confdefs.h.  */
8644 _ACEOF
8645 cat confdefs.h >>conftest.$ac_ext
8646 cat >>conftest.$ac_ext <<_ACEOF
8647 /* end confdefs.h.  */
8648
8649 /* Override any GCC internal prototype to avoid an error.
8650    Use char because int might match the return type of a GCC
8651    builtin and then its argument prototype would still apply.  */
8652 #ifdef __cplusplus
8653 extern "C"
8654 #endif
8655 char krb5_sendauth ();
8656 int
8657 main ()
8658 {
8659 return krb5_sendauth ();
8660   ;
8661   return 0;
8662 }
8663 _ACEOF
8664 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
8665   if test -z "$ac_lib"; then
8666     ac_res="none required"
8667   else
8668     ac_res=-l$ac_lib
8669     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8670   fi
8671   rm -f conftest.$ac_objext conftest$ac_exeext
8672 if { (ac_try="$ac_link"
8673 case "(($ac_try" in
8674   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8675   *) ac_try_echo=$ac_try;;
8676 esac
8677 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8678 $as_echo "$ac_try_echo") >&5
8679   (eval "$ac_link") 2>conftest.er1
8680   ac_status=$?
8681   grep -v '^ *+' conftest.er1 >conftest.err
8682   rm -f conftest.er1
8683   cat conftest.err >&5
8684   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8685   (exit $ac_status); } && {
8686          test -z "$ac_c_werror_flag" ||
8687          test ! -s conftest.err
8688        } && test -s conftest$ac_exeext && {
8689          test "$cross_compiling" = yes ||
8690          $as_test_x conftest$ac_exeext
8691        }; then
8692   ac_cv_search_krb5_sendauth=$ac_res
8693 else
8694   $as_echo "$as_me: failed program was:" >&5
8695 sed 's/^/| /' conftest.$ac_ext >&5
8696
8697
8698 fi
8699
8700 rm -rf conftest.dSYM
8701 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8702       conftest$ac_exeext
8703   if test "${ac_cv_search_krb5_sendauth+set}" = set; then
8704   break
8705 fi
8706 done
8707 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
8708   :
8709 else
8710   ac_cv_search_krb5_sendauth=no
8711 fi
8712 rm conftest.$ac_ext
8713 LIBS=$ac_func_search_save_LIBS
8714 fi
8715 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
8716 $as_echo "$ac_cv_search_krb5_sendauth" >&6; }
8717 ac_res=$ac_cv_search_krb5_sendauth
8718 if test "$ac_res" != no; then
8719   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8720
8721 else
8722   { { $as_echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
8723 $as_echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
8724    { (exit 1); exit 1; }; }
8725 fi
8726
8727   else
8728      { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
8729 $as_echo_n "checking for library containing com_err... " >&6; }
8730 if test "${ac_cv_search_com_err+set}" = set; then
8731   $as_echo_n "(cached) " >&6
8732 else
8733   ac_func_search_save_LIBS=$LIBS
8734 cat >conftest.$ac_ext <<_ACEOF
8735 /* confdefs.h.  */
8736 _ACEOF
8737 cat confdefs.h >>conftest.$ac_ext
8738 cat >>conftest.$ac_ext <<_ACEOF
8739 /* end confdefs.h.  */
8740
8741 /* Override any GCC internal prototype to avoid an error.
8742    Use char because int might match the return type of a GCC
8743    builtin and then its argument prototype would still apply.  */
8744 #ifdef __cplusplus
8745 extern "C"
8746 #endif
8747 char com_err ();
8748 int
8749 main ()
8750 {
8751 return com_err ();
8752   ;
8753   return 0;
8754 }
8755 _ACEOF
8756 for ac_lib in '' 'comerr32 -lkrb5_32'; do
8757   if test -z "$ac_lib"; then
8758     ac_res="none required"
8759   else
8760     ac_res=-l$ac_lib
8761     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8762   fi
8763   rm -f conftest.$ac_objext conftest$ac_exeext
8764 if { (ac_try="$ac_link"
8765 case "(($ac_try" in
8766   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8767   *) ac_try_echo=$ac_try;;
8768 esac
8769 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8770 $as_echo "$ac_try_echo") >&5
8771   (eval "$ac_link") 2>conftest.er1
8772   ac_status=$?
8773   grep -v '^ *+' conftest.er1 >conftest.err
8774   rm -f conftest.er1
8775   cat conftest.err >&5
8776   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8777   (exit $ac_status); } && {
8778          test -z "$ac_c_werror_flag" ||
8779          test ! -s conftest.err
8780        } && test -s conftest$ac_exeext && {
8781          test "$cross_compiling" = yes ||
8782          $as_test_x conftest$ac_exeext
8783        }; then
8784   ac_cv_search_com_err=$ac_res
8785 else
8786   $as_echo "$as_me: failed program was:" >&5
8787 sed 's/^/| /' conftest.$ac_ext >&5
8788
8789
8790 fi
8791
8792 rm -rf conftest.dSYM
8793 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8794       conftest$ac_exeext
8795   if test "${ac_cv_search_com_err+set}" = set; then
8796   break
8797 fi
8798 done
8799 if test "${ac_cv_search_com_err+set}" = set; then
8800   :
8801 else
8802   ac_cv_search_com_err=no
8803 fi
8804 rm conftest.$ac_ext
8805 LIBS=$ac_func_search_save_LIBS
8806 fi
8807 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
8808 $as_echo "$ac_cv_search_com_err" >&6; }
8809 ac_res=$ac_cv_search_com_err
8810 if test "$ac_res" != no; then
8811   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8812
8813 else
8814   { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
8815 $as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
8816    { (exit 1); exit 1; }; }
8817 fi
8818
8819   fi
8820 fi
8821
8822 if test "$with_openssl" = yes ; then
8823     if test "$PORTNAME" != "win32"; then
8824
8825 { $as_echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
8826 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
8827 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
8828   $as_echo_n "(cached) " >&6
8829 else
8830   ac_check_lib_save_LIBS=$LIBS
8831 LIBS="-lcrypto  $LIBS"
8832 cat >conftest.$ac_ext <<_ACEOF
8833 /* confdefs.h.  */
8834 _ACEOF
8835 cat confdefs.h >>conftest.$ac_ext
8836 cat >>conftest.$ac_ext <<_ACEOF
8837 /* end confdefs.h.  */
8838
8839 /* Override any GCC internal prototype to avoid an error.
8840    Use char because int might match the return type of a GCC
8841    builtin and then its argument prototype would still apply.  */
8842 #ifdef __cplusplus
8843 extern "C"
8844 #endif
8845 char CRYPTO_new_ex_data ();
8846 int
8847 main ()
8848 {
8849 return CRYPTO_new_ex_data ();
8850   ;
8851   return 0;
8852 }
8853 _ACEOF
8854 rm -f conftest.$ac_objext conftest$ac_exeext
8855 if { (ac_try="$ac_link"
8856 case "(($ac_try" in
8857   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8858   *) ac_try_echo=$ac_try;;
8859 esac
8860 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8861 $as_echo "$ac_try_echo") >&5
8862   (eval "$ac_link") 2>conftest.er1
8863   ac_status=$?
8864   grep -v '^ *+' conftest.er1 >conftest.err
8865   rm -f conftest.er1
8866   cat conftest.err >&5
8867   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8868   (exit $ac_status); } && {
8869          test -z "$ac_c_werror_flag" ||
8870          test ! -s conftest.err
8871        } && test -s conftest$ac_exeext && {
8872          test "$cross_compiling" = yes ||
8873          $as_test_x conftest$ac_exeext
8874        }; then
8875   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
8876 else
8877   $as_echo "$as_me: failed program was:" >&5
8878 sed 's/^/| /' conftest.$ac_ext >&5
8879
8880         ac_cv_lib_crypto_CRYPTO_new_ex_data=no
8881 fi
8882
8883 rm -rf conftest.dSYM
8884 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8885       conftest$ac_exeext conftest.$ac_ext
8886 LIBS=$ac_check_lib_save_LIBS
8887 fi
8888 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
8889 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
8890 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = x""yes; then
8891   cat >>confdefs.h <<_ACEOF
8892 #define HAVE_LIBCRYPTO 1
8893 _ACEOF
8894
8895   LIBS="-lcrypto $LIBS"
8896
8897 else
8898   { { $as_echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
8899 $as_echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
8900    { (exit 1); exit 1; }; }
8901 fi
8902
8903
8904 { $as_echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
8905 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
8906 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
8907   $as_echo_n "(cached) " >&6
8908 else
8909   ac_check_lib_save_LIBS=$LIBS
8910 LIBS="-lssl  $LIBS"
8911 cat >conftest.$ac_ext <<_ACEOF
8912 /* confdefs.h.  */
8913 _ACEOF
8914 cat confdefs.h >>conftest.$ac_ext
8915 cat >>conftest.$ac_ext <<_ACEOF
8916 /* end confdefs.h.  */
8917
8918 /* Override any GCC internal prototype to avoid an error.
8919    Use char because int might match the return type of a GCC
8920    builtin and then its argument prototype would still apply.  */
8921 #ifdef __cplusplus
8922 extern "C"
8923 #endif
8924 char SSL_library_init ();
8925 int
8926 main ()
8927 {
8928 return SSL_library_init ();
8929   ;
8930   return 0;
8931 }
8932 _ACEOF
8933 rm -f conftest.$ac_objext conftest$ac_exeext
8934 if { (ac_try="$ac_link"
8935 case "(($ac_try" in
8936   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8937   *) ac_try_echo=$ac_try;;
8938 esac
8939 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8940 $as_echo "$ac_try_echo") >&5
8941   (eval "$ac_link") 2>conftest.er1
8942   ac_status=$?
8943   grep -v '^ *+' conftest.er1 >conftest.err
8944   rm -f conftest.er1
8945   cat conftest.err >&5
8946   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8947   (exit $ac_status); } && {
8948          test -z "$ac_c_werror_flag" ||
8949          test ! -s conftest.err
8950        } && test -s conftest$ac_exeext && {
8951          test "$cross_compiling" = yes ||
8952          $as_test_x conftest$ac_exeext
8953        }; then
8954   ac_cv_lib_ssl_SSL_library_init=yes
8955 else
8956   $as_echo "$as_me: failed program was:" >&5
8957 sed 's/^/| /' conftest.$ac_ext >&5
8958
8959         ac_cv_lib_ssl_SSL_library_init=no
8960 fi
8961
8962 rm -rf conftest.dSYM
8963 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8964       conftest$ac_exeext conftest.$ac_ext
8965 LIBS=$ac_check_lib_save_LIBS
8966 fi
8967 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
8968 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
8969 if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then
8970   cat >>confdefs.h <<_ACEOF
8971 #define HAVE_LIBSSL 1
8972 _ACEOF
8973
8974   LIBS="-lssl $LIBS"
8975
8976 else
8977   { { $as_echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
8978 $as_echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
8979    { (exit 1); exit 1; }; }
8980 fi
8981
8982   else
8983
8984 { $as_echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
8985 $as_echo_n "checking for CRYPTO_new_ex_data in -leay32... " >&6; }
8986 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
8987   $as_echo_n "(cached) " >&6
8988 else
8989   ac_check_lib_save_LIBS=$LIBS
8990 LIBS="-leay32  $LIBS"
8991 cat >conftest.$ac_ext <<_ACEOF
8992 /* confdefs.h.  */
8993 _ACEOF
8994 cat confdefs.h >>conftest.$ac_ext
8995 cat >>conftest.$ac_ext <<_ACEOF
8996 /* end confdefs.h.  */
8997
8998 /* Override any GCC internal prototype to avoid an error.
8999    Use char because int might match the return type of a GCC
9000    builtin and then its argument prototype would still apply.  */
9001 #ifdef __cplusplus
9002 extern "C"
9003 #endif
9004 char CRYPTO_new_ex_data ();
9005 int
9006 main ()
9007 {
9008 return CRYPTO_new_ex_data ();
9009   ;
9010   return 0;
9011 }
9012 _ACEOF
9013 rm -f conftest.$ac_objext conftest$ac_exeext
9014 if { (ac_try="$ac_link"
9015 case "(($ac_try" in
9016   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9017   *) ac_try_echo=$ac_try;;
9018 esac
9019 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9020 $as_echo "$ac_try_echo") >&5
9021   (eval "$ac_link") 2>conftest.er1
9022   ac_status=$?
9023   grep -v '^ *+' conftest.er1 >conftest.err
9024   rm -f conftest.er1
9025   cat conftest.err >&5
9026   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9027   (exit $ac_status); } && {
9028          test -z "$ac_c_werror_flag" ||
9029          test ! -s conftest.err
9030        } && test -s conftest$ac_exeext && {
9031          test "$cross_compiling" = yes ||
9032          $as_test_x conftest$ac_exeext
9033        }; then
9034   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
9035 else
9036   $as_echo "$as_me: failed program was:" >&5
9037 sed 's/^/| /' conftest.$ac_ext >&5
9038
9039         ac_cv_lib_eay32_CRYPTO_new_ex_data=no
9040 fi
9041
9042 rm -rf conftest.dSYM
9043 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9044       conftest$ac_exeext conftest.$ac_ext
9045 LIBS=$ac_check_lib_save_LIBS
9046 fi
9047 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
9048 $as_echo "$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6; }
9049 if test "x$ac_cv_lib_eay32_CRYPTO_new_ex_data" = x""yes; then
9050   cat >>confdefs.h <<_ACEOF
9051 #define HAVE_LIBEAY32 1
9052 _ACEOF
9053
9054   LIBS="-leay32 $LIBS"
9055
9056 else
9057   { { $as_echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
9058 $as_echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
9059    { (exit 1); exit 1; }; }
9060 fi
9061
9062
9063 { $as_echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
9064 $as_echo_n "checking for SSL_library_init in -lssleay32... " >&6; }
9065 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
9066   $as_echo_n "(cached) " >&6
9067 else
9068   ac_check_lib_save_LIBS=$LIBS
9069 LIBS="-lssleay32  $LIBS"
9070 cat >conftest.$ac_ext <<_ACEOF
9071 /* confdefs.h.  */
9072 _ACEOF
9073 cat confdefs.h >>conftest.$ac_ext
9074 cat >>conftest.$ac_ext <<_ACEOF
9075 /* end confdefs.h.  */
9076
9077 /* Override any GCC internal prototype to avoid an error.
9078    Use char because int might match the return type of a GCC
9079    builtin and then its argument prototype would still apply.  */
9080 #ifdef __cplusplus
9081 extern "C"
9082 #endif
9083 char SSL_library_init ();
9084 int
9085 main ()
9086 {
9087 return SSL_library_init ();
9088   ;
9089   return 0;
9090 }
9091 _ACEOF
9092 rm -f conftest.$ac_objext conftest$ac_exeext
9093 if { (ac_try="$ac_link"
9094 case "(($ac_try" in
9095   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9096   *) ac_try_echo=$ac_try;;
9097 esac
9098 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9099 $as_echo "$ac_try_echo") >&5
9100   (eval "$ac_link") 2>conftest.er1
9101   ac_status=$?
9102   grep -v '^ *+' conftest.er1 >conftest.err
9103   rm -f conftest.er1
9104   cat conftest.err >&5
9105   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9106   (exit $ac_status); } && {
9107          test -z "$ac_c_werror_flag" ||
9108          test ! -s conftest.err
9109        } && test -s conftest$ac_exeext && {
9110          test "$cross_compiling" = yes ||
9111          $as_test_x conftest$ac_exeext
9112        }; then
9113   ac_cv_lib_ssleay32_SSL_library_init=yes
9114 else
9115   $as_echo "$as_me: failed program was:" >&5
9116 sed 's/^/| /' conftest.$ac_ext >&5
9117
9118         ac_cv_lib_ssleay32_SSL_library_init=no
9119 fi
9120
9121 rm -rf conftest.dSYM
9122 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9123       conftest$ac_exeext conftest.$ac_ext
9124 LIBS=$ac_check_lib_save_LIBS
9125 fi
9126 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
9127 $as_echo "$ac_cv_lib_ssleay32_SSL_library_init" >&6; }
9128 if test "x$ac_cv_lib_ssleay32_SSL_library_init" = x""yes; then
9129   cat >>confdefs.h <<_ACEOF
9130 #define HAVE_LIBSSLEAY32 1
9131 _ACEOF
9132
9133   LIBS="-lssleay32 $LIBS"
9134
9135 else
9136   { { $as_echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
9137 $as_echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
9138    { (exit 1); exit 1; }; }
9139 fi
9140
9141   fi
9142 fi
9143
9144 if test "$with_pam" = yes ; then
9145
9146 { $as_echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
9147 $as_echo_n "checking for pam_start in -lpam... " >&6; }
9148 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
9149   $as_echo_n "(cached) " >&6
9150 else
9151   ac_check_lib_save_LIBS=$LIBS
9152 LIBS="-lpam  $LIBS"
9153 cat >conftest.$ac_ext <<_ACEOF
9154 /* confdefs.h.  */
9155 _ACEOF
9156 cat confdefs.h >>conftest.$ac_ext
9157 cat >>conftest.$ac_ext <<_ACEOF
9158 /* end confdefs.h.  */
9159
9160 /* Override any GCC internal prototype to avoid an error.
9161    Use char because int might match the return type of a GCC
9162    builtin and then its argument prototype would still apply.  */
9163 #ifdef __cplusplus
9164 extern "C"
9165 #endif
9166 char pam_start ();
9167 int
9168 main ()
9169 {
9170 return pam_start ();
9171   ;
9172   return 0;
9173 }
9174 _ACEOF
9175 rm -f conftest.$ac_objext conftest$ac_exeext
9176 if { (ac_try="$ac_link"
9177 case "(($ac_try" in
9178   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9179   *) ac_try_echo=$ac_try;;
9180 esac
9181 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9182 $as_echo "$ac_try_echo") >&5
9183   (eval "$ac_link") 2>conftest.er1
9184   ac_status=$?
9185   grep -v '^ *+' conftest.er1 >conftest.err
9186   rm -f conftest.er1
9187   cat conftest.err >&5
9188   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9189   (exit $ac_status); } && {
9190          test -z "$ac_c_werror_flag" ||
9191          test ! -s conftest.err
9192        } && test -s conftest$ac_exeext && {
9193          test "$cross_compiling" = yes ||
9194          $as_test_x conftest$ac_exeext
9195        }; then
9196   ac_cv_lib_pam_pam_start=yes
9197 else
9198   $as_echo "$as_me: failed program was:" >&5
9199 sed 's/^/| /' conftest.$ac_ext >&5
9200
9201         ac_cv_lib_pam_pam_start=no
9202 fi
9203
9204 rm -rf conftest.dSYM
9205 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9206       conftest$ac_exeext conftest.$ac_ext
9207 LIBS=$ac_check_lib_save_LIBS
9208 fi
9209 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
9210 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
9211 if test "x$ac_cv_lib_pam_pam_start" = x""yes; then
9212   cat >>confdefs.h <<_ACEOF
9213 #define HAVE_LIBPAM 1
9214 _ACEOF
9215
9216   LIBS="-lpam $LIBS"
9217
9218 else
9219   { { $as_echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
9220 $as_echo "$as_me: error: library 'pam' is required for PAM" >&2;}
9221    { (exit 1); exit 1; }; }
9222 fi
9223
9224 fi
9225
9226 if test "$with_libxml" = yes ; then
9227
9228 { $as_echo "$as_me:$LINENO: checking for xmlSaveToBuffer in -lxml2" >&5
9229 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
9230 if test "${ac_cv_lib_xml2_xmlSaveToBuffer+set}" = set; then
9231   $as_echo_n "(cached) " >&6
9232 else
9233   ac_check_lib_save_LIBS=$LIBS
9234 LIBS="-lxml2  $LIBS"
9235 cat >conftest.$ac_ext <<_ACEOF
9236 /* confdefs.h.  */
9237 _ACEOF
9238 cat confdefs.h >>conftest.$ac_ext
9239 cat >>conftest.$ac_ext <<_ACEOF
9240 /* end confdefs.h.  */
9241
9242 /* Override any GCC internal prototype to avoid an error.
9243    Use char because int might match the return type of a GCC
9244    builtin and then its argument prototype would still apply.  */
9245 #ifdef __cplusplus
9246 extern "C"
9247 #endif
9248 char xmlSaveToBuffer ();
9249 int
9250 main ()
9251 {
9252 return xmlSaveToBuffer ();
9253   ;
9254   return 0;
9255 }
9256 _ACEOF
9257 rm -f conftest.$ac_objext conftest$ac_exeext
9258 if { (ac_try="$ac_link"
9259 case "(($ac_try" in
9260   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9261   *) ac_try_echo=$ac_try;;
9262 esac
9263 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9264 $as_echo "$ac_try_echo") >&5
9265   (eval "$ac_link") 2>conftest.er1
9266   ac_status=$?
9267   grep -v '^ *+' conftest.er1 >conftest.err
9268   rm -f conftest.er1
9269   cat conftest.err >&5
9270   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9271   (exit $ac_status); } && {
9272          test -z "$ac_c_werror_flag" ||
9273          test ! -s conftest.err
9274        } && test -s conftest$ac_exeext && {
9275          test "$cross_compiling" = yes ||
9276          $as_test_x conftest$ac_exeext
9277        }; then
9278   ac_cv_lib_xml2_xmlSaveToBuffer=yes
9279 else
9280   $as_echo "$as_me: failed program was:" >&5
9281 sed 's/^/| /' conftest.$ac_ext >&5
9282
9283         ac_cv_lib_xml2_xmlSaveToBuffer=no
9284 fi
9285
9286 rm -rf conftest.dSYM
9287 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9288       conftest$ac_exeext conftest.$ac_ext
9289 LIBS=$ac_check_lib_save_LIBS
9290 fi
9291 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
9292 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
9293 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = x""yes; then
9294   cat >>confdefs.h <<_ACEOF
9295 #define HAVE_LIBXML2 1
9296 _ACEOF
9297
9298   LIBS="-lxml2 $LIBS"
9299
9300 else
9301   { { $as_echo "$as_me:$LINENO: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&5
9302 $as_echo "$as_me: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&2;}
9303    { (exit 1); exit 1; }; }
9304 fi
9305
9306 fi
9307
9308 if test "$with_libxslt" = yes ; then
9309
9310 { $as_echo "$as_me:$LINENO: checking for xsltCleanupGlobals in -lxslt" >&5
9311 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
9312 if test "${ac_cv_lib_xslt_xsltCleanupGlobals+set}" = set; then
9313   $as_echo_n "(cached) " >&6
9314 else
9315   ac_check_lib_save_LIBS=$LIBS
9316 LIBS="-lxslt  $LIBS"
9317 cat >conftest.$ac_ext <<_ACEOF
9318 /* confdefs.h.  */
9319 _ACEOF
9320 cat confdefs.h >>conftest.$ac_ext
9321 cat >>conftest.$ac_ext <<_ACEOF
9322 /* end confdefs.h.  */
9323
9324 /* Override any GCC internal prototype to avoid an error.
9325    Use char because int might match the return type of a GCC
9326    builtin and then its argument prototype would still apply.  */
9327 #ifdef __cplusplus
9328 extern "C"
9329 #endif
9330 char xsltCleanupGlobals ();
9331 int
9332 main ()
9333 {
9334 return xsltCleanupGlobals ();
9335   ;
9336   return 0;
9337 }
9338 _ACEOF
9339 rm -f conftest.$ac_objext conftest$ac_exeext
9340 if { (ac_try="$ac_link"
9341 case "(($ac_try" in
9342   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9343   *) ac_try_echo=$ac_try;;
9344 esac
9345 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9346 $as_echo "$ac_try_echo") >&5
9347   (eval "$ac_link") 2>conftest.er1
9348   ac_status=$?
9349   grep -v '^ *+' conftest.er1 >conftest.err
9350   rm -f conftest.er1
9351   cat conftest.err >&5
9352   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9353   (exit $ac_status); } && {
9354          test -z "$ac_c_werror_flag" ||
9355          test ! -s conftest.err
9356        } && test -s conftest$ac_exeext && {
9357          test "$cross_compiling" = yes ||
9358          $as_test_x conftest$ac_exeext
9359        }; then
9360   ac_cv_lib_xslt_xsltCleanupGlobals=yes
9361 else
9362   $as_echo "$as_me: failed program was:" >&5
9363 sed 's/^/| /' conftest.$ac_ext >&5
9364
9365         ac_cv_lib_xslt_xsltCleanupGlobals=no
9366 fi
9367
9368 rm -rf conftest.dSYM
9369 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9370       conftest$ac_exeext conftest.$ac_ext
9371 LIBS=$ac_check_lib_save_LIBS
9372 fi
9373 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
9374 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
9375 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = x""yes; then
9376   cat >>confdefs.h <<_ACEOF
9377 #define HAVE_LIBXSLT 1
9378 _ACEOF
9379
9380   LIBS="-lxslt $LIBS"
9381
9382 else
9383   { { $as_echo "$as_me:$LINENO: error: library 'xslt' is required for XSLT support" >&5
9384 $as_echo "$as_me: error: library 'xslt' is required for XSLT support" >&2;}
9385    { (exit 1); exit 1; }; }
9386 fi
9387
9388 fi
9389
9390 # for contrib/sepgsql
9391 if test "$with_selinux" = yes; then
9392
9393 { $as_echo "$as_me:$LINENO: checking for getpeercon_raw in -lselinux" >&5
9394 $as_echo_n "checking for getpeercon_raw in -lselinux... " >&6; }
9395 if test "${ac_cv_lib_selinux_getpeercon_raw+set}" = set; then
9396   $as_echo_n "(cached) " >&6
9397 else
9398   ac_check_lib_save_LIBS=$LIBS
9399 LIBS="-lselinux  $LIBS"
9400 cat >conftest.$ac_ext <<_ACEOF
9401 /* confdefs.h.  */
9402 _ACEOF
9403 cat confdefs.h >>conftest.$ac_ext
9404 cat >>conftest.$ac_ext <<_ACEOF
9405 /* end confdefs.h.  */
9406
9407 /* Override any GCC internal prototype to avoid an error.
9408    Use char because int might match the return type of a GCC
9409    builtin and then its argument prototype would still apply.  */
9410 #ifdef __cplusplus
9411 extern "C"
9412 #endif
9413 char getpeercon_raw ();
9414 int
9415 main ()
9416 {
9417 return getpeercon_raw ();
9418   ;
9419   return 0;
9420 }
9421 _ACEOF
9422 rm -f conftest.$ac_objext conftest$ac_exeext
9423 if { (ac_try="$ac_link"
9424 case "(($ac_try" in
9425   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9426   *) ac_try_echo=$ac_try;;
9427 esac
9428 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9429 $as_echo "$ac_try_echo") >&5
9430   (eval "$ac_link") 2>conftest.er1
9431   ac_status=$?
9432   grep -v '^ *+' conftest.er1 >conftest.err
9433   rm -f conftest.er1
9434   cat conftest.err >&5
9435   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9436   (exit $ac_status); } && {
9437          test -z "$ac_c_werror_flag" ||
9438          test ! -s conftest.err
9439        } && test -s conftest$ac_exeext && {
9440          test "$cross_compiling" = yes ||
9441          $as_test_x conftest$ac_exeext
9442        }; then
9443   ac_cv_lib_selinux_getpeercon_raw=yes
9444 else
9445   $as_echo "$as_me: failed program was:" >&5
9446 sed 's/^/| /' conftest.$ac_ext >&5
9447
9448         ac_cv_lib_selinux_getpeercon_raw=no
9449 fi
9450
9451 rm -rf conftest.dSYM
9452 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9453       conftest$ac_exeext conftest.$ac_ext
9454 LIBS=$ac_check_lib_save_LIBS
9455 fi
9456 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_getpeercon_raw" >&5
9457 $as_echo "$ac_cv_lib_selinux_getpeercon_raw" >&6; }
9458 if test "x$ac_cv_lib_selinux_getpeercon_raw" = x""yes; then
9459   cat >>confdefs.h <<_ACEOF
9460 #define HAVE_LIBSELINUX 1
9461 _ACEOF
9462
9463   LIBS="-lselinux $LIBS"
9464
9465 else
9466   { { $as_echo "$as_me:$LINENO: error: library 'libselinux' is required for SELinux support" >&5
9467 $as_echo "$as_me: error: library 'libselinux' is required for SELinux support" >&2;}
9468    { (exit 1); exit 1; }; }
9469 fi
9470
9471 fi
9472
9473 # for contrib/uuid-ossp
9474 if test "$with_ossp_uuid" = yes ; then
9475   { $as_echo "$as_me:$LINENO: checking for uuid_export in -lossp-uuid" >&5
9476 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
9477 if test "${ac_cv_lib_ossp_uuid_uuid_export+set}" = set; then
9478   $as_echo_n "(cached) " >&6
9479 else
9480   ac_check_lib_save_LIBS=$LIBS
9481 LIBS="-lossp-uuid  $LIBS"
9482 cat >conftest.$ac_ext <<_ACEOF
9483 /* confdefs.h.  */
9484 _ACEOF
9485 cat confdefs.h >>conftest.$ac_ext
9486 cat >>conftest.$ac_ext <<_ACEOF
9487 /* end confdefs.h.  */
9488
9489 /* Override any GCC internal prototype to avoid an error.
9490    Use char because int might match the return type of a GCC
9491    builtin and then its argument prototype would still apply.  */
9492 #ifdef __cplusplus
9493 extern "C"
9494 #endif
9495 char uuid_export ();
9496 int
9497 main ()
9498 {
9499 return uuid_export ();
9500   ;
9501   return 0;
9502 }
9503 _ACEOF
9504 rm -f conftest.$ac_objext conftest$ac_exeext
9505 if { (ac_try="$ac_link"
9506 case "(($ac_try" in
9507   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9508   *) ac_try_echo=$ac_try;;
9509 esac
9510 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9511 $as_echo "$ac_try_echo") >&5
9512   (eval "$ac_link") 2>conftest.er1
9513   ac_status=$?
9514   grep -v '^ *+' conftest.er1 >conftest.err
9515   rm -f conftest.er1
9516   cat conftest.err >&5
9517   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9518   (exit $ac_status); } && {
9519          test -z "$ac_c_werror_flag" ||
9520          test ! -s conftest.err
9521        } && test -s conftest$ac_exeext && {
9522          test "$cross_compiling" = yes ||
9523          $as_test_x conftest$ac_exeext
9524        }; then
9525   ac_cv_lib_ossp_uuid_uuid_export=yes
9526 else
9527   $as_echo "$as_me: failed program was:" >&5
9528 sed 's/^/| /' conftest.$ac_ext >&5
9529
9530         ac_cv_lib_ossp_uuid_uuid_export=no
9531 fi
9532
9533 rm -rf conftest.dSYM
9534 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9535       conftest$ac_exeext conftest.$ac_ext
9536 LIBS=$ac_check_lib_save_LIBS
9537 fi
9538 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
9539 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
9540 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = x""yes; then
9541   OSSP_UUID_LIBS="-lossp-uuid"
9542 else
9543   { $as_echo "$as_me:$LINENO: checking for uuid_export in -luuid" >&5
9544 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
9545 if test "${ac_cv_lib_uuid_uuid_export+set}" = set; then
9546   $as_echo_n "(cached) " >&6
9547 else
9548   ac_check_lib_save_LIBS=$LIBS
9549 LIBS="-luuid  $LIBS"
9550 cat >conftest.$ac_ext <<_ACEOF
9551 /* confdefs.h.  */
9552 _ACEOF
9553 cat confdefs.h >>conftest.$ac_ext
9554 cat >>conftest.$ac_ext <<_ACEOF
9555 /* end confdefs.h.  */
9556
9557 /* Override any GCC internal prototype to avoid an error.
9558    Use char because int might match the return type of a GCC
9559    builtin and then its argument prototype would still apply.  */
9560 #ifdef __cplusplus
9561 extern "C"
9562 #endif
9563 char uuid_export ();
9564 int
9565 main ()
9566 {
9567 return uuid_export ();
9568   ;
9569   return 0;
9570 }
9571 _ACEOF
9572 rm -f conftest.$ac_objext conftest$ac_exeext
9573 if { (ac_try="$ac_link"
9574 case "(($ac_try" in
9575   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9576   *) ac_try_echo=$ac_try;;
9577 esac
9578 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9579 $as_echo "$ac_try_echo") >&5
9580   (eval "$ac_link") 2>conftest.er1
9581   ac_status=$?
9582   grep -v '^ *+' conftest.er1 >conftest.err
9583   rm -f conftest.er1
9584   cat conftest.err >&5
9585   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9586   (exit $ac_status); } && {
9587          test -z "$ac_c_werror_flag" ||
9588          test ! -s conftest.err
9589        } && test -s conftest$ac_exeext && {
9590          test "$cross_compiling" = yes ||
9591          $as_test_x conftest$ac_exeext
9592        }; then
9593   ac_cv_lib_uuid_uuid_export=yes
9594 else
9595   $as_echo "$as_me: failed program was:" >&5
9596 sed 's/^/| /' conftest.$ac_ext >&5
9597
9598         ac_cv_lib_uuid_uuid_export=no
9599 fi
9600
9601 rm -rf conftest.dSYM
9602 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9603       conftest$ac_exeext conftest.$ac_ext
9604 LIBS=$ac_check_lib_save_LIBS
9605 fi
9606 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_export" >&5
9607 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
9608 if test "x$ac_cv_lib_uuid_uuid_export" = x""yes; then
9609   OSSP_UUID_LIBS="-luuid"
9610 else
9611   { { $as_echo "$as_me:$LINENO: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&5
9612 $as_echo "$as_me: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&2;}
9613    { (exit 1); exit 1; }; }
9614 fi
9615
9616 fi
9617
9618 fi
9619
9620
9621
9622 ##
9623 ## Header files
9624 ##
9625
9626 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
9627 $as_echo_n "checking for ANSI C header files... " >&6; }
9628 if test "${ac_cv_header_stdc+set}" = set; then
9629   $as_echo_n "(cached) " >&6
9630 else
9631   cat >conftest.$ac_ext <<_ACEOF
9632 /* confdefs.h.  */
9633 _ACEOF
9634 cat confdefs.h >>conftest.$ac_ext
9635 cat >>conftest.$ac_ext <<_ACEOF
9636 /* end confdefs.h.  */
9637 #include <stdlib.h>
9638 #include <stdarg.h>
9639 #include <string.h>
9640 #include <float.h>
9641
9642 int
9643 main ()
9644 {
9645
9646   ;
9647   return 0;
9648 }
9649 _ACEOF
9650 rm -f conftest.$ac_objext
9651 if { (ac_try="$ac_compile"
9652 case "(($ac_try" in
9653   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9654   *) ac_try_echo=$ac_try;;
9655 esac
9656 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9657 $as_echo "$ac_try_echo") >&5
9658   (eval "$ac_compile") 2>conftest.er1
9659   ac_status=$?
9660   grep -v '^ *+' conftest.er1 >conftest.err
9661   rm -f conftest.er1
9662   cat conftest.err >&5
9663   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9664   (exit $ac_status); } && {
9665          test -z "$ac_c_werror_flag" ||
9666          test ! -s conftest.err
9667        } && test -s conftest.$ac_objext; then
9668   ac_cv_header_stdc=yes
9669 else
9670   $as_echo "$as_me: failed program was:" >&5
9671 sed 's/^/| /' conftest.$ac_ext >&5
9672
9673         ac_cv_header_stdc=no
9674 fi
9675
9676 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9677
9678 if test $ac_cv_header_stdc = yes; then
9679   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9680   cat >conftest.$ac_ext <<_ACEOF
9681 /* confdefs.h.  */
9682 _ACEOF
9683 cat confdefs.h >>conftest.$ac_ext
9684 cat >>conftest.$ac_ext <<_ACEOF
9685 /* end confdefs.h.  */
9686 #include <string.h>
9687
9688 _ACEOF
9689 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9690   $EGREP "memchr" >/dev/null 2>&1; then
9691   :
9692 else
9693   ac_cv_header_stdc=no
9694 fi
9695 rm -f conftest*
9696
9697 fi
9698
9699 if test $ac_cv_header_stdc = yes; then
9700   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9701   cat >conftest.$ac_ext <<_ACEOF
9702 /* confdefs.h.  */
9703 _ACEOF
9704 cat confdefs.h >>conftest.$ac_ext
9705 cat >>conftest.$ac_ext <<_ACEOF
9706 /* end confdefs.h.  */
9707 #include <stdlib.h>
9708
9709 _ACEOF
9710 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9711   $EGREP "free" >/dev/null 2>&1; then
9712   :
9713 else
9714   ac_cv_header_stdc=no
9715 fi
9716 rm -f conftest*
9717
9718 fi
9719
9720 if test $ac_cv_header_stdc = yes; then
9721   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9722   if test "$cross_compiling" = yes; then
9723   :
9724 else
9725   cat >conftest.$ac_ext <<_ACEOF
9726 /* confdefs.h.  */
9727 _ACEOF
9728 cat confdefs.h >>conftest.$ac_ext
9729 cat >>conftest.$ac_ext <<_ACEOF
9730 /* end confdefs.h.  */
9731 #include <ctype.h>
9732 #include <stdlib.h>
9733 #if ((' ' & 0x0FF) == 0x020)
9734 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9735 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9736 #else
9737 # define ISLOWER(c) \
9738                    (('a' <= (c) && (c) <= 'i') \
9739                      || ('j' <= (c) && (c) <= 'r') \
9740                      || ('s' <= (c) && (c) <= 'z'))
9741 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9742 #endif
9743
9744 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9745 int
9746 main ()
9747 {
9748   int i;
9749   for (i = 0; i < 256; i++)
9750     if (XOR (islower (i), ISLOWER (i))
9751         || toupper (i) != TOUPPER (i))
9752       return 2;
9753   return 0;
9754 }
9755 _ACEOF
9756 rm -f conftest$ac_exeext
9757 if { (ac_try="$ac_link"
9758 case "(($ac_try" in
9759   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9760   *) ac_try_echo=$ac_try;;
9761 esac
9762 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9763 $as_echo "$ac_try_echo") >&5
9764   (eval "$ac_link") 2>&5
9765   ac_status=$?
9766   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9767   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9768   { (case "(($ac_try" in
9769   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9770   *) ac_try_echo=$ac_try;;
9771 esac
9772 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9773 $as_echo "$ac_try_echo") >&5
9774   (eval "$ac_try") 2>&5
9775   ac_status=$?
9776   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9777   (exit $ac_status); }; }; then
9778   :
9779 else
9780   $as_echo "$as_me: program exited with status $ac_status" >&5
9781 $as_echo "$as_me: failed program was:" >&5
9782 sed 's/^/| /' conftest.$ac_ext >&5
9783
9784 ( exit $ac_status )
9785 ac_cv_header_stdc=no
9786 fi
9787 rm -rf conftest.dSYM
9788 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9789 fi
9790
9791
9792 fi
9793 fi
9794 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
9795 $as_echo "$ac_cv_header_stdc" >&6; }
9796 if test $ac_cv_header_stdc = yes; then
9797
9798 cat >>confdefs.h <<\_ACEOF
9799 #define STDC_HEADERS 1
9800 _ACEOF
9801
9802 fi
9803
9804 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9815                   inttypes.h stdint.h unistd.h
9816 do
9817 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9818 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9819 $as_echo_n "checking for $ac_header... " >&6; }
9820 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9821   $as_echo_n "(cached) " >&6
9822 else
9823   cat >conftest.$ac_ext <<_ACEOF
9824 /* confdefs.h.  */
9825 _ACEOF
9826 cat confdefs.h >>conftest.$ac_ext
9827 cat >>conftest.$ac_ext <<_ACEOF
9828 /* end confdefs.h.  */
9829 $ac_includes_default
9830
9831 #include <$ac_header>
9832 _ACEOF
9833 rm -f conftest.$ac_objext
9834 if { (ac_try="$ac_compile"
9835 case "(($ac_try" in
9836   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9837   *) ac_try_echo=$ac_try;;
9838 esac
9839 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9840 $as_echo "$ac_try_echo") >&5
9841   (eval "$ac_compile") 2>conftest.er1
9842   ac_status=$?
9843   grep -v '^ *+' conftest.er1 >conftest.err
9844   rm -f conftest.er1
9845   cat conftest.err >&5
9846   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9847   (exit $ac_status); } && {
9848          test -z "$ac_c_werror_flag" ||
9849          test ! -s conftest.err
9850        } && test -s conftest.$ac_objext; then
9851   eval "$as_ac_Header=yes"
9852 else
9853   $as_echo "$as_me: failed program was:" >&5
9854 sed 's/^/| /' conftest.$ac_ext >&5
9855
9856         eval "$as_ac_Header=no"
9857 fi
9858
9859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9860 fi
9861 ac_res=`eval 'as_val=${'$as_ac_Header'}
9862                  $as_echo "$as_val"'`
9863                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9864 $as_echo "$ac_res" >&6; }
9865 as_val=`eval 'as_val=${'$as_ac_Header'}
9866                  $as_echo "$as_val"'`
9867    if test "x$as_val" = x""yes; then
9868   cat >>confdefs.h <<_ACEOF
9869 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9870 _ACEOF
9871
9872 fi
9873
9874 done
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907 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
9908 do
9909 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9910 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9911   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
9912 $as_echo_n "checking for $ac_header... " >&6; }
9913 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9914   $as_echo_n "(cached) " >&6
9915 fi
9916 ac_res=`eval 'as_val=${'$as_ac_Header'}
9917                  $as_echo "$as_val"'`
9918                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9919 $as_echo "$ac_res" >&6; }
9920 else
9921   # Is the header compilable?
9922 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
9923 $as_echo_n "checking $ac_header usability... " >&6; }
9924 cat >conftest.$ac_ext <<_ACEOF
9925 /* confdefs.h.  */
9926 _ACEOF
9927 cat confdefs.h >>conftest.$ac_ext
9928 cat >>conftest.$ac_ext <<_ACEOF
9929 /* end confdefs.h.  */
9930 $ac_includes_default
9931 #include <$ac_header>
9932 _ACEOF
9933 rm -f conftest.$ac_objext
9934 if { (ac_try="$ac_compile"
9935 case "(($ac_try" in
9936   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9937   *) ac_try_echo=$ac_try;;
9938 esac
9939 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9940 $as_echo "$ac_try_echo") >&5
9941   (eval "$ac_compile") 2>conftest.er1
9942   ac_status=$?
9943   grep -v '^ *+' conftest.er1 >conftest.err
9944   rm -f conftest.er1
9945   cat conftest.err >&5
9946   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9947   (exit $ac_status); } && {
9948          test -z "$ac_c_werror_flag" ||
9949          test ! -s conftest.err
9950        } && test -s conftest.$ac_objext; then
9951   ac_header_compiler=yes
9952 else
9953   $as_echo "$as_me: failed program was:" >&5
9954 sed 's/^/| /' conftest.$ac_ext >&5
9955
9956         ac_header_compiler=no
9957 fi
9958
9959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9960 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9961 $as_echo "$ac_header_compiler" >&6; }
9962
9963 # Is the header present?
9964 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
9965 $as_echo_n "checking $ac_header presence... " >&6; }
9966 cat >conftest.$ac_ext <<_ACEOF
9967 /* confdefs.h.  */
9968 _ACEOF
9969 cat confdefs.h >>conftest.$ac_ext
9970 cat >>conftest.$ac_ext <<_ACEOF
9971 /* end confdefs.h.  */
9972 #include <$ac_header>
9973 _ACEOF
9974 if { (ac_try="$ac_cpp conftest.$ac_ext"
9975 case "(($ac_try" in
9976   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9977   *) ac_try_echo=$ac_try;;
9978 esac
9979 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9980 $as_echo "$ac_try_echo") >&5
9981   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9982   ac_status=$?
9983   grep -v '^ *+' conftest.er1 >conftest.err
9984   rm -f conftest.er1
9985   cat conftest.err >&5
9986   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9987   (exit $ac_status); } >/dev/null && {
9988          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9989          test ! -s conftest.err
9990        }; then
9991   ac_header_preproc=yes
9992 else
9993   $as_echo "$as_me: failed program was:" >&5
9994 sed 's/^/| /' conftest.$ac_ext >&5
9995
9996   ac_header_preproc=no
9997 fi
9998
9999 rm -f conftest.err conftest.$ac_ext
10000 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10001 $as_echo "$ac_header_preproc" >&6; }
10002
10003 # So?  What about this header?
10004 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10005   yes:no: )
10006     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10007 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10008     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10009 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10010     ac_header_preproc=yes
10011     ;;
10012   no:yes:* )
10013     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10014 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10015     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10016 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10017     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10018 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10019     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10020 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10021     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10022 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10023     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10024 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10025     ( cat <<\_ASBOX
10026 ## ---------------------------------------- ##
10027 ## Report this to pgsql-bugs@postgresql.org ##
10028 ## ---------------------------------------- ##
10029 _ASBOX
10030      ) | sed "s/^/$as_me: WARNING:     /" >&2
10031     ;;
10032 esac
10033 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10034 $as_echo_n "checking for $ac_header... " >&6; }
10035 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10036   $as_echo_n "(cached) " >&6
10037 else
10038   eval "$as_ac_Header=\$ac_header_preproc"
10039 fi
10040 ac_res=`eval 'as_val=${'$as_ac_Header'}
10041                  $as_echo "$as_val"'`
10042                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10043 $as_echo "$ac_res" >&6; }
10044
10045 fi
10046 as_val=`eval 'as_val=${'$as_ac_Header'}
10047                  $as_echo "$as_val"'`
10048    if test "x$as_val" = x""yes; then
10049   cat >>confdefs.h <<_ACEOF
10050 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10051 _ACEOF
10052
10053 fi
10054
10055 done
10056
10057
10058 # On BSD, cpp test for net/if.h will fail unless sys/socket.h
10059 # is included first.
10060
10061 for ac_header in net/if.h
10062 do
10063 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10064 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10065 $as_echo_n "checking for $ac_header... " >&6; }
10066 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10067   $as_echo_n "(cached) " >&6
10068 else
10069   cat >conftest.$ac_ext <<_ACEOF
10070 /* confdefs.h.  */
10071 _ACEOF
10072 cat confdefs.h >>conftest.$ac_ext
10073 cat >>conftest.$ac_ext <<_ACEOF
10074 /* end confdefs.h.  */
10075 $ac_includes_default
10076 #ifdef HAVE_SYS_SOCKET_H
10077 #include <sys/socket.h>
10078 #endif
10079
10080
10081 #include <$ac_header>
10082 _ACEOF
10083 rm -f conftest.$ac_objext
10084 if { (ac_try="$ac_compile"
10085 case "(($ac_try" in
10086   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10087   *) ac_try_echo=$ac_try;;
10088 esac
10089 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10090 $as_echo "$ac_try_echo") >&5
10091   (eval "$ac_compile") 2>conftest.er1
10092   ac_status=$?
10093   grep -v '^ *+' conftest.er1 >conftest.err
10094   rm -f conftest.er1
10095   cat conftest.err >&5
10096   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10097   (exit $ac_status); } && {
10098          test -z "$ac_c_werror_flag" ||
10099          test ! -s conftest.err
10100        } && test -s conftest.$ac_objext; then
10101   eval "$as_ac_Header=yes"
10102 else
10103   $as_echo "$as_me: failed program was:" >&5
10104 sed 's/^/| /' conftest.$ac_ext >&5
10105
10106         eval "$as_ac_Header=no"
10107 fi
10108
10109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10110 fi
10111 ac_res=`eval 'as_val=${'$as_ac_Header'}
10112                  $as_echo "$as_val"'`
10113                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10114 $as_echo "$ac_res" >&6; }
10115 as_val=`eval 'as_val=${'$as_ac_Header'}
10116                  $as_echo "$as_val"'`
10117    if test "x$as_val" = x""yes; then
10118   cat >>confdefs.h <<_ACEOF
10119 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10120 _ACEOF
10121
10122 fi
10123
10124 done
10125
10126
10127 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
10128 # netinet/in.h is included first.
10129
10130 for ac_header in netinet/in.h
10131 do
10132 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10133 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10134   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10135 $as_echo_n "checking for $ac_header... " >&6; }
10136 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10137   $as_echo_n "(cached) " >&6
10138 fi
10139 ac_res=`eval 'as_val=${'$as_ac_Header'}
10140                  $as_echo "$as_val"'`
10141                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10142 $as_echo "$ac_res" >&6; }
10143 else
10144   # Is the header compilable?
10145 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10146 $as_echo_n "checking $ac_header usability... " >&6; }
10147 cat >conftest.$ac_ext <<_ACEOF
10148 /* confdefs.h.  */
10149 _ACEOF
10150 cat confdefs.h >>conftest.$ac_ext
10151 cat >>conftest.$ac_ext <<_ACEOF
10152 /* end confdefs.h.  */
10153 $ac_includes_default
10154 #include <$ac_header>
10155 _ACEOF
10156 rm -f conftest.$ac_objext
10157 if { (ac_try="$ac_compile"
10158 case "(($ac_try" in
10159   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10160   *) ac_try_echo=$ac_try;;
10161 esac
10162 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10163 $as_echo "$ac_try_echo") >&5
10164   (eval "$ac_compile") 2>conftest.er1
10165   ac_status=$?
10166   grep -v '^ *+' conftest.er1 >conftest.err
10167   rm -f conftest.er1
10168   cat conftest.err >&5
10169   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10170   (exit $ac_status); } && {
10171          test -z "$ac_c_werror_flag" ||
10172          test ! -s conftest.err
10173        } && test -s conftest.$ac_objext; then
10174   ac_header_compiler=yes
10175 else
10176   $as_echo "$as_me: failed program was:" >&5
10177 sed 's/^/| /' conftest.$ac_ext >&5
10178
10179         ac_header_compiler=no
10180 fi
10181
10182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10183 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10184 $as_echo "$ac_header_compiler" >&6; }
10185
10186 # Is the header present?
10187 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10188 $as_echo_n "checking $ac_header presence... " >&6; }
10189 cat >conftest.$ac_ext <<_ACEOF
10190 /* confdefs.h.  */
10191 _ACEOF
10192 cat confdefs.h >>conftest.$ac_ext
10193 cat >>conftest.$ac_ext <<_ACEOF
10194 /* end confdefs.h.  */
10195 #include <$ac_header>
10196 _ACEOF
10197 if { (ac_try="$ac_cpp conftest.$ac_ext"
10198 case "(($ac_try" in
10199   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10200   *) ac_try_echo=$ac_try;;
10201 esac
10202 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10203 $as_echo "$ac_try_echo") >&5
10204   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10205   ac_status=$?
10206   grep -v '^ *+' conftest.er1 >conftest.err
10207   rm -f conftest.er1
10208   cat conftest.err >&5
10209   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10210   (exit $ac_status); } >/dev/null && {
10211          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10212          test ! -s conftest.err
10213        }; then
10214   ac_header_preproc=yes
10215 else
10216   $as_echo "$as_me: failed program was:" >&5
10217 sed 's/^/| /' conftest.$ac_ext >&5
10218
10219   ac_header_preproc=no
10220 fi
10221
10222 rm -f conftest.err conftest.$ac_ext
10223 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10224 $as_echo "$ac_header_preproc" >&6; }
10225
10226 # So?  What about this header?
10227 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10228   yes:no: )
10229     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10230 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10231     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10232 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10233     ac_header_preproc=yes
10234     ;;
10235   no:yes:* )
10236     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10237 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10238     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10239 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10240     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10241 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10242     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10243 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10244     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10245 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10246     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10247 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10248     ( cat <<\_ASBOX
10249 ## ---------------------------------------- ##
10250 ## Report this to pgsql-bugs@postgresql.org ##
10251 ## ---------------------------------------- ##
10252 _ASBOX
10253      ) | sed "s/^/$as_me: WARNING:     /" >&2
10254     ;;
10255 esac
10256 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10257 $as_echo_n "checking for $ac_header... " >&6; }
10258 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10259   $as_echo_n "(cached) " >&6
10260 else
10261   eval "$as_ac_Header=\$ac_header_preproc"
10262 fi
10263 ac_res=`eval 'as_val=${'$as_ac_Header'}
10264                  $as_echo "$as_val"'`
10265                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10266 $as_echo "$ac_res" >&6; }
10267
10268 fi
10269 as_val=`eval 'as_val=${'$as_ac_Header'}
10270                  $as_echo "$as_val"'`
10271    if test "x$as_val" = x""yes; then
10272   cat >>confdefs.h <<_ACEOF
10273 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10274 _ACEOF
10275
10276 fi
10277
10278 done
10279
10280
10281 for ac_header in netinet/tcp.h
10282 do
10283 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10284 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10285 $as_echo_n "checking for $ac_header... " >&6; }
10286 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10287   $as_echo_n "(cached) " >&6
10288 else
10289   cat >conftest.$ac_ext <<_ACEOF
10290 /* confdefs.h.  */
10291 _ACEOF
10292 cat confdefs.h >>conftest.$ac_ext
10293 cat >>conftest.$ac_ext <<_ACEOF
10294 /* end confdefs.h.  */
10295 $ac_includes_default
10296 #ifdef HAVE_NETINET_IN_H
10297 #include <netinet/in.h>
10298 #endif
10299
10300
10301 #include <$ac_header>
10302 _ACEOF
10303 rm -f conftest.$ac_objext
10304 if { (ac_try="$ac_compile"
10305 case "(($ac_try" in
10306   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10307   *) ac_try_echo=$ac_try;;
10308 esac
10309 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10310 $as_echo "$ac_try_echo") >&5
10311   (eval "$ac_compile") 2>conftest.er1
10312   ac_status=$?
10313   grep -v '^ *+' conftest.er1 >conftest.err
10314   rm -f conftest.er1
10315   cat conftest.err >&5
10316   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10317   (exit $ac_status); } && {
10318          test -z "$ac_c_werror_flag" ||
10319          test ! -s conftest.err
10320        } && test -s conftest.$ac_objext; then
10321   eval "$as_ac_Header=yes"
10322 else
10323   $as_echo "$as_me: failed program was:" >&5
10324 sed 's/^/| /' conftest.$ac_ext >&5
10325
10326         eval "$as_ac_Header=no"
10327 fi
10328
10329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10330 fi
10331 ac_res=`eval 'as_val=${'$as_ac_Header'}
10332                  $as_echo "$as_val"'`
10333                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10334 $as_echo "$ac_res" >&6; }
10335 as_val=`eval 'as_val=${'$as_ac_Header'}
10336                  $as_echo "$as_val"'`
10337    if test "x$as_val" = x""yes; then
10338   cat >>confdefs.h <<_ACEOF
10339 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10340 _ACEOF
10341
10342 fi
10343
10344 done
10345
10346
10347 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10348
10349 for ac_header in readline/readline.h
10350 do
10351 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10352 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10353   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10354 $as_echo_n "checking for $ac_header... " >&6; }
10355 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10356   $as_echo_n "(cached) " >&6
10357 fi
10358 ac_res=`eval 'as_val=${'$as_ac_Header'}
10359                  $as_echo "$as_val"'`
10360                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10361 $as_echo "$ac_res" >&6; }
10362 else
10363   # Is the header compilable?
10364 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10365 $as_echo_n "checking $ac_header usability... " >&6; }
10366 cat >conftest.$ac_ext <<_ACEOF
10367 /* confdefs.h.  */
10368 _ACEOF
10369 cat confdefs.h >>conftest.$ac_ext
10370 cat >>conftest.$ac_ext <<_ACEOF
10371 /* end confdefs.h.  */
10372 $ac_includes_default
10373 #include <$ac_header>
10374 _ACEOF
10375 rm -f conftest.$ac_objext
10376 if { (ac_try="$ac_compile"
10377 case "(($ac_try" in
10378   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10379   *) ac_try_echo=$ac_try;;
10380 esac
10381 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10382 $as_echo "$ac_try_echo") >&5
10383   (eval "$ac_compile") 2>conftest.er1
10384   ac_status=$?
10385   grep -v '^ *+' conftest.er1 >conftest.err
10386   rm -f conftest.er1
10387   cat conftest.err >&5
10388   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10389   (exit $ac_status); } && {
10390          test -z "$ac_c_werror_flag" ||
10391          test ! -s conftest.err
10392        } && test -s conftest.$ac_objext; then
10393   ac_header_compiler=yes
10394 else
10395   $as_echo "$as_me: failed program was:" >&5
10396 sed 's/^/| /' conftest.$ac_ext >&5
10397
10398         ac_header_compiler=no
10399 fi
10400
10401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10402 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10403 $as_echo "$ac_header_compiler" >&6; }
10404
10405 # Is the header present?
10406 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10407 $as_echo_n "checking $ac_header presence... " >&6; }
10408 cat >conftest.$ac_ext <<_ACEOF
10409 /* confdefs.h.  */
10410 _ACEOF
10411 cat confdefs.h >>conftest.$ac_ext
10412 cat >>conftest.$ac_ext <<_ACEOF
10413 /* end confdefs.h.  */
10414 #include <$ac_header>
10415 _ACEOF
10416 if { (ac_try="$ac_cpp conftest.$ac_ext"
10417 case "(($ac_try" in
10418   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10419   *) ac_try_echo=$ac_try;;
10420 esac
10421 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10422 $as_echo "$ac_try_echo") >&5
10423   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10424   ac_status=$?
10425   grep -v '^ *+' conftest.er1 >conftest.err
10426   rm -f conftest.er1
10427   cat conftest.err >&5
10428   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10429   (exit $ac_status); } >/dev/null && {
10430          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10431          test ! -s conftest.err
10432        }; then
10433   ac_header_preproc=yes
10434 else
10435   $as_echo "$as_me: failed program was:" >&5
10436 sed 's/^/| /' conftest.$ac_ext >&5
10437
10438   ac_header_preproc=no
10439 fi
10440
10441 rm -f conftest.err conftest.$ac_ext
10442 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10443 $as_echo "$ac_header_preproc" >&6; }
10444
10445 # So?  What about this header?
10446 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10447   yes:no: )
10448     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10449 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10450     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10451 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10452     ac_header_preproc=yes
10453     ;;
10454   no:yes:* )
10455     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10456 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10457     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10458 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10459     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10460 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10461     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10462 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10463     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10464 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10465     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10466 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10467     ( cat <<\_ASBOX
10468 ## ---------------------------------------- ##
10469 ## Report this to pgsql-bugs@postgresql.org ##
10470 ## ---------------------------------------- ##
10471 _ASBOX
10472      ) | sed "s/^/$as_me: WARNING:     /" >&2
10473     ;;
10474 esac
10475 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10476 $as_echo_n "checking for $ac_header... " >&6; }
10477 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10478   $as_echo_n "(cached) " >&6
10479 else
10480   eval "$as_ac_Header=\$ac_header_preproc"
10481 fi
10482 ac_res=`eval 'as_val=${'$as_ac_Header'}
10483                  $as_echo "$as_val"'`
10484                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10485 $as_echo "$ac_res" >&6; }
10486
10487 fi
10488 as_val=`eval 'as_val=${'$as_ac_Header'}
10489                  $as_echo "$as_val"'`
10490    if test "x$as_val" = x""yes; then
10491   cat >>confdefs.h <<_ACEOF
10492 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10493 _ACEOF
10494
10495 else
10496
10497 for ac_header in readline.h
10498 do
10499 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10500 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10501   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10502 $as_echo_n "checking for $ac_header... " >&6; }
10503 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10504   $as_echo_n "(cached) " >&6
10505 fi
10506 ac_res=`eval 'as_val=${'$as_ac_Header'}
10507                  $as_echo "$as_val"'`
10508                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10509 $as_echo "$ac_res" >&6; }
10510 else
10511   # Is the header compilable?
10512 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10513 $as_echo_n "checking $ac_header usability... " >&6; }
10514 cat >conftest.$ac_ext <<_ACEOF
10515 /* confdefs.h.  */
10516 _ACEOF
10517 cat confdefs.h >>conftest.$ac_ext
10518 cat >>conftest.$ac_ext <<_ACEOF
10519 /* end confdefs.h.  */
10520 $ac_includes_default
10521 #include <$ac_header>
10522 _ACEOF
10523 rm -f conftest.$ac_objext
10524 if { (ac_try="$ac_compile"
10525 case "(($ac_try" in
10526   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10527   *) ac_try_echo=$ac_try;;
10528 esac
10529 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10530 $as_echo "$ac_try_echo") >&5
10531   (eval "$ac_compile") 2>conftest.er1
10532   ac_status=$?
10533   grep -v '^ *+' conftest.er1 >conftest.err
10534   rm -f conftest.er1
10535   cat conftest.err >&5
10536   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10537   (exit $ac_status); } && {
10538          test -z "$ac_c_werror_flag" ||
10539          test ! -s conftest.err
10540        } && test -s conftest.$ac_objext; then
10541   ac_header_compiler=yes
10542 else
10543   $as_echo "$as_me: failed program was:" >&5
10544 sed 's/^/| /' conftest.$ac_ext >&5
10545
10546         ac_header_compiler=no
10547 fi
10548
10549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10550 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10551 $as_echo "$ac_header_compiler" >&6; }
10552
10553 # Is the header present?
10554 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10555 $as_echo_n "checking $ac_header presence... " >&6; }
10556 cat >conftest.$ac_ext <<_ACEOF
10557 /* confdefs.h.  */
10558 _ACEOF
10559 cat confdefs.h >>conftest.$ac_ext
10560 cat >>conftest.$ac_ext <<_ACEOF
10561 /* end confdefs.h.  */
10562 #include <$ac_header>
10563 _ACEOF
10564 if { (ac_try="$ac_cpp conftest.$ac_ext"
10565 case "(($ac_try" in
10566   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10567   *) ac_try_echo=$ac_try;;
10568 esac
10569 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10570 $as_echo "$ac_try_echo") >&5
10571   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10572   ac_status=$?
10573   grep -v '^ *+' conftest.er1 >conftest.err
10574   rm -f conftest.er1
10575   cat conftest.err >&5
10576   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10577   (exit $ac_status); } >/dev/null && {
10578          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10579          test ! -s conftest.err
10580        }; then
10581   ac_header_preproc=yes
10582 else
10583   $as_echo "$as_me: failed program was:" >&5
10584 sed 's/^/| /' conftest.$ac_ext >&5
10585
10586   ac_header_preproc=no
10587 fi
10588
10589 rm -f conftest.err conftest.$ac_ext
10590 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10591 $as_echo "$ac_header_preproc" >&6; }
10592
10593 # So?  What about this header?
10594 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10595   yes:no: )
10596     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10597 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10598     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10599 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10600     ac_header_preproc=yes
10601     ;;
10602   no:yes:* )
10603     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10604 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10605     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10606 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10607     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10608 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10609     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10610 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10611     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10612 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10613     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10614 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10615     ( cat <<\_ASBOX
10616 ## ---------------------------------------- ##
10617 ## Report this to pgsql-bugs@postgresql.org ##
10618 ## ---------------------------------------- ##
10619 _ASBOX
10620      ) | sed "s/^/$as_me: WARNING:     /" >&2
10621     ;;
10622 esac
10623 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10624 $as_echo_n "checking for $ac_header... " >&6; }
10625 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10626   $as_echo_n "(cached) " >&6
10627 else
10628   eval "$as_ac_Header=\$ac_header_preproc"
10629 fi
10630 ac_res=`eval 'as_val=${'$as_ac_Header'}
10631                  $as_echo "$as_val"'`
10632                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10633 $as_echo "$ac_res" >&6; }
10634
10635 fi
10636 as_val=`eval 'as_val=${'$as_ac_Header'}
10637                  $as_echo "$as_val"'`
10638    if test "x$as_val" = x""yes; then
10639   cat >>confdefs.h <<_ACEOF
10640 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10641 _ACEOF
10642
10643 else
10644   { { $as_echo "$as_me:$LINENO: error: readline header not found
10645 If you have readline already installed, see config.log for details on the
10646 failure.  It is possible the compiler isn't looking in the proper directory.
10647 Use --without-readline to disable readline support." >&5
10648 $as_echo "$as_me: error: readline header not found
10649 If you have readline already installed, see config.log for details on the
10650 failure.  It is possible the compiler isn't looking in the proper directory.
10651 Use --without-readline to disable readline support." >&2;}
10652    { (exit 1); exit 1; }; }
10653 fi
10654
10655 done
10656
10657 fi
10658
10659 done
10660
10661
10662 for ac_header in readline/history.h
10663 do
10664 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10665 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10666   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10667 $as_echo_n "checking for $ac_header... " >&6; }
10668 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10669   $as_echo_n "(cached) " >&6
10670 fi
10671 ac_res=`eval 'as_val=${'$as_ac_Header'}
10672                  $as_echo "$as_val"'`
10673                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10674 $as_echo "$ac_res" >&6; }
10675 else
10676   # Is the header compilable?
10677 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10678 $as_echo_n "checking $ac_header usability... " >&6; }
10679 cat >conftest.$ac_ext <<_ACEOF
10680 /* confdefs.h.  */
10681 _ACEOF
10682 cat confdefs.h >>conftest.$ac_ext
10683 cat >>conftest.$ac_ext <<_ACEOF
10684 /* end confdefs.h.  */
10685 $ac_includes_default
10686 #include <$ac_header>
10687 _ACEOF
10688 rm -f conftest.$ac_objext
10689 if { (ac_try="$ac_compile"
10690 case "(($ac_try" in
10691   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10692   *) ac_try_echo=$ac_try;;
10693 esac
10694 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10695 $as_echo "$ac_try_echo") >&5
10696   (eval "$ac_compile") 2>conftest.er1
10697   ac_status=$?
10698   grep -v '^ *+' conftest.er1 >conftest.err
10699   rm -f conftest.er1
10700   cat conftest.err >&5
10701   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10702   (exit $ac_status); } && {
10703          test -z "$ac_c_werror_flag" ||
10704          test ! -s conftest.err
10705        } && test -s conftest.$ac_objext; then
10706   ac_header_compiler=yes
10707 else
10708   $as_echo "$as_me: failed program was:" >&5
10709 sed 's/^/| /' conftest.$ac_ext >&5
10710
10711         ac_header_compiler=no
10712 fi
10713
10714 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10715 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10716 $as_echo "$ac_header_compiler" >&6; }
10717
10718 # Is the header present?
10719 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10720 $as_echo_n "checking $ac_header presence... " >&6; }
10721 cat >conftest.$ac_ext <<_ACEOF
10722 /* confdefs.h.  */
10723 _ACEOF
10724 cat confdefs.h >>conftest.$ac_ext
10725 cat >>conftest.$ac_ext <<_ACEOF
10726 /* end confdefs.h.  */
10727 #include <$ac_header>
10728 _ACEOF
10729 if { (ac_try="$ac_cpp conftest.$ac_ext"
10730 case "(($ac_try" in
10731   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10732   *) ac_try_echo=$ac_try;;
10733 esac
10734 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10735 $as_echo "$ac_try_echo") >&5
10736   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10737   ac_status=$?
10738   grep -v '^ *+' conftest.er1 >conftest.err
10739   rm -f conftest.er1
10740   cat conftest.err >&5
10741   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10742   (exit $ac_status); } >/dev/null && {
10743          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10744          test ! -s conftest.err
10745        }; then
10746   ac_header_preproc=yes
10747 else
10748   $as_echo "$as_me: failed program was:" >&5
10749 sed 's/^/| /' conftest.$ac_ext >&5
10750
10751   ac_header_preproc=no
10752 fi
10753
10754 rm -f conftest.err conftest.$ac_ext
10755 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10756 $as_echo "$ac_header_preproc" >&6; }
10757
10758 # So?  What about this header?
10759 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10760   yes:no: )
10761     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10762 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10763     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10764 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10765     ac_header_preproc=yes
10766     ;;
10767   no:yes:* )
10768     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10769 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10770     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10771 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10772     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10773 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10774     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10775 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10776     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10777 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10778     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10779 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10780     ( cat <<\_ASBOX
10781 ## ---------------------------------------- ##
10782 ## Report this to pgsql-bugs@postgresql.org ##
10783 ## ---------------------------------------- ##
10784 _ASBOX
10785      ) | sed "s/^/$as_me: WARNING:     /" >&2
10786     ;;
10787 esac
10788 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10789 $as_echo_n "checking for $ac_header... " >&6; }
10790 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10791   $as_echo_n "(cached) " >&6
10792 else
10793   eval "$as_ac_Header=\$ac_header_preproc"
10794 fi
10795 ac_res=`eval 'as_val=${'$as_ac_Header'}
10796                  $as_echo "$as_val"'`
10797                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10798 $as_echo "$ac_res" >&6; }
10799
10800 fi
10801 as_val=`eval 'as_val=${'$as_ac_Header'}
10802                  $as_echo "$as_val"'`
10803    if test "x$as_val" = x""yes; then
10804   cat >>confdefs.h <<_ACEOF
10805 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10806 _ACEOF
10807
10808 else
10809
10810 for ac_header in history.h
10811 do
10812 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10813 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10814   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10815 $as_echo_n "checking for $ac_header... " >&6; }
10816 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10817   $as_echo_n "(cached) " >&6
10818 fi
10819 ac_res=`eval 'as_val=${'$as_ac_Header'}
10820                  $as_echo "$as_val"'`
10821                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10822 $as_echo "$ac_res" >&6; }
10823 else
10824   # Is the header compilable?
10825 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10826 $as_echo_n "checking $ac_header usability... " >&6; }
10827 cat >conftest.$ac_ext <<_ACEOF
10828 /* confdefs.h.  */
10829 _ACEOF
10830 cat confdefs.h >>conftest.$ac_ext
10831 cat >>conftest.$ac_ext <<_ACEOF
10832 /* end confdefs.h.  */
10833 $ac_includes_default
10834 #include <$ac_header>
10835 _ACEOF
10836 rm -f conftest.$ac_objext
10837 if { (ac_try="$ac_compile"
10838 case "(($ac_try" in
10839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10840   *) ac_try_echo=$ac_try;;
10841 esac
10842 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10843 $as_echo "$ac_try_echo") >&5
10844   (eval "$ac_compile") 2>conftest.er1
10845   ac_status=$?
10846   grep -v '^ *+' conftest.er1 >conftest.err
10847   rm -f conftest.er1
10848   cat conftest.err >&5
10849   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10850   (exit $ac_status); } && {
10851          test -z "$ac_c_werror_flag" ||
10852          test ! -s conftest.err
10853        } && test -s conftest.$ac_objext; then
10854   ac_header_compiler=yes
10855 else
10856   $as_echo "$as_me: failed program was:" >&5
10857 sed 's/^/| /' conftest.$ac_ext >&5
10858
10859         ac_header_compiler=no
10860 fi
10861
10862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10863 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10864 $as_echo "$ac_header_compiler" >&6; }
10865
10866 # Is the header present?
10867 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10868 $as_echo_n "checking $ac_header presence... " >&6; }
10869 cat >conftest.$ac_ext <<_ACEOF
10870 /* confdefs.h.  */
10871 _ACEOF
10872 cat confdefs.h >>conftest.$ac_ext
10873 cat >>conftest.$ac_ext <<_ACEOF
10874 /* end confdefs.h.  */
10875 #include <$ac_header>
10876 _ACEOF
10877 if { (ac_try="$ac_cpp conftest.$ac_ext"
10878 case "(($ac_try" in
10879   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10880   *) ac_try_echo=$ac_try;;
10881 esac
10882 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10883 $as_echo "$ac_try_echo") >&5
10884   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10885   ac_status=$?
10886   grep -v '^ *+' conftest.er1 >conftest.err
10887   rm -f conftest.er1
10888   cat conftest.err >&5
10889   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10890   (exit $ac_status); } >/dev/null && {
10891          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10892          test ! -s conftest.err
10893        }; then
10894   ac_header_preproc=yes
10895 else
10896   $as_echo "$as_me: failed program was:" >&5
10897 sed 's/^/| /' conftest.$ac_ext >&5
10898
10899   ac_header_preproc=no
10900 fi
10901
10902 rm -f conftest.err conftest.$ac_ext
10903 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10904 $as_echo "$ac_header_preproc" >&6; }
10905
10906 # So?  What about this header?
10907 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10908   yes:no: )
10909     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10910 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10911     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10912 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10913     ac_header_preproc=yes
10914     ;;
10915   no:yes:* )
10916     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10917 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10918     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10919 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10920     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10921 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10922     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10923 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10924     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10925 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10926     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10927 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10928     ( cat <<\_ASBOX
10929 ## ---------------------------------------- ##
10930 ## Report this to pgsql-bugs@postgresql.org ##
10931 ## ---------------------------------------- ##
10932 _ASBOX
10933      ) | sed "s/^/$as_me: WARNING:     /" >&2
10934     ;;
10935 esac
10936 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10937 $as_echo_n "checking for $ac_header... " >&6; }
10938 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10939   $as_echo_n "(cached) " >&6
10940 else
10941   eval "$as_ac_Header=\$ac_header_preproc"
10942 fi
10943 ac_res=`eval 'as_val=${'$as_ac_Header'}
10944                  $as_echo "$as_val"'`
10945                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10946 $as_echo "$ac_res" >&6; }
10947
10948 fi
10949 as_val=`eval 'as_val=${'$as_ac_Header'}
10950                  $as_echo "$as_val"'`
10951    if test "x$as_val" = x""yes; then
10952   cat >>confdefs.h <<_ACEOF
10953 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10954 _ACEOF
10955
10956 else
10957   { { $as_echo "$as_me:$LINENO: error: history header not found
10958 If you have readline already installed, see config.log for details on the
10959 failure.  It is possible the compiler isn't looking in the proper directory.
10960 Use --without-readline to disable readline support." >&5
10961 $as_echo "$as_me: error: history header not found
10962 If you have readline already installed, see config.log for details on the
10963 failure.  It is possible the compiler isn't looking in the proper directory.
10964 Use --without-readline to disable readline support." >&2;}
10965    { (exit 1); exit 1; }; }
10966 fi
10967
10968 done
10969
10970 fi
10971
10972 done
10973
10974 fi
10975
10976 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10977 # Some installations of libedit usurp /usr/include/readline/, which seems
10978 # bad practice, since in combined installations readline will have its headers
10979 # there.  We might have to resort to AC_EGREP checks to make sure we found
10980 # the proper header...
10981
10982 for ac_header in editline/readline.h
10983 do
10984 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10985 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10986   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10987 $as_echo_n "checking for $ac_header... " >&6; }
10988 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10989   $as_echo_n "(cached) " >&6
10990 fi
10991 ac_res=`eval 'as_val=${'$as_ac_Header'}
10992                  $as_echo "$as_val"'`
10993                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10994 $as_echo "$ac_res" >&6; }
10995 else
10996   # Is the header compilable?
10997 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10998 $as_echo_n "checking $ac_header usability... " >&6; }
10999 cat >conftest.$ac_ext <<_ACEOF
11000 /* confdefs.h.  */
11001 _ACEOF
11002 cat confdefs.h >>conftest.$ac_ext
11003 cat >>conftest.$ac_ext <<_ACEOF
11004 /* end confdefs.h.  */
11005 $ac_includes_default
11006 #include <$ac_header>
11007 _ACEOF
11008 rm -f conftest.$ac_objext
11009 if { (ac_try="$ac_compile"
11010 case "(($ac_try" in
11011   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11012   *) ac_try_echo=$ac_try;;
11013 esac
11014 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11015 $as_echo "$ac_try_echo") >&5
11016   (eval "$ac_compile") 2>conftest.er1
11017   ac_status=$?
11018   grep -v '^ *+' conftest.er1 >conftest.err
11019   rm -f conftest.er1
11020   cat conftest.err >&5
11021   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11022   (exit $ac_status); } && {
11023          test -z "$ac_c_werror_flag" ||
11024          test ! -s conftest.err
11025        } && test -s conftest.$ac_objext; then
11026   ac_header_compiler=yes
11027 else
11028   $as_echo "$as_me: failed program was:" >&5
11029 sed 's/^/| /' conftest.$ac_ext >&5
11030
11031         ac_header_compiler=no
11032 fi
11033
11034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11035 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11036 $as_echo "$ac_header_compiler" >&6; }
11037
11038 # Is the header present?
11039 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11040 $as_echo_n "checking $ac_header presence... " >&6; }
11041 cat >conftest.$ac_ext <<_ACEOF
11042 /* confdefs.h.  */
11043 _ACEOF
11044 cat confdefs.h >>conftest.$ac_ext
11045 cat >>conftest.$ac_ext <<_ACEOF
11046 /* end confdefs.h.  */
11047 #include <$ac_header>
11048 _ACEOF
11049 if { (ac_try="$ac_cpp conftest.$ac_ext"
11050 case "(($ac_try" in
11051   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11052   *) ac_try_echo=$ac_try;;
11053 esac
11054 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11055 $as_echo "$ac_try_echo") >&5
11056   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11057   ac_status=$?
11058   grep -v '^ *+' conftest.er1 >conftest.err
11059   rm -f conftest.er1
11060   cat conftest.err >&5
11061   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11062   (exit $ac_status); } >/dev/null && {
11063          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11064          test ! -s conftest.err
11065        }; then
11066   ac_header_preproc=yes
11067 else
11068   $as_echo "$as_me: failed program was:" >&5
11069 sed 's/^/| /' conftest.$ac_ext >&5
11070
11071   ac_header_preproc=no
11072 fi
11073
11074 rm -f conftest.err conftest.$ac_ext
11075 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11076 $as_echo "$ac_header_preproc" >&6; }
11077
11078 # So?  What about this header?
11079 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11080   yes:no: )
11081     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11082 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11083     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11084 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11085     ac_header_preproc=yes
11086     ;;
11087   no:yes:* )
11088     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11089 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11090     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11091 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11092     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11093 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11094     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11095 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11096     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11097 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11098     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11099 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11100     ( cat <<\_ASBOX
11101 ## ---------------------------------------- ##
11102 ## Report this to pgsql-bugs@postgresql.org ##
11103 ## ---------------------------------------- ##
11104 _ASBOX
11105      ) | sed "s/^/$as_me: WARNING:     /" >&2
11106     ;;
11107 esac
11108 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11109 $as_echo_n "checking for $ac_header... " >&6; }
11110 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11111   $as_echo_n "(cached) " >&6
11112 else
11113   eval "$as_ac_Header=\$ac_header_preproc"
11114 fi
11115 ac_res=`eval 'as_val=${'$as_ac_Header'}
11116                  $as_echo "$as_val"'`
11117                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11118 $as_echo "$ac_res" >&6; }
11119
11120 fi
11121 as_val=`eval 'as_val=${'$as_ac_Header'}
11122                  $as_echo "$as_val"'`
11123    if test "x$as_val" = x""yes; then
11124   cat >>confdefs.h <<_ACEOF
11125 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11126 _ACEOF
11127
11128 else
11129
11130 for ac_header in readline.h
11131 do
11132 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11133 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11134   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11135 $as_echo_n "checking for $ac_header... " >&6; }
11136 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11137   $as_echo_n "(cached) " >&6
11138 fi
11139 ac_res=`eval 'as_val=${'$as_ac_Header'}
11140                  $as_echo "$as_val"'`
11141                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11142 $as_echo "$ac_res" >&6; }
11143 else
11144   # Is the header compilable?
11145 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11146 $as_echo_n "checking $ac_header usability... " >&6; }
11147 cat >conftest.$ac_ext <<_ACEOF
11148 /* confdefs.h.  */
11149 _ACEOF
11150 cat confdefs.h >>conftest.$ac_ext
11151 cat >>conftest.$ac_ext <<_ACEOF
11152 /* end confdefs.h.  */
11153 $ac_includes_default
11154 #include <$ac_header>
11155 _ACEOF
11156 rm -f conftest.$ac_objext
11157 if { (ac_try="$ac_compile"
11158 case "(($ac_try" in
11159   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11160   *) ac_try_echo=$ac_try;;
11161 esac
11162 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11163 $as_echo "$ac_try_echo") >&5
11164   (eval "$ac_compile") 2>conftest.er1
11165   ac_status=$?
11166   grep -v '^ *+' conftest.er1 >conftest.err
11167   rm -f conftest.er1
11168   cat conftest.err >&5
11169   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11170   (exit $ac_status); } && {
11171          test -z "$ac_c_werror_flag" ||
11172          test ! -s conftest.err
11173        } && test -s conftest.$ac_objext; then
11174   ac_header_compiler=yes
11175 else
11176   $as_echo "$as_me: failed program was:" >&5
11177 sed 's/^/| /' conftest.$ac_ext >&5
11178
11179         ac_header_compiler=no
11180 fi
11181
11182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11183 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11184 $as_echo "$ac_header_compiler" >&6; }
11185
11186 # Is the header present?
11187 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11188 $as_echo_n "checking $ac_header presence... " >&6; }
11189 cat >conftest.$ac_ext <<_ACEOF
11190 /* confdefs.h.  */
11191 _ACEOF
11192 cat confdefs.h >>conftest.$ac_ext
11193 cat >>conftest.$ac_ext <<_ACEOF
11194 /* end confdefs.h.  */
11195 #include <$ac_header>
11196 _ACEOF
11197 if { (ac_try="$ac_cpp conftest.$ac_ext"
11198 case "(($ac_try" in
11199   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11200   *) ac_try_echo=$ac_try;;
11201 esac
11202 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11203 $as_echo "$ac_try_echo") >&5
11204   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11205   ac_status=$?
11206   grep -v '^ *+' conftest.er1 >conftest.err
11207   rm -f conftest.er1
11208   cat conftest.err >&5
11209   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11210   (exit $ac_status); } >/dev/null && {
11211          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11212          test ! -s conftest.err
11213        }; then
11214   ac_header_preproc=yes
11215 else
11216   $as_echo "$as_me: failed program was:" >&5
11217 sed 's/^/| /' conftest.$ac_ext >&5
11218
11219   ac_header_preproc=no
11220 fi
11221
11222 rm -f conftest.err conftest.$ac_ext
11223 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11224 $as_echo "$ac_header_preproc" >&6; }
11225
11226 # So?  What about this header?
11227 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11228   yes:no: )
11229     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11230 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11231     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11232 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11233     ac_header_preproc=yes
11234     ;;
11235   no:yes:* )
11236     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11237 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11238     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11239 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11240     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11241 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11242     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11243 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11244     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11245 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11246     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11247 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11248     ( cat <<\_ASBOX
11249 ## ---------------------------------------- ##
11250 ## Report this to pgsql-bugs@postgresql.org ##
11251 ## ---------------------------------------- ##
11252 _ASBOX
11253      ) | sed "s/^/$as_me: WARNING:     /" >&2
11254     ;;
11255 esac
11256 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11257 $as_echo_n "checking for $ac_header... " >&6; }
11258 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11259   $as_echo_n "(cached) " >&6
11260 else
11261   eval "$as_ac_Header=\$ac_header_preproc"
11262 fi
11263 ac_res=`eval 'as_val=${'$as_ac_Header'}
11264                  $as_echo "$as_val"'`
11265                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11266 $as_echo "$ac_res" >&6; }
11267
11268 fi
11269 as_val=`eval 'as_val=${'$as_ac_Header'}
11270                  $as_echo "$as_val"'`
11271    if test "x$as_val" = x""yes; then
11272   cat >>confdefs.h <<_ACEOF
11273 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11274 _ACEOF
11275
11276 else
11277
11278 for ac_header in readline/readline.h
11279 do
11280 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11281 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11282   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11283 $as_echo_n "checking for $ac_header... " >&6; }
11284 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11285   $as_echo_n "(cached) " >&6
11286 fi
11287 ac_res=`eval 'as_val=${'$as_ac_Header'}
11288                  $as_echo "$as_val"'`
11289                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11290 $as_echo "$ac_res" >&6; }
11291 else
11292   # Is the header compilable?
11293 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11294 $as_echo_n "checking $ac_header usability... " >&6; }
11295 cat >conftest.$ac_ext <<_ACEOF
11296 /* confdefs.h.  */
11297 _ACEOF
11298 cat confdefs.h >>conftest.$ac_ext
11299 cat >>conftest.$ac_ext <<_ACEOF
11300 /* end confdefs.h.  */
11301 $ac_includes_default
11302 #include <$ac_header>
11303 _ACEOF
11304 rm -f conftest.$ac_objext
11305 if { (ac_try="$ac_compile"
11306 case "(($ac_try" in
11307   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11308   *) ac_try_echo=$ac_try;;
11309 esac
11310 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11311 $as_echo "$ac_try_echo") >&5
11312   (eval "$ac_compile") 2>conftest.er1
11313   ac_status=$?
11314   grep -v '^ *+' conftest.er1 >conftest.err
11315   rm -f conftest.er1
11316   cat conftest.err >&5
11317   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11318   (exit $ac_status); } && {
11319          test -z "$ac_c_werror_flag" ||
11320          test ! -s conftest.err
11321        } && test -s conftest.$ac_objext; then
11322   ac_header_compiler=yes
11323 else
11324   $as_echo "$as_me: failed program was:" >&5
11325 sed 's/^/| /' conftest.$ac_ext >&5
11326
11327         ac_header_compiler=no
11328 fi
11329
11330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11331 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11332 $as_echo "$ac_header_compiler" >&6; }
11333
11334 # Is the header present?
11335 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11336 $as_echo_n "checking $ac_header presence... " >&6; }
11337 cat >conftest.$ac_ext <<_ACEOF
11338 /* confdefs.h.  */
11339 _ACEOF
11340 cat confdefs.h >>conftest.$ac_ext
11341 cat >>conftest.$ac_ext <<_ACEOF
11342 /* end confdefs.h.  */
11343 #include <$ac_header>
11344 _ACEOF
11345 if { (ac_try="$ac_cpp conftest.$ac_ext"
11346 case "(($ac_try" in
11347   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11348   *) ac_try_echo=$ac_try;;
11349 esac
11350 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11351 $as_echo "$ac_try_echo") >&5
11352   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11353   ac_status=$?
11354   grep -v '^ *+' conftest.er1 >conftest.err
11355   rm -f conftest.er1
11356   cat conftest.err >&5
11357   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11358   (exit $ac_status); } >/dev/null && {
11359          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11360          test ! -s conftest.err
11361        }; then
11362   ac_header_preproc=yes
11363 else
11364   $as_echo "$as_me: failed program was:" >&5
11365 sed 's/^/| /' conftest.$ac_ext >&5
11366
11367   ac_header_preproc=no
11368 fi
11369
11370 rm -f conftest.err conftest.$ac_ext
11371 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11372 $as_echo "$ac_header_preproc" >&6; }
11373
11374 # So?  What about this header?
11375 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11376   yes:no: )
11377     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11378 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11379     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11380 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11381     ac_header_preproc=yes
11382     ;;
11383   no:yes:* )
11384     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11385 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11386     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11387 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11388     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11389 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11390     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11391 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11392     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11393 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11394     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11395 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11396     ( cat <<\_ASBOX
11397 ## ---------------------------------------- ##
11398 ## Report this to pgsql-bugs@postgresql.org ##
11399 ## ---------------------------------------- ##
11400 _ASBOX
11401      ) | sed "s/^/$as_me: WARNING:     /" >&2
11402     ;;
11403 esac
11404 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11405 $as_echo_n "checking for $ac_header... " >&6; }
11406 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11407   $as_echo_n "(cached) " >&6
11408 else
11409   eval "$as_ac_Header=\$ac_header_preproc"
11410 fi
11411 ac_res=`eval 'as_val=${'$as_ac_Header'}
11412                  $as_echo "$as_val"'`
11413                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11414 $as_echo "$ac_res" >&6; }
11415
11416 fi
11417 as_val=`eval 'as_val=${'$as_ac_Header'}
11418                  $as_echo "$as_val"'`
11419    if test "x$as_val" = x""yes; then
11420   cat >>confdefs.h <<_ACEOF
11421 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11422 _ACEOF
11423
11424 else
11425   { { $as_echo "$as_me:$LINENO: error: readline header not found
11426 If you have libedit already installed, see config.log for details on the
11427 failure.  It is possible the compiler isn't looking in the proper directory.
11428 Use --without-readline to disable libedit support." >&5
11429 $as_echo "$as_me: error: readline header not found
11430 If you have libedit already installed, see config.log for details on the
11431 failure.  It is possible the compiler isn't looking in the proper directory.
11432 Use --without-readline to disable libedit support." >&2;}
11433    { (exit 1); exit 1; }; }
11434 fi
11435
11436 done
11437
11438 fi
11439
11440 done
11441
11442 fi
11443
11444 done
11445
11446 # Note: in a libedit installation, history.h is sometimes a dummy, and may
11447 # not be there at all.  Hence, don't complain if not found.  We must check
11448 # though, since in yet other versions it is an independent header.
11449
11450 for ac_header in editline/history.h
11451 do
11452 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11453 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11454   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11455 $as_echo_n "checking for $ac_header... " >&6; }
11456 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11457   $as_echo_n "(cached) " >&6
11458 fi
11459 ac_res=`eval 'as_val=${'$as_ac_Header'}
11460                  $as_echo "$as_val"'`
11461                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11462 $as_echo "$ac_res" >&6; }
11463 else
11464   # Is the header compilable?
11465 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11466 $as_echo_n "checking $ac_header usability... " >&6; }
11467 cat >conftest.$ac_ext <<_ACEOF
11468 /* confdefs.h.  */
11469 _ACEOF
11470 cat confdefs.h >>conftest.$ac_ext
11471 cat >>conftest.$ac_ext <<_ACEOF
11472 /* end confdefs.h.  */
11473 $ac_includes_default
11474 #include <$ac_header>
11475 _ACEOF
11476 rm -f conftest.$ac_objext
11477 if { (ac_try="$ac_compile"
11478 case "(($ac_try" in
11479   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11480   *) ac_try_echo=$ac_try;;
11481 esac
11482 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11483 $as_echo "$ac_try_echo") >&5
11484   (eval "$ac_compile") 2>conftest.er1
11485   ac_status=$?
11486   grep -v '^ *+' conftest.er1 >conftest.err
11487   rm -f conftest.er1
11488   cat conftest.err >&5
11489   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11490   (exit $ac_status); } && {
11491          test -z "$ac_c_werror_flag" ||
11492          test ! -s conftest.err
11493        } && test -s conftest.$ac_objext; then
11494   ac_header_compiler=yes
11495 else
11496   $as_echo "$as_me: failed program was:" >&5
11497 sed 's/^/| /' conftest.$ac_ext >&5
11498
11499         ac_header_compiler=no
11500 fi
11501
11502 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11503 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11504 $as_echo "$ac_header_compiler" >&6; }
11505
11506 # Is the header present?
11507 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11508 $as_echo_n "checking $ac_header presence... " >&6; }
11509 cat >conftest.$ac_ext <<_ACEOF
11510 /* confdefs.h.  */
11511 _ACEOF
11512 cat confdefs.h >>conftest.$ac_ext
11513 cat >>conftest.$ac_ext <<_ACEOF
11514 /* end confdefs.h.  */
11515 #include <$ac_header>
11516 _ACEOF
11517 if { (ac_try="$ac_cpp conftest.$ac_ext"
11518 case "(($ac_try" in
11519   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11520   *) ac_try_echo=$ac_try;;
11521 esac
11522 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11523 $as_echo "$ac_try_echo") >&5
11524   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11525   ac_status=$?
11526   grep -v '^ *+' conftest.er1 >conftest.err
11527   rm -f conftest.er1
11528   cat conftest.err >&5
11529   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11530   (exit $ac_status); } >/dev/null && {
11531          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11532          test ! -s conftest.err
11533        }; then
11534   ac_header_preproc=yes
11535 else
11536   $as_echo "$as_me: failed program was:" >&5
11537 sed 's/^/| /' conftest.$ac_ext >&5
11538
11539   ac_header_preproc=no
11540 fi
11541
11542 rm -f conftest.err conftest.$ac_ext
11543 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11544 $as_echo "$ac_header_preproc" >&6; }
11545
11546 # So?  What about this header?
11547 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11548   yes:no: )
11549     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11550 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11551     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11552 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11553     ac_header_preproc=yes
11554     ;;
11555   no:yes:* )
11556     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11557 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11558     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11559 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11560     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11561 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11562     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11563 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11564     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11565 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11566     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11567 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11568     ( cat <<\_ASBOX
11569 ## ---------------------------------------- ##
11570 ## Report this to pgsql-bugs@postgresql.org ##
11571 ## ---------------------------------------- ##
11572 _ASBOX
11573      ) | sed "s/^/$as_me: WARNING:     /" >&2
11574     ;;
11575 esac
11576 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11577 $as_echo_n "checking for $ac_header... " >&6; }
11578 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11579   $as_echo_n "(cached) " >&6
11580 else
11581   eval "$as_ac_Header=\$ac_header_preproc"
11582 fi
11583 ac_res=`eval 'as_val=${'$as_ac_Header'}
11584                  $as_echo "$as_val"'`
11585                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11586 $as_echo "$ac_res" >&6; }
11587
11588 fi
11589 as_val=`eval 'as_val=${'$as_ac_Header'}
11590                  $as_echo "$as_val"'`
11591    if test "x$as_val" = x""yes; then
11592   cat >>confdefs.h <<_ACEOF
11593 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11594 _ACEOF
11595
11596 else
11597
11598 for ac_header in history.h
11599 do
11600 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11601 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11602   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11603 $as_echo_n "checking for $ac_header... " >&6; }
11604 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11605   $as_echo_n "(cached) " >&6
11606 fi
11607 ac_res=`eval 'as_val=${'$as_ac_Header'}
11608                  $as_echo "$as_val"'`
11609                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11610 $as_echo "$ac_res" >&6; }
11611 else
11612   # Is the header compilable?
11613 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11614 $as_echo_n "checking $ac_header usability... " >&6; }
11615 cat >conftest.$ac_ext <<_ACEOF
11616 /* confdefs.h.  */
11617 _ACEOF
11618 cat confdefs.h >>conftest.$ac_ext
11619 cat >>conftest.$ac_ext <<_ACEOF
11620 /* end confdefs.h.  */
11621 $ac_includes_default
11622 #include <$ac_header>
11623 _ACEOF
11624 rm -f conftest.$ac_objext
11625 if { (ac_try="$ac_compile"
11626 case "(($ac_try" in
11627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11628   *) ac_try_echo=$ac_try;;
11629 esac
11630 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11631 $as_echo "$ac_try_echo") >&5
11632   (eval "$ac_compile") 2>conftest.er1
11633   ac_status=$?
11634   grep -v '^ *+' conftest.er1 >conftest.err
11635   rm -f conftest.er1
11636   cat conftest.err >&5
11637   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11638   (exit $ac_status); } && {
11639          test -z "$ac_c_werror_flag" ||
11640          test ! -s conftest.err
11641        } && test -s conftest.$ac_objext; then
11642   ac_header_compiler=yes
11643 else
11644   $as_echo "$as_me: failed program was:" >&5
11645 sed 's/^/| /' conftest.$ac_ext >&5
11646
11647         ac_header_compiler=no
11648 fi
11649
11650 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11651 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11652 $as_echo "$ac_header_compiler" >&6; }
11653
11654 # Is the header present?
11655 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11656 $as_echo_n "checking $ac_header presence... " >&6; }
11657 cat >conftest.$ac_ext <<_ACEOF
11658 /* confdefs.h.  */
11659 _ACEOF
11660 cat confdefs.h >>conftest.$ac_ext
11661 cat >>conftest.$ac_ext <<_ACEOF
11662 /* end confdefs.h.  */
11663 #include <$ac_header>
11664 _ACEOF
11665 if { (ac_try="$ac_cpp conftest.$ac_ext"
11666 case "(($ac_try" in
11667   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11668   *) ac_try_echo=$ac_try;;
11669 esac
11670 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11671 $as_echo "$ac_try_echo") >&5
11672   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11673   ac_status=$?
11674   grep -v '^ *+' conftest.er1 >conftest.err
11675   rm -f conftest.er1
11676   cat conftest.err >&5
11677   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11678   (exit $ac_status); } >/dev/null && {
11679          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11680          test ! -s conftest.err
11681        }; then
11682   ac_header_preproc=yes
11683 else
11684   $as_echo "$as_me: failed program was:" >&5
11685 sed 's/^/| /' conftest.$ac_ext >&5
11686
11687   ac_header_preproc=no
11688 fi
11689
11690 rm -f conftest.err conftest.$ac_ext
11691 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11692 $as_echo "$ac_header_preproc" >&6; }
11693
11694 # So?  What about this header?
11695 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11696   yes:no: )
11697     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11698 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11699     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11700 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11701     ac_header_preproc=yes
11702     ;;
11703   no:yes:* )
11704     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11705 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11706     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11707 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11708     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11709 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11710     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11711 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11712     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11713 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11714     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11715 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11716     ( cat <<\_ASBOX
11717 ## ---------------------------------------- ##
11718 ## Report this to pgsql-bugs@postgresql.org ##
11719 ## ---------------------------------------- ##
11720 _ASBOX
11721      ) | sed "s/^/$as_me: WARNING:     /" >&2
11722     ;;
11723 esac
11724 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11725 $as_echo_n "checking for $ac_header... " >&6; }
11726 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11727   $as_echo_n "(cached) " >&6
11728 else
11729   eval "$as_ac_Header=\$ac_header_preproc"
11730 fi
11731 ac_res=`eval 'as_val=${'$as_ac_Header'}
11732                  $as_echo "$as_val"'`
11733                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11734 $as_echo "$ac_res" >&6; }
11735
11736 fi
11737 as_val=`eval 'as_val=${'$as_ac_Header'}
11738                  $as_echo "$as_val"'`
11739    if test "x$as_val" = x""yes; then
11740   cat >>confdefs.h <<_ACEOF
11741 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11742 _ACEOF
11743
11744 else
11745
11746 for ac_header in readline/history.h
11747 do
11748 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11749 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11750   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11751 $as_echo_n "checking for $ac_header... " >&6; }
11752 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11753   $as_echo_n "(cached) " >&6
11754 fi
11755 ac_res=`eval 'as_val=${'$as_ac_Header'}
11756                  $as_echo "$as_val"'`
11757                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11758 $as_echo "$ac_res" >&6; }
11759 else
11760   # Is the header compilable?
11761 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11762 $as_echo_n "checking $ac_header usability... " >&6; }
11763 cat >conftest.$ac_ext <<_ACEOF
11764 /* confdefs.h.  */
11765 _ACEOF
11766 cat confdefs.h >>conftest.$ac_ext
11767 cat >>conftest.$ac_ext <<_ACEOF
11768 /* end confdefs.h.  */
11769 $ac_includes_default
11770 #include <$ac_header>
11771 _ACEOF
11772 rm -f conftest.$ac_objext
11773 if { (ac_try="$ac_compile"
11774 case "(($ac_try" in
11775   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11776   *) ac_try_echo=$ac_try;;
11777 esac
11778 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11779 $as_echo "$ac_try_echo") >&5
11780   (eval "$ac_compile") 2>conftest.er1
11781   ac_status=$?
11782   grep -v '^ *+' conftest.er1 >conftest.err
11783   rm -f conftest.er1
11784   cat conftest.err >&5
11785   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11786   (exit $ac_status); } && {
11787          test -z "$ac_c_werror_flag" ||
11788          test ! -s conftest.err
11789        } && test -s conftest.$ac_objext; then
11790   ac_header_compiler=yes
11791 else
11792   $as_echo "$as_me: failed program was:" >&5
11793 sed 's/^/| /' conftest.$ac_ext >&5
11794
11795         ac_header_compiler=no
11796 fi
11797
11798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11799 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11800 $as_echo "$ac_header_compiler" >&6; }
11801
11802 # Is the header present?
11803 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11804 $as_echo_n "checking $ac_header presence... " >&6; }
11805 cat >conftest.$ac_ext <<_ACEOF
11806 /* confdefs.h.  */
11807 _ACEOF
11808 cat confdefs.h >>conftest.$ac_ext
11809 cat >>conftest.$ac_ext <<_ACEOF
11810 /* end confdefs.h.  */
11811 #include <$ac_header>
11812 _ACEOF
11813 if { (ac_try="$ac_cpp conftest.$ac_ext"
11814 case "(($ac_try" in
11815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11816   *) ac_try_echo=$ac_try;;
11817 esac
11818 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11819 $as_echo "$ac_try_echo") >&5
11820   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11821   ac_status=$?
11822   grep -v '^ *+' conftest.er1 >conftest.err
11823   rm -f conftest.er1
11824   cat conftest.err >&5
11825   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11826   (exit $ac_status); } >/dev/null && {
11827          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11828          test ! -s conftest.err
11829        }; then
11830   ac_header_preproc=yes
11831 else
11832   $as_echo "$as_me: failed program was:" >&5
11833 sed 's/^/| /' conftest.$ac_ext >&5
11834
11835   ac_header_preproc=no
11836 fi
11837
11838 rm -f conftest.err conftest.$ac_ext
11839 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11840 $as_echo "$ac_header_preproc" >&6; }
11841
11842 # So?  What about this header?
11843 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11844   yes:no: )
11845     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11846 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11847     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11848 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11849     ac_header_preproc=yes
11850     ;;
11851   no:yes:* )
11852     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11853 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11854     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11855 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11856     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11857 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11858     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11859 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11860     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11861 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11862     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11863 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11864     ( cat <<\_ASBOX
11865 ## ---------------------------------------- ##
11866 ## Report this to pgsql-bugs@postgresql.org ##
11867 ## ---------------------------------------- ##
11868 _ASBOX
11869      ) | sed "s/^/$as_me: WARNING:     /" >&2
11870     ;;
11871 esac
11872 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11873 $as_echo_n "checking for $ac_header... " >&6; }
11874 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11875   $as_echo_n "(cached) " >&6
11876 else
11877   eval "$as_ac_Header=\$ac_header_preproc"
11878 fi
11879 ac_res=`eval 'as_val=${'$as_ac_Header'}
11880                  $as_echo "$as_val"'`
11881                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11882 $as_echo "$ac_res" >&6; }
11883
11884 fi
11885 as_val=`eval 'as_val=${'$as_ac_Header'}
11886                  $as_echo "$as_val"'`
11887    if test "x$as_val" = x""yes; then
11888   cat >>confdefs.h <<_ACEOF
11889 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11890 _ACEOF
11891
11892 fi
11893
11894 done
11895
11896 fi
11897
11898 done
11899
11900 fi
11901
11902 done
11903
11904 fi
11905
11906 if test "$with_zlib" = yes; then
11907   if test "${ac_cv_header_zlib_h+set}" = set; then
11908   { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
11909 $as_echo_n "checking for zlib.h... " >&6; }
11910 if test "${ac_cv_header_zlib_h+set}" = set; then
11911   $as_echo_n "(cached) " >&6
11912 fi
11913 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
11914 $as_echo "$ac_cv_header_zlib_h" >&6; }
11915 else
11916   # Is the header compilable?
11917 { $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
11918 $as_echo_n "checking zlib.h usability... " >&6; }
11919 cat >conftest.$ac_ext <<_ACEOF
11920 /* confdefs.h.  */
11921 _ACEOF
11922 cat confdefs.h >>conftest.$ac_ext
11923 cat >>conftest.$ac_ext <<_ACEOF
11924 /* end confdefs.h.  */
11925 $ac_includes_default
11926 #include <zlib.h>
11927 _ACEOF
11928 rm -f conftest.$ac_objext
11929 if { (ac_try="$ac_compile"
11930 case "(($ac_try" in
11931   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11932   *) ac_try_echo=$ac_try;;
11933 esac
11934 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11935 $as_echo "$ac_try_echo") >&5
11936   (eval "$ac_compile") 2>conftest.er1
11937   ac_status=$?
11938   grep -v '^ *+' conftest.er1 >conftest.err
11939   rm -f conftest.er1
11940   cat conftest.err >&5
11941   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11942   (exit $ac_status); } && {
11943          test -z "$ac_c_werror_flag" ||
11944          test ! -s conftest.err
11945        } && test -s conftest.$ac_objext; then
11946   ac_header_compiler=yes
11947 else
11948   $as_echo "$as_me: failed program was:" >&5
11949 sed 's/^/| /' conftest.$ac_ext >&5
11950
11951         ac_header_compiler=no
11952 fi
11953
11954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11955 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11956 $as_echo "$ac_header_compiler" >&6; }
11957
11958 # Is the header present?
11959 { $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
11960 $as_echo_n "checking zlib.h presence... " >&6; }
11961 cat >conftest.$ac_ext <<_ACEOF
11962 /* confdefs.h.  */
11963 _ACEOF
11964 cat confdefs.h >>conftest.$ac_ext
11965 cat >>conftest.$ac_ext <<_ACEOF
11966 /* end confdefs.h.  */
11967 #include <zlib.h>
11968 _ACEOF
11969 if { (ac_try="$ac_cpp conftest.$ac_ext"
11970 case "(($ac_try" in
11971   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11972   *) ac_try_echo=$ac_try;;
11973 esac
11974 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11975 $as_echo "$ac_try_echo") >&5
11976   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11977   ac_status=$?
11978   grep -v '^ *+' conftest.er1 >conftest.err
11979   rm -f conftest.er1
11980   cat conftest.err >&5
11981   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11982   (exit $ac_status); } >/dev/null && {
11983          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11984          test ! -s conftest.err
11985        }; then
11986   ac_header_preproc=yes
11987 else
11988   $as_echo "$as_me: failed program was:" >&5
11989 sed 's/^/| /' conftest.$ac_ext >&5
11990
11991   ac_header_preproc=no
11992 fi
11993
11994 rm -f conftest.err conftest.$ac_ext
11995 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11996 $as_echo "$ac_header_preproc" >&6; }
11997
11998 # So?  What about this header?
11999 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12000   yes:no: )
12001     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12002 $as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12003     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
12004 $as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
12005     ac_header_preproc=yes
12006     ;;
12007   no:yes:* )
12008     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
12009 $as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
12010     { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
12011 $as_echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
12012     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
12013 $as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
12014     { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
12015 $as_echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12016     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
12017 $as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
12018     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
12019 $as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
12020     ( cat <<\_ASBOX
12021 ## ---------------------------------------- ##
12022 ## Report this to pgsql-bugs@postgresql.org ##
12023 ## ---------------------------------------- ##
12024 _ASBOX
12025      ) | sed "s/^/$as_me: WARNING:     /" >&2
12026     ;;
12027 esac
12028 { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
12029 $as_echo_n "checking for zlib.h... " >&6; }
12030 if test "${ac_cv_header_zlib_h+set}" = set; then
12031   $as_echo_n "(cached) " >&6
12032 else
12033   ac_cv_header_zlib_h=$ac_header_preproc
12034 fi
12035 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
12036 $as_echo "$ac_cv_header_zlib_h" >&6; }
12037
12038 fi
12039 if test "x$ac_cv_header_zlib_h" = x""yes; then
12040   :
12041 else
12042   { { $as_echo "$as_me:$LINENO: error: zlib header not found
12043 If you have zlib already installed, see config.log for details on the
12044 failure.  It is possible the compiler isn't looking in the proper directory.
12045 Use --without-zlib to disable zlib support." >&5
12046 $as_echo "$as_me: error: zlib header not found
12047 If you have zlib already installed, see config.log for details on the
12048 failure.  It is possible the compiler isn't looking in the proper directory.
12049 Use --without-zlib to disable zlib support." >&2;}
12050    { (exit 1); exit 1; }; }
12051 fi
12052
12053
12054 fi
12055
12056 if test "$with_gssapi" = yes ; then
12057
12058 for ac_header in gssapi/gssapi.h
12059 do
12060 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12061 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12062   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12063 $as_echo_n "checking for $ac_header... " >&6; }
12064 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12065   $as_echo_n "(cached) " >&6
12066 fi
12067 ac_res=`eval 'as_val=${'$as_ac_Header'}
12068                  $as_echo "$as_val"'`
12069                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12070 $as_echo "$ac_res" >&6; }
12071 else
12072   # Is the header compilable?
12073 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12074 $as_echo_n "checking $ac_header usability... " >&6; }
12075 cat >conftest.$ac_ext <<_ACEOF
12076 /* confdefs.h.  */
12077 _ACEOF
12078 cat confdefs.h >>conftest.$ac_ext
12079 cat >>conftest.$ac_ext <<_ACEOF
12080 /* end confdefs.h.  */
12081 $ac_includes_default
12082 #include <$ac_header>
12083 _ACEOF
12084 rm -f conftest.$ac_objext
12085 if { (ac_try="$ac_compile"
12086 case "(($ac_try" in
12087   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12088   *) ac_try_echo=$ac_try;;
12089 esac
12090 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12091 $as_echo "$ac_try_echo") >&5
12092   (eval "$ac_compile") 2>conftest.er1
12093   ac_status=$?
12094   grep -v '^ *+' conftest.er1 >conftest.err
12095   rm -f conftest.er1
12096   cat conftest.err >&5
12097   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12098   (exit $ac_status); } && {
12099          test -z "$ac_c_werror_flag" ||
12100          test ! -s conftest.err
12101        } && test -s conftest.$ac_objext; then
12102   ac_header_compiler=yes
12103 else
12104   $as_echo "$as_me: failed program was:" >&5
12105 sed 's/^/| /' conftest.$ac_ext >&5
12106
12107         ac_header_compiler=no
12108 fi
12109
12110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12111 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12112 $as_echo "$ac_header_compiler" >&6; }
12113
12114 # Is the header present?
12115 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12116 $as_echo_n "checking $ac_header presence... " >&6; }
12117 cat >conftest.$ac_ext <<_ACEOF
12118 /* confdefs.h.  */
12119 _ACEOF
12120 cat confdefs.h >>conftest.$ac_ext
12121 cat >>conftest.$ac_ext <<_ACEOF
12122 /* end confdefs.h.  */
12123 #include <$ac_header>
12124 _ACEOF
12125 if { (ac_try="$ac_cpp conftest.$ac_ext"
12126 case "(($ac_try" in
12127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12128   *) ac_try_echo=$ac_try;;
12129 esac
12130 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12131 $as_echo "$ac_try_echo") >&5
12132   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12133   ac_status=$?
12134   grep -v '^ *+' conftest.er1 >conftest.err
12135   rm -f conftest.er1
12136   cat conftest.err >&5
12137   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12138   (exit $ac_status); } >/dev/null && {
12139          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12140          test ! -s conftest.err
12141        }; then
12142   ac_header_preproc=yes
12143 else
12144   $as_echo "$as_me: failed program was:" >&5
12145 sed 's/^/| /' conftest.$ac_ext >&5
12146
12147   ac_header_preproc=no
12148 fi
12149
12150 rm -f conftest.err conftest.$ac_ext
12151 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12152 $as_echo "$ac_header_preproc" >&6; }
12153
12154 # So?  What about this header?
12155 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12156   yes:no: )
12157     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12158 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12159     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12160 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12161     ac_header_preproc=yes
12162     ;;
12163   no:yes:* )
12164     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12165 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12166     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12167 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12168     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12169 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12170     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12171 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12172     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12173 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12174     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12175 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12176     ( cat <<\_ASBOX
12177 ## ---------------------------------------- ##
12178 ## Report this to pgsql-bugs@postgresql.org ##
12179 ## ---------------------------------------- ##
12180 _ASBOX
12181      ) | sed "s/^/$as_me: WARNING:     /" >&2
12182     ;;
12183 esac
12184 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12185 $as_echo_n "checking for $ac_header... " >&6; }
12186 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12187   $as_echo_n "(cached) " >&6
12188 else
12189   eval "$as_ac_Header=\$ac_header_preproc"
12190 fi
12191 ac_res=`eval 'as_val=${'$as_ac_Header'}
12192                  $as_echo "$as_val"'`
12193                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12194 $as_echo "$ac_res" >&6; }
12195
12196 fi
12197 as_val=`eval 'as_val=${'$as_ac_Header'}
12198                  $as_echo "$as_val"'`
12199    if test "x$as_val" = x""yes; then
12200   cat >>confdefs.h <<_ACEOF
12201 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12202 _ACEOF
12203
12204 else
12205
12206 for ac_header in gssapi.h
12207 do
12208 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12209 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12210   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12211 $as_echo_n "checking for $ac_header... " >&6; }
12212 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12213   $as_echo_n "(cached) " >&6
12214 fi
12215 ac_res=`eval 'as_val=${'$as_ac_Header'}
12216                  $as_echo "$as_val"'`
12217                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12218 $as_echo "$ac_res" >&6; }
12219 else
12220   # Is the header compilable?
12221 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12222 $as_echo_n "checking $ac_header usability... " >&6; }
12223 cat >conftest.$ac_ext <<_ACEOF
12224 /* confdefs.h.  */
12225 _ACEOF
12226 cat confdefs.h >>conftest.$ac_ext
12227 cat >>conftest.$ac_ext <<_ACEOF
12228 /* end confdefs.h.  */
12229 $ac_includes_default
12230 #include <$ac_header>
12231 _ACEOF
12232 rm -f conftest.$ac_objext
12233 if { (ac_try="$ac_compile"
12234 case "(($ac_try" in
12235   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12236   *) ac_try_echo=$ac_try;;
12237 esac
12238 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12239 $as_echo "$ac_try_echo") >&5
12240   (eval "$ac_compile") 2>conftest.er1
12241   ac_status=$?
12242   grep -v '^ *+' conftest.er1 >conftest.err
12243   rm -f conftest.er1
12244   cat conftest.err >&5
12245   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12246   (exit $ac_status); } && {
12247          test -z "$ac_c_werror_flag" ||
12248          test ! -s conftest.err
12249        } && test -s conftest.$ac_objext; then
12250   ac_header_compiler=yes
12251 else
12252   $as_echo "$as_me: failed program was:" >&5
12253 sed 's/^/| /' conftest.$ac_ext >&5
12254
12255         ac_header_compiler=no
12256 fi
12257
12258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12259 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12260 $as_echo "$ac_header_compiler" >&6; }
12261
12262 # Is the header present?
12263 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12264 $as_echo_n "checking $ac_header presence... " >&6; }
12265 cat >conftest.$ac_ext <<_ACEOF
12266 /* confdefs.h.  */
12267 _ACEOF
12268 cat confdefs.h >>conftest.$ac_ext
12269 cat >>conftest.$ac_ext <<_ACEOF
12270 /* end confdefs.h.  */
12271 #include <$ac_header>
12272 _ACEOF
12273 if { (ac_try="$ac_cpp conftest.$ac_ext"
12274 case "(($ac_try" in
12275   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12276   *) ac_try_echo=$ac_try;;
12277 esac
12278 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12279 $as_echo "$ac_try_echo") >&5
12280   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12281   ac_status=$?
12282   grep -v '^ *+' conftest.er1 >conftest.err
12283   rm -f conftest.er1
12284   cat conftest.err >&5
12285   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12286   (exit $ac_status); } >/dev/null && {
12287          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12288          test ! -s conftest.err
12289        }; then
12290   ac_header_preproc=yes
12291 else
12292   $as_echo "$as_me: failed program was:" >&5
12293 sed 's/^/| /' conftest.$ac_ext >&5
12294
12295   ac_header_preproc=no
12296 fi
12297
12298 rm -f conftest.err conftest.$ac_ext
12299 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12300 $as_echo "$ac_header_preproc" >&6; }
12301
12302 # So?  What about this header?
12303 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12304   yes:no: )
12305     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12306 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12307     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12308 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12309     ac_header_preproc=yes
12310     ;;
12311   no:yes:* )
12312     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12313 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12314     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12315 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12316     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12317 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12318     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12319 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12320     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12321 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12322     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12323 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12324     ( cat <<\_ASBOX
12325 ## ---------------------------------------- ##
12326 ## Report this to pgsql-bugs@postgresql.org ##
12327 ## ---------------------------------------- ##
12328 _ASBOX
12329      ) | sed "s/^/$as_me: WARNING:     /" >&2
12330     ;;
12331 esac
12332 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12333 $as_echo_n "checking for $ac_header... " >&6; }
12334 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12335   $as_echo_n "(cached) " >&6
12336 else
12337   eval "$as_ac_Header=\$ac_header_preproc"
12338 fi
12339 ac_res=`eval 'as_val=${'$as_ac_Header'}
12340                  $as_echo "$as_val"'`
12341                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12342 $as_echo "$ac_res" >&6; }
12343
12344 fi
12345 as_val=`eval 'as_val=${'$as_ac_Header'}
12346                  $as_echo "$as_val"'`
12347    if test "x$as_val" = x""yes; then
12348   cat >>confdefs.h <<_ACEOF
12349 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12350 _ACEOF
12351
12352 else
12353   { { $as_echo "$as_me:$LINENO: error: gssapi.h header file is required for GSSAPI" >&5
12354 $as_echo "$as_me: error: gssapi.h header file is required for GSSAPI" >&2;}
12355    { (exit 1); exit 1; }; }
12356 fi
12357
12358 done
12359
12360 fi
12361
12362 done
12363
12364 fi
12365
12366 if test "$with_krb5" = yes ; then
12367   if test "${ac_cv_header_krb5_h+set}" = set; then
12368   { $as_echo "$as_me:$LINENO: checking for krb5.h" >&5
12369 $as_echo_n "checking for krb5.h... " >&6; }
12370 if test "${ac_cv_header_krb5_h+set}" = set; then
12371   $as_echo_n "(cached) " >&6
12372 fi
12373 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
12374 $as_echo "$ac_cv_header_krb5_h" >&6; }
12375 else
12376   # Is the header compilable?
12377 { $as_echo "$as_me:$LINENO: checking krb5.h usability" >&5
12378 $as_echo_n "checking krb5.h usability... " >&6; }
12379 cat >conftest.$ac_ext <<_ACEOF
12380 /* confdefs.h.  */
12381 _ACEOF
12382 cat confdefs.h >>conftest.$ac_ext
12383 cat >>conftest.$ac_ext <<_ACEOF
12384 /* end confdefs.h.  */
12385 $ac_includes_default
12386 #include <krb5.h>
12387 _ACEOF
12388 rm -f conftest.$ac_objext
12389 if { (ac_try="$ac_compile"
12390 case "(($ac_try" in
12391   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12392   *) ac_try_echo=$ac_try;;
12393 esac
12394 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12395 $as_echo "$ac_try_echo") >&5
12396   (eval "$ac_compile") 2>conftest.er1
12397   ac_status=$?
12398   grep -v '^ *+' conftest.er1 >conftest.err
12399   rm -f conftest.er1
12400   cat conftest.err >&5
12401   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12402   (exit $ac_status); } && {
12403          test -z "$ac_c_werror_flag" ||
12404          test ! -s conftest.err
12405        } && test -s conftest.$ac_objext; then
12406   ac_header_compiler=yes
12407 else
12408   $as_echo "$as_me: failed program was:" >&5
12409 sed 's/^/| /' conftest.$ac_ext >&5
12410
12411         ac_header_compiler=no
12412 fi
12413
12414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12415 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12416 $as_echo "$ac_header_compiler" >&6; }
12417
12418 # Is the header present?
12419 { $as_echo "$as_me:$LINENO: checking krb5.h presence" >&5
12420 $as_echo_n "checking krb5.h presence... " >&6; }
12421 cat >conftest.$ac_ext <<_ACEOF
12422 /* confdefs.h.  */
12423 _ACEOF
12424 cat confdefs.h >>conftest.$ac_ext
12425 cat >>conftest.$ac_ext <<_ACEOF
12426 /* end confdefs.h.  */
12427 #include <krb5.h>
12428 _ACEOF
12429 if { (ac_try="$ac_cpp conftest.$ac_ext"
12430 case "(($ac_try" in
12431   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12432   *) ac_try_echo=$ac_try;;
12433 esac
12434 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12435 $as_echo "$ac_try_echo") >&5
12436   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12437   ac_status=$?
12438   grep -v '^ *+' conftest.er1 >conftest.err
12439   rm -f conftest.er1
12440   cat conftest.err >&5
12441   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12442   (exit $ac_status); } >/dev/null && {
12443          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12444          test ! -s conftest.err
12445        }; then
12446   ac_header_preproc=yes
12447 else
12448   $as_echo "$as_me: failed program was:" >&5
12449 sed 's/^/| /' conftest.$ac_ext >&5
12450
12451   ac_header_preproc=no
12452 fi
12453
12454 rm -f conftest.err conftest.$ac_ext
12455 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12456 $as_echo "$ac_header_preproc" >&6; }
12457
12458 # So?  What about this header?
12459 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12460   yes:no: )
12461     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
12462 $as_echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12463     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
12464 $as_echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
12465     ac_header_preproc=yes
12466     ;;
12467   no:yes:* )
12468     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
12469 $as_echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
12470     { $as_echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
12471 $as_echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
12472     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
12473 $as_echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
12474     { $as_echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
12475 $as_echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12476     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
12477 $as_echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
12478     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
12479 $as_echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
12480     ( cat <<\_ASBOX
12481 ## ---------------------------------------- ##
12482 ## Report this to pgsql-bugs@postgresql.org ##
12483 ## ---------------------------------------- ##
12484 _ASBOX
12485      ) | sed "s/^/$as_me: WARNING:     /" >&2
12486     ;;
12487 esac
12488 { $as_echo "$as_me:$LINENO: checking for krb5.h" >&5
12489 $as_echo_n "checking for krb5.h... " >&6; }
12490 if test "${ac_cv_header_krb5_h+set}" = set; then
12491   $as_echo_n "(cached) " >&6
12492 else
12493   ac_cv_header_krb5_h=$ac_header_preproc
12494 fi
12495 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
12496 $as_echo "$ac_cv_header_krb5_h" >&6; }
12497
12498 fi
12499 if test "x$ac_cv_header_krb5_h" = x""yes; then
12500   :
12501 else
12502   { { $as_echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
12503 $as_echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
12504    { (exit 1); exit 1; }; }
12505 fi
12506
12507
12508 fi
12509
12510 if test "$with_openssl" = yes ; then
12511   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
12512   { $as_echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
12513 $as_echo_n "checking for openssl/ssl.h... " >&6; }
12514 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
12515   $as_echo_n "(cached) " >&6
12516 fi
12517 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
12518 $as_echo "$ac_cv_header_openssl_ssl_h" >&6; }
12519 else
12520   # Is the header compilable?
12521 { $as_echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
12522 $as_echo_n "checking openssl/ssl.h usability... " >&6; }
12523 cat >conftest.$ac_ext <<_ACEOF
12524 /* confdefs.h.  */
12525 _ACEOF
12526 cat confdefs.h >>conftest.$ac_ext
12527 cat >>conftest.$ac_ext <<_ACEOF
12528 /* end confdefs.h.  */
12529 $ac_includes_default
12530 #include <openssl/ssl.h>
12531 _ACEOF
12532 rm -f conftest.$ac_objext
12533 if { (ac_try="$ac_compile"
12534 case "(($ac_try" in
12535   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12536   *) ac_try_echo=$ac_try;;
12537 esac
12538 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12539 $as_echo "$ac_try_echo") >&5
12540   (eval "$ac_compile") 2>conftest.er1
12541   ac_status=$?
12542   grep -v '^ *+' conftest.er1 >conftest.err
12543   rm -f conftest.er1
12544   cat conftest.err >&5
12545   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12546   (exit $ac_status); } && {
12547          test -z "$ac_c_werror_flag" ||
12548          test ! -s conftest.err
12549        } && test -s conftest.$ac_objext; then
12550   ac_header_compiler=yes
12551 else
12552   $as_echo "$as_me: failed program was:" >&5
12553 sed 's/^/| /' conftest.$ac_ext >&5
12554
12555         ac_header_compiler=no
12556 fi
12557
12558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12559 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12560 $as_echo "$ac_header_compiler" >&6; }
12561
12562 # Is the header present?
12563 { $as_echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
12564 $as_echo_n "checking openssl/ssl.h presence... " >&6; }
12565 cat >conftest.$ac_ext <<_ACEOF
12566 /* confdefs.h.  */
12567 _ACEOF
12568 cat confdefs.h >>conftest.$ac_ext
12569 cat >>conftest.$ac_ext <<_ACEOF
12570 /* end confdefs.h.  */
12571 #include <openssl/ssl.h>
12572 _ACEOF
12573 if { (ac_try="$ac_cpp conftest.$ac_ext"
12574 case "(($ac_try" in
12575   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12576   *) ac_try_echo=$ac_try;;
12577 esac
12578 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12579 $as_echo "$ac_try_echo") >&5
12580   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12581   ac_status=$?
12582   grep -v '^ *+' conftest.er1 >conftest.err
12583   rm -f conftest.er1
12584   cat conftest.err >&5
12585   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12586   (exit $ac_status); } >/dev/null && {
12587          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12588          test ! -s conftest.err
12589        }; then
12590   ac_header_preproc=yes
12591 else
12592   $as_echo "$as_me: failed program was:" >&5
12593 sed 's/^/| /' conftest.$ac_ext >&5
12594
12595   ac_header_preproc=no
12596 fi
12597
12598 rm -f conftest.err conftest.$ac_ext
12599 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12600 $as_echo "$ac_header_preproc" >&6; }
12601
12602 # So?  What about this header?
12603 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12604   yes:no: )
12605     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
12606 $as_echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12607     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
12608 $as_echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
12609     ac_header_preproc=yes
12610     ;;
12611   no:yes:* )
12612     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
12613 $as_echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
12614     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
12615 $as_echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
12616     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
12617 $as_echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
12618     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
12619 $as_echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12620     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
12621 $as_echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
12622     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
12623 $as_echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
12624     ( cat <<\_ASBOX
12625 ## ---------------------------------------- ##
12626 ## Report this to pgsql-bugs@postgresql.org ##
12627 ## ---------------------------------------- ##
12628 _ASBOX
12629      ) | sed "s/^/$as_me: WARNING:     /" >&2
12630     ;;
12631 esac
12632 { $as_echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
12633 $as_echo_n "checking for openssl/ssl.h... " >&6; }
12634 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
12635   $as_echo_n "(cached) " >&6
12636 else
12637   ac_cv_header_openssl_ssl_h=$ac_header_preproc
12638 fi
12639 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
12640 $as_echo "$ac_cv_header_openssl_ssl_h" >&6; }
12641
12642 fi
12643 if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then
12644   :
12645 else
12646   { { $as_echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
12647 $as_echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
12648    { (exit 1); exit 1; }; }
12649 fi
12650
12651
12652   if test "${ac_cv_header_openssl_err_h+set}" = set; then
12653   { $as_echo "$as_me:$LINENO: checking for openssl/err.h" >&5
12654 $as_echo_n "checking for openssl/err.h... " >&6; }
12655 if test "${ac_cv_header_openssl_err_h+set}" = set; then
12656   $as_echo_n "(cached) " >&6
12657 fi
12658 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
12659 $as_echo "$ac_cv_header_openssl_err_h" >&6; }
12660 else
12661   # Is the header compilable?
12662 { $as_echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
12663 $as_echo_n "checking openssl/err.h usability... " >&6; }
12664 cat >conftest.$ac_ext <<_ACEOF
12665 /* confdefs.h.  */
12666 _ACEOF
12667 cat confdefs.h >>conftest.$ac_ext
12668 cat >>conftest.$ac_ext <<_ACEOF
12669 /* end confdefs.h.  */
12670 $ac_includes_default
12671 #include <openssl/err.h>
12672 _ACEOF
12673 rm -f conftest.$ac_objext
12674 if { (ac_try="$ac_compile"
12675 case "(($ac_try" in
12676   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12677   *) ac_try_echo=$ac_try;;
12678 esac
12679 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12680 $as_echo "$ac_try_echo") >&5
12681   (eval "$ac_compile") 2>conftest.er1
12682   ac_status=$?
12683   grep -v '^ *+' conftest.er1 >conftest.err
12684   rm -f conftest.er1
12685   cat conftest.err >&5
12686   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12687   (exit $ac_status); } && {
12688          test -z "$ac_c_werror_flag" ||
12689          test ! -s conftest.err
12690        } && test -s conftest.$ac_objext; then
12691   ac_header_compiler=yes
12692 else
12693   $as_echo "$as_me: failed program was:" >&5
12694 sed 's/^/| /' conftest.$ac_ext >&5
12695
12696         ac_header_compiler=no
12697 fi
12698
12699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12700 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12701 $as_echo "$ac_header_compiler" >&6; }
12702
12703 # Is the header present?
12704 { $as_echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
12705 $as_echo_n "checking openssl/err.h presence... " >&6; }
12706 cat >conftest.$ac_ext <<_ACEOF
12707 /* confdefs.h.  */
12708 _ACEOF
12709 cat confdefs.h >>conftest.$ac_ext
12710 cat >>conftest.$ac_ext <<_ACEOF
12711 /* end confdefs.h.  */
12712 #include <openssl/err.h>
12713 _ACEOF
12714 if { (ac_try="$ac_cpp conftest.$ac_ext"
12715 case "(($ac_try" in
12716   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12717   *) ac_try_echo=$ac_try;;
12718 esac
12719 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12720 $as_echo "$ac_try_echo") >&5
12721   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12722   ac_status=$?
12723   grep -v '^ *+' conftest.er1 >conftest.err
12724   rm -f conftest.er1
12725   cat conftest.err >&5
12726   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12727   (exit $ac_status); } >/dev/null && {
12728          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12729          test ! -s conftest.err
12730        }; then
12731   ac_header_preproc=yes
12732 else
12733   $as_echo "$as_me: failed program was:" >&5
12734 sed 's/^/| /' conftest.$ac_ext >&5
12735
12736   ac_header_preproc=no
12737 fi
12738
12739 rm -f conftest.err conftest.$ac_ext
12740 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12741 $as_echo "$ac_header_preproc" >&6; }
12742
12743 # So?  What about this header?
12744 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12745   yes:no: )
12746     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
12747 $as_echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12748     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
12749 $as_echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
12750     ac_header_preproc=yes
12751     ;;
12752   no:yes:* )
12753     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
12754 $as_echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
12755     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
12756 $as_echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
12757     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
12758 $as_echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
12759     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
12760 $as_echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12761     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
12762 $as_echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
12763     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
12764 $as_echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
12765     ( cat <<\_ASBOX
12766 ## ---------------------------------------- ##
12767 ## Report this to pgsql-bugs@postgresql.org ##
12768 ## ---------------------------------------- ##
12769 _ASBOX
12770      ) | sed "s/^/$as_me: WARNING:     /" >&2
12771     ;;
12772 esac
12773 { $as_echo "$as_me:$LINENO: checking for openssl/err.h" >&5
12774 $as_echo_n "checking for openssl/err.h... " >&6; }
12775 if test "${ac_cv_header_openssl_err_h+set}" = set; then
12776   $as_echo_n "(cached) " >&6
12777 else
12778   ac_cv_header_openssl_err_h=$ac_header_preproc
12779 fi
12780 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
12781 $as_echo "$ac_cv_header_openssl_err_h" >&6; }
12782
12783 fi
12784 if test "x$ac_cv_header_openssl_err_h" = x""yes; then
12785   :
12786 else
12787   { { $as_echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
12788 $as_echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
12789    { (exit 1); exit 1; }; }
12790 fi
12791
12792
12793
12794 for ac_func in ERR_set_mark
12795 do
12796 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12797 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
12798 $as_echo_n "checking for $ac_func... " >&6; }
12799 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12800   $as_echo_n "(cached) " >&6
12801 else
12802   cat >conftest.$ac_ext <<_ACEOF
12803 /* confdefs.h.  */
12804 _ACEOF
12805 cat confdefs.h >>conftest.$ac_ext
12806 cat >>conftest.$ac_ext <<_ACEOF
12807 /* end confdefs.h.  */
12808 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
12809    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12810 #define $ac_func innocuous_$ac_func
12811
12812 /* System header to define __stub macros and hopefully few prototypes,
12813     which can conflict with char $ac_func (); below.
12814     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12815     <limits.h> exists even on freestanding compilers.  */
12816
12817 #ifdef __STDC__
12818 # include <limits.h>
12819 #else
12820 # include <assert.h>
12821 #endif
12822
12823 #undef $ac_func
12824
12825 /* Override any GCC internal prototype to avoid an error.
12826    Use char because int might match the return type of a GCC
12827    builtin and then its argument prototype would still apply.  */
12828 #ifdef __cplusplus
12829 extern "C"
12830 #endif
12831 char $ac_func ();
12832 /* The GNU C library defines this for functions which it implements
12833     to always fail with ENOSYS.  Some functions are actually named
12834     something starting with __ and the normal name is an alias.  */
12835 #if defined __stub_$ac_func || defined __stub___$ac_func
12836 choke me
12837 #endif
12838
12839 int
12840 main ()
12841 {
12842 return $ac_func ();
12843   ;
12844   return 0;
12845 }
12846 _ACEOF
12847 rm -f conftest.$ac_objext conftest$ac_exeext
12848 if { (ac_try="$ac_link"
12849 case "(($ac_try" in
12850   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12851   *) ac_try_echo=$ac_try;;
12852 esac
12853 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12854 $as_echo "$ac_try_echo") >&5
12855   (eval "$ac_link") 2>conftest.er1
12856   ac_status=$?
12857   grep -v '^ *+' conftest.er1 >conftest.err
12858   rm -f conftest.er1
12859   cat conftest.err >&5
12860   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12861   (exit $ac_status); } && {
12862          test -z "$ac_c_werror_flag" ||
12863          test ! -s conftest.err
12864        } && test -s conftest$ac_exeext && {
12865          test "$cross_compiling" = yes ||
12866          $as_test_x conftest$ac_exeext
12867        }; then
12868   eval "$as_ac_var=yes"
12869 else
12870   $as_echo "$as_me: failed program was:" >&5
12871 sed 's/^/| /' conftest.$ac_ext >&5
12872
12873         eval "$as_ac_var=no"
12874 fi
12875
12876 rm -rf conftest.dSYM
12877 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12878       conftest$ac_exeext conftest.$ac_ext
12879 fi
12880 ac_res=`eval 'as_val=${'$as_ac_var'}
12881                  $as_echo "$as_val"'`
12882                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12883 $as_echo "$ac_res" >&6; }
12884 as_val=`eval 'as_val=${'$as_ac_var'}
12885                  $as_echo "$as_val"'`
12886    if test "x$as_val" = x""yes; then
12887   cat >>confdefs.h <<_ACEOF
12888 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12889 _ACEOF
12890
12891 fi
12892 done
12893
12894 fi
12895
12896 if test "$with_pam" = yes ; then
12897
12898 for ac_header in security/pam_appl.h
12899 do
12900 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12901 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12902   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12903 $as_echo_n "checking for $ac_header... " >&6; }
12904 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12905   $as_echo_n "(cached) " >&6
12906 fi
12907 ac_res=`eval 'as_val=${'$as_ac_Header'}
12908                  $as_echo "$as_val"'`
12909                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12910 $as_echo "$ac_res" >&6; }
12911 else
12912   # Is the header compilable?
12913 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12914 $as_echo_n "checking $ac_header usability... " >&6; }
12915 cat >conftest.$ac_ext <<_ACEOF
12916 /* confdefs.h.  */
12917 _ACEOF
12918 cat confdefs.h >>conftest.$ac_ext
12919 cat >>conftest.$ac_ext <<_ACEOF
12920 /* end confdefs.h.  */
12921 $ac_includes_default
12922 #include <$ac_header>
12923 _ACEOF
12924 rm -f conftest.$ac_objext
12925 if { (ac_try="$ac_compile"
12926 case "(($ac_try" in
12927   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12928   *) ac_try_echo=$ac_try;;
12929 esac
12930 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12931 $as_echo "$ac_try_echo") >&5
12932   (eval "$ac_compile") 2>conftest.er1
12933   ac_status=$?
12934   grep -v '^ *+' conftest.er1 >conftest.err
12935   rm -f conftest.er1
12936   cat conftest.err >&5
12937   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12938   (exit $ac_status); } && {
12939          test -z "$ac_c_werror_flag" ||
12940          test ! -s conftest.err
12941        } && test -s conftest.$ac_objext; then
12942   ac_header_compiler=yes
12943 else
12944   $as_echo "$as_me: failed program was:" >&5
12945 sed 's/^/| /' conftest.$ac_ext >&5
12946
12947         ac_header_compiler=no
12948 fi
12949
12950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12951 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12952 $as_echo "$ac_header_compiler" >&6; }
12953
12954 # Is the header present?
12955 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12956 $as_echo_n "checking $ac_header presence... " >&6; }
12957 cat >conftest.$ac_ext <<_ACEOF
12958 /* confdefs.h.  */
12959 _ACEOF
12960 cat confdefs.h >>conftest.$ac_ext
12961 cat >>conftest.$ac_ext <<_ACEOF
12962 /* end confdefs.h.  */
12963 #include <$ac_header>
12964 _ACEOF
12965 if { (ac_try="$ac_cpp conftest.$ac_ext"
12966 case "(($ac_try" in
12967   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12968   *) ac_try_echo=$ac_try;;
12969 esac
12970 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12971 $as_echo "$ac_try_echo") >&5
12972   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12973   ac_status=$?
12974   grep -v '^ *+' conftest.er1 >conftest.err
12975   rm -f conftest.er1
12976   cat conftest.err >&5
12977   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12978   (exit $ac_status); } >/dev/null && {
12979          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12980          test ! -s conftest.err
12981        }; then
12982   ac_header_preproc=yes
12983 else
12984   $as_echo "$as_me: failed program was:" >&5
12985 sed 's/^/| /' conftest.$ac_ext >&5
12986
12987   ac_header_preproc=no
12988 fi
12989
12990 rm -f conftest.err conftest.$ac_ext
12991 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12992 $as_echo "$ac_header_preproc" >&6; }
12993
12994 # So?  What about this header?
12995 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12996   yes:no: )
12997     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12998 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12999     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13000 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13001     ac_header_preproc=yes
13002     ;;
13003   no:yes:* )
13004     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13005 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13006     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13007 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13008     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13009 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13010     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13011 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13012     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13013 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13014     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13015 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13016     ( cat <<\_ASBOX
13017 ## ---------------------------------------- ##
13018 ## Report this to pgsql-bugs@postgresql.org ##
13019 ## ---------------------------------------- ##
13020 _ASBOX
13021      ) | sed "s/^/$as_me: WARNING:     /" >&2
13022     ;;
13023 esac
13024 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13025 $as_echo_n "checking for $ac_header... " >&6; }
13026 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13027   $as_echo_n "(cached) " >&6
13028 else
13029   eval "$as_ac_Header=\$ac_header_preproc"
13030 fi
13031 ac_res=`eval 'as_val=${'$as_ac_Header'}
13032                  $as_echo "$as_val"'`
13033                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13034 $as_echo "$ac_res" >&6; }
13035
13036 fi
13037 as_val=`eval 'as_val=${'$as_ac_Header'}
13038                  $as_echo "$as_val"'`
13039    if test "x$as_val" = x""yes; then
13040   cat >>confdefs.h <<_ACEOF
13041 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13042 _ACEOF
13043
13044 else
13045
13046 for ac_header in pam/pam_appl.h
13047 do
13048 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13049 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13050   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13051 $as_echo_n "checking for $ac_header... " >&6; }
13052 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13053   $as_echo_n "(cached) " >&6
13054 fi
13055 ac_res=`eval 'as_val=${'$as_ac_Header'}
13056                  $as_echo "$as_val"'`
13057                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13058 $as_echo "$ac_res" >&6; }
13059 else
13060   # Is the header compilable?
13061 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
13062 $as_echo_n "checking $ac_header usability... " >&6; }
13063 cat >conftest.$ac_ext <<_ACEOF
13064 /* confdefs.h.  */
13065 _ACEOF
13066 cat confdefs.h >>conftest.$ac_ext
13067 cat >>conftest.$ac_ext <<_ACEOF
13068 /* end confdefs.h.  */
13069 $ac_includes_default
13070 #include <$ac_header>
13071 _ACEOF
13072 rm -f conftest.$ac_objext
13073 if { (ac_try="$ac_compile"
13074 case "(($ac_try" in
13075   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13076   *) ac_try_echo=$ac_try;;
13077 esac
13078 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13079 $as_echo "$ac_try_echo") >&5
13080   (eval "$ac_compile") 2>conftest.er1
13081   ac_status=$?
13082   grep -v '^ *+' conftest.er1 >conftest.err
13083   rm -f conftest.er1
13084   cat conftest.err >&5
13085   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13086   (exit $ac_status); } && {
13087          test -z "$ac_c_werror_flag" ||
13088          test ! -s conftest.err
13089        } && test -s conftest.$ac_objext; then
13090   ac_header_compiler=yes
13091 else
13092   $as_echo "$as_me: failed program was:" >&5
13093 sed 's/^/| /' conftest.$ac_ext >&5
13094
13095         ac_header_compiler=no
13096 fi
13097
13098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13099 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13100 $as_echo "$ac_header_compiler" >&6; }
13101
13102 # Is the header present?
13103 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
13104 $as_echo_n "checking $ac_header presence... " >&6; }
13105 cat >conftest.$ac_ext <<_ACEOF
13106 /* confdefs.h.  */
13107 _ACEOF
13108 cat confdefs.h >>conftest.$ac_ext
13109 cat >>conftest.$ac_ext <<_ACEOF
13110 /* end confdefs.h.  */
13111 #include <$ac_header>
13112 _ACEOF
13113 if { (ac_try="$ac_cpp conftest.$ac_ext"
13114 case "(($ac_try" in
13115   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13116   *) ac_try_echo=$ac_try;;
13117 esac
13118 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13119 $as_echo "$ac_try_echo") >&5
13120   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13121   ac_status=$?
13122   grep -v '^ *+' conftest.er1 >conftest.err
13123   rm -f conftest.er1
13124   cat conftest.err >&5
13125   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13126   (exit $ac_status); } >/dev/null && {
13127          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13128          test ! -s conftest.err
13129        }; then
13130   ac_header_preproc=yes
13131 else
13132   $as_echo "$as_me: failed program was:" >&5
13133 sed 's/^/| /' conftest.$ac_ext >&5
13134
13135   ac_header_preproc=no
13136 fi
13137
13138 rm -f conftest.err conftest.$ac_ext
13139 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13140 $as_echo "$ac_header_preproc" >&6; }
13141
13142 # So?  What about this header?
13143 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13144   yes:no: )
13145     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13146 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13147     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13148 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13149     ac_header_preproc=yes
13150     ;;
13151   no:yes:* )
13152     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13153 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13154     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13155 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13156     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13157 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13158     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13159 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13160     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13161 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13162     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13163 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13164     ( cat <<\_ASBOX
13165 ## ---------------------------------------- ##
13166 ## Report this to pgsql-bugs@postgresql.org ##
13167 ## ---------------------------------------- ##
13168 _ASBOX
13169      ) | sed "s/^/$as_me: WARNING:     /" >&2
13170     ;;
13171 esac
13172 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13173 $as_echo_n "checking for $ac_header... " >&6; }
13174 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13175   $as_echo_n "(cached) " >&6
13176 else
13177   eval "$as_ac_Header=\$ac_header_preproc"
13178 fi
13179 ac_res=`eval 'as_val=${'$as_ac_Header'}
13180                  $as_echo "$as_val"'`
13181                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13182 $as_echo "$ac_res" >&6; }
13183
13184 fi
13185 as_val=`eval 'as_val=${'$as_ac_Header'}
13186                  $as_echo "$as_val"'`
13187    if test "x$as_val" = x""yes; then
13188   cat >>confdefs.h <<_ACEOF
13189 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13190 _ACEOF
13191
13192 else
13193   { { $as_echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
13194 $as_echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
13195    { (exit 1); exit 1; }; }
13196 fi
13197
13198 done
13199
13200 fi
13201
13202 done
13203
13204 fi
13205
13206 if test "$with_libxml" = yes ; then
13207   if test "${ac_cv_header_libxml_parser_h+set}" = set; then
13208   { $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
13209 $as_echo_n "checking for libxml/parser.h... " >&6; }
13210 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
13211   $as_echo_n "(cached) " >&6
13212 fi
13213 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
13214 $as_echo "$ac_cv_header_libxml_parser_h" >&6; }
13215 else
13216   # Is the header compilable?
13217 { $as_echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
13218 $as_echo_n "checking libxml/parser.h usability... " >&6; }
13219 cat >conftest.$ac_ext <<_ACEOF
13220 /* confdefs.h.  */
13221 _ACEOF
13222 cat confdefs.h >>conftest.$ac_ext
13223 cat >>conftest.$ac_ext <<_ACEOF
13224 /* end confdefs.h.  */
13225 $ac_includes_default
13226 #include <libxml/parser.h>
13227 _ACEOF
13228 rm -f conftest.$ac_objext
13229 if { (ac_try="$ac_compile"
13230 case "(($ac_try" in
13231   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13232   *) ac_try_echo=$ac_try;;
13233 esac
13234 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13235 $as_echo "$ac_try_echo") >&5
13236   (eval "$ac_compile") 2>conftest.er1
13237   ac_status=$?
13238   grep -v '^ *+' conftest.er1 >conftest.err
13239   rm -f conftest.er1
13240   cat conftest.err >&5
13241   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13242   (exit $ac_status); } && {
13243          test -z "$ac_c_werror_flag" ||
13244          test ! -s conftest.err
13245        } && test -s conftest.$ac_objext; then
13246   ac_header_compiler=yes
13247 else
13248   $as_echo "$as_me: failed program was:" >&5
13249 sed 's/^/| /' conftest.$ac_ext >&5
13250
13251         ac_header_compiler=no
13252 fi
13253
13254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13255 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13256 $as_echo "$ac_header_compiler" >&6; }
13257
13258 # Is the header present?
13259 { $as_echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
13260 $as_echo_n "checking libxml/parser.h presence... " >&6; }
13261 cat >conftest.$ac_ext <<_ACEOF
13262 /* confdefs.h.  */
13263 _ACEOF
13264 cat confdefs.h >>conftest.$ac_ext
13265 cat >>conftest.$ac_ext <<_ACEOF
13266 /* end confdefs.h.  */
13267 #include <libxml/parser.h>
13268 _ACEOF
13269 if { (ac_try="$ac_cpp conftest.$ac_ext"
13270 case "(($ac_try" in
13271   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13272   *) ac_try_echo=$ac_try;;
13273 esac
13274 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13275 $as_echo "$ac_try_echo") >&5
13276   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13277   ac_status=$?
13278   grep -v '^ *+' conftest.er1 >conftest.err
13279   rm -f conftest.er1
13280   cat conftest.err >&5
13281   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13282   (exit $ac_status); } >/dev/null && {
13283          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13284          test ! -s conftest.err
13285        }; then
13286   ac_header_preproc=yes
13287 else
13288   $as_echo "$as_me: failed program was:" >&5
13289 sed 's/^/| /' conftest.$ac_ext >&5
13290
13291   ac_header_preproc=no
13292 fi
13293
13294 rm -f conftest.err conftest.$ac_ext
13295 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13296 $as_echo "$ac_header_preproc" >&6; }
13297
13298 # So?  What about this header?
13299 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13300   yes:no: )
13301     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
13302 $as_echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13303     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
13304 $as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
13305     ac_header_preproc=yes
13306     ;;
13307   no:yes:* )
13308     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
13309 $as_echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
13310     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
13311 $as_echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
13312     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
13313 $as_echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
13314     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
13315 $as_echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
13316     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
13317 $as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
13318     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
13319 $as_echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
13320     ( cat <<\_ASBOX
13321 ## ---------------------------------------- ##
13322 ## Report this to pgsql-bugs@postgresql.org ##
13323 ## ---------------------------------------- ##
13324 _ASBOX
13325      ) | sed "s/^/$as_me: WARNING:     /" >&2
13326     ;;
13327 esac
13328 { $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
13329 $as_echo_n "checking for libxml/parser.h... " >&6; }
13330 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
13331   $as_echo_n "(cached) " >&6
13332 else
13333   ac_cv_header_libxml_parser_h=$ac_header_preproc
13334 fi
13335 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
13336 $as_echo "$ac_cv_header_libxml_parser_h" >&6; }
13337
13338 fi
13339 if test "x$ac_cv_header_libxml_parser_h" = x""yes; then
13340   :
13341 else
13342   { { $as_echo "$as_me:$LINENO: error: header file <libxml/parser.h> is required for XML support" >&5
13343 $as_echo "$as_me: error: header file <libxml/parser.h> is required for XML support" >&2;}
13344    { (exit 1); exit 1; }; }
13345 fi
13346
13347
13348 fi
13349
13350 if test "$with_libxslt" = yes ; then
13351   if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
13352   { $as_echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
13353 $as_echo_n "checking for libxslt/xslt.h... " >&6; }
13354 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
13355   $as_echo_n "(cached) " >&6
13356 fi
13357 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
13358 $as_echo "$ac_cv_header_libxslt_xslt_h" >&6; }
13359 else
13360   # Is the header compilable?
13361 { $as_echo "$as_me:$LINENO: checking libxslt/xslt.h usability" >&5
13362 $as_echo_n "checking libxslt/xslt.h usability... " >&6; }
13363 cat >conftest.$ac_ext <<_ACEOF
13364 /* confdefs.h.  */
13365 _ACEOF
13366 cat confdefs.h >>conftest.$ac_ext
13367 cat >>conftest.$ac_ext <<_ACEOF
13368 /* end confdefs.h.  */
13369 $ac_includes_default
13370 #include <libxslt/xslt.h>
13371 _ACEOF
13372 rm -f conftest.$ac_objext
13373 if { (ac_try="$ac_compile"
13374 case "(($ac_try" in
13375   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13376   *) ac_try_echo=$ac_try;;
13377 esac
13378 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13379 $as_echo "$ac_try_echo") >&5
13380   (eval "$ac_compile") 2>conftest.er1
13381   ac_status=$?
13382   grep -v '^ *+' conftest.er1 >conftest.err
13383   rm -f conftest.er1
13384   cat conftest.err >&5
13385   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13386   (exit $ac_status); } && {
13387          test -z "$ac_c_werror_flag" ||
13388          test ! -s conftest.err
13389        } && test -s conftest.$ac_objext; then
13390   ac_header_compiler=yes
13391 else
13392   $as_echo "$as_me: failed program was:" >&5
13393 sed 's/^/| /' conftest.$ac_ext >&5
13394
13395         ac_header_compiler=no
13396 fi
13397
13398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13399 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13400 $as_echo "$ac_header_compiler" >&6; }
13401
13402 # Is the header present?
13403 { $as_echo "$as_me:$LINENO: checking libxslt/xslt.h presence" >&5
13404 $as_echo_n "checking libxslt/xslt.h presence... " >&6; }
13405 cat >conftest.$ac_ext <<_ACEOF
13406 /* confdefs.h.  */
13407 _ACEOF
13408 cat confdefs.h >>conftest.$ac_ext
13409 cat >>conftest.$ac_ext <<_ACEOF
13410 /* end confdefs.h.  */
13411 #include <libxslt/xslt.h>
13412 _ACEOF
13413 if { (ac_try="$ac_cpp conftest.$ac_ext"
13414 case "(($ac_try" in
13415   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13416   *) ac_try_echo=$ac_try;;
13417 esac
13418 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13419 $as_echo "$ac_try_echo") >&5
13420   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13421   ac_status=$?
13422   grep -v '^ *+' conftest.er1 >conftest.err
13423   rm -f conftest.er1
13424   cat conftest.err >&5
13425   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13426   (exit $ac_status); } >/dev/null && {
13427          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13428          test ! -s conftest.err
13429        }; then
13430   ac_header_preproc=yes
13431 else
13432   $as_echo "$as_me: failed program was:" >&5
13433 sed 's/^/| /' conftest.$ac_ext >&5
13434
13435   ac_header_preproc=no
13436 fi
13437
13438 rm -f conftest.err conftest.$ac_ext
13439 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13440 $as_echo "$ac_header_preproc" >&6; }
13441
13442 # So?  What about this header?
13443 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13444   yes:no: )
13445     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&5
13446 $as_echo "$as_me: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13447     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&5
13448 $as_echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&2;}
13449     ac_header_preproc=yes
13450     ;;
13451   no:yes:* )
13452     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: present but cannot be compiled" >&5
13453 $as_echo "$as_me: WARNING: libxslt/xslt.h: present but cannot be compiled" >&2;}
13454     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&5
13455 $as_echo "$as_me: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&2;}
13456     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&5
13457 $as_echo "$as_me: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&2;}
13458     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&5
13459 $as_echo "$as_me: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
13460     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&5
13461 $as_echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&2;}
13462     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&5
13463 $as_echo "$as_me: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&2;}
13464     ( cat <<\_ASBOX
13465 ## ---------------------------------------- ##
13466 ## Report this to pgsql-bugs@postgresql.org ##
13467 ## ---------------------------------------- ##
13468 _ASBOX
13469      ) | sed "s/^/$as_me: WARNING:     /" >&2
13470     ;;
13471 esac
13472 { $as_echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
13473 $as_echo_n "checking for libxslt/xslt.h... " >&6; }
13474 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
13475   $as_echo_n "(cached) " >&6
13476 else
13477   ac_cv_header_libxslt_xslt_h=$ac_header_preproc
13478 fi
13479 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
13480 $as_echo "$ac_cv_header_libxslt_xslt_h" >&6; }
13481
13482 fi
13483 if test "x$ac_cv_header_libxslt_xslt_h" = x""yes; then
13484   :
13485 else
13486   { { $as_echo "$as_me:$LINENO: error: header file <libxslt/xslt.h> is required for XSLT support" >&5
13487 $as_echo "$as_me: error: header file <libxslt/xslt.h> is required for XSLT support" >&2;}
13488    { (exit 1); exit 1; }; }
13489 fi
13490
13491
13492 fi
13493
13494 if test "$with_ldap" = yes ; then
13495   if test "$PORTNAME" != "win32"; then
13496
13497 for ac_header in ldap.h
13498 do
13499 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13500 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13501   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13502 $as_echo_n "checking for $ac_header... " >&6; }
13503 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13504   $as_echo_n "(cached) " >&6
13505 fi
13506 ac_res=`eval 'as_val=${'$as_ac_Header'}
13507                  $as_echo "$as_val"'`
13508                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13509 $as_echo "$ac_res" >&6; }
13510 else
13511   # Is the header compilable?
13512 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
13513 $as_echo_n "checking $ac_header usability... " >&6; }
13514 cat >conftest.$ac_ext <<_ACEOF
13515 /* confdefs.h.  */
13516 _ACEOF
13517 cat confdefs.h >>conftest.$ac_ext
13518 cat >>conftest.$ac_ext <<_ACEOF
13519 /* end confdefs.h.  */
13520 $ac_includes_default
13521 #include <$ac_header>
13522 _ACEOF
13523 rm -f conftest.$ac_objext
13524 if { (ac_try="$ac_compile"
13525 case "(($ac_try" in
13526   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13527   *) ac_try_echo=$ac_try;;
13528 esac
13529 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13530 $as_echo "$ac_try_echo") >&5
13531   (eval "$ac_compile") 2>conftest.er1
13532   ac_status=$?
13533   grep -v '^ *+' conftest.er1 >conftest.err
13534   rm -f conftest.er1
13535   cat conftest.err >&5
13536   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13537   (exit $ac_status); } && {
13538          test -z "$ac_c_werror_flag" ||
13539          test ! -s conftest.err
13540        } && test -s conftest.$ac_objext; then
13541   ac_header_compiler=yes
13542 else
13543   $as_echo "$as_me: failed program was:" >&5
13544 sed 's/^/| /' conftest.$ac_ext >&5
13545
13546         ac_header_compiler=no
13547 fi
13548
13549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13550 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13551 $as_echo "$ac_header_compiler" >&6; }
13552
13553 # Is the header present?
13554 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
13555 $as_echo_n "checking $ac_header presence... " >&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 #include <$ac_header>
13563 _ACEOF
13564 if { (ac_try="$ac_cpp conftest.$ac_ext"
13565 case "(($ac_try" in
13566   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13567   *) ac_try_echo=$ac_try;;
13568 esac
13569 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13570 $as_echo "$ac_try_echo") >&5
13571   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13572   ac_status=$?
13573   grep -v '^ *+' conftest.er1 >conftest.err
13574   rm -f conftest.er1
13575   cat conftest.err >&5
13576   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13577   (exit $ac_status); } >/dev/null && {
13578          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13579          test ! -s conftest.err
13580        }; then
13581   ac_header_preproc=yes
13582 else
13583   $as_echo "$as_me: failed program was:" >&5
13584 sed 's/^/| /' conftest.$ac_ext >&5
13585
13586   ac_header_preproc=no
13587 fi
13588
13589 rm -f conftest.err conftest.$ac_ext
13590 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13591 $as_echo "$ac_header_preproc" >&6; }
13592
13593 # So?  What about this header?
13594 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13595   yes:no: )
13596     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13597 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13598     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13599 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13600     ac_header_preproc=yes
13601     ;;
13602   no:yes:* )
13603     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13604 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13605     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13606 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13607     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13608 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13609     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13610 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13611     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13612 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13613     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13614 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13615     ( cat <<\_ASBOX
13616 ## ---------------------------------------- ##
13617 ## Report this to pgsql-bugs@postgresql.org ##
13618 ## ---------------------------------------- ##
13619 _ASBOX
13620      ) | sed "s/^/$as_me: WARNING:     /" >&2
13621     ;;
13622 esac
13623 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13624 $as_echo_n "checking for $ac_header... " >&6; }
13625 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13626   $as_echo_n "(cached) " >&6
13627 else
13628   eval "$as_ac_Header=\$ac_header_preproc"
13629 fi
13630 ac_res=`eval 'as_val=${'$as_ac_Header'}
13631                  $as_echo "$as_val"'`
13632                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13633 $as_echo "$ac_res" >&6; }
13634
13635 fi
13636 as_val=`eval 'as_val=${'$as_ac_Header'}
13637                  $as_echo "$as_val"'`
13638    if test "x$as_val" = x""yes; then
13639   cat >>confdefs.h <<_ACEOF
13640 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13641 _ACEOF
13642
13643 else
13644   { { $as_echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
13645 $as_echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
13646    { (exit 1); exit 1; }; }
13647 fi
13648
13649 done
13650
13651   else
13652
13653 for ac_header in winldap.h
13654 do
13655 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13656 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13657 $as_echo_n "checking for $ac_header... " >&6; }
13658 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13659   $as_echo_n "(cached) " >&6
13660 else
13661   cat >conftest.$ac_ext <<_ACEOF
13662 /* confdefs.h.  */
13663 _ACEOF
13664 cat confdefs.h >>conftest.$ac_ext
13665 cat >>conftest.$ac_ext <<_ACEOF
13666 /* end confdefs.h.  */
13667 $ac_includes_default
13668 #include <windows.h>
13669
13670
13671 #include <$ac_header>
13672 _ACEOF
13673 rm -f conftest.$ac_objext
13674 if { (ac_try="$ac_compile"
13675 case "(($ac_try" in
13676   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13677   *) ac_try_echo=$ac_try;;
13678 esac
13679 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13680 $as_echo "$ac_try_echo") >&5
13681   (eval "$ac_compile") 2>conftest.er1
13682   ac_status=$?
13683   grep -v '^ *+' conftest.er1 >conftest.err
13684   rm -f conftest.er1
13685   cat conftest.err >&5
13686   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13687   (exit $ac_status); } && {
13688          test -z "$ac_c_werror_flag" ||
13689          test ! -s conftest.err
13690        } && test -s conftest.$ac_objext; then
13691   eval "$as_ac_Header=yes"
13692 else
13693   $as_echo "$as_me: failed program was:" >&5
13694 sed 's/^/| /' conftest.$ac_ext >&5
13695
13696         eval "$as_ac_Header=no"
13697 fi
13698
13699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13700 fi
13701 ac_res=`eval 'as_val=${'$as_ac_Header'}
13702                  $as_echo "$as_val"'`
13703                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13704 $as_echo "$ac_res" >&6; }
13705 as_val=`eval 'as_val=${'$as_ac_Header'}
13706                  $as_echo "$as_val"'`
13707    if test "x$as_val" = x""yes; then
13708   cat >>confdefs.h <<_ACEOF
13709 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13710 _ACEOF
13711
13712 else
13713   { { $as_echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
13714 $as_echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
13715    { (exit 1); exit 1; }; }
13716 fi
13717
13718 done
13719
13720   fi
13721 fi
13722
13723 if test "$with_bonjour" = yes ; then
13724   if test "${ac_cv_header_dns_sd_h+set}" = set; then
13725   { $as_echo "$as_me:$LINENO: checking for dns_sd.h" >&5
13726 $as_echo_n "checking for dns_sd.h... " >&6; }
13727 if test "${ac_cv_header_dns_sd_h+set}" = set; then
13728   $as_echo_n "(cached) " >&6
13729 fi
13730 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_dns_sd_h" >&5
13731 $as_echo "$ac_cv_header_dns_sd_h" >&6; }
13732 else
13733   # Is the header compilable?
13734 { $as_echo "$as_me:$LINENO: checking dns_sd.h usability" >&5
13735 $as_echo_n "checking dns_sd.h usability... " >&6; }
13736 cat >conftest.$ac_ext <<_ACEOF
13737 /* confdefs.h.  */
13738 _ACEOF
13739 cat confdefs.h >>conftest.$ac_ext
13740 cat >>conftest.$ac_ext <<_ACEOF
13741 /* end confdefs.h.  */
13742 $ac_includes_default
13743 #include <dns_sd.h>
13744 _ACEOF
13745 rm -f conftest.$ac_objext
13746 if { (ac_try="$ac_compile"
13747 case "(($ac_try" in
13748   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13749   *) ac_try_echo=$ac_try;;
13750 esac
13751 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13752 $as_echo "$ac_try_echo") >&5
13753   (eval "$ac_compile") 2>conftest.er1
13754   ac_status=$?
13755   grep -v '^ *+' conftest.er1 >conftest.err
13756   rm -f conftest.er1
13757   cat conftest.err >&5
13758   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13759   (exit $ac_status); } && {
13760          test -z "$ac_c_werror_flag" ||
13761          test ! -s conftest.err
13762        } && test -s conftest.$ac_objext; then
13763   ac_header_compiler=yes
13764 else
13765   $as_echo "$as_me: failed program was:" >&5
13766 sed 's/^/| /' conftest.$ac_ext >&5
13767
13768         ac_header_compiler=no
13769 fi
13770
13771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13772 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13773 $as_echo "$ac_header_compiler" >&6; }
13774
13775 # Is the header present?
13776 { $as_echo "$as_me:$LINENO: checking dns_sd.h presence" >&5
13777 $as_echo_n "checking dns_sd.h presence... " >&6; }
13778 cat >conftest.$ac_ext <<_ACEOF
13779 /* confdefs.h.  */
13780 _ACEOF
13781 cat confdefs.h >>conftest.$ac_ext
13782 cat >>conftest.$ac_ext <<_ACEOF
13783 /* end confdefs.h.  */
13784 #include <dns_sd.h>
13785 _ACEOF
13786 if { (ac_try="$ac_cpp conftest.$ac_ext"
13787 case "(($ac_try" in
13788   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13789   *) ac_try_echo=$ac_try;;
13790 esac
13791 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13792 $as_echo "$ac_try_echo") >&5
13793   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13794   ac_status=$?
13795   grep -v '^ *+' conftest.er1 >conftest.err
13796   rm -f conftest.er1
13797   cat conftest.err >&5
13798   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13799   (exit $ac_status); } >/dev/null && {
13800          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13801          test ! -s conftest.err
13802        }; then
13803   ac_header_preproc=yes
13804 else
13805   $as_echo "$as_me: failed program was:" >&5
13806 sed 's/^/| /' conftest.$ac_ext >&5
13807
13808   ac_header_preproc=no
13809 fi
13810
13811 rm -f conftest.err conftest.$ac_ext
13812 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13813 $as_echo "$ac_header_preproc" >&6; }
13814
13815 # So?  What about this header?
13816 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13817   yes:no: )
13818     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: accepted by the compiler, rejected by the preprocessor!" >&5
13819 $as_echo "$as_me: WARNING: dns_sd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13820     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: proceeding with the compiler's result" >&5
13821 $as_echo "$as_me: WARNING: dns_sd.h: proceeding with the compiler's result" >&2;}
13822     ac_header_preproc=yes
13823     ;;
13824   no:yes:* )
13825     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: present but cannot be compiled" >&5
13826 $as_echo "$as_me: WARNING: dns_sd.h: present but cannot be compiled" >&2;}
13827     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h:     check for missing prerequisite headers?" >&5
13828 $as_echo "$as_me: WARNING: dns_sd.h:     check for missing prerequisite headers?" >&2;}
13829     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: see the Autoconf documentation" >&5
13830 $as_echo "$as_me: WARNING: dns_sd.h: see the Autoconf documentation" >&2;}
13831     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h:     section \"Present But Cannot Be Compiled\"" >&5
13832 $as_echo "$as_me: WARNING: dns_sd.h:     section \"Present But Cannot Be Compiled\"" >&2;}
13833     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: proceeding with the preprocessor's result" >&5
13834 $as_echo "$as_me: WARNING: dns_sd.h: proceeding with the preprocessor's result" >&2;}
13835     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: in the future, the compiler will take precedence" >&5
13836 $as_echo "$as_me: WARNING: dns_sd.h: in the future, the compiler will take precedence" >&2;}
13837     ( cat <<\_ASBOX
13838 ## ---------------------------------------- ##
13839 ## Report this to pgsql-bugs@postgresql.org ##
13840 ## ---------------------------------------- ##
13841 _ASBOX
13842      ) | sed "s/^/$as_me: WARNING:     /" >&2
13843     ;;
13844 esac
13845 { $as_echo "$as_me:$LINENO: checking for dns_sd.h" >&5
13846 $as_echo_n "checking for dns_sd.h... " >&6; }
13847 if test "${ac_cv_header_dns_sd_h+set}" = set; then
13848   $as_echo_n "(cached) " >&6
13849 else
13850   ac_cv_header_dns_sd_h=$ac_header_preproc
13851 fi
13852 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_dns_sd_h" >&5
13853 $as_echo "$ac_cv_header_dns_sd_h" >&6; }
13854
13855 fi
13856 if test "x$ac_cv_header_dns_sd_h" = x""yes; then
13857   :
13858 else
13859   { { $as_echo "$as_me:$LINENO: error: header file <dns_sd.h> is required for Bonjour" >&5
13860 $as_echo "$as_me: error: header file <dns_sd.h> is required for Bonjour" >&2;}
13861    { (exit 1); exit 1; }; }
13862 fi
13863
13864
13865 fi
13866
13867 # for contrib/uuid-ossp
13868 if test "$with_ossp_uuid" = yes ; then
13869
13870 for ac_header in ossp/uuid.h
13871 do
13872 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13873 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13874   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13875 $as_echo_n "checking for $ac_header... " >&6; }
13876 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13877   $as_echo_n "(cached) " >&6
13878 fi
13879 ac_res=`eval 'as_val=${'$as_ac_Header'}
13880                  $as_echo "$as_val"'`
13881                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13882 $as_echo "$ac_res" >&6; }
13883 else
13884   # Is the header compilable?
13885 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
13886 $as_echo_n "checking $ac_header usability... " >&6; }
13887 cat >conftest.$ac_ext <<_ACEOF
13888 /* confdefs.h.  */
13889 _ACEOF
13890 cat confdefs.h >>conftest.$ac_ext
13891 cat >>conftest.$ac_ext <<_ACEOF
13892 /* end confdefs.h.  */
13893 $ac_includes_default
13894 #include <$ac_header>
13895 _ACEOF
13896 rm -f conftest.$ac_objext
13897 if { (ac_try="$ac_compile"
13898 case "(($ac_try" in
13899   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13900   *) ac_try_echo=$ac_try;;
13901 esac
13902 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13903 $as_echo "$ac_try_echo") >&5
13904   (eval "$ac_compile") 2>conftest.er1
13905   ac_status=$?
13906   grep -v '^ *+' conftest.er1 >conftest.err
13907   rm -f conftest.er1
13908   cat conftest.err >&5
13909   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13910   (exit $ac_status); } && {
13911          test -z "$ac_c_werror_flag" ||
13912          test ! -s conftest.err
13913        } && test -s conftest.$ac_objext; then
13914   ac_header_compiler=yes
13915 else
13916   $as_echo "$as_me: failed program was:" >&5
13917 sed 's/^/| /' conftest.$ac_ext >&5
13918
13919         ac_header_compiler=no
13920 fi
13921
13922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13923 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13924 $as_echo "$ac_header_compiler" >&6; }
13925
13926 # Is the header present?
13927 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
13928 $as_echo_n "checking $ac_header presence... " >&6; }
13929 cat >conftest.$ac_ext <<_ACEOF
13930 /* confdefs.h.  */
13931 _ACEOF
13932 cat confdefs.h >>conftest.$ac_ext
13933 cat >>conftest.$ac_ext <<_ACEOF
13934 /* end confdefs.h.  */
13935 #include <$ac_header>
13936 _ACEOF
13937 if { (ac_try="$ac_cpp conftest.$ac_ext"
13938 case "(($ac_try" in
13939   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13940   *) ac_try_echo=$ac_try;;
13941 esac
13942 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13943 $as_echo "$ac_try_echo") >&5
13944   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13945   ac_status=$?
13946   grep -v '^ *+' conftest.er1 >conftest.err
13947   rm -f conftest.er1
13948   cat conftest.err >&5
13949   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13950   (exit $ac_status); } >/dev/null && {
13951          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13952          test ! -s conftest.err
13953        }; then
13954   ac_header_preproc=yes
13955 else
13956   $as_echo "$as_me: failed program was:" >&5
13957 sed 's/^/| /' conftest.$ac_ext >&5
13958
13959   ac_header_preproc=no
13960 fi
13961
13962 rm -f conftest.err conftest.$ac_ext
13963 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13964 $as_echo "$ac_header_preproc" >&6; }
13965
13966 # So?  What about this header?
13967 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13968   yes:no: )
13969     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13970 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13971     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13972 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13973     ac_header_preproc=yes
13974     ;;
13975   no:yes:* )
13976     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13977 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13978     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13979 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13980     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13981 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13982     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13983 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13984     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13985 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13986     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13987 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13988     ( cat <<\_ASBOX
13989 ## ---------------------------------------- ##
13990 ## Report this to pgsql-bugs@postgresql.org ##
13991 ## ---------------------------------------- ##
13992 _ASBOX
13993      ) | sed "s/^/$as_me: WARNING:     /" >&2
13994     ;;
13995 esac
13996 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13997 $as_echo_n "checking for $ac_header... " >&6; }
13998 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13999   $as_echo_n "(cached) " >&6
14000 else
14001   eval "$as_ac_Header=\$ac_header_preproc"
14002 fi
14003 ac_res=`eval 'as_val=${'$as_ac_Header'}
14004                  $as_echo "$as_val"'`
14005                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14006 $as_echo "$ac_res" >&6; }
14007
14008 fi
14009 as_val=`eval 'as_val=${'$as_ac_Header'}
14010                  $as_echo "$as_val"'`
14011    if test "x$as_val" = x""yes; then
14012   cat >>confdefs.h <<_ACEOF
14013 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14014 _ACEOF
14015
14016 else
14017
14018
14019 for ac_header in uuid.h
14020 do
14021 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14022 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14023   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14024 $as_echo_n "checking for $ac_header... " >&6; }
14025 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14026   $as_echo_n "(cached) " >&6
14027 fi
14028 ac_res=`eval 'as_val=${'$as_ac_Header'}
14029                  $as_echo "$as_val"'`
14030                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14031 $as_echo "$ac_res" >&6; }
14032 else
14033   # Is the header compilable?
14034 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
14035 $as_echo_n "checking $ac_header usability... " >&6; }
14036 cat >conftest.$ac_ext <<_ACEOF
14037 /* confdefs.h.  */
14038 _ACEOF
14039 cat confdefs.h >>conftest.$ac_ext
14040 cat >>conftest.$ac_ext <<_ACEOF
14041 /* end confdefs.h.  */
14042 $ac_includes_default
14043 #include <$ac_header>
14044 _ACEOF
14045 rm -f conftest.$ac_objext
14046 if { (ac_try="$ac_compile"
14047 case "(($ac_try" in
14048   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14049   *) ac_try_echo=$ac_try;;
14050 esac
14051 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14052 $as_echo "$ac_try_echo") >&5
14053   (eval "$ac_compile") 2>conftest.er1
14054   ac_status=$?
14055   grep -v '^ *+' conftest.er1 >conftest.err
14056   rm -f conftest.er1
14057   cat conftest.err >&5
14058   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14059   (exit $ac_status); } && {
14060          test -z "$ac_c_werror_flag" ||
14061          test ! -s conftest.err
14062        } && test -s conftest.$ac_objext; then
14063   ac_header_compiler=yes
14064 else
14065   $as_echo "$as_me: failed program was:" >&5
14066 sed 's/^/| /' conftest.$ac_ext >&5
14067
14068         ac_header_compiler=no
14069 fi
14070
14071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14072 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14073 $as_echo "$ac_header_compiler" >&6; }
14074
14075 # Is the header present?
14076 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
14077 $as_echo_n "checking $ac_header presence... " >&6; }
14078 cat >conftest.$ac_ext <<_ACEOF
14079 /* confdefs.h.  */
14080 _ACEOF
14081 cat confdefs.h >>conftest.$ac_ext
14082 cat >>conftest.$ac_ext <<_ACEOF
14083 /* end confdefs.h.  */
14084 #include <$ac_header>
14085 _ACEOF
14086 if { (ac_try="$ac_cpp conftest.$ac_ext"
14087 case "(($ac_try" in
14088   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14089   *) ac_try_echo=$ac_try;;
14090 esac
14091 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14092 $as_echo "$ac_try_echo") >&5
14093   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14094   ac_status=$?
14095   grep -v '^ *+' conftest.er1 >conftest.err
14096   rm -f conftest.er1
14097   cat conftest.err >&5
14098   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14099   (exit $ac_status); } >/dev/null && {
14100          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14101          test ! -s conftest.err
14102        }; then
14103   ac_header_preproc=yes
14104 else
14105   $as_echo "$as_me: failed program was:" >&5
14106 sed 's/^/| /' conftest.$ac_ext >&5
14107
14108   ac_header_preproc=no
14109 fi
14110
14111 rm -f conftest.err conftest.$ac_ext
14112 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14113 $as_echo "$ac_header_preproc" >&6; }
14114
14115 # So?  What about this header?
14116 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14117   yes:no: )
14118     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14119 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14120     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14121 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14122     ac_header_preproc=yes
14123     ;;
14124   no:yes:* )
14125     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14126 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14127     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14128 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14129     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14130 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14131     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14132 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14133     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14134 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14135     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14136 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14137     ( cat <<\_ASBOX
14138 ## ---------------------------------------- ##
14139 ## Report this to pgsql-bugs@postgresql.org ##
14140 ## ---------------------------------------- ##
14141 _ASBOX
14142      ) | sed "s/^/$as_me: WARNING:     /" >&2
14143     ;;
14144 esac
14145 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14146 $as_echo_n "checking for $ac_header... " >&6; }
14147 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14148   $as_echo_n "(cached) " >&6
14149 else
14150   eval "$as_ac_Header=\$ac_header_preproc"
14151 fi
14152 ac_res=`eval 'as_val=${'$as_ac_Header'}
14153                  $as_echo "$as_val"'`
14154                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14155 $as_echo "$ac_res" >&6; }
14156
14157 fi
14158 as_val=`eval 'as_val=${'$as_ac_Header'}
14159                  $as_echo "$as_val"'`
14160    if test "x$as_val" = x""yes; then
14161   cat >>confdefs.h <<_ACEOF
14162 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14163 _ACEOF
14164
14165 else
14166   { { $as_echo "$as_me:$LINENO: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&5
14167 $as_echo "$as_me: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&2;}
14168    { (exit 1); exit 1; }; }
14169 fi
14170
14171 done
14172
14173 fi
14174
14175 done
14176
14177 fi
14178
14179
14180 ##
14181 ## Types, structures, compiler characteristics
14182 ##
14183
14184
14185  { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
14186 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14187 if test "${ac_cv_c_bigendian+set}" = set; then
14188   $as_echo_n "(cached) " >&6
14189 else
14190   ac_cv_c_bigendian=unknown
14191     # See if we're dealing with a universal compiler.
14192     cat >conftest.$ac_ext <<_ACEOF
14193 /* confdefs.h.  */
14194 _ACEOF
14195 cat confdefs.h >>conftest.$ac_ext
14196 cat >>conftest.$ac_ext <<_ACEOF
14197 /* end confdefs.h.  */
14198 #ifndef __APPLE_CC__
14199                not a universal capable compiler
14200              #endif
14201              typedef int dummy;
14202
14203 _ACEOF
14204 rm -f conftest.$ac_objext
14205 if { (ac_try="$ac_compile"
14206 case "(($ac_try" in
14207   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14208   *) ac_try_echo=$ac_try;;
14209 esac
14210 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14211 $as_echo "$ac_try_echo") >&5
14212   (eval "$ac_compile") 2>conftest.er1
14213   ac_status=$?
14214   grep -v '^ *+' conftest.er1 >conftest.err
14215   rm -f conftest.er1
14216   cat conftest.err >&5
14217   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14218   (exit $ac_status); } && {
14219          test -z "$ac_c_werror_flag" ||
14220          test ! -s conftest.err
14221        } && test -s conftest.$ac_objext; then
14222
14223         # Check for potential -arch flags.  It is not universal unless
14224         # there are some -arch flags.  Note that *ppc* also matches
14225         # ppc64.  This check is also rather less than ideal.
14226         case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
14227           *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
14228         esac
14229 else
14230   $as_echo "$as_me: failed program was:" >&5
14231 sed 's/^/| /' conftest.$ac_ext >&5
14232
14233
14234 fi
14235
14236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14237     if test $ac_cv_c_bigendian = unknown; then
14238       # See if sys/param.h defines the BYTE_ORDER macro.
14239       cat >conftest.$ac_ext <<_ACEOF
14240 /* confdefs.h.  */
14241 _ACEOF
14242 cat confdefs.h >>conftest.$ac_ext
14243 cat >>conftest.$ac_ext <<_ACEOF
14244 /* end confdefs.h.  */
14245 #include <sys/types.h>
14246              #include <sys/param.h>
14247
14248 int
14249 main ()
14250 {
14251 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14252                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14253                      && LITTLE_ENDIAN)
14254               bogus endian macros
14255              #endif
14256
14257   ;
14258   return 0;
14259 }
14260 _ACEOF
14261 rm -f conftest.$ac_objext
14262 if { (ac_try="$ac_compile"
14263 case "(($ac_try" in
14264   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14265   *) ac_try_echo=$ac_try;;
14266 esac
14267 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14268 $as_echo "$ac_try_echo") >&5
14269   (eval "$ac_compile") 2>conftest.er1
14270   ac_status=$?
14271   grep -v '^ *+' conftest.er1 >conftest.err
14272   rm -f conftest.er1
14273   cat conftest.err >&5
14274   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14275   (exit $ac_status); } && {
14276          test -z "$ac_c_werror_flag" ||
14277          test ! -s conftest.err
14278        } && test -s conftest.$ac_objext; then
14279   # It does; now see whether it defined to BIG_ENDIAN or not.
14280          cat >conftest.$ac_ext <<_ACEOF
14281 /* confdefs.h.  */
14282 _ACEOF
14283 cat confdefs.h >>conftest.$ac_ext
14284 cat >>conftest.$ac_ext <<_ACEOF
14285 /* end confdefs.h.  */
14286 #include <sys/types.h>
14287                 #include <sys/param.h>
14288
14289 int
14290 main ()
14291 {
14292 #if BYTE_ORDER != BIG_ENDIAN
14293                  not big endian
14294                 #endif
14295
14296   ;
14297   return 0;
14298 }
14299 _ACEOF
14300 rm -f conftest.$ac_objext
14301 if { (ac_try="$ac_compile"
14302 case "(($ac_try" in
14303   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14304   *) ac_try_echo=$ac_try;;
14305 esac
14306 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14307 $as_echo "$ac_try_echo") >&5
14308   (eval "$ac_compile") 2>conftest.er1
14309   ac_status=$?
14310   grep -v '^ *+' conftest.er1 >conftest.err
14311   rm -f conftest.er1
14312   cat conftest.err >&5
14313   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14314   (exit $ac_status); } && {
14315          test -z "$ac_c_werror_flag" ||
14316          test ! -s conftest.err
14317        } && test -s conftest.$ac_objext; then
14318   ac_cv_c_bigendian=yes
14319 else
14320   $as_echo "$as_me: failed program was:" >&5
14321 sed 's/^/| /' conftest.$ac_ext >&5
14322
14323         ac_cv_c_bigendian=no
14324 fi
14325
14326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14327 else
14328   $as_echo "$as_me: failed program was:" >&5
14329 sed 's/^/| /' conftest.$ac_ext >&5
14330
14331
14332 fi
14333
14334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14335     fi
14336     if test $ac_cv_c_bigendian = unknown; then
14337       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14338       cat >conftest.$ac_ext <<_ACEOF
14339 /* confdefs.h.  */
14340 _ACEOF
14341 cat confdefs.h >>conftest.$ac_ext
14342 cat >>conftest.$ac_ext <<_ACEOF
14343 /* end confdefs.h.  */
14344 #include <limits.h>
14345
14346 int
14347 main ()
14348 {
14349 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14350               bogus endian macros
14351              #endif
14352
14353   ;
14354   return 0;
14355 }
14356 _ACEOF
14357 rm -f conftest.$ac_objext
14358 if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
14366   ac_status=$?
14367   grep -v '^ *+' conftest.er1 >conftest.err
14368   rm -f conftest.er1
14369   cat conftest.err >&5
14370   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14371   (exit $ac_status); } && {
14372          test -z "$ac_c_werror_flag" ||
14373          test ! -s conftest.err
14374        } && test -s conftest.$ac_objext; then
14375   # It does; now see whether it defined to _BIG_ENDIAN or not.
14376          cat >conftest.$ac_ext <<_ACEOF
14377 /* confdefs.h.  */
14378 _ACEOF
14379 cat confdefs.h >>conftest.$ac_ext
14380 cat >>conftest.$ac_ext <<_ACEOF
14381 /* end confdefs.h.  */
14382 #include <limits.h>
14383
14384 int
14385 main ()
14386 {
14387 #ifndef _BIG_ENDIAN
14388                  not big endian
14389                 #endif
14390
14391   ;
14392   return 0;
14393 }
14394 _ACEOF
14395 rm -f conftest.$ac_objext
14396 if { (ac_try="$ac_compile"
14397 case "(($ac_try" in
14398   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14399   *) ac_try_echo=$ac_try;;
14400 esac
14401 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14402 $as_echo "$ac_try_echo") >&5
14403   (eval "$ac_compile") 2>conftest.er1
14404   ac_status=$?
14405   grep -v '^ *+' conftest.er1 >conftest.err
14406   rm -f conftest.er1
14407   cat conftest.err >&5
14408   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14409   (exit $ac_status); } && {
14410          test -z "$ac_c_werror_flag" ||
14411          test ! -s conftest.err
14412        } && test -s conftest.$ac_objext; then
14413   ac_cv_c_bigendian=yes
14414 else
14415   $as_echo "$as_me: failed program was:" >&5
14416 sed 's/^/| /' conftest.$ac_ext >&5
14417
14418         ac_cv_c_bigendian=no
14419 fi
14420
14421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14422 else
14423   $as_echo "$as_me: failed program was:" >&5
14424 sed 's/^/| /' conftest.$ac_ext >&5
14425
14426
14427 fi
14428
14429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14430     fi
14431     if test $ac_cv_c_bigendian = unknown; then
14432       # Compile a test program.
14433       if test "$cross_compiling" = yes; then
14434   # Try to guess by grepping values from an object file.
14435          cat >conftest.$ac_ext <<_ACEOF
14436 /* confdefs.h.  */
14437 _ACEOF
14438 cat confdefs.h >>conftest.$ac_ext
14439 cat >>conftest.$ac_ext <<_ACEOF
14440 /* end confdefs.h.  */
14441 short int ascii_mm[] =
14442                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14443                 short int ascii_ii[] =
14444                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14445                 int use_ascii (int i) {
14446                   return ascii_mm[i] + ascii_ii[i];
14447                 }
14448                 short int ebcdic_ii[] =
14449                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14450                 short int ebcdic_mm[] =
14451                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14452                 int use_ebcdic (int i) {
14453                   return ebcdic_mm[i] + ebcdic_ii[i];
14454                 }
14455                 extern int foo;
14456
14457 int
14458 main ()
14459 {
14460 return use_ascii (foo) == use_ebcdic (foo);
14461   ;
14462   return 0;
14463 }
14464 _ACEOF
14465 rm -f conftest.$ac_objext
14466 if { (ac_try="$ac_compile"
14467 case "(($ac_try" in
14468   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14469   *) ac_try_echo=$ac_try;;
14470 esac
14471 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14472 $as_echo "$ac_try_echo") >&5
14473   (eval "$ac_compile") 2>conftest.er1
14474   ac_status=$?
14475   grep -v '^ *+' conftest.er1 >conftest.err
14476   rm -f conftest.er1
14477   cat conftest.err >&5
14478   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14479   (exit $ac_status); } && {
14480          test -z "$ac_c_werror_flag" ||
14481          test ! -s conftest.err
14482        } && test -s conftest.$ac_objext; then
14483   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14484               ac_cv_c_bigendian=yes
14485             fi
14486             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14487               if test "$ac_cv_c_bigendian" = unknown; then
14488                 ac_cv_c_bigendian=no
14489               else
14490                 # finding both strings is unlikely to happen, but who knows?
14491                 ac_cv_c_bigendian=unknown
14492               fi
14493             fi
14494 else
14495   $as_echo "$as_me: failed program was:" >&5
14496 sed 's/^/| /' conftest.$ac_ext >&5
14497
14498
14499 fi
14500
14501 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14502 else
14503   cat >conftest.$ac_ext <<_ACEOF
14504 /* confdefs.h.  */
14505 _ACEOF
14506 cat confdefs.h >>conftest.$ac_ext
14507 cat >>conftest.$ac_ext <<_ACEOF
14508 /* end confdefs.h.  */
14509 $ac_includes_default
14510 int
14511 main ()
14512 {
14513
14514              /* Are we little or big endian?  From Harbison&Steele.  */
14515              union
14516              {
14517                long int l;
14518                char c[sizeof (long int)];
14519              } u;
14520              u.l = 1;
14521              return u.c[sizeof (long int) - 1] == 1;
14522
14523   ;
14524   return 0;
14525 }
14526 _ACEOF
14527 rm -f conftest$ac_exeext
14528 if { (ac_try="$ac_link"
14529 case "(($ac_try" in
14530   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14531   *) ac_try_echo=$ac_try;;
14532 esac
14533 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14534 $as_echo "$ac_try_echo") >&5
14535   (eval "$ac_link") 2>&5
14536   ac_status=$?
14537   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14538   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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_try") 2>&5
14546   ac_status=$?
14547   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14548   (exit $ac_status); }; }; then
14549   ac_cv_c_bigendian=no
14550 else
14551   $as_echo "$as_me: program exited with status $ac_status" >&5
14552 $as_echo "$as_me: failed program was:" >&5
14553 sed 's/^/| /' conftest.$ac_ext >&5
14554
14555 ( exit $ac_status )
14556 ac_cv_c_bigendian=yes
14557 fi
14558 rm -rf conftest.dSYM
14559 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14560 fi
14561
14562
14563     fi
14564 fi
14565 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
14566 $as_echo "$ac_cv_c_bigendian" >&6; }
14567  case $ac_cv_c_bigendian in #(
14568    yes)
14569      cat >>confdefs.h <<\_ACEOF
14570 #define WORDS_BIGENDIAN 1
14571 _ACEOF
14572 ;; #(
14573    no)
14574       ;; #(
14575    universal)
14576
14577 cat >>confdefs.h <<\_ACEOF
14578 #define AC_APPLE_UNIVERSAL_BUILD 1
14579 _ACEOF
14580
14581      ;; #(
14582    *)
14583      { { $as_echo "$as_me:$LINENO: error: unknown endianness
14584  presetting ac_cv_c_bigendian=no (or yes) will help" >&5
14585 $as_echo "$as_me: error: unknown endianness
14586  presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
14587    { (exit 1); exit 1; }; } ;;
14588  esac
14589
14590 { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14591 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
14592 if test "${ac_cv_c_const+set}" = set; then
14593   $as_echo_n "(cached) " >&6
14594 else
14595   cat >conftest.$ac_ext <<_ACEOF
14596 /* confdefs.h.  */
14597 _ACEOF
14598 cat confdefs.h >>conftest.$ac_ext
14599 cat >>conftest.$ac_ext <<_ACEOF
14600 /* end confdefs.h.  */
14601
14602 int
14603 main ()
14604 {
14605 /* FIXME: Include the comments suggested by Paul. */
14606 #ifndef __cplusplus
14607   /* Ultrix mips cc rejects this.  */
14608   typedef int charset[2];
14609   const charset cs;
14610   /* SunOS 4.1.1 cc rejects this.  */
14611   char const *const *pcpcc;
14612   char **ppc;
14613   /* NEC SVR4.0.2 mips cc rejects this.  */
14614   struct point {int x, y;};
14615   static struct point const zero = {0,0};
14616   /* AIX XL C 1.02.0.0 rejects this.
14617      It does not let you subtract one const X* pointer from another in
14618      an arm of an if-expression whose if-part is not a constant
14619      expression */
14620   const char *g = "string";
14621   pcpcc = &g + (g ? g-g : 0);
14622   /* HPUX 7.0 cc rejects these. */
14623   ++pcpcc;
14624   ppc = (char**) pcpcc;
14625   pcpcc = (char const *const *) ppc;
14626   { /* SCO 3.2v4 cc rejects this.  */
14627     char *t;
14628     char const *s = 0 ? (char *) 0 : (char const *) 0;
14629
14630     *t++ = 0;
14631     if (s) return 0;
14632   }
14633   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14634     int x[] = {25, 17};
14635     const int *foo = &x[0];
14636     ++foo;
14637   }
14638   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14639     typedef const int *iptr;
14640     iptr p = 0;
14641     ++p;
14642   }
14643   { /* AIX XL C 1.02.0.0 rejects this saying
14644        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14645     struct s { int j; const int *ap[3]; };
14646     struct s *b; b->j = 5;
14647   }
14648   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14649     const int foo = 10;
14650     if (!foo) return 0;
14651   }
14652   return !cs[0] && !zero.x;
14653 #endif
14654
14655   ;
14656   return 0;
14657 }
14658 _ACEOF
14659 rm -f conftest.$ac_objext
14660 if { (ac_try="$ac_compile"
14661 case "(($ac_try" in
14662   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14663   *) ac_try_echo=$ac_try;;
14664 esac
14665 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14666 $as_echo "$ac_try_echo") >&5
14667   (eval "$ac_compile") 2>conftest.er1
14668   ac_status=$?
14669   grep -v '^ *+' conftest.er1 >conftest.err
14670   rm -f conftest.er1
14671   cat conftest.err >&5
14672   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14673   (exit $ac_status); } && {
14674          test -z "$ac_c_werror_flag" ||
14675          test ! -s conftest.err
14676        } && test -s conftest.$ac_objext; then
14677   ac_cv_c_const=yes
14678 else
14679   $as_echo "$as_me: failed program was:" >&5
14680 sed 's/^/| /' conftest.$ac_ext >&5
14681
14682         ac_cv_c_const=no
14683 fi
14684
14685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14686 fi
14687 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14688 $as_echo "$ac_cv_c_const" >&6; }
14689 if test $ac_cv_c_const = no; then
14690
14691 cat >>confdefs.h <<\_ACEOF
14692 #define const /**/
14693 _ACEOF
14694
14695 fi
14696
14697 { $as_echo "$as_me:$LINENO: checking for inline" >&5
14698 $as_echo_n "checking for inline... " >&6; }
14699 if test "${ac_cv_c_inline+set}" = set; then
14700   $as_echo_n "(cached) " >&6
14701 else
14702   ac_cv_c_inline=no
14703 for ac_kw in inline __inline__ __inline; do
14704   cat >conftest.$ac_ext <<_ACEOF
14705 /* confdefs.h.  */
14706 _ACEOF
14707 cat confdefs.h >>conftest.$ac_ext
14708 cat >>conftest.$ac_ext <<_ACEOF
14709 /* end confdefs.h.  */
14710 #ifndef __cplusplus
14711 typedef int foo_t;
14712 static $ac_kw foo_t static_foo () {return 0; }
14713 $ac_kw foo_t foo () {return 0; }
14714 #endif
14715
14716 _ACEOF
14717 rm -f conftest.$ac_objext
14718 if { (ac_try="$ac_compile"
14719 case "(($ac_try" in
14720   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14721   *) ac_try_echo=$ac_try;;
14722 esac
14723 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14724 $as_echo "$ac_try_echo") >&5
14725   (eval "$ac_compile") 2>conftest.er1
14726   ac_status=$?
14727   grep -v '^ *+' conftest.er1 >conftest.err
14728   rm -f conftest.er1
14729   cat conftest.err >&5
14730   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14731   (exit $ac_status); } && {
14732          test -z "$ac_c_werror_flag" ||
14733          test ! -s conftest.err
14734        } && test -s conftest.$ac_objext; then
14735   ac_cv_c_inline=$ac_kw
14736 else
14737   $as_echo "$as_me: failed program was:" >&5
14738 sed 's/^/| /' conftest.$ac_ext >&5
14739
14740
14741 fi
14742
14743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14744   test "$ac_cv_c_inline" != no && break
14745 done
14746
14747 fi
14748 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
14749 $as_echo "$ac_cv_c_inline" >&6; }
14750
14751
14752 case $ac_cv_c_inline in
14753   inline | yes) ;;
14754   *)
14755     case $ac_cv_c_inline in
14756       no) ac_val=;;
14757       *) ac_val=$ac_cv_c_inline;;
14758     esac
14759     cat >>confdefs.h <<_ACEOF
14760 #ifndef __cplusplus
14761 #define inline $ac_val
14762 #endif
14763 _ACEOF
14764     ;;
14765 esac
14766
14767 { $as_echo "$as_me:$LINENO: checking for quiet inline (no complaint if unreferenced)" >&5
14768 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
14769 if test "${pgac_cv_c_inline_quietly+set}" = set; then
14770   $as_echo_n "(cached) " >&6
14771 else
14772   pgac_cv_c_inline_quietly=no
14773   if test "$ac_cv_c_inline" != no; then
14774     pgac_c_inline_save_werror=$ac_c_werror_flag
14775     ac_c_werror_flag=yes
14776     cat >conftest.$ac_ext <<_ACEOF
14777 /* confdefs.h.  */
14778 _ACEOF
14779 cat confdefs.h >>conftest.$ac_ext
14780 cat >>conftest.$ac_ext <<_ACEOF
14781 /* end confdefs.h.  */
14782 static inline int fun () {return 0;}
14783 int
14784 main ()
14785 {
14786
14787   ;
14788   return 0;
14789 }
14790 _ACEOF
14791 rm -f conftest.$ac_objext conftest$ac_exeext
14792 if { (ac_try="$ac_link"
14793 case "(($ac_try" in
14794   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14795   *) ac_try_echo=$ac_try;;
14796 esac
14797 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14798 $as_echo "$ac_try_echo") >&5
14799   (eval "$ac_link") 2>conftest.er1
14800   ac_status=$?
14801   grep -v '^ *+' conftest.er1 >conftest.err
14802   rm -f conftest.er1
14803   cat conftest.err >&5
14804   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14805   (exit $ac_status); } && {
14806          test -z "$ac_c_werror_flag" ||
14807          test ! -s conftest.err
14808        } && test -s conftest$ac_exeext && {
14809          test "$cross_compiling" = yes ||
14810          $as_test_x conftest$ac_exeext
14811        }; then
14812   pgac_cv_c_inline_quietly=yes
14813 else
14814   $as_echo "$as_me: failed program was:" >&5
14815 sed 's/^/| /' conftest.$ac_ext >&5
14816
14817
14818 fi
14819
14820 rm -rf conftest.dSYM
14821 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14822       conftest$ac_exeext conftest.$ac_ext
14823     ac_c_werror_flag=$pgac_c_inline_save_werror
14824   fi
14825 fi
14826 { $as_echo "$as_me:$LINENO: result: $pgac_cv_c_inline_quietly" >&5
14827 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
14828 if test "$pgac_cv_c_inline_quietly" != no; then
14829
14830 cat >>confdefs.h <<_ACEOF
14831 #define USE_INLINE 1
14832 _ACEOF
14833
14834 fi
14835
14836 { $as_echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
14837 $as_echo_n "checking for preprocessor stringizing operator... " >&6; }
14838 if test "${ac_cv_c_stringize+set}" = set; then
14839   $as_echo_n "(cached) " >&6
14840 else
14841   cat >conftest.$ac_ext <<_ACEOF
14842 /* confdefs.h.  */
14843 _ACEOF
14844 cat confdefs.h >>conftest.$ac_ext
14845 cat >>conftest.$ac_ext <<_ACEOF
14846 /* end confdefs.h.  */
14847 #define x(y) #y
14848
14849 char *s = x(teststring);
14850 _ACEOF
14851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14852   $EGREP "#teststring" >/dev/null 2>&1; then
14853   ac_cv_c_stringize=no
14854 else
14855   ac_cv_c_stringize=yes
14856 fi
14857 rm -f conftest*
14858
14859 fi
14860 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
14861 $as_echo "$ac_cv_c_stringize" >&6; }
14862 if test $ac_cv_c_stringize = yes; then
14863
14864 cat >>confdefs.h <<\_ACEOF
14865 #define HAVE_STRINGIZE 1
14866 _ACEOF
14867
14868 fi
14869
14870 { $as_echo "$as_me:$LINENO: checking for signed types" >&5
14871 $as_echo_n "checking for signed types... " >&6; }
14872 if test "${pgac_cv_c_signed+set}" = set; then
14873   $as_echo_n "(cached) " >&6
14874 else
14875   cat >conftest.$ac_ext <<_ACEOF
14876 /* confdefs.h.  */
14877 _ACEOF
14878 cat confdefs.h >>conftest.$ac_ext
14879 cat >>conftest.$ac_ext <<_ACEOF
14880 /* end confdefs.h.  */
14881
14882 int
14883 main ()
14884 {
14885 signed char c; signed short s; signed int i;
14886   ;
14887   return 0;
14888 }
14889 _ACEOF
14890 rm -f conftest.$ac_objext
14891 if { (ac_try="$ac_compile"
14892 case "(($ac_try" in
14893   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14894   *) ac_try_echo=$ac_try;;
14895 esac
14896 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14897 $as_echo "$ac_try_echo") >&5
14898   (eval "$ac_compile") 2>conftest.er1
14899   ac_status=$?
14900   grep -v '^ *+' conftest.er1 >conftest.err
14901   rm -f conftest.er1
14902   cat conftest.err >&5
14903   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14904   (exit $ac_status); } && {
14905          test -z "$ac_c_werror_flag" ||
14906          test ! -s conftest.err
14907        } && test -s conftest.$ac_objext; then
14908   pgac_cv_c_signed=yes
14909 else
14910   $as_echo "$as_me: failed program was:" >&5
14911 sed 's/^/| /' conftest.$ac_ext >&5
14912
14913         pgac_cv_c_signed=no
14914 fi
14915
14916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14917 fi
14918 { $as_echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
14919 $as_echo "$pgac_cv_c_signed" >&6; }
14920 if test x"$pgac_cv_c_signed" = xno ; then
14921
14922 cat >>confdefs.h <<\_ACEOF
14923 #define signed /**/
14924 _ACEOF
14925
14926 fi
14927 { $as_echo "$as_me:$LINENO: checking for working volatile" >&5
14928 $as_echo_n "checking for working volatile... " >&6; }
14929 if test "${ac_cv_c_volatile+set}" = set; then
14930   $as_echo_n "(cached) " >&6
14931 else
14932   cat >conftest.$ac_ext <<_ACEOF
14933 /* confdefs.h.  */
14934 _ACEOF
14935 cat confdefs.h >>conftest.$ac_ext
14936 cat >>conftest.$ac_ext <<_ACEOF
14937 /* end confdefs.h.  */
14938
14939 int
14940 main ()
14941 {
14942
14943 volatile int x;
14944 int * volatile y = (int *) 0;
14945 return !x && !y;
14946   ;
14947   return 0;
14948 }
14949 _ACEOF
14950 rm -f conftest.$ac_objext
14951 if { (ac_try="$ac_compile"
14952 case "(($ac_try" in
14953   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14954   *) ac_try_echo=$ac_try;;
14955 esac
14956 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14957 $as_echo "$ac_try_echo") >&5
14958   (eval "$ac_compile") 2>conftest.er1
14959   ac_status=$?
14960   grep -v '^ *+' conftest.er1 >conftest.err
14961   rm -f conftest.er1
14962   cat conftest.err >&5
14963   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14964   (exit $ac_status); } && {
14965          test -z "$ac_c_werror_flag" ||
14966          test ! -s conftest.err
14967        } && test -s conftest.$ac_objext; then
14968   ac_cv_c_volatile=yes
14969 else
14970   $as_echo "$as_me: failed program was:" >&5
14971 sed 's/^/| /' conftest.$ac_ext >&5
14972
14973         ac_cv_c_volatile=no
14974 fi
14975
14976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14977 fi
14978 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
14979 $as_echo "$ac_cv_c_volatile" >&6; }
14980 if test $ac_cv_c_volatile = no; then
14981
14982 cat >>confdefs.h <<\_ACEOF
14983 #define volatile /**/
14984 _ACEOF
14985
14986 fi
14987
14988 { $as_echo "$as_me:$LINENO: checking for __func__" >&5
14989 $as_echo_n "checking for __func__... " >&6; }
14990 if test "${pgac_cv_funcname_func_support+set}" = set; then
14991   $as_echo_n "(cached) " >&6
14992 else
14993   cat >conftest.$ac_ext <<_ACEOF
14994 /* confdefs.h.  */
14995 _ACEOF
14996 cat confdefs.h >>conftest.$ac_ext
14997 cat >>conftest.$ac_ext <<_ACEOF
14998 /* end confdefs.h.  */
14999 #include <stdio.h>
15000 int
15001 main ()
15002 {
15003 printf("%s\n", __func__);
15004   ;
15005   return 0;
15006 }
15007 _ACEOF
15008 rm -f conftest.$ac_objext
15009 if { (ac_try="$ac_compile"
15010 case "(($ac_try" in
15011   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15012   *) ac_try_echo=$ac_try;;
15013 esac
15014 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15015 $as_echo "$ac_try_echo") >&5
15016   (eval "$ac_compile") 2>conftest.er1
15017   ac_status=$?
15018   grep -v '^ *+' conftest.er1 >conftest.err
15019   rm -f conftest.er1
15020   cat conftest.err >&5
15021   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15022   (exit $ac_status); } && {
15023          test -z "$ac_c_werror_flag" ||
15024          test ! -s conftest.err
15025        } && test -s conftest.$ac_objext; then
15026   pgac_cv_funcname_func_support=yes
15027 else
15028   $as_echo "$as_me: failed program was:" >&5
15029 sed 's/^/| /' conftest.$ac_ext >&5
15030
15031         pgac_cv_funcname_func_support=no
15032 fi
15033
15034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15035 fi
15036 { $as_echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
15037 $as_echo "$pgac_cv_funcname_func_support" >&6; }
15038 if test x"$pgac_cv_funcname_func_support" = xyes ; then
15039
15040 cat >>confdefs.h <<\_ACEOF
15041 #define HAVE_FUNCNAME__FUNC 1
15042 _ACEOF
15043
15044 else
15045 { $as_echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
15046 $as_echo_n "checking for __FUNCTION__... " >&6; }
15047 if test "${pgac_cv_funcname_function_support+set}" = set; then
15048   $as_echo_n "(cached) " >&6
15049 else
15050   cat >conftest.$ac_ext <<_ACEOF
15051 /* confdefs.h.  */
15052 _ACEOF
15053 cat confdefs.h >>conftest.$ac_ext
15054 cat >>conftest.$ac_ext <<_ACEOF
15055 /* end confdefs.h.  */
15056 #include <stdio.h>
15057 int
15058 main ()
15059 {
15060 printf("%s\n", __FUNCTION__);
15061   ;
15062   return 0;
15063 }
15064 _ACEOF
15065 rm -f conftest.$ac_objext
15066 if { (ac_try="$ac_compile"
15067 case "(($ac_try" in
15068   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15069   *) ac_try_echo=$ac_try;;
15070 esac
15071 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15072 $as_echo "$ac_try_echo") >&5
15073   (eval "$ac_compile") 2>conftest.er1
15074   ac_status=$?
15075   grep -v '^ *+' conftest.er1 >conftest.err
15076   rm -f conftest.er1
15077   cat conftest.err >&5
15078   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15079   (exit $ac_status); } && {
15080          test -z "$ac_c_werror_flag" ||
15081          test ! -s conftest.err
15082        } && test -s conftest.$ac_objext; then
15083   pgac_cv_funcname_function_support=yes
15084 else
15085   $as_echo "$as_me: failed program was:" >&5
15086 sed 's/^/| /' conftest.$ac_ext >&5
15087
15088         pgac_cv_funcname_function_support=no
15089 fi
15090
15091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15092 fi
15093 { $as_echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
15094 $as_echo "$pgac_cv_funcname_function_support" >&6; }
15095 if test x"$pgac_cv_funcname_function_support" = xyes ; then
15096
15097 cat >>confdefs.h <<\_ACEOF
15098 #define HAVE_FUNCNAME__FUNCTION 1
15099 _ACEOF
15100
15101 fi
15102 fi
15103 { $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15104 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
15105 if test "${ac_cv_struct_tm+set}" = set; then
15106   $as_echo_n "(cached) " >&6
15107 else
15108   cat >conftest.$ac_ext <<_ACEOF
15109 /* confdefs.h.  */
15110 _ACEOF
15111 cat confdefs.h >>conftest.$ac_ext
15112 cat >>conftest.$ac_ext <<_ACEOF
15113 /* end confdefs.h.  */
15114 #include <sys/types.h>
15115 #include <time.h>
15116
15117 int
15118 main ()
15119 {
15120 struct tm tm;
15121                                      int *p = &tm.tm_sec;
15122                                      return !p;
15123   ;
15124   return 0;
15125 }
15126 _ACEOF
15127 rm -f conftest.$ac_objext
15128 if { (ac_try="$ac_compile"
15129 case "(($ac_try" in
15130   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15131   *) ac_try_echo=$ac_try;;
15132 esac
15133 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15134 $as_echo "$ac_try_echo") >&5
15135   (eval "$ac_compile") 2>conftest.er1
15136   ac_status=$?
15137   grep -v '^ *+' conftest.er1 >conftest.err
15138   rm -f conftest.er1
15139   cat conftest.err >&5
15140   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15141   (exit $ac_status); } && {
15142          test -z "$ac_c_werror_flag" ||
15143          test ! -s conftest.err
15144        } && test -s conftest.$ac_objext; then
15145   ac_cv_struct_tm=time.h
15146 else
15147   $as_echo "$as_me: failed program was:" >&5
15148 sed 's/^/| /' conftest.$ac_ext >&5
15149
15150         ac_cv_struct_tm=sys/time.h
15151 fi
15152
15153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15154 fi
15155 { $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
15156 $as_echo "$ac_cv_struct_tm" >&6; }
15157 if test $ac_cv_struct_tm = sys/time.h; then
15158
15159 cat >>confdefs.h <<\_ACEOF
15160 #define TM_IN_SYS_TIME 1
15161 _ACEOF
15162
15163 fi
15164
15165 { $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
15166 $as_echo_n "checking for struct tm.tm_zone... " >&6; }
15167 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
15168   $as_echo_n "(cached) " >&6
15169 else
15170   cat >conftest.$ac_ext <<_ACEOF
15171 /* confdefs.h.  */
15172 _ACEOF
15173 cat confdefs.h >>conftest.$ac_ext
15174 cat >>conftest.$ac_ext <<_ACEOF
15175 /* end confdefs.h.  */
15176 #include <sys/types.h>
15177 #include <$ac_cv_struct_tm>
15178
15179
15180 int
15181 main ()
15182 {
15183 static struct tm ac_aggr;
15184 if (ac_aggr.tm_zone)
15185 return 0;
15186   ;
15187   return 0;
15188 }
15189 _ACEOF
15190 rm -f conftest.$ac_objext
15191 if { (ac_try="$ac_compile"
15192 case "(($ac_try" in
15193   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15194   *) ac_try_echo=$ac_try;;
15195 esac
15196 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15197 $as_echo "$ac_try_echo") >&5
15198   (eval "$ac_compile") 2>conftest.er1
15199   ac_status=$?
15200   grep -v '^ *+' conftest.er1 >conftest.err
15201   rm -f conftest.er1
15202   cat conftest.err >&5
15203   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15204   (exit $ac_status); } && {
15205          test -z "$ac_c_werror_flag" ||
15206          test ! -s conftest.err
15207        } && test -s conftest.$ac_objext; then
15208   ac_cv_member_struct_tm_tm_zone=yes
15209 else
15210   $as_echo "$as_me: failed program was:" >&5
15211 sed 's/^/| /' conftest.$ac_ext >&5
15212
15213         cat >conftest.$ac_ext <<_ACEOF
15214 /* confdefs.h.  */
15215 _ACEOF
15216 cat confdefs.h >>conftest.$ac_ext
15217 cat >>conftest.$ac_ext <<_ACEOF
15218 /* end confdefs.h.  */
15219 #include <sys/types.h>
15220 #include <$ac_cv_struct_tm>
15221
15222
15223 int
15224 main ()
15225 {
15226 static struct tm ac_aggr;
15227 if (sizeof ac_aggr.tm_zone)
15228 return 0;
15229   ;
15230   return 0;
15231 }
15232 _ACEOF
15233 rm -f conftest.$ac_objext
15234 if { (ac_try="$ac_compile"
15235 case "(($ac_try" in
15236   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15237   *) ac_try_echo=$ac_try;;
15238 esac
15239 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15240 $as_echo "$ac_try_echo") >&5
15241   (eval "$ac_compile") 2>conftest.er1
15242   ac_status=$?
15243   grep -v '^ *+' conftest.er1 >conftest.err
15244   rm -f conftest.er1
15245   cat conftest.err >&5
15246   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15247   (exit $ac_status); } && {
15248          test -z "$ac_c_werror_flag" ||
15249          test ! -s conftest.err
15250        } && test -s conftest.$ac_objext; then
15251   ac_cv_member_struct_tm_tm_zone=yes
15252 else
15253   $as_echo "$as_me: failed program was:" >&5
15254 sed 's/^/| /' conftest.$ac_ext >&5
15255
15256         ac_cv_member_struct_tm_tm_zone=no
15257 fi
15258
15259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15260 fi
15261
15262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15263 fi
15264 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
15265 $as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
15266 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
15267
15268 cat >>confdefs.h <<_ACEOF
15269 #define HAVE_STRUCT_TM_TM_ZONE 1
15270 _ACEOF
15271
15272
15273 fi
15274
15275 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15276
15277 cat >>confdefs.h <<\_ACEOF
15278 #define HAVE_TM_ZONE 1
15279 _ACEOF
15280
15281 fi
15282 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
15283 $as_echo_n "checking for tzname... " >&6; }
15284 if test "${ac_cv_var_tzname+set}" = set; then
15285   $as_echo_n "(cached) " >&6
15286 else
15287   cat >conftest.$ac_ext <<_ACEOF
15288 /* confdefs.h.  */
15289 _ACEOF
15290 cat confdefs.h >>conftest.$ac_ext
15291 cat >>conftest.$ac_ext <<_ACEOF
15292 /* end confdefs.h.  */
15293 #include <time.h>
15294 #ifndef tzname /* For SGI.  */
15295 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
15296 #endif
15297
15298 int
15299 main ()
15300 {
15301 atoi(*tzname);
15302   ;
15303   return 0;
15304 }
15305 _ACEOF
15306 rm -f conftest.$ac_objext conftest$ac_exeext
15307 if { (ac_try="$ac_link"
15308 case "(($ac_try" in
15309   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15310   *) ac_try_echo=$ac_try;;
15311 esac
15312 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15313 $as_echo "$ac_try_echo") >&5
15314   (eval "$ac_link") 2>conftest.er1
15315   ac_status=$?
15316   grep -v '^ *+' conftest.er1 >conftest.err
15317   rm -f conftest.er1
15318   cat conftest.err >&5
15319   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15320   (exit $ac_status); } && {
15321          test -z "$ac_c_werror_flag" ||
15322          test ! -s conftest.err
15323        } && test -s conftest$ac_exeext && {
15324          test "$cross_compiling" = yes ||
15325          $as_test_x conftest$ac_exeext
15326        }; then
15327   ac_cv_var_tzname=yes
15328 else
15329   $as_echo "$as_me: failed program was:" >&5
15330 sed 's/^/| /' conftest.$ac_ext >&5
15331
15332         ac_cv_var_tzname=no
15333 fi
15334
15335 rm -rf conftest.dSYM
15336 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15337       conftest$ac_exeext conftest.$ac_ext
15338 fi
15339 { $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
15340 $as_echo "$ac_cv_var_tzname" >&6; }
15341 if test $ac_cv_var_tzname = yes; then
15342
15343 cat >>confdefs.h <<\_ACEOF
15344 #define HAVE_TZNAME 1
15345 _ACEOF
15346
15347 fi
15348
15349 { $as_echo "$as_me:$LINENO: checking for union semun" >&5
15350 $as_echo_n "checking for union semun... " >&6; }
15351 if test "${ac_cv_type_union_semun+set}" = set; then
15352   $as_echo_n "(cached) " >&6
15353 else
15354   ac_cv_type_union_semun=no
15355 cat >conftest.$ac_ext <<_ACEOF
15356 /* confdefs.h.  */
15357 _ACEOF
15358 cat confdefs.h >>conftest.$ac_ext
15359 cat >>conftest.$ac_ext <<_ACEOF
15360 /* end confdefs.h.  */
15361 #include <sys/types.h>
15362 #include <sys/ipc.h>
15363 #include <sys/sem.h>
15364
15365 int
15366 main ()
15367 {
15368 if (sizeof (union semun))
15369        return 0;
15370   ;
15371   return 0;
15372 }
15373 _ACEOF
15374 rm -f conftest.$ac_objext
15375 if { (ac_try="$ac_compile"
15376 case "(($ac_try" in
15377   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15378   *) ac_try_echo=$ac_try;;
15379 esac
15380 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15381 $as_echo "$ac_try_echo") >&5
15382   (eval "$ac_compile") 2>conftest.er1
15383   ac_status=$?
15384   grep -v '^ *+' conftest.er1 >conftest.err
15385   rm -f conftest.er1
15386   cat conftest.err >&5
15387   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15388   (exit $ac_status); } && {
15389          test -z "$ac_c_werror_flag" ||
15390          test ! -s conftest.err
15391        } && test -s conftest.$ac_objext; then
15392   cat >conftest.$ac_ext <<_ACEOF
15393 /* confdefs.h.  */
15394 _ACEOF
15395 cat confdefs.h >>conftest.$ac_ext
15396 cat >>conftest.$ac_ext <<_ACEOF
15397 /* end confdefs.h.  */
15398 #include <sys/types.h>
15399 #include <sys/ipc.h>
15400 #include <sys/sem.h>
15401
15402 int
15403 main ()
15404 {
15405 if (sizeof ((union semun)))
15406           return 0;
15407   ;
15408   return 0;
15409 }
15410 _ACEOF
15411 rm -f conftest.$ac_objext
15412 if { (ac_try="$ac_compile"
15413 case "(($ac_try" in
15414   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15415   *) ac_try_echo=$ac_try;;
15416 esac
15417 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15418 $as_echo "$ac_try_echo") >&5
15419   (eval "$ac_compile") 2>conftest.er1
15420   ac_status=$?
15421   grep -v '^ *+' conftest.er1 >conftest.err
15422   rm -f conftest.er1
15423   cat conftest.err >&5
15424   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15425   (exit $ac_status); } && {
15426          test -z "$ac_c_werror_flag" ||
15427          test ! -s conftest.err
15428        } && test -s conftest.$ac_objext; then
15429   :
15430 else
15431   $as_echo "$as_me: failed program was:" >&5
15432 sed 's/^/| /' conftest.$ac_ext >&5
15433
15434         ac_cv_type_union_semun=yes
15435 fi
15436
15437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15438 else
15439   $as_echo "$as_me: failed program was:" >&5
15440 sed 's/^/| /' conftest.$ac_ext >&5
15441
15442
15443 fi
15444
15445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15446 fi
15447 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
15448 $as_echo "$ac_cv_type_union_semun" >&6; }
15449 if test "x$ac_cv_type_union_semun" = x""yes; then
15450
15451 cat >>confdefs.h <<_ACEOF
15452 #define HAVE_UNION_SEMUN 1
15453 _ACEOF
15454
15455
15456 fi
15457
15458 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
15459 $as_echo_n "checking for struct sockaddr_un... " >&6; }
15460 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
15461   $as_echo_n "(cached) " >&6
15462 else
15463   ac_cv_type_struct_sockaddr_un=no
15464 cat >conftest.$ac_ext <<_ACEOF
15465 /* confdefs.h.  */
15466 _ACEOF
15467 cat confdefs.h >>conftest.$ac_ext
15468 cat >>conftest.$ac_ext <<_ACEOF
15469 /* end confdefs.h.  */
15470 #include <sys/types.h>
15471 #ifdef HAVE_SYS_UN_H
15472 #include <sys/un.h>
15473 #endif
15474
15475
15476 int
15477 main ()
15478 {
15479 if (sizeof (struct sockaddr_un))
15480        return 0;
15481   ;
15482   return 0;
15483 }
15484 _ACEOF
15485 rm -f conftest.$ac_objext
15486 if { (ac_try="$ac_compile"
15487 case "(($ac_try" in
15488   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15489   *) ac_try_echo=$ac_try;;
15490 esac
15491 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15492 $as_echo "$ac_try_echo") >&5
15493   (eval "$ac_compile") 2>conftest.er1
15494   ac_status=$?
15495   grep -v '^ *+' conftest.er1 >conftest.err
15496   rm -f conftest.er1
15497   cat conftest.err >&5
15498   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15499   (exit $ac_status); } && {
15500          test -z "$ac_c_werror_flag" ||
15501          test ! -s conftest.err
15502        } && test -s conftest.$ac_objext; then
15503   cat >conftest.$ac_ext <<_ACEOF
15504 /* confdefs.h.  */
15505 _ACEOF
15506 cat confdefs.h >>conftest.$ac_ext
15507 cat >>conftest.$ac_ext <<_ACEOF
15508 /* end confdefs.h.  */
15509 #include <sys/types.h>
15510 #ifdef HAVE_SYS_UN_H
15511 #include <sys/un.h>
15512 #endif
15513
15514
15515 int
15516 main ()
15517 {
15518 if (sizeof ((struct sockaddr_un)))
15519           return 0;
15520   ;
15521   return 0;
15522 }
15523 _ACEOF
15524 rm -f conftest.$ac_objext
15525 if { (ac_try="$ac_compile"
15526 case "(($ac_try" in
15527   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15528   *) ac_try_echo=$ac_try;;
15529 esac
15530 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15531 $as_echo "$ac_try_echo") >&5
15532   (eval "$ac_compile") 2>conftest.er1
15533   ac_status=$?
15534   grep -v '^ *+' conftest.er1 >conftest.err
15535   rm -f conftest.er1
15536   cat conftest.err >&5
15537   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15538   (exit $ac_status); } && {
15539          test -z "$ac_c_werror_flag" ||
15540          test ! -s conftest.err
15541        } && test -s conftest.$ac_objext; then
15542   :
15543 else
15544   $as_echo "$as_me: failed program was:" >&5
15545 sed 's/^/| /' conftest.$ac_ext >&5
15546
15547         ac_cv_type_struct_sockaddr_un=yes
15548 fi
15549
15550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15551 else
15552   $as_echo "$as_me: failed program was:" >&5
15553 sed 's/^/| /' conftest.$ac_ext >&5
15554
15555
15556 fi
15557
15558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15559 fi
15560 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
15561 $as_echo "$ac_cv_type_struct_sockaddr_un" >&6; }
15562 if test "x$ac_cv_type_struct_sockaddr_un" = x""yes; then
15563
15564 cat >>confdefs.h <<_ACEOF
15565 #define HAVE_STRUCT_SOCKADDR_UN 1
15566 _ACEOF
15567
15568
15569 cat >>confdefs.h <<\_ACEOF
15570 #define HAVE_UNIX_SOCKETS 1
15571 _ACEOF
15572
15573 fi
15574
15575 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
15576 $as_echo_n "checking for struct sockaddr_storage... " >&6; }
15577 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
15578   $as_echo_n "(cached) " >&6
15579 else
15580   ac_cv_type_struct_sockaddr_storage=no
15581 cat >conftest.$ac_ext <<_ACEOF
15582 /* confdefs.h.  */
15583 _ACEOF
15584 cat confdefs.h >>conftest.$ac_ext
15585 cat >>conftest.$ac_ext <<_ACEOF
15586 /* end confdefs.h.  */
15587 #include <sys/types.h>
15588 #ifdef HAVE_SYS_SOCKET_H
15589 #include <sys/socket.h>
15590 #endif
15591
15592
15593 int
15594 main ()
15595 {
15596 if (sizeof (struct sockaddr_storage))
15597        return 0;
15598   ;
15599   return 0;
15600 }
15601 _ACEOF
15602 rm -f conftest.$ac_objext
15603 if { (ac_try="$ac_compile"
15604 case "(($ac_try" in
15605   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15606   *) ac_try_echo=$ac_try;;
15607 esac
15608 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15609 $as_echo "$ac_try_echo") >&5
15610   (eval "$ac_compile") 2>conftest.er1
15611   ac_status=$?
15612   grep -v '^ *+' conftest.er1 >conftest.err
15613   rm -f conftest.er1
15614   cat conftest.err >&5
15615   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15616   (exit $ac_status); } && {
15617          test -z "$ac_c_werror_flag" ||
15618          test ! -s conftest.err
15619        } && test -s conftest.$ac_objext; then
15620   cat >conftest.$ac_ext <<_ACEOF
15621 /* confdefs.h.  */
15622 _ACEOF
15623 cat confdefs.h >>conftest.$ac_ext
15624 cat >>conftest.$ac_ext <<_ACEOF
15625 /* end confdefs.h.  */
15626 #include <sys/types.h>
15627 #ifdef HAVE_SYS_SOCKET_H
15628 #include <sys/socket.h>
15629 #endif
15630
15631
15632 int
15633 main ()
15634 {
15635 if (sizeof ((struct sockaddr_storage)))
15636           return 0;
15637   ;
15638   return 0;
15639 }
15640 _ACEOF
15641 rm -f conftest.$ac_objext
15642 if { (ac_try="$ac_compile"
15643 case "(($ac_try" in
15644   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15645   *) ac_try_echo=$ac_try;;
15646 esac
15647 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15648 $as_echo "$ac_try_echo") >&5
15649   (eval "$ac_compile") 2>conftest.er1
15650   ac_status=$?
15651   grep -v '^ *+' conftest.er1 >conftest.err
15652   rm -f conftest.er1
15653   cat conftest.err >&5
15654   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15655   (exit $ac_status); } && {
15656          test -z "$ac_c_werror_flag" ||
15657          test ! -s conftest.err
15658        } && test -s conftest.$ac_objext; then
15659   :
15660 else
15661   $as_echo "$as_me: failed program was:" >&5
15662 sed 's/^/| /' conftest.$ac_ext >&5
15663
15664         ac_cv_type_struct_sockaddr_storage=yes
15665 fi
15666
15667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15668 else
15669   $as_echo "$as_me: failed program was:" >&5
15670 sed 's/^/| /' conftest.$ac_ext >&5
15671
15672
15673 fi
15674
15675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15676 fi
15677 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
15678 $as_echo "$ac_cv_type_struct_sockaddr_storage" >&6; }
15679 if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then
15680
15681 cat >>confdefs.h <<_ACEOF
15682 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
15683 _ACEOF
15684
15685
15686 fi
15687
15688 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
15689 $as_echo_n "checking for struct sockaddr_storage.ss_family... " >&6; }
15690 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
15691   $as_echo_n "(cached) " >&6
15692 else
15693   cat >conftest.$ac_ext <<_ACEOF
15694 /* confdefs.h.  */
15695 _ACEOF
15696 cat confdefs.h >>conftest.$ac_ext
15697 cat >>conftest.$ac_ext <<_ACEOF
15698 /* end confdefs.h.  */
15699 #include <sys/types.h>
15700 #ifdef HAVE_SYS_SOCKET_H
15701 #include <sys/socket.h>
15702 #endif
15703
15704
15705 int
15706 main ()
15707 {
15708 static struct sockaddr_storage ac_aggr;
15709 if (ac_aggr.ss_family)
15710 return 0;
15711   ;
15712   return 0;
15713 }
15714 _ACEOF
15715 rm -f conftest.$ac_objext
15716 if { (ac_try="$ac_compile"
15717 case "(($ac_try" in
15718   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15719   *) ac_try_echo=$ac_try;;
15720 esac
15721 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15722 $as_echo "$ac_try_echo") >&5
15723   (eval "$ac_compile") 2>conftest.er1
15724   ac_status=$?
15725   grep -v '^ *+' conftest.er1 >conftest.err
15726   rm -f conftest.er1
15727   cat conftest.err >&5
15728   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15729   (exit $ac_status); } && {
15730          test -z "$ac_c_werror_flag" ||
15731          test ! -s conftest.err
15732        } && test -s conftest.$ac_objext; then
15733   ac_cv_member_struct_sockaddr_storage_ss_family=yes
15734 else
15735   $as_echo "$as_me: failed program was:" >&5
15736 sed 's/^/| /' conftest.$ac_ext >&5
15737
15738         cat >conftest.$ac_ext <<_ACEOF
15739 /* confdefs.h.  */
15740 _ACEOF
15741 cat confdefs.h >>conftest.$ac_ext
15742 cat >>conftest.$ac_ext <<_ACEOF
15743 /* end confdefs.h.  */
15744 #include <sys/types.h>
15745 #ifdef HAVE_SYS_SOCKET_H
15746 #include <sys/socket.h>
15747 #endif
15748
15749
15750 int
15751 main ()
15752 {
15753 static struct sockaddr_storage ac_aggr;
15754 if (sizeof ac_aggr.ss_family)
15755 return 0;
15756   ;
15757   return 0;
15758 }
15759 _ACEOF
15760 rm -f conftest.$ac_objext
15761 if { (ac_try="$ac_compile"
15762 case "(($ac_try" in
15763   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15764   *) ac_try_echo=$ac_try;;
15765 esac
15766 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15767 $as_echo "$ac_try_echo") >&5
15768   (eval "$ac_compile") 2>conftest.er1
15769   ac_status=$?
15770   grep -v '^ *+' conftest.er1 >conftest.err
15771   rm -f conftest.er1
15772   cat conftest.err >&5
15773   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15774   (exit $ac_status); } && {
15775          test -z "$ac_c_werror_flag" ||
15776          test ! -s conftest.err
15777        } && test -s conftest.$ac_objext; then
15778   ac_cv_member_struct_sockaddr_storage_ss_family=yes
15779 else
15780   $as_echo "$as_me: failed program was:" >&5
15781 sed 's/^/| /' conftest.$ac_ext >&5
15782
15783         ac_cv_member_struct_sockaddr_storage_ss_family=no
15784 fi
15785
15786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15787 fi
15788
15789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15790 fi
15791 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
15792 $as_echo "$ac_cv_member_struct_sockaddr_storage_ss_family" >&6; }
15793 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = x""yes; then
15794
15795 cat >>confdefs.h <<_ACEOF
15796 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
15797 _ACEOF
15798
15799
15800 fi
15801 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
15802 $as_echo_n "checking for struct sockaddr_storage.__ss_family... " >&6; }
15803 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
15804   $as_echo_n "(cached) " >&6
15805 else
15806   cat >conftest.$ac_ext <<_ACEOF
15807 /* confdefs.h.  */
15808 _ACEOF
15809 cat confdefs.h >>conftest.$ac_ext
15810 cat >>conftest.$ac_ext <<_ACEOF
15811 /* end confdefs.h.  */
15812 #include <sys/types.h>
15813 #ifdef HAVE_SYS_SOCKET_H
15814 #include <sys/socket.h>
15815 #endif
15816
15817
15818 int
15819 main ()
15820 {
15821 static struct sockaddr_storage ac_aggr;
15822 if (ac_aggr.__ss_family)
15823 return 0;
15824   ;
15825   return 0;
15826 }
15827 _ACEOF
15828 rm -f conftest.$ac_objext
15829 if { (ac_try="$ac_compile"
15830 case "(($ac_try" in
15831   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15832   *) ac_try_echo=$ac_try;;
15833 esac
15834 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15835 $as_echo "$ac_try_echo") >&5
15836   (eval "$ac_compile") 2>conftest.er1
15837   ac_status=$?
15838   grep -v '^ *+' conftest.er1 >conftest.err
15839   rm -f conftest.er1
15840   cat conftest.err >&5
15841   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15842   (exit $ac_status); } && {
15843          test -z "$ac_c_werror_flag" ||
15844          test ! -s conftest.err
15845        } && test -s conftest.$ac_objext; then
15846   ac_cv_member_struct_sockaddr_storage___ss_family=yes
15847 else
15848   $as_echo "$as_me: failed program was:" >&5
15849 sed 's/^/| /' conftest.$ac_ext >&5
15850
15851         cat >conftest.$ac_ext <<_ACEOF
15852 /* confdefs.h.  */
15853 _ACEOF
15854 cat confdefs.h >>conftest.$ac_ext
15855 cat >>conftest.$ac_ext <<_ACEOF
15856 /* end confdefs.h.  */
15857 #include <sys/types.h>
15858 #ifdef HAVE_SYS_SOCKET_H
15859 #include <sys/socket.h>
15860 #endif
15861
15862
15863 int
15864 main ()
15865 {
15866 static struct sockaddr_storage ac_aggr;
15867 if (sizeof ac_aggr.__ss_family)
15868 return 0;
15869   ;
15870   return 0;
15871 }
15872 _ACEOF
15873 rm -f conftest.$ac_objext
15874 if { (ac_try="$ac_compile"
15875 case "(($ac_try" in
15876   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15877   *) ac_try_echo=$ac_try;;
15878 esac
15879 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15880 $as_echo "$ac_try_echo") >&5
15881   (eval "$ac_compile") 2>conftest.er1
15882   ac_status=$?
15883   grep -v '^ *+' conftest.er1 >conftest.err
15884   rm -f conftest.er1
15885   cat conftest.err >&5
15886   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15887   (exit $ac_status); } && {
15888          test -z "$ac_c_werror_flag" ||
15889          test ! -s conftest.err
15890        } && test -s conftest.$ac_objext; then
15891   ac_cv_member_struct_sockaddr_storage___ss_family=yes
15892 else
15893   $as_echo "$as_me: failed program was:" >&5
15894 sed 's/^/| /' conftest.$ac_ext >&5
15895
15896         ac_cv_member_struct_sockaddr_storage___ss_family=no
15897 fi
15898
15899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15900 fi
15901
15902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15903 fi
15904 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
15905 $as_echo "$ac_cv_member_struct_sockaddr_storage___ss_family" >&6; }
15906 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = x""yes; then
15907
15908 cat >>confdefs.h <<_ACEOF
15909 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
15910 _ACEOF
15911
15912
15913 fi
15914 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
15915 $as_echo_n "checking for struct sockaddr_storage.ss_len... " >&6; }
15916 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
15917   $as_echo_n "(cached) " >&6
15918 else
15919   cat >conftest.$ac_ext <<_ACEOF
15920 /* confdefs.h.  */
15921 _ACEOF
15922 cat confdefs.h >>conftest.$ac_ext
15923 cat >>conftest.$ac_ext <<_ACEOF
15924 /* end confdefs.h.  */
15925 #include <sys/types.h>
15926 #ifdef HAVE_SYS_SOCKET_H
15927 #include <sys/socket.h>
15928 #endif
15929
15930
15931 int
15932 main ()
15933 {
15934 static struct sockaddr_storage ac_aggr;
15935 if (ac_aggr.ss_len)
15936 return 0;
15937   ;
15938   return 0;
15939 }
15940 _ACEOF
15941 rm -f conftest.$ac_objext
15942 if { (ac_try="$ac_compile"
15943 case "(($ac_try" in
15944   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15945   *) ac_try_echo=$ac_try;;
15946 esac
15947 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15948 $as_echo "$ac_try_echo") >&5
15949   (eval "$ac_compile") 2>conftest.er1
15950   ac_status=$?
15951   grep -v '^ *+' conftest.er1 >conftest.err
15952   rm -f conftest.er1
15953   cat conftest.err >&5
15954   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15955   (exit $ac_status); } && {
15956          test -z "$ac_c_werror_flag" ||
15957          test ! -s conftest.err
15958        } && test -s conftest.$ac_objext; then
15959   ac_cv_member_struct_sockaddr_storage_ss_len=yes
15960 else
15961   $as_echo "$as_me: failed program was:" >&5
15962 sed 's/^/| /' conftest.$ac_ext >&5
15963
15964         cat >conftest.$ac_ext <<_ACEOF
15965 /* confdefs.h.  */
15966 _ACEOF
15967 cat confdefs.h >>conftest.$ac_ext
15968 cat >>conftest.$ac_ext <<_ACEOF
15969 /* end confdefs.h.  */
15970 #include <sys/types.h>
15971 #ifdef HAVE_SYS_SOCKET_H
15972 #include <sys/socket.h>
15973 #endif
15974
15975
15976 int
15977 main ()
15978 {
15979 static struct sockaddr_storage ac_aggr;
15980 if (sizeof ac_aggr.ss_len)
15981 return 0;
15982   ;
15983   return 0;
15984 }
15985 _ACEOF
15986 rm -f conftest.$ac_objext
15987 if { (ac_try="$ac_compile"
15988 case "(($ac_try" in
15989   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15990   *) ac_try_echo=$ac_try;;
15991 esac
15992 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15993 $as_echo "$ac_try_echo") >&5
15994   (eval "$ac_compile") 2>conftest.er1
15995   ac_status=$?
15996   grep -v '^ *+' conftest.er1 >conftest.err
15997   rm -f conftest.er1
15998   cat conftest.err >&5
15999   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16000   (exit $ac_status); } && {
16001          test -z "$ac_c_werror_flag" ||
16002          test ! -s conftest.err
16003        } && test -s conftest.$ac_objext; then
16004   ac_cv_member_struct_sockaddr_storage_ss_len=yes
16005 else
16006   $as_echo "$as_me: failed program was:" >&5
16007 sed 's/^/| /' conftest.$ac_ext >&5
16008
16009         ac_cv_member_struct_sockaddr_storage_ss_len=no
16010 fi
16011
16012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16013 fi
16014
16015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16016 fi
16017 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
16018 $as_echo "$ac_cv_member_struct_sockaddr_storage_ss_len" >&6; }
16019 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = x""yes; then
16020
16021 cat >>confdefs.h <<_ACEOF
16022 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
16023 _ACEOF
16024
16025
16026 fi
16027 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
16028 $as_echo_n "checking for struct sockaddr_storage.__ss_len... " >&6; }
16029 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
16030   $as_echo_n "(cached) " >&6
16031 else
16032   cat >conftest.$ac_ext <<_ACEOF
16033 /* confdefs.h.  */
16034 _ACEOF
16035 cat confdefs.h >>conftest.$ac_ext
16036 cat >>conftest.$ac_ext <<_ACEOF
16037 /* end confdefs.h.  */
16038 #include <sys/types.h>
16039 #ifdef HAVE_SYS_SOCKET_H
16040 #include <sys/socket.h>
16041 #endif
16042
16043
16044 int
16045 main ()
16046 {
16047 static struct sockaddr_storage ac_aggr;
16048 if (ac_aggr.__ss_len)
16049 return 0;
16050   ;
16051   return 0;
16052 }
16053 _ACEOF
16054 rm -f conftest.$ac_objext
16055 if { (ac_try="$ac_compile"
16056 case "(($ac_try" in
16057   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16058   *) ac_try_echo=$ac_try;;
16059 esac
16060 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16061 $as_echo "$ac_try_echo") >&5
16062   (eval "$ac_compile") 2>conftest.er1
16063   ac_status=$?
16064   grep -v '^ *+' conftest.er1 >conftest.err
16065   rm -f conftest.er1
16066   cat conftest.err >&5
16067   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16068   (exit $ac_status); } && {
16069          test -z "$ac_c_werror_flag" ||
16070          test ! -s conftest.err
16071        } && test -s conftest.$ac_objext; then
16072   ac_cv_member_struct_sockaddr_storage___ss_len=yes
16073 else
16074   $as_echo "$as_me: failed program was:" >&5
16075 sed 's/^/| /' conftest.$ac_ext >&5
16076
16077         cat >conftest.$ac_ext <<_ACEOF
16078 /* confdefs.h.  */
16079 _ACEOF
16080 cat confdefs.h >>conftest.$ac_ext
16081 cat >>conftest.$ac_ext <<_ACEOF
16082 /* end confdefs.h.  */
16083 #include <sys/types.h>
16084 #ifdef HAVE_SYS_SOCKET_H
16085 #include <sys/socket.h>
16086 #endif
16087
16088
16089 int
16090 main ()
16091 {
16092 static struct sockaddr_storage ac_aggr;
16093 if (sizeof ac_aggr.__ss_len)
16094 return 0;
16095   ;
16096   return 0;
16097 }
16098 _ACEOF
16099 rm -f conftest.$ac_objext
16100 if { (ac_try="$ac_compile"
16101 case "(($ac_try" in
16102   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16103   *) ac_try_echo=$ac_try;;
16104 esac
16105 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16106 $as_echo "$ac_try_echo") >&5
16107   (eval "$ac_compile") 2>conftest.er1
16108   ac_status=$?
16109   grep -v '^ *+' conftest.er1 >conftest.err
16110   rm -f conftest.er1
16111   cat conftest.err >&5
16112   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16113   (exit $ac_status); } && {
16114          test -z "$ac_c_werror_flag" ||
16115          test ! -s conftest.err
16116        } && test -s conftest.$ac_objext; then
16117   ac_cv_member_struct_sockaddr_storage___ss_len=yes
16118 else
16119   $as_echo "$as_me: failed program was:" >&5
16120 sed 's/^/| /' conftest.$ac_ext >&5
16121
16122         ac_cv_member_struct_sockaddr_storage___ss_len=no
16123 fi
16124
16125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16126 fi
16127
16128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16129 fi
16130 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
16131 $as_echo "$ac_cv_member_struct_sockaddr_storage___ss_len" >&6; }
16132 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = x""yes; then
16133
16134 cat >>confdefs.h <<_ACEOF
16135 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
16136 _ACEOF
16137
16138
16139 fi
16140 { $as_echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
16141 $as_echo_n "checking for struct sockaddr.sa_len... " >&6; }
16142 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
16143   $as_echo_n "(cached) " >&6
16144 else
16145   cat >conftest.$ac_ext <<_ACEOF
16146 /* confdefs.h.  */
16147 _ACEOF
16148 cat confdefs.h >>conftest.$ac_ext
16149 cat >>conftest.$ac_ext <<_ACEOF
16150 /* end confdefs.h.  */
16151 #include <sys/types.h>
16152 #ifdef HAVE_SYS_SOCKET_H
16153 #include <sys/socket.h>
16154 #endif
16155
16156
16157 int
16158 main ()
16159 {
16160 static struct sockaddr ac_aggr;
16161 if (ac_aggr.sa_len)
16162 return 0;
16163   ;
16164   return 0;
16165 }
16166 _ACEOF
16167 rm -f conftest.$ac_objext
16168 if { (ac_try="$ac_compile"
16169 case "(($ac_try" in
16170   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16171   *) ac_try_echo=$ac_try;;
16172 esac
16173 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16174 $as_echo "$ac_try_echo") >&5
16175   (eval "$ac_compile") 2>conftest.er1
16176   ac_status=$?
16177   grep -v '^ *+' conftest.er1 >conftest.err
16178   rm -f conftest.er1
16179   cat conftest.err >&5
16180   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16181   (exit $ac_status); } && {
16182          test -z "$ac_c_werror_flag" ||
16183          test ! -s conftest.err
16184        } && test -s conftest.$ac_objext; then
16185   ac_cv_member_struct_sockaddr_sa_len=yes
16186 else
16187   $as_echo "$as_me: failed program was:" >&5
16188 sed 's/^/| /' conftest.$ac_ext >&5
16189
16190         cat >conftest.$ac_ext <<_ACEOF
16191 /* confdefs.h.  */
16192 _ACEOF
16193 cat confdefs.h >>conftest.$ac_ext
16194 cat >>conftest.$ac_ext <<_ACEOF
16195 /* end confdefs.h.  */
16196 #include <sys/types.h>
16197 #ifdef HAVE_SYS_SOCKET_H
16198 #include <sys/socket.h>
16199 #endif
16200
16201
16202 int
16203 main ()
16204 {
16205 static struct sockaddr ac_aggr;
16206 if (sizeof ac_aggr.sa_len)
16207 return 0;
16208   ;
16209   return 0;
16210 }
16211 _ACEOF
16212 rm -f conftest.$ac_objext
16213 if { (ac_try="$ac_compile"
16214 case "(($ac_try" in
16215   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16216   *) ac_try_echo=$ac_try;;
16217 esac
16218 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16219 $as_echo "$ac_try_echo") >&5
16220   (eval "$ac_compile") 2>conftest.er1
16221   ac_status=$?
16222   grep -v '^ *+' conftest.er1 >conftest.err
16223   rm -f conftest.er1
16224   cat conftest.err >&5
16225   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16226   (exit $ac_status); } && {
16227          test -z "$ac_c_werror_flag" ||
16228          test ! -s conftest.err
16229        } && test -s conftest.$ac_objext; then
16230   ac_cv_member_struct_sockaddr_sa_len=yes
16231 else
16232   $as_echo "$as_me: failed program was:" >&5
16233 sed 's/^/| /' conftest.$ac_ext >&5
16234
16235         ac_cv_member_struct_sockaddr_sa_len=no
16236 fi
16237
16238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16239 fi
16240
16241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16242 fi
16243 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
16244 $as_echo "$ac_cv_member_struct_sockaddr_sa_len" >&6; }
16245 if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then
16246
16247 cat >>confdefs.h <<_ACEOF
16248 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
16249 _ACEOF
16250
16251
16252 fi
16253
16254 { $as_echo "$as_me:$LINENO: checking for struct addrinfo" >&5
16255 $as_echo_n "checking for struct addrinfo... " >&6; }
16256 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
16257   $as_echo_n "(cached) " >&6
16258 else
16259   ac_cv_type_struct_addrinfo=no
16260 cat >conftest.$ac_ext <<_ACEOF
16261 /* confdefs.h.  */
16262 _ACEOF
16263 cat confdefs.h >>conftest.$ac_ext
16264 cat >>conftest.$ac_ext <<_ACEOF
16265 /* end confdefs.h.  */
16266 #include <sys/types.h>
16267 #include <sys/socket.h>
16268 #include <netdb.h>
16269
16270
16271 int
16272 main ()
16273 {
16274 if (sizeof (struct addrinfo))
16275        return 0;
16276   ;
16277   return 0;
16278 }
16279 _ACEOF
16280 rm -f conftest.$ac_objext
16281 if { (ac_try="$ac_compile"
16282 case "(($ac_try" in
16283   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16284   *) ac_try_echo=$ac_try;;
16285 esac
16286 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16287 $as_echo "$ac_try_echo") >&5
16288   (eval "$ac_compile") 2>conftest.er1
16289   ac_status=$?
16290   grep -v '^ *+' conftest.er1 >conftest.err
16291   rm -f conftest.er1
16292   cat conftest.err >&5
16293   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16294   (exit $ac_status); } && {
16295          test -z "$ac_c_werror_flag" ||
16296          test ! -s conftest.err
16297        } && test -s conftest.$ac_objext; then
16298   cat >conftest.$ac_ext <<_ACEOF
16299 /* confdefs.h.  */
16300 _ACEOF
16301 cat confdefs.h >>conftest.$ac_ext
16302 cat >>conftest.$ac_ext <<_ACEOF
16303 /* end confdefs.h.  */
16304 #include <sys/types.h>
16305 #include <sys/socket.h>
16306 #include <netdb.h>
16307
16308
16309 int
16310 main ()
16311 {
16312 if (sizeof ((struct addrinfo)))
16313           return 0;
16314   ;
16315   return 0;
16316 }
16317 _ACEOF
16318 rm -f conftest.$ac_objext
16319 if { (ac_try="$ac_compile"
16320 case "(($ac_try" in
16321   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16322   *) ac_try_echo=$ac_try;;
16323 esac
16324 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16325 $as_echo "$ac_try_echo") >&5
16326   (eval "$ac_compile") 2>conftest.er1
16327   ac_status=$?
16328   grep -v '^ *+' conftest.er1 >conftest.err
16329   rm -f conftest.er1
16330   cat conftest.err >&5
16331   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16332   (exit $ac_status); } && {
16333          test -z "$ac_c_werror_flag" ||
16334          test ! -s conftest.err
16335        } && test -s conftest.$ac_objext; then
16336   :
16337 else
16338   $as_echo "$as_me: failed program was:" >&5
16339 sed 's/^/| /' conftest.$ac_ext >&5
16340
16341         ac_cv_type_struct_addrinfo=yes
16342 fi
16343
16344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16345 else
16346   $as_echo "$as_me: failed program was:" >&5
16347 sed 's/^/| /' conftest.$ac_ext >&5
16348
16349
16350 fi
16351
16352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16353 fi
16354 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
16355 $as_echo "$ac_cv_type_struct_addrinfo" >&6; }
16356 if test "x$ac_cv_type_struct_addrinfo" = x""yes; then
16357
16358 cat >>confdefs.h <<_ACEOF
16359 #define HAVE_STRUCT_ADDRINFO 1
16360 _ACEOF
16361
16362
16363 fi
16364
16365
16366   { $as_echo "$as_me:$LINENO: checking for intptr_t" >&5
16367 $as_echo_n "checking for intptr_t... " >&6; }
16368 if test "${ac_cv_type_intptr_t+set}" = set; then
16369   $as_echo_n "(cached) " >&6
16370 else
16371   ac_cv_type_intptr_t=no
16372 cat >conftest.$ac_ext <<_ACEOF
16373 /* confdefs.h.  */
16374 _ACEOF
16375 cat confdefs.h >>conftest.$ac_ext
16376 cat >>conftest.$ac_ext <<_ACEOF
16377 /* end confdefs.h.  */
16378 $ac_includes_default
16379 int
16380 main ()
16381 {
16382 if (sizeof (intptr_t))
16383        return 0;
16384   ;
16385   return 0;
16386 }
16387 _ACEOF
16388 rm -f conftest.$ac_objext
16389 if { (ac_try="$ac_compile"
16390 case "(($ac_try" in
16391   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16392   *) ac_try_echo=$ac_try;;
16393 esac
16394 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16395 $as_echo "$ac_try_echo") >&5
16396   (eval "$ac_compile") 2>conftest.er1
16397   ac_status=$?
16398   grep -v '^ *+' conftest.er1 >conftest.err
16399   rm -f conftest.er1
16400   cat conftest.err >&5
16401   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16402   (exit $ac_status); } && {
16403          test -z "$ac_c_werror_flag" ||
16404          test ! -s conftest.err
16405        } && test -s conftest.$ac_objext; then
16406   cat >conftest.$ac_ext <<_ACEOF
16407 /* confdefs.h.  */
16408 _ACEOF
16409 cat confdefs.h >>conftest.$ac_ext
16410 cat >>conftest.$ac_ext <<_ACEOF
16411 /* end confdefs.h.  */
16412 $ac_includes_default
16413 int
16414 main ()
16415 {
16416 if (sizeof ((intptr_t)))
16417           return 0;
16418   ;
16419   return 0;
16420 }
16421 _ACEOF
16422 rm -f conftest.$ac_objext
16423 if { (ac_try="$ac_compile"
16424 case "(($ac_try" in
16425   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16426   *) ac_try_echo=$ac_try;;
16427 esac
16428 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16429 $as_echo "$ac_try_echo") >&5
16430   (eval "$ac_compile") 2>conftest.er1
16431   ac_status=$?
16432   grep -v '^ *+' conftest.er1 >conftest.err
16433   rm -f conftest.er1
16434   cat conftest.err >&5
16435   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16436   (exit $ac_status); } && {
16437          test -z "$ac_c_werror_flag" ||
16438          test ! -s conftest.err
16439        } && test -s conftest.$ac_objext; then
16440   :
16441 else
16442   $as_echo "$as_me: failed program was:" >&5
16443 sed 's/^/| /' conftest.$ac_ext >&5
16444
16445         ac_cv_type_intptr_t=yes
16446 fi
16447
16448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16449 else
16450   $as_echo "$as_me: failed program was:" >&5
16451 sed 's/^/| /' conftest.$ac_ext >&5
16452
16453
16454 fi
16455
16456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16457 fi
16458 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
16459 $as_echo "$ac_cv_type_intptr_t" >&6; }
16460 if test "x$ac_cv_type_intptr_t" = x""yes; then
16461
16462 cat >>confdefs.h <<\_ACEOF
16463 #define HAVE_INTPTR_T 1
16464 _ACEOF
16465
16466 else
16467   for ac_type in 'int' 'long int' 'long long int'; do
16468        cat >conftest.$ac_ext <<_ACEOF
16469 /* confdefs.h.  */
16470 _ACEOF
16471 cat confdefs.h >>conftest.$ac_ext
16472 cat >>conftest.$ac_ext <<_ACEOF
16473 /* end confdefs.h.  */
16474 $ac_includes_default
16475 int
16476 main ()
16477 {
16478 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
16479 test_array [0] = 0
16480
16481   ;
16482   return 0;
16483 }
16484 _ACEOF
16485 rm -f conftest.$ac_objext
16486 if { (ac_try="$ac_compile"
16487 case "(($ac_try" in
16488   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16489   *) ac_try_echo=$ac_try;;
16490 esac
16491 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16492 $as_echo "$ac_try_echo") >&5
16493   (eval "$ac_compile") 2>conftest.er1
16494   ac_status=$?
16495   grep -v '^ *+' conftest.er1 >conftest.err
16496   rm -f conftest.er1
16497   cat conftest.err >&5
16498   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16499   (exit $ac_status); } && {
16500          test -z "$ac_c_werror_flag" ||
16501          test ! -s conftest.err
16502        } && test -s conftest.$ac_objext; then
16503
16504 cat >>confdefs.h <<_ACEOF
16505 #define intptr_t $ac_type
16506 _ACEOF
16507
16508           ac_type=
16509 else
16510   $as_echo "$as_me: failed program was:" >&5
16511 sed 's/^/| /' conftest.$ac_ext >&5
16512
16513
16514 fi
16515
16516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16517        test -z "$ac_type" && break
16518      done
16519 fi
16520
16521
16522
16523   { $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5
16524 $as_echo_n "checking for uintptr_t... " >&6; }
16525 if test "${ac_cv_type_uintptr_t+set}" = set; then
16526   $as_echo_n "(cached) " >&6
16527 else
16528   ac_cv_type_uintptr_t=no
16529 cat >conftest.$ac_ext <<_ACEOF
16530 /* confdefs.h.  */
16531 _ACEOF
16532 cat confdefs.h >>conftest.$ac_ext
16533 cat >>conftest.$ac_ext <<_ACEOF
16534 /* end confdefs.h.  */
16535 $ac_includes_default
16536 int
16537 main ()
16538 {
16539 if (sizeof (uintptr_t))
16540        return 0;
16541   ;
16542   return 0;
16543 }
16544 _ACEOF
16545 rm -f conftest.$ac_objext
16546 if { (ac_try="$ac_compile"
16547 case "(($ac_try" in
16548   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16549   *) ac_try_echo=$ac_try;;
16550 esac
16551 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16552 $as_echo "$ac_try_echo") >&5
16553   (eval "$ac_compile") 2>conftest.er1
16554   ac_status=$?
16555   grep -v '^ *+' conftest.er1 >conftest.err
16556   rm -f conftest.er1
16557   cat conftest.err >&5
16558   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16559   (exit $ac_status); } && {
16560          test -z "$ac_c_werror_flag" ||
16561          test ! -s conftest.err
16562        } && test -s conftest.$ac_objext; then
16563   cat >conftest.$ac_ext <<_ACEOF
16564 /* confdefs.h.  */
16565 _ACEOF
16566 cat confdefs.h >>conftest.$ac_ext
16567 cat >>conftest.$ac_ext <<_ACEOF
16568 /* end confdefs.h.  */
16569 $ac_includes_default
16570 int
16571 main ()
16572 {
16573 if (sizeof ((uintptr_t)))
16574           return 0;
16575   ;
16576   return 0;
16577 }
16578 _ACEOF
16579 rm -f conftest.$ac_objext
16580 if { (ac_try="$ac_compile"
16581 case "(($ac_try" in
16582   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16583   *) ac_try_echo=$ac_try;;
16584 esac
16585 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16586 $as_echo "$ac_try_echo") >&5
16587   (eval "$ac_compile") 2>conftest.er1
16588   ac_status=$?
16589   grep -v '^ *+' conftest.er1 >conftest.err
16590   rm -f conftest.er1
16591   cat conftest.err >&5
16592   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16593   (exit $ac_status); } && {
16594          test -z "$ac_c_werror_flag" ||
16595          test ! -s conftest.err
16596        } && test -s conftest.$ac_objext; then
16597   :
16598 else
16599   $as_echo "$as_me: failed program was:" >&5
16600 sed 's/^/| /' conftest.$ac_ext >&5
16601
16602         ac_cv_type_uintptr_t=yes
16603 fi
16604
16605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16606 else
16607   $as_echo "$as_me: failed program was:" >&5
16608 sed 's/^/| /' conftest.$ac_ext >&5
16609
16610
16611 fi
16612
16613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16614 fi
16615 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
16616 $as_echo "$ac_cv_type_uintptr_t" >&6; }
16617 if test "x$ac_cv_type_uintptr_t" = x""yes; then
16618
16619 cat >>confdefs.h <<\_ACEOF
16620 #define HAVE_UINTPTR_T 1
16621 _ACEOF
16622
16623 else
16624   for ac_type in 'unsigned int' 'unsigned long int' \
16625         'unsigned long long int'; do
16626        cat >conftest.$ac_ext <<_ACEOF
16627 /* confdefs.h.  */
16628 _ACEOF
16629 cat confdefs.h >>conftest.$ac_ext
16630 cat >>conftest.$ac_ext <<_ACEOF
16631 /* end confdefs.h.  */
16632 $ac_includes_default
16633 int
16634 main ()
16635 {
16636 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
16637 test_array [0] = 0
16638
16639   ;
16640   return 0;
16641 }
16642 _ACEOF
16643 rm -f conftest.$ac_objext
16644 if { (ac_try="$ac_compile"
16645 case "(($ac_try" in
16646   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16647   *) ac_try_echo=$ac_try;;
16648 esac
16649 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16650 $as_echo "$ac_try_echo") >&5
16651   (eval "$ac_compile") 2>conftest.er1
16652   ac_status=$?
16653   grep -v '^ *+' conftest.er1 >conftest.err
16654   rm -f conftest.er1
16655   cat conftest.err >&5
16656   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16657   (exit $ac_status); } && {
16658          test -z "$ac_c_werror_flag" ||
16659          test ! -s conftest.err
16660        } && test -s conftest.$ac_objext; then
16661
16662 cat >>confdefs.h <<_ACEOF
16663 #define uintptr_t $ac_type
16664 _ACEOF
16665
16666           ac_type=
16667 else
16668   $as_echo "$as_me: failed program was:" >&5
16669 sed 's/^/| /' conftest.$ac_ext >&5
16670
16671
16672 fi
16673
16674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16675        test -z "$ac_type" && break
16676      done
16677 fi
16678
16679
16680
16681   { $as_echo "$as_me:$LINENO: checking for long long int" >&5
16682 $as_echo_n "checking for long long int... " >&6; }
16683 if test "${ac_cv_type_long_long_int+set}" = set; then
16684   $as_echo_n "(cached) " >&6
16685 else
16686   cat >conftest.$ac_ext <<_ACEOF
16687
16688   /* confdefs.h.  */
16689 _ACEOF
16690 cat confdefs.h >>conftest.$ac_ext
16691 cat >>conftest.$ac_ext <<_ACEOF
16692 /* end confdefs.h.  */
16693 /* For now, do not test the preprocessor; as of 2007 there are too many
16694          implementations with broken preprocessors.  Perhaps this can
16695          be revisited in 2012.  In the meantime, code should not expect
16696          #if to work with literals wider than 32 bits.  */
16697       /* Test literals.  */
16698       long long int ll = 9223372036854775807ll;
16699       long long int nll = -9223372036854775807LL;
16700       unsigned long long int ull = 18446744073709551615ULL;
16701       /* Test constant expressions.   */
16702       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
16703                      ? 1 : -1)];
16704       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
16705                      ? 1 : -1)];
16706       int i = 63;
16707 int
16708 main ()
16709 {
16710 /* Test availability of runtime routines for shift and division.  */
16711       long long int llmax = 9223372036854775807ll;
16712       unsigned long long int ullmax = 18446744073709551615ull;
16713       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
16714               | (llmax / ll) | (llmax % ll)
16715               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
16716               | (ullmax / ull) | (ullmax % ull));
16717   ;
16718   return 0;
16719 }
16720
16721 _ACEOF
16722 rm -f conftest.$ac_objext conftest$ac_exeext
16723 if { (ac_try="$ac_link"
16724 case "(($ac_try" in
16725   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16726   *) ac_try_echo=$ac_try;;
16727 esac
16728 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16729 $as_echo "$ac_try_echo") >&5
16730   (eval "$ac_link") 2>conftest.er1
16731   ac_status=$?
16732   grep -v '^ *+' conftest.er1 >conftest.err
16733   rm -f conftest.er1
16734   cat conftest.err >&5
16735   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16736   (exit $ac_status); } && {
16737          test -z "$ac_c_werror_flag" ||
16738          test ! -s conftest.err
16739        } && test -s conftest$ac_exeext && {
16740          test "$cross_compiling" = yes ||
16741          $as_test_x conftest$ac_exeext
16742        }; then
16743                         if test "$cross_compiling" = yes; then
16744   ac_cv_type_long_long_int=yes
16745 else
16746   cat >conftest.$ac_ext <<_ACEOF
16747 /* confdefs.h.  */
16748 _ACEOF
16749 cat confdefs.h >>conftest.$ac_ext
16750 cat >>conftest.$ac_ext <<_ACEOF
16751 /* end confdefs.h.  */
16752 #include <limits.h>
16753                #ifndef LLONG_MAX
16754                # define HALF \
16755                         (1LL << (sizeof (long long int) * CHAR_BIT - 2))
16756                # define LLONG_MAX (HALF - 1 + HALF)
16757                #endif
16758 int
16759 main ()
16760 {
16761 long long int n = 1;
16762                int i;
16763                for (i = 0; ; i++)
16764                  {
16765                    long long int m = n << i;
16766                    if (m >> i != n)
16767                      return 1;
16768                    if (LLONG_MAX / 2 < m)
16769                      break;
16770                  }
16771                return 0;
16772   ;
16773   return 0;
16774 }
16775 _ACEOF
16776 rm -f conftest$ac_exeext
16777 if { (ac_try="$ac_link"
16778 case "(($ac_try" in
16779   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16780   *) ac_try_echo=$ac_try;;
16781 esac
16782 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16783 $as_echo "$ac_try_echo") >&5
16784   (eval "$ac_link") 2>&5
16785   ac_status=$?
16786   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16787   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16788   { (case "(($ac_try" in
16789   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16790   *) ac_try_echo=$ac_try;;
16791 esac
16792 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16793 $as_echo "$ac_try_echo") >&5
16794   (eval "$ac_try") 2>&5
16795   ac_status=$?
16796   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16797   (exit $ac_status); }; }; then
16798   ac_cv_type_long_long_int=yes
16799 else
16800   $as_echo "$as_me: program exited with status $ac_status" >&5
16801 $as_echo "$as_me: failed program was:" >&5
16802 sed 's/^/| /' conftest.$ac_ext >&5
16803
16804 ( exit $ac_status )
16805 ac_cv_type_long_long_int=no
16806 fi
16807 rm -rf conftest.dSYM
16808 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16809 fi
16810
16811
16812 else
16813   $as_echo "$as_me: failed program was:" >&5
16814 sed 's/^/| /' conftest.$ac_ext >&5
16815
16816         ac_cv_type_long_long_int=no
16817 fi
16818
16819 rm -rf conftest.dSYM
16820 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16821       conftest$ac_exeext conftest.$ac_ext
16822 fi
16823 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
16824 $as_echo "$ac_cv_type_long_long_int" >&6; }
16825   if test $ac_cv_type_long_long_int = yes; then
16826
16827 cat >>confdefs.h <<\_ACEOF
16828 #define HAVE_LONG_LONG_INT 1
16829 _ACEOF
16830
16831   fi
16832
16833
16834 { $as_echo "$as_me:$LINENO: checking for locale_t" >&5
16835 $as_echo_n "checking for locale_t... " >&6; }
16836 if test "${pgac_cv_type_locale_t+set}" = set; then
16837   $as_echo_n "(cached) " >&6
16838 else
16839   cat >conftest.$ac_ext <<_ACEOF
16840 /* confdefs.h.  */
16841 _ACEOF
16842 cat confdefs.h >>conftest.$ac_ext
16843 cat >>conftest.$ac_ext <<_ACEOF
16844 /* end confdefs.h.  */
16845 #include <locale.h>
16846 locale_t x;
16847 int
16848 main ()
16849 {
16850
16851   ;
16852   return 0;
16853 }
16854 _ACEOF
16855 rm -f conftest.$ac_objext
16856 if { (ac_try="$ac_compile"
16857 case "(($ac_try" in
16858   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16859   *) ac_try_echo=$ac_try;;
16860 esac
16861 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16862 $as_echo "$ac_try_echo") >&5
16863   (eval "$ac_compile") 2>conftest.er1
16864   ac_status=$?
16865   grep -v '^ *+' conftest.er1 >conftest.err
16866   rm -f conftest.er1
16867   cat conftest.err >&5
16868   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16869   (exit $ac_status); } && {
16870          test -z "$ac_c_werror_flag" ||
16871          test ! -s conftest.err
16872        } && test -s conftest.$ac_objext; then
16873   pgac_cv_type_locale_t=yes
16874 else
16875   $as_echo "$as_me: failed program was:" >&5
16876 sed 's/^/| /' conftest.$ac_ext >&5
16877
16878         cat >conftest.$ac_ext <<_ACEOF
16879 /* confdefs.h.  */
16880 _ACEOF
16881 cat confdefs.h >>conftest.$ac_ext
16882 cat >>conftest.$ac_ext <<_ACEOF
16883 /* end confdefs.h.  */
16884 #include <xlocale.h>
16885 locale_t x;
16886 int
16887 main ()
16888 {
16889
16890   ;
16891   return 0;
16892 }
16893 _ACEOF
16894 rm -f conftest.$ac_objext
16895 if { (ac_try="$ac_compile"
16896 case "(($ac_try" in
16897   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16898   *) ac_try_echo=$ac_try;;
16899 esac
16900 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16901 $as_echo "$ac_try_echo") >&5
16902   (eval "$ac_compile") 2>conftest.er1
16903   ac_status=$?
16904   grep -v '^ *+' conftest.er1 >conftest.err
16905   rm -f conftest.er1
16906   cat conftest.err >&5
16907   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16908   (exit $ac_status); } && {
16909          test -z "$ac_c_werror_flag" ||
16910          test ! -s conftest.err
16911        } && test -s conftest.$ac_objext; then
16912   pgac_cv_type_locale_t='yes (in xlocale.h)'
16913 else
16914   $as_echo "$as_me: failed program was:" >&5
16915 sed 's/^/| /' conftest.$ac_ext >&5
16916
16917         pgac_cv_type_locale_t=no
16918 fi
16919
16920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16921 fi
16922
16923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16924 fi
16925 { $as_echo "$as_me:$LINENO: result: $pgac_cv_type_locale_t" >&5
16926 $as_echo "$pgac_cv_type_locale_t" >&6; }
16927 if test "$pgac_cv_type_locale_t" != no; then
16928
16929 cat >>confdefs.h <<\_ACEOF
16930 #define HAVE_LOCALE_T 1
16931 _ACEOF
16932
16933 fi
16934 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
16935
16936 cat >>confdefs.h <<\_ACEOF
16937 #define LOCALE_T_IN_XLOCALE 1
16938 _ACEOF
16939
16940 fi
16941
16942 { $as_echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
16943 $as_echo_n "checking for struct cmsgcred... " >&6; }
16944 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
16945   $as_echo_n "(cached) " >&6
16946 else
16947   ac_cv_type_struct_cmsgcred=no
16948 cat >conftest.$ac_ext <<_ACEOF
16949 /* confdefs.h.  */
16950 _ACEOF
16951 cat confdefs.h >>conftest.$ac_ext
16952 cat >>conftest.$ac_ext <<_ACEOF
16953 /* end confdefs.h.  */
16954 #include <sys/param.h>
16955 #include <sys/types.h>
16956 #include <sys/socket.h>
16957 #include <sys/ucred.h>
16958
16959 int
16960 main ()
16961 {
16962 if (sizeof (struct cmsgcred))
16963        return 0;
16964   ;
16965   return 0;
16966 }
16967 _ACEOF
16968 rm -f conftest.$ac_objext
16969 if { (ac_try="$ac_compile"
16970 case "(($ac_try" in
16971   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16972   *) ac_try_echo=$ac_try;;
16973 esac
16974 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16975 $as_echo "$ac_try_echo") >&5
16976   (eval "$ac_compile") 2>conftest.er1
16977   ac_status=$?
16978   grep -v '^ *+' conftest.er1 >conftest.err
16979   rm -f conftest.er1
16980   cat conftest.err >&5
16981   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16982   (exit $ac_status); } && {
16983          test -z "$ac_c_werror_flag" ||
16984          test ! -s conftest.err
16985        } && test -s conftest.$ac_objext; then
16986   cat >conftest.$ac_ext <<_ACEOF
16987 /* confdefs.h.  */
16988 _ACEOF
16989 cat confdefs.h >>conftest.$ac_ext
16990 cat >>conftest.$ac_ext <<_ACEOF
16991 /* end confdefs.h.  */
16992 #include <sys/param.h>
16993 #include <sys/types.h>
16994 #include <sys/socket.h>
16995 #include <sys/ucred.h>
16996
16997 int
16998 main ()
16999 {
17000 if (sizeof ((struct cmsgcred)))
17001           return 0;
17002   ;
17003   return 0;
17004 }
17005 _ACEOF
17006 rm -f conftest.$ac_objext
17007 if { (ac_try="$ac_compile"
17008 case "(($ac_try" in
17009   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17010   *) ac_try_echo=$ac_try;;
17011 esac
17012 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17013 $as_echo "$ac_try_echo") >&5
17014   (eval "$ac_compile") 2>conftest.er1
17015   ac_status=$?
17016   grep -v '^ *+' conftest.er1 >conftest.err
17017   rm -f conftest.er1
17018   cat conftest.err >&5
17019   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17020   (exit $ac_status); } && {
17021          test -z "$ac_c_werror_flag" ||
17022          test ! -s conftest.err
17023        } && test -s conftest.$ac_objext; then
17024   :
17025 else
17026   $as_echo "$as_me: failed program was:" >&5
17027 sed 's/^/| /' conftest.$ac_ext >&5
17028
17029         ac_cv_type_struct_cmsgcred=yes
17030 fi
17031
17032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17033 else
17034   $as_echo "$as_me: failed program was:" >&5
17035 sed 's/^/| /' conftest.$ac_ext >&5
17036
17037
17038 fi
17039
17040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17041 fi
17042 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
17043 $as_echo "$ac_cv_type_struct_cmsgcred" >&6; }
17044 if test "x$ac_cv_type_struct_cmsgcred" = x""yes; then
17045
17046 cat >>confdefs.h <<_ACEOF
17047 #define HAVE_STRUCT_CMSGCRED 1
17048 _ACEOF
17049
17050
17051 fi
17052 { $as_echo "$as_me:$LINENO: checking for struct fcred" >&5
17053 $as_echo_n "checking for struct fcred... " >&6; }
17054 if test "${ac_cv_type_struct_fcred+set}" = set; then
17055   $as_echo_n "(cached) " >&6
17056 else
17057   ac_cv_type_struct_fcred=no
17058 cat >conftest.$ac_ext <<_ACEOF
17059 /* confdefs.h.  */
17060 _ACEOF
17061 cat confdefs.h >>conftest.$ac_ext
17062 cat >>conftest.$ac_ext <<_ACEOF
17063 /* end confdefs.h.  */
17064 #include <sys/param.h>
17065 #include <sys/types.h>
17066 #include <sys/socket.h>
17067 #include <sys/ucred.h>
17068
17069 int
17070 main ()
17071 {
17072 if (sizeof (struct fcred))
17073        return 0;
17074   ;
17075   return 0;
17076 }
17077 _ACEOF
17078 rm -f conftest.$ac_objext
17079 if { (ac_try="$ac_compile"
17080 case "(($ac_try" in
17081   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17082   *) ac_try_echo=$ac_try;;
17083 esac
17084 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17085 $as_echo "$ac_try_echo") >&5
17086   (eval "$ac_compile") 2>conftest.er1
17087   ac_status=$?
17088   grep -v '^ *+' conftest.er1 >conftest.err
17089   rm -f conftest.er1
17090   cat conftest.err >&5
17091   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17092   (exit $ac_status); } && {
17093          test -z "$ac_c_werror_flag" ||
17094          test ! -s conftest.err
17095        } && test -s conftest.$ac_objext; then
17096   cat >conftest.$ac_ext <<_ACEOF
17097 /* confdefs.h.  */
17098 _ACEOF
17099 cat confdefs.h >>conftest.$ac_ext
17100 cat >>conftest.$ac_ext <<_ACEOF
17101 /* end confdefs.h.  */
17102 #include <sys/param.h>
17103 #include <sys/types.h>
17104 #include <sys/socket.h>
17105 #include <sys/ucred.h>
17106
17107 int
17108 main ()
17109 {
17110 if (sizeof ((struct fcred)))
17111           return 0;
17112   ;
17113   return 0;
17114 }
17115 _ACEOF
17116 rm -f conftest.$ac_objext
17117 if { (ac_try="$ac_compile"
17118 case "(($ac_try" in
17119   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17120   *) ac_try_echo=$ac_try;;
17121 esac
17122 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17123 $as_echo "$ac_try_echo") >&5
17124   (eval "$ac_compile") 2>conftest.er1
17125   ac_status=$?
17126   grep -v '^ *+' conftest.er1 >conftest.err
17127   rm -f conftest.er1
17128   cat conftest.err >&5
17129   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17130   (exit $ac_status); } && {
17131          test -z "$ac_c_werror_flag" ||
17132          test ! -s conftest.err
17133        } && test -s conftest.$ac_objext; then
17134   :
17135 else
17136   $as_echo "$as_me: failed program was:" >&5
17137 sed 's/^/| /' conftest.$ac_ext >&5
17138
17139         ac_cv_type_struct_fcred=yes
17140 fi
17141
17142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17143 else
17144   $as_echo "$as_me: failed program was:" >&5
17145 sed 's/^/| /' conftest.$ac_ext >&5
17146
17147
17148 fi
17149
17150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17151 fi
17152 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
17153 $as_echo "$ac_cv_type_struct_fcred" >&6; }
17154 if test "x$ac_cv_type_struct_fcred" = x""yes; then
17155
17156 cat >>confdefs.h <<_ACEOF
17157 #define HAVE_STRUCT_FCRED 1
17158 _ACEOF
17159
17160
17161 fi
17162 { $as_echo "$as_me:$LINENO: checking for struct sockcred" >&5
17163 $as_echo_n "checking for struct sockcred... " >&6; }
17164 if test "${ac_cv_type_struct_sockcred+set}" = set; then
17165   $as_echo_n "(cached) " >&6
17166 else
17167   ac_cv_type_struct_sockcred=no
17168 cat >conftest.$ac_ext <<_ACEOF
17169 /* confdefs.h.  */
17170 _ACEOF
17171 cat confdefs.h >>conftest.$ac_ext
17172 cat >>conftest.$ac_ext <<_ACEOF
17173 /* end confdefs.h.  */
17174 #include <sys/param.h>
17175 #include <sys/types.h>
17176 #include <sys/socket.h>
17177 #include <sys/ucred.h>
17178
17179 int
17180 main ()
17181 {
17182 if (sizeof (struct sockcred))
17183        return 0;
17184   ;
17185   return 0;
17186 }
17187 _ACEOF
17188 rm -f conftest.$ac_objext
17189 if { (ac_try="$ac_compile"
17190 case "(($ac_try" in
17191   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17192   *) ac_try_echo=$ac_try;;
17193 esac
17194 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17195 $as_echo "$ac_try_echo") >&5
17196   (eval "$ac_compile") 2>conftest.er1
17197   ac_status=$?
17198   grep -v '^ *+' conftest.er1 >conftest.err
17199   rm -f conftest.er1
17200   cat conftest.err >&5
17201   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17202   (exit $ac_status); } && {
17203          test -z "$ac_c_werror_flag" ||
17204          test ! -s conftest.err
17205        } && test -s conftest.$ac_objext; then
17206   cat >conftest.$ac_ext <<_ACEOF
17207 /* confdefs.h.  */
17208 _ACEOF
17209 cat confdefs.h >>conftest.$ac_ext
17210 cat >>conftest.$ac_ext <<_ACEOF
17211 /* end confdefs.h.  */
17212 #include <sys/param.h>
17213 #include <sys/types.h>
17214 #include <sys/socket.h>
17215 #include <sys/ucred.h>
17216
17217 int
17218 main ()
17219 {
17220 if (sizeof ((struct sockcred)))
17221           return 0;
17222   ;
17223   return 0;
17224 }
17225 _ACEOF
17226 rm -f conftest.$ac_objext
17227 if { (ac_try="$ac_compile"
17228 case "(($ac_try" in
17229   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17230   *) ac_try_echo=$ac_try;;
17231 esac
17232 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17233 $as_echo "$ac_try_echo") >&5
17234   (eval "$ac_compile") 2>conftest.er1
17235   ac_status=$?
17236   grep -v '^ *+' conftest.er1 >conftest.err
17237   rm -f conftest.er1
17238   cat conftest.err >&5
17239   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17240   (exit $ac_status); } && {
17241          test -z "$ac_c_werror_flag" ||
17242          test ! -s conftest.err
17243        } && test -s conftest.$ac_objext; then
17244   :
17245 else
17246   $as_echo "$as_me: failed program was:" >&5
17247 sed 's/^/| /' conftest.$ac_ext >&5
17248
17249         ac_cv_type_struct_sockcred=yes
17250 fi
17251
17252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17253 else
17254   $as_echo "$as_me: failed program was:" >&5
17255 sed 's/^/| /' conftest.$ac_ext >&5
17256
17257
17258 fi
17259
17260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17261 fi
17262 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
17263 $as_echo "$ac_cv_type_struct_sockcred" >&6; }
17264 if test "x$ac_cv_type_struct_sockcred" = x""yes; then
17265
17266 cat >>confdefs.h <<_ACEOF
17267 #define HAVE_STRUCT_SOCKCRED 1
17268 _ACEOF
17269
17270
17271 fi
17272
17273
17274 { $as_echo "$as_me:$LINENO: checking for struct option" >&5
17275 $as_echo_n "checking for struct option... " >&6; }
17276 if test "${ac_cv_type_struct_option+set}" = set; then
17277   $as_echo_n "(cached) " >&6
17278 else
17279   ac_cv_type_struct_option=no
17280 cat >conftest.$ac_ext <<_ACEOF
17281 /* confdefs.h.  */
17282 _ACEOF
17283 cat confdefs.h >>conftest.$ac_ext
17284 cat >>conftest.$ac_ext <<_ACEOF
17285 /* end confdefs.h.  */
17286 #ifdef HAVE_GETOPT_H
17287 #include <getopt.h>
17288 #endif
17289
17290 int
17291 main ()
17292 {
17293 if (sizeof (struct option))
17294        return 0;
17295   ;
17296   return 0;
17297 }
17298 _ACEOF
17299 rm -f conftest.$ac_objext
17300 if { (ac_try="$ac_compile"
17301 case "(($ac_try" in
17302   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17303   *) ac_try_echo=$ac_try;;
17304 esac
17305 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17306 $as_echo "$ac_try_echo") >&5
17307   (eval "$ac_compile") 2>conftest.er1
17308   ac_status=$?
17309   grep -v '^ *+' conftest.er1 >conftest.err
17310   rm -f conftest.er1
17311   cat conftest.err >&5
17312   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17313   (exit $ac_status); } && {
17314          test -z "$ac_c_werror_flag" ||
17315          test ! -s conftest.err
17316        } && test -s conftest.$ac_objext; then
17317   cat >conftest.$ac_ext <<_ACEOF
17318 /* confdefs.h.  */
17319 _ACEOF
17320 cat confdefs.h >>conftest.$ac_ext
17321 cat >>conftest.$ac_ext <<_ACEOF
17322 /* end confdefs.h.  */
17323 #ifdef HAVE_GETOPT_H
17324 #include <getopt.h>
17325 #endif
17326
17327 int
17328 main ()
17329 {
17330 if (sizeof ((struct option)))
17331           return 0;
17332   ;
17333   return 0;
17334 }
17335 _ACEOF
17336 rm -f conftest.$ac_objext
17337 if { (ac_try="$ac_compile"
17338 case "(($ac_try" in
17339   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17340   *) ac_try_echo=$ac_try;;
17341 esac
17342 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17343 $as_echo "$ac_try_echo") >&5
17344   (eval "$ac_compile") 2>conftest.er1
17345   ac_status=$?
17346   grep -v '^ *+' conftest.er1 >conftest.err
17347   rm -f conftest.er1
17348   cat conftest.err >&5
17349   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17350   (exit $ac_status); } && {
17351          test -z "$ac_c_werror_flag" ||
17352          test ! -s conftest.err
17353        } && test -s conftest.$ac_objext; then
17354   :
17355 else
17356   $as_echo "$as_me: failed program was:" >&5
17357 sed 's/^/| /' conftest.$ac_ext >&5
17358
17359         ac_cv_type_struct_option=yes
17360 fi
17361
17362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17363 else
17364   $as_echo "$as_me: failed program was:" >&5
17365 sed 's/^/| /' conftest.$ac_ext >&5
17366
17367
17368 fi
17369
17370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17371 fi
17372 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
17373 $as_echo "$ac_cv_type_struct_option" >&6; }
17374 if test "x$ac_cv_type_struct_option" = x""yes; then
17375
17376 cat >>confdefs.h <<_ACEOF
17377 #define HAVE_STRUCT_OPTION 1
17378 _ACEOF
17379
17380
17381 fi
17382
17383
17384 if test "$with_zlib" = yes; then
17385   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
17386   # did not).  While we could work around the lack of z_streamp, it
17387   # seems unwise to encourage people to use such old zlib versions...
17388   { $as_echo "$as_me:$LINENO: checking for z_streamp" >&5
17389 $as_echo_n "checking for z_streamp... " >&6; }
17390 if test "${ac_cv_type_z_streamp+set}" = set; then
17391   $as_echo_n "(cached) " >&6
17392 else
17393   ac_cv_type_z_streamp=no
17394 cat >conftest.$ac_ext <<_ACEOF
17395 /* confdefs.h.  */
17396 _ACEOF
17397 cat confdefs.h >>conftest.$ac_ext
17398 cat >>conftest.$ac_ext <<_ACEOF
17399 /* end confdefs.h.  */
17400 #include <zlib.h>
17401
17402 int
17403 main ()
17404 {
17405 if (sizeof (z_streamp))
17406        return 0;
17407   ;
17408   return 0;
17409 }
17410 _ACEOF
17411 rm -f conftest.$ac_objext
17412 if { (ac_try="$ac_compile"
17413 case "(($ac_try" in
17414   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17415   *) ac_try_echo=$ac_try;;
17416 esac
17417 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17418 $as_echo "$ac_try_echo") >&5
17419   (eval "$ac_compile") 2>conftest.er1
17420   ac_status=$?
17421   grep -v '^ *+' conftest.er1 >conftest.err
17422   rm -f conftest.er1
17423   cat conftest.err >&5
17424   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17425   (exit $ac_status); } && {
17426          test -z "$ac_c_werror_flag" ||
17427          test ! -s conftest.err
17428        } && test -s conftest.$ac_objext; then
17429   cat >conftest.$ac_ext <<_ACEOF
17430 /* confdefs.h.  */
17431 _ACEOF
17432 cat confdefs.h >>conftest.$ac_ext
17433 cat >>conftest.$ac_ext <<_ACEOF
17434 /* end confdefs.h.  */
17435 #include <zlib.h>
17436
17437 int
17438 main ()
17439 {
17440 if (sizeof ((z_streamp)))
17441           return 0;
17442   ;
17443   return 0;
17444 }
17445 _ACEOF
17446 rm -f conftest.$ac_objext
17447 if { (ac_try="$ac_compile"
17448 case "(($ac_try" in
17449   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17450   *) ac_try_echo=$ac_try;;
17451 esac
17452 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17453 $as_echo "$ac_try_echo") >&5
17454   (eval "$ac_compile") 2>conftest.er1
17455   ac_status=$?
17456   grep -v '^ *+' conftest.er1 >conftest.err
17457   rm -f conftest.er1
17458   cat conftest.err >&5
17459   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17460   (exit $ac_status); } && {
17461          test -z "$ac_c_werror_flag" ||
17462          test ! -s conftest.err
17463        } && test -s conftest.$ac_objext; then
17464   :
17465 else
17466   $as_echo "$as_me: failed program was:" >&5
17467 sed 's/^/| /' conftest.$ac_ext >&5
17468
17469         ac_cv_type_z_streamp=yes
17470 fi
17471
17472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17473 else
17474   $as_echo "$as_me: failed program was:" >&5
17475 sed 's/^/| /' conftest.$ac_ext >&5
17476
17477
17478 fi
17479
17480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17481 fi
17482 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
17483 $as_echo "$ac_cv_type_z_streamp" >&6; }
17484 if test "x$ac_cv_type_z_streamp" = x""yes; then
17485   :
17486 else
17487   { { $as_echo "$as_me:$LINENO: error: zlib version is too old
17488 Use --without-zlib to disable zlib support." >&5
17489 $as_echo "$as_me: error: zlib version is too old
17490 Use --without-zlib to disable zlib support." >&2;}
17491    { (exit 1); exit 1; }; }
17492 fi
17493
17494 fi
17495
17496 if test "$with_krb5" = yes; then
17497 # Check for differences between MIT and Heimdal (KTH) releases
17498   { $as_echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
17499 $as_echo_n "checking for krb5_ticket.enc_part2... " >&6; }
17500 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
17501   $as_echo_n "(cached) " >&6
17502 else
17503   cat >conftest.$ac_ext <<_ACEOF
17504 /* confdefs.h.  */
17505 _ACEOF
17506 cat confdefs.h >>conftest.$ac_ext
17507 cat >>conftest.$ac_ext <<_ACEOF
17508 /* end confdefs.h.  */
17509 #include <krb5.h>
17510
17511 int
17512 main ()
17513 {
17514 static krb5_ticket ac_aggr;
17515 if (ac_aggr.enc_part2)
17516 return 0;
17517   ;
17518   return 0;
17519 }
17520 _ACEOF
17521 rm -f conftest.$ac_objext
17522 if { (ac_try="$ac_compile"
17523 case "(($ac_try" in
17524   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17525   *) ac_try_echo=$ac_try;;
17526 esac
17527 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17528 $as_echo "$ac_try_echo") >&5
17529   (eval "$ac_compile") 2>conftest.er1
17530   ac_status=$?
17531   grep -v '^ *+' conftest.er1 >conftest.err
17532   rm -f conftest.er1
17533   cat conftest.err >&5
17534   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17535   (exit $ac_status); } && {
17536          test -z "$ac_c_werror_flag" ||
17537          test ! -s conftest.err
17538        } && test -s conftest.$ac_objext; then
17539   ac_cv_member_krb5_ticket_enc_part2=yes
17540 else
17541   $as_echo "$as_me: failed program was:" >&5
17542 sed 's/^/| /' conftest.$ac_ext >&5
17543
17544         cat >conftest.$ac_ext <<_ACEOF
17545 /* confdefs.h.  */
17546 _ACEOF
17547 cat confdefs.h >>conftest.$ac_ext
17548 cat >>conftest.$ac_ext <<_ACEOF
17549 /* end confdefs.h.  */
17550 #include <krb5.h>
17551
17552 int
17553 main ()
17554 {
17555 static krb5_ticket ac_aggr;
17556 if (sizeof ac_aggr.enc_part2)
17557 return 0;
17558   ;
17559   return 0;
17560 }
17561 _ACEOF
17562 rm -f conftest.$ac_objext
17563 if { (ac_try="$ac_compile"
17564 case "(($ac_try" in
17565   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17566   *) ac_try_echo=$ac_try;;
17567 esac
17568 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17569 $as_echo "$ac_try_echo") >&5
17570   (eval "$ac_compile") 2>conftest.er1
17571   ac_status=$?
17572   grep -v '^ *+' conftest.er1 >conftest.err
17573   rm -f conftest.er1
17574   cat conftest.err >&5
17575   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17576   (exit $ac_status); } && {
17577          test -z "$ac_c_werror_flag" ||
17578          test ! -s conftest.err
17579        } && test -s conftest.$ac_objext; then
17580   ac_cv_member_krb5_ticket_enc_part2=yes
17581 else
17582   $as_echo "$as_me: failed program was:" >&5
17583 sed 's/^/| /' conftest.$ac_ext >&5
17584
17585         ac_cv_member_krb5_ticket_enc_part2=no
17586 fi
17587
17588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17589 fi
17590
17591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17592 fi
17593 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
17594 $as_echo "$ac_cv_member_krb5_ticket_enc_part2" >&6; }
17595 if test "x$ac_cv_member_krb5_ticket_enc_part2" = x""yes; then
17596
17597 cat >>confdefs.h <<_ACEOF
17598 #define HAVE_KRB5_TICKET_ENC_PART2 1
17599 _ACEOF
17600
17601
17602 else
17603   { $as_echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
17604 $as_echo_n "checking for krb5_ticket.client... " >&6; }
17605 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
17606   $as_echo_n "(cached) " >&6
17607 else
17608   cat >conftest.$ac_ext <<_ACEOF
17609 /* confdefs.h.  */
17610 _ACEOF
17611 cat confdefs.h >>conftest.$ac_ext
17612 cat >>conftest.$ac_ext <<_ACEOF
17613 /* end confdefs.h.  */
17614 #include <krb5.h>
17615
17616 int
17617 main ()
17618 {
17619 static krb5_ticket ac_aggr;
17620 if (ac_aggr.client)
17621 return 0;
17622   ;
17623   return 0;
17624 }
17625 _ACEOF
17626 rm -f conftest.$ac_objext
17627 if { (ac_try="$ac_compile"
17628 case "(($ac_try" in
17629   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17630   *) ac_try_echo=$ac_try;;
17631 esac
17632 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17633 $as_echo "$ac_try_echo") >&5
17634   (eval "$ac_compile") 2>conftest.er1
17635   ac_status=$?
17636   grep -v '^ *+' conftest.er1 >conftest.err
17637   rm -f conftest.er1
17638   cat conftest.err >&5
17639   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17640   (exit $ac_status); } && {
17641          test -z "$ac_c_werror_flag" ||
17642          test ! -s conftest.err
17643        } && test -s conftest.$ac_objext; then
17644   ac_cv_member_krb5_ticket_client=yes
17645 else
17646   $as_echo "$as_me: failed program was:" >&5
17647 sed 's/^/| /' conftest.$ac_ext >&5
17648
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
17657 int
17658 main ()
17659 {
17660 static krb5_ticket ac_aggr;
17661 if (sizeof ac_aggr.client)
17662 return 0;
17663   ;
17664   return 0;
17665 }
17666 _ACEOF
17667 rm -f conftest.$ac_objext
17668 if { (ac_try="$ac_compile"
17669 case "(($ac_try" in
17670   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17671   *) ac_try_echo=$ac_try;;
17672 esac
17673 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17674 $as_echo "$ac_try_echo") >&5
17675   (eval "$ac_compile") 2>conftest.er1
17676   ac_status=$?
17677   grep -v '^ *+' conftest.er1 >conftest.err
17678   rm -f conftest.er1
17679   cat conftest.err >&5
17680   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17681   (exit $ac_status); } && {
17682          test -z "$ac_c_werror_flag" ||
17683          test ! -s conftest.err
17684        } && test -s conftest.$ac_objext; then
17685   ac_cv_member_krb5_ticket_client=yes
17686 else
17687   $as_echo "$as_me: failed program was:" >&5
17688 sed 's/^/| /' conftest.$ac_ext >&5
17689
17690         ac_cv_member_krb5_ticket_client=no
17691 fi
17692
17693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17694 fi
17695
17696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17697 fi
17698 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
17699 $as_echo "$ac_cv_member_krb5_ticket_client" >&6; }
17700 if test "x$ac_cv_member_krb5_ticket_client" = x""yes; then
17701
17702 cat >>confdefs.h <<_ACEOF
17703 #define HAVE_KRB5_TICKET_CLIENT 1
17704 _ACEOF
17705
17706
17707 else
17708   { { $as_echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
17709 $as_echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
17710    { (exit 1); exit 1; }; }
17711 fi
17712
17713 fi
17714
17715   { $as_echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
17716 $as_echo_n "checking for krb5_error.text.data... " >&6; }
17717 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
17718   $as_echo_n "(cached) " >&6
17719 else
17720   cat >conftest.$ac_ext <<_ACEOF
17721 /* confdefs.h.  */
17722 _ACEOF
17723 cat confdefs.h >>conftest.$ac_ext
17724 cat >>conftest.$ac_ext <<_ACEOF
17725 /* end confdefs.h.  */
17726 #include <krb5.h>
17727
17728 int
17729 main ()
17730 {
17731 static krb5_error ac_aggr;
17732 if (ac_aggr.text.data)
17733 return 0;
17734   ;
17735   return 0;
17736 }
17737 _ACEOF
17738 rm -f conftest.$ac_objext
17739 if { (ac_try="$ac_compile"
17740 case "(($ac_try" in
17741   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17742   *) ac_try_echo=$ac_try;;
17743 esac
17744 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17745 $as_echo "$ac_try_echo") >&5
17746   (eval "$ac_compile") 2>conftest.er1
17747   ac_status=$?
17748   grep -v '^ *+' conftest.er1 >conftest.err
17749   rm -f conftest.er1
17750   cat conftest.err >&5
17751   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17752   (exit $ac_status); } && {
17753          test -z "$ac_c_werror_flag" ||
17754          test ! -s conftest.err
17755        } && test -s conftest.$ac_objext; then
17756   ac_cv_member_krb5_error_text_data=yes
17757 else
17758   $as_echo "$as_me: failed program was:" >&5
17759 sed 's/^/| /' conftest.$ac_ext >&5
17760
17761         cat >conftest.$ac_ext <<_ACEOF
17762 /* confdefs.h.  */
17763 _ACEOF
17764 cat confdefs.h >>conftest.$ac_ext
17765 cat >>conftest.$ac_ext <<_ACEOF
17766 /* end confdefs.h.  */
17767 #include <krb5.h>
17768
17769 int
17770 main ()
17771 {
17772 static krb5_error ac_aggr;
17773 if (sizeof ac_aggr.text.data)
17774 return 0;
17775   ;
17776   return 0;
17777 }
17778 _ACEOF
17779 rm -f conftest.$ac_objext
17780 if { (ac_try="$ac_compile"
17781 case "(($ac_try" in
17782   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17783   *) ac_try_echo=$ac_try;;
17784 esac
17785 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17786 $as_echo "$ac_try_echo") >&5
17787   (eval "$ac_compile") 2>conftest.er1
17788   ac_status=$?
17789   grep -v '^ *+' conftest.er1 >conftest.err
17790   rm -f conftest.er1
17791   cat conftest.err >&5
17792   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17793   (exit $ac_status); } && {
17794          test -z "$ac_c_werror_flag" ||
17795          test ! -s conftest.err
17796        } && test -s conftest.$ac_objext; then
17797   ac_cv_member_krb5_error_text_data=yes
17798 else
17799   $as_echo "$as_me: failed program was:" >&5
17800 sed 's/^/| /' conftest.$ac_ext >&5
17801
17802         ac_cv_member_krb5_error_text_data=no
17803 fi
17804
17805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17806 fi
17807
17808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17809 fi
17810 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
17811 $as_echo "$ac_cv_member_krb5_error_text_data" >&6; }
17812 if test "x$ac_cv_member_krb5_error_text_data" = x""yes; then
17813
17814 cat >>confdefs.h <<_ACEOF
17815 #define HAVE_KRB5_ERROR_TEXT_DATA 1
17816 _ACEOF
17817
17818
17819 else
17820   { $as_echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
17821 $as_echo_n "checking for krb5_error.e_data... " >&6; }
17822 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
17823   $as_echo_n "(cached) " >&6
17824 else
17825   cat >conftest.$ac_ext <<_ACEOF
17826 /* confdefs.h.  */
17827 _ACEOF
17828 cat confdefs.h >>conftest.$ac_ext
17829 cat >>conftest.$ac_ext <<_ACEOF
17830 /* end confdefs.h.  */
17831 #include <krb5.h>
17832
17833 int
17834 main ()
17835 {
17836 static krb5_error ac_aggr;
17837 if (ac_aggr.e_data)
17838 return 0;
17839   ;
17840   return 0;
17841 }
17842 _ACEOF
17843 rm -f conftest.$ac_objext
17844 if { (ac_try="$ac_compile"
17845 case "(($ac_try" in
17846   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17847   *) ac_try_echo=$ac_try;;
17848 esac
17849 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17850 $as_echo "$ac_try_echo") >&5
17851   (eval "$ac_compile") 2>conftest.er1
17852   ac_status=$?
17853   grep -v '^ *+' conftest.er1 >conftest.err
17854   rm -f conftest.er1
17855   cat conftest.err >&5
17856   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17857   (exit $ac_status); } && {
17858          test -z "$ac_c_werror_flag" ||
17859          test ! -s conftest.err
17860        } && test -s conftest.$ac_objext; then
17861   ac_cv_member_krb5_error_e_data=yes
17862 else
17863   $as_echo "$as_me: failed program was:" >&5
17864 sed 's/^/| /' conftest.$ac_ext >&5
17865
17866         cat >conftest.$ac_ext <<_ACEOF
17867 /* confdefs.h.  */
17868 _ACEOF
17869 cat confdefs.h >>conftest.$ac_ext
17870 cat >>conftest.$ac_ext <<_ACEOF
17871 /* end confdefs.h.  */
17872 #include <krb5.h>
17873
17874 int
17875 main ()
17876 {
17877 static krb5_error ac_aggr;
17878 if (sizeof ac_aggr.e_data)
17879 return 0;
17880   ;
17881   return 0;
17882 }
17883 _ACEOF
17884 rm -f conftest.$ac_objext
17885 if { (ac_try="$ac_compile"
17886 case "(($ac_try" in
17887   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17888   *) ac_try_echo=$ac_try;;
17889 esac
17890 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17891 $as_echo "$ac_try_echo") >&5
17892   (eval "$ac_compile") 2>conftest.er1
17893   ac_status=$?
17894   grep -v '^ *+' conftest.er1 >conftest.err
17895   rm -f conftest.er1
17896   cat conftest.err >&5
17897   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17898   (exit $ac_status); } && {
17899          test -z "$ac_c_werror_flag" ||
17900          test ! -s conftest.err
17901        } && test -s conftest.$ac_objext; then
17902   ac_cv_member_krb5_error_e_data=yes
17903 else
17904   $as_echo "$as_me: failed program was:" >&5
17905 sed 's/^/| /' conftest.$ac_ext >&5
17906
17907         ac_cv_member_krb5_error_e_data=no
17908 fi
17909
17910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17911 fi
17912
17913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17914 fi
17915 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
17916 $as_echo "$ac_cv_member_krb5_error_e_data" >&6; }
17917 if test "x$ac_cv_member_krb5_error_e_data" = x""yes; then
17918
17919 cat >>confdefs.h <<_ACEOF
17920 #define HAVE_KRB5_ERROR_E_DATA 1
17921 _ACEOF
17922
17923
17924 else
17925   { { $as_echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
17926 $as_echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
17927    { (exit 1); exit 1; }; }
17928 fi
17929
17930 fi
17931
17932
17933 # Win32 requires headers to be loaded for __stdcall, so can't use
17934 # AC_CHECK_FUNCS here.
17935   { $as_echo "$as_me:$LINENO: checking for krb5_free_unparsed_name" >&5
17936 $as_echo_n "checking for krb5_free_unparsed_name... " >&6; }
17937   cat >conftest.$ac_ext <<_ACEOF
17938 /* confdefs.h.  */
17939 _ACEOF
17940 cat confdefs.h >>conftest.$ac_ext
17941 cat >>conftest.$ac_ext <<_ACEOF
17942 /* end confdefs.h.  */
17943 #include <krb5.h>
17944 int
17945 main ()
17946 {
17947 krb5_free_unparsed_name(NULL,NULL);
17948   ;
17949   return 0;
17950 }
17951 _ACEOF
17952 rm -f conftest.$ac_objext conftest$ac_exeext
17953 if { (ac_try="$ac_link"
17954 case "(($ac_try" in
17955   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17956   *) ac_try_echo=$ac_try;;
17957 esac
17958 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17959 $as_echo "$ac_try_echo") >&5
17960   (eval "$ac_link") 2>conftest.er1
17961   ac_status=$?
17962   grep -v '^ *+' conftest.er1 >conftest.err
17963   rm -f conftest.er1
17964   cat conftest.err >&5
17965   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17966   (exit $ac_status); } && {
17967          test -z "$ac_c_werror_flag" ||
17968          test ! -s conftest.err
17969        } && test -s conftest$ac_exeext && {
17970          test "$cross_compiling" = yes ||
17971          $as_test_x conftest$ac_exeext
17972        }; then
17973
17974 cat >>confdefs.h <<\_ACEOF
17975 #define HAVE_KRB5_FREE_UNPARSED_NAME 1
17976 _ACEOF
17977
17978 { $as_echo "$as_me:$LINENO: result: yes" >&5
17979 $as_echo "yes" >&6; }
17980 else
17981   $as_echo "$as_me: failed program was:" >&5
17982 sed 's/^/| /' conftest.$ac_ext >&5
17983
17984         { $as_echo "$as_me:$LINENO: result: no" >&5
17985 $as_echo "no" >&6; }
17986 fi
17987
17988 rm -rf conftest.dSYM
17989 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17990       conftest$ac_exeext conftest.$ac_ext
17991 fi
17992
17993 # Check largefile support.  You might think this is a system service not a
17994 # compiler characteristic, but you'd be wrong.  We must check this before
17995 # probing existence of related functions such as fseeko, since the largefile
17996 # defines can affect what is generated for that.
17997 # Check whether --enable-largefile was given.
17998 if test "${enable_largefile+set}" = set; then
17999   enableval=$enable_largefile;
18000 fi
18001
18002 if test "$enable_largefile" != no; then
18003
18004   { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
18005 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
18006 if test "${ac_cv_sys_largefile_CC+set}" = set; then
18007   $as_echo_n "(cached) " >&6
18008 else
18009   ac_cv_sys_largefile_CC=no
18010      if test "$GCC" != yes; then
18011        ac_save_CC=$CC
18012        while :; do
18013          # IRIX 6.2 and later do not support large files by default,
18014          # so use the C compiler's -n32 option if that helps.
18015          cat >conftest.$ac_ext <<_ACEOF
18016 /* confdefs.h.  */
18017 _ACEOF
18018 cat confdefs.h >>conftest.$ac_ext
18019 cat >>conftest.$ac_ext <<_ACEOF
18020 /* end confdefs.h.  */
18021 #include <sys/types.h>
18022  /* Check that off_t can represent 2**63 - 1 correctly.
18023     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18024     since some C++ compilers masquerading as C compilers
18025     incorrectly reject 9223372036854775807.  */
18026 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18027   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18028                        && LARGE_OFF_T % 2147483647 == 1)
18029                       ? 1 : -1];
18030 int
18031 main ()
18032 {
18033
18034   ;
18035   return 0;
18036 }
18037 _ACEOF
18038          rm -f conftest.$ac_objext
18039 if { (ac_try="$ac_compile"
18040 case "(($ac_try" in
18041   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18042   *) ac_try_echo=$ac_try;;
18043 esac
18044 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18045 $as_echo "$ac_try_echo") >&5
18046   (eval "$ac_compile") 2>conftest.er1
18047   ac_status=$?
18048   grep -v '^ *+' conftest.er1 >conftest.err
18049   rm -f conftest.er1
18050   cat conftest.err >&5
18051   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18052   (exit $ac_status); } && {
18053          test -z "$ac_c_werror_flag" ||
18054          test ! -s conftest.err
18055        } && test -s conftest.$ac_objext; then
18056   break
18057 else
18058   $as_echo "$as_me: failed program was:" >&5
18059 sed 's/^/| /' conftest.$ac_ext >&5
18060
18061
18062 fi
18063
18064 rm -f core conftest.err conftest.$ac_objext
18065          CC="$CC -n32"
18066          rm -f conftest.$ac_objext
18067 if { (ac_try="$ac_compile"
18068 case "(($ac_try" in
18069   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18070   *) ac_try_echo=$ac_try;;
18071 esac
18072 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18073 $as_echo "$ac_try_echo") >&5
18074   (eval "$ac_compile") 2>conftest.er1
18075   ac_status=$?
18076   grep -v '^ *+' conftest.er1 >conftest.err
18077   rm -f conftest.er1
18078   cat conftest.err >&5
18079   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18080   (exit $ac_status); } && {
18081          test -z "$ac_c_werror_flag" ||
18082          test ! -s conftest.err
18083        } && test -s conftest.$ac_objext; then
18084   ac_cv_sys_largefile_CC=' -n32'; break
18085 else
18086   $as_echo "$as_me: failed program was:" >&5
18087 sed 's/^/| /' conftest.$ac_ext >&5
18088
18089
18090 fi
18091
18092 rm -f core conftest.err conftest.$ac_objext
18093          break
18094        done
18095        CC=$ac_save_CC
18096        rm -f conftest.$ac_ext
18097     fi
18098 fi
18099 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
18100 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
18101   if test "$ac_cv_sys_largefile_CC" != no; then
18102     CC=$CC$ac_cv_sys_largefile_CC
18103   fi
18104
18105   { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
18106 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
18107 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
18108   $as_echo_n "(cached) " >&6
18109 else
18110   while :; do
18111   cat >conftest.$ac_ext <<_ACEOF
18112 /* confdefs.h.  */
18113 _ACEOF
18114 cat confdefs.h >>conftest.$ac_ext
18115 cat >>conftest.$ac_ext <<_ACEOF
18116 /* end confdefs.h.  */
18117 #include <sys/types.h>
18118  /* Check that off_t can represent 2**63 - 1 correctly.
18119     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18120     since some C++ compilers masquerading as C compilers
18121     incorrectly reject 9223372036854775807.  */
18122 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18123   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18124                        && LARGE_OFF_T % 2147483647 == 1)
18125                       ? 1 : -1];
18126 int
18127 main ()
18128 {
18129
18130   ;
18131   return 0;
18132 }
18133 _ACEOF
18134 rm -f conftest.$ac_objext
18135 if { (ac_try="$ac_compile"
18136 case "(($ac_try" in
18137   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18138   *) ac_try_echo=$ac_try;;
18139 esac
18140 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18141 $as_echo "$ac_try_echo") >&5
18142   (eval "$ac_compile") 2>conftest.er1
18143   ac_status=$?
18144   grep -v '^ *+' conftest.er1 >conftest.err
18145   rm -f conftest.er1
18146   cat conftest.err >&5
18147   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18148   (exit $ac_status); } && {
18149          test -z "$ac_c_werror_flag" ||
18150          test ! -s conftest.err
18151        } && test -s conftest.$ac_objext; then
18152   ac_cv_sys_file_offset_bits=no; break
18153 else
18154   $as_echo "$as_me: failed program was:" >&5
18155 sed 's/^/| /' conftest.$ac_ext >&5
18156
18157
18158 fi
18159
18160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18161   cat >conftest.$ac_ext <<_ACEOF
18162 /* confdefs.h.  */
18163 _ACEOF
18164 cat confdefs.h >>conftest.$ac_ext
18165 cat >>conftest.$ac_ext <<_ACEOF
18166 /* end confdefs.h.  */
18167 #define _FILE_OFFSET_BITS 64
18168 #include <sys/types.h>
18169  /* Check that off_t can represent 2**63 - 1 correctly.
18170     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18171     since some C++ compilers masquerading as C compilers
18172     incorrectly reject 9223372036854775807.  */
18173 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18174   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18175                        && LARGE_OFF_T % 2147483647 == 1)
18176                       ? 1 : -1];
18177 int
18178 main ()
18179 {
18180
18181   ;
18182   return 0;
18183 }
18184 _ACEOF
18185 rm -f conftest.$ac_objext
18186 if { (ac_try="$ac_compile"
18187 case "(($ac_try" in
18188   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18189   *) ac_try_echo=$ac_try;;
18190 esac
18191 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18192 $as_echo "$ac_try_echo") >&5
18193   (eval "$ac_compile") 2>conftest.er1
18194   ac_status=$?
18195   grep -v '^ *+' conftest.er1 >conftest.err
18196   rm -f conftest.er1
18197   cat conftest.err >&5
18198   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18199   (exit $ac_status); } && {
18200          test -z "$ac_c_werror_flag" ||
18201          test ! -s conftest.err
18202        } && test -s conftest.$ac_objext; then
18203   ac_cv_sys_file_offset_bits=64; break
18204 else
18205   $as_echo "$as_me: failed program was:" >&5
18206 sed 's/^/| /' conftest.$ac_ext >&5
18207
18208
18209 fi
18210
18211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18212   ac_cv_sys_file_offset_bits=unknown
18213   break
18214 done
18215 fi
18216 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
18217 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
18218 case $ac_cv_sys_file_offset_bits in #(
18219   no | unknown) ;;
18220   *)
18221 cat >>confdefs.h <<_ACEOF
18222 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
18223 _ACEOF
18224 ;;
18225 esac
18226 rm -rf conftest*
18227   if test $ac_cv_sys_file_offset_bits = unknown; then
18228     { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
18229 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
18230 if test "${ac_cv_sys_large_files+set}" = set; then
18231   $as_echo_n "(cached) " >&6
18232 else
18233   while :; do
18234   cat >conftest.$ac_ext <<_ACEOF
18235 /* confdefs.h.  */
18236 _ACEOF
18237 cat confdefs.h >>conftest.$ac_ext
18238 cat >>conftest.$ac_ext <<_ACEOF
18239 /* end confdefs.h.  */
18240 #include <sys/types.h>
18241  /* Check that off_t can represent 2**63 - 1 correctly.
18242     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18243     since some C++ compilers masquerading as C compilers
18244     incorrectly reject 9223372036854775807.  */
18245 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18246   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18247                        && LARGE_OFF_T % 2147483647 == 1)
18248                       ? 1 : -1];
18249 int
18250 main ()
18251 {
18252
18253   ;
18254   return 0;
18255 }
18256 _ACEOF
18257 rm -f conftest.$ac_objext
18258 if { (ac_try="$ac_compile"
18259 case "(($ac_try" in
18260   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18261   *) ac_try_echo=$ac_try;;
18262 esac
18263 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18264 $as_echo "$ac_try_echo") >&5
18265   (eval "$ac_compile") 2>conftest.er1
18266   ac_status=$?
18267   grep -v '^ *+' conftest.er1 >conftest.err
18268   rm -f conftest.er1
18269   cat conftest.err >&5
18270   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18271   (exit $ac_status); } && {
18272          test -z "$ac_c_werror_flag" ||
18273          test ! -s conftest.err
18274        } && test -s conftest.$ac_objext; then
18275   ac_cv_sys_large_files=no; break
18276 else
18277   $as_echo "$as_me: failed program was:" >&5
18278 sed 's/^/| /' conftest.$ac_ext >&5
18279
18280
18281 fi
18282
18283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18284   cat >conftest.$ac_ext <<_ACEOF
18285 /* confdefs.h.  */
18286 _ACEOF
18287 cat confdefs.h >>conftest.$ac_ext
18288 cat >>conftest.$ac_ext <<_ACEOF
18289 /* end confdefs.h.  */
18290 #define _LARGE_FILES 1
18291 #include <sys/types.h>
18292  /* Check that off_t can represent 2**63 - 1 correctly.
18293     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18294     since some C++ compilers masquerading as C compilers
18295     incorrectly reject 9223372036854775807.  */
18296 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18297   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18298                        && LARGE_OFF_T % 2147483647 == 1)
18299                       ? 1 : -1];
18300 int
18301 main ()
18302 {
18303
18304   ;
18305   return 0;
18306 }
18307 _ACEOF
18308 rm -f conftest.$ac_objext
18309 if { (ac_try="$ac_compile"
18310 case "(($ac_try" in
18311   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18312   *) ac_try_echo=$ac_try;;
18313 esac
18314 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18315 $as_echo "$ac_try_echo") >&5
18316   (eval "$ac_compile") 2>conftest.er1
18317   ac_status=$?
18318   grep -v '^ *+' conftest.er1 >conftest.err
18319   rm -f conftest.er1
18320   cat conftest.err >&5
18321   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18322   (exit $ac_status); } && {
18323          test -z "$ac_c_werror_flag" ||
18324          test ! -s conftest.err
18325        } && test -s conftest.$ac_objext; then
18326   ac_cv_sys_large_files=1; break
18327 else
18328   $as_echo "$as_me: failed program was:" >&5
18329 sed 's/^/| /' conftest.$ac_ext >&5
18330
18331
18332 fi
18333
18334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18335   ac_cv_sys_large_files=unknown
18336   break
18337 done
18338 fi
18339 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
18340 $as_echo "$ac_cv_sys_large_files" >&6; }
18341 case $ac_cv_sys_large_files in #(
18342   no | unknown) ;;
18343   *)
18344 cat >>confdefs.h <<_ACEOF
18345 #define _LARGE_FILES $ac_cv_sys_large_files
18346 _ACEOF
18347 ;;
18348 esac
18349 rm -rf conftest*
18350   fi
18351 fi
18352
18353
18354 # Check for largefile support (must be after AC_SYS_LARGEFILE)
18355 # The cast to long int works around a bug in the HP C Compiler
18356 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18357 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18358 # This bug is HP SR number 8606223364.
18359 { $as_echo "$as_me:$LINENO: checking size of off_t" >&5
18360 $as_echo_n "checking size of off_t... " >&6; }
18361 if test "${ac_cv_sizeof_off_t+set}" = set; then
18362   $as_echo_n "(cached) " >&6
18363 else
18364   if test "$cross_compiling" = yes; then
18365   # Depending upon the size, compute the lo and hi bounds.
18366 cat >conftest.$ac_ext <<_ACEOF
18367 /* confdefs.h.  */
18368 _ACEOF
18369 cat confdefs.h >>conftest.$ac_ext
18370 cat >>conftest.$ac_ext <<_ACEOF
18371 /* end confdefs.h.  */
18372 $ac_includes_default
18373 int
18374 main ()
18375 {
18376 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= 0)];
18377 test_array [0] = 0
18378
18379   ;
18380   return 0;
18381 }
18382 _ACEOF
18383 rm -f conftest.$ac_objext
18384 if { (ac_try="$ac_compile"
18385 case "(($ac_try" in
18386   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18387   *) ac_try_echo=$ac_try;;
18388 esac
18389 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18390 $as_echo "$ac_try_echo") >&5
18391   (eval "$ac_compile") 2>conftest.er1
18392   ac_status=$?
18393   grep -v '^ *+' conftest.er1 >conftest.err
18394   rm -f conftest.er1
18395   cat conftest.err >&5
18396   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18397   (exit $ac_status); } && {
18398          test -z "$ac_c_werror_flag" ||
18399          test ! -s conftest.err
18400        } && test -s conftest.$ac_objext; then
18401   ac_lo=0 ac_mid=0
18402   while :; do
18403     cat >conftest.$ac_ext <<_ACEOF
18404 /* confdefs.h.  */
18405 _ACEOF
18406 cat confdefs.h >>conftest.$ac_ext
18407 cat >>conftest.$ac_ext <<_ACEOF
18408 /* end confdefs.h.  */
18409 $ac_includes_default
18410 int
18411 main ()
18412 {
18413 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
18414 test_array [0] = 0
18415
18416   ;
18417   return 0;
18418 }
18419 _ACEOF
18420 rm -f conftest.$ac_objext
18421 if { (ac_try="$ac_compile"
18422 case "(($ac_try" in
18423   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18424   *) ac_try_echo=$ac_try;;
18425 esac
18426 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18427 $as_echo "$ac_try_echo") >&5
18428   (eval "$ac_compile") 2>conftest.er1
18429   ac_status=$?
18430   grep -v '^ *+' conftest.er1 >conftest.err
18431   rm -f conftest.er1
18432   cat conftest.err >&5
18433   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18434   (exit $ac_status); } && {
18435          test -z "$ac_c_werror_flag" ||
18436          test ! -s conftest.err
18437        } && test -s conftest.$ac_objext; then
18438   ac_hi=$ac_mid; break
18439 else
18440   $as_echo "$as_me: failed program was:" >&5
18441 sed 's/^/| /' conftest.$ac_ext >&5
18442
18443         ac_lo=`expr $ac_mid + 1`
18444                         if test $ac_lo -le $ac_mid; then
18445                           ac_lo= ac_hi=
18446                           break
18447                         fi
18448                         ac_mid=`expr 2 '*' $ac_mid + 1`
18449 fi
18450
18451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18452   done
18453 else
18454   $as_echo "$as_me: failed program was:" >&5
18455 sed 's/^/| /' conftest.$ac_ext >&5
18456
18457         cat >conftest.$ac_ext <<_ACEOF
18458 /* confdefs.h.  */
18459 _ACEOF
18460 cat confdefs.h >>conftest.$ac_ext
18461 cat >>conftest.$ac_ext <<_ACEOF
18462 /* end confdefs.h.  */
18463 $ac_includes_default
18464 int
18465 main ()
18466 {
18467 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) < 0)];
18468 test_array [0] = 0
18469
18470   ;
18471   return 0;
18472 }
18473 _ACEOF
18474 rm -f conftest.$ac_objext
18475 if { (ac_try="$ac_compile"
18476 case "(($ac_try" in
18477   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18478   *) ac_try_echo=$ac_try;;
18479 esac
18480 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18481 $as_echo "$ac_try_echo") >&5
18482   (eval "$ac_compile") 2>conftest.er1
18483   ac_status=$?
18484   grep -v '^ *+' conftest.er1 >conftest.err
18485   rm -f conftest.er1
18486   cat conftest.err >&5
18487   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18488   (exit $ac_status); } && {
18489          test -z "$ac_c_werror_flag" ||
18490          test ! -s conftest.err
18491        } && test -s conftest.$ac_objext; then
18492   ac_hi=-1 ac_mid=-1
18493   while :; do
18494     cat >conftest.$ac_ext <<_ACEOF
18495 /* confdefs.h.  */
18496 _ACEOF
18497 cat confdefs.h >>conftest.$ac_ext
18498 cat >>conftest.$ac_ext <<_ACEOF
18499 /* end confdefs.h.  */
18500 $ac_includes_default
18501 int
18502 main ()
18503 {
18504 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $ac_mid)];
18505 test_array [0] = 0
18506
18507   ;
18508   return 0;
18509 }
18510 _ACEOF
18511 rm -f conftest.$ac_objext
18512 if { (ac_try="$ac_compile"
18513 case "(($ac_try" in
18514   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18515   *) ac_try_echo=$ac_try;;
18516 esac
18517 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18518 $as_echo "$ac_try_echo") >&5
18519   (eval "$ac_compile") 2>conftest.er1
18520   ac_status=$?
18521   grep -v '^ *+' conftest.er1 >conftest.err
18522   rm -f conftest.er1
18523   cat conftest.err >&5
18524   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18525   (exit $ac_status); } && {
18526          test -z "$ac_c_werror_flag" ||
18527          test ! -s conftest.err
18528        } && test -s conftest.$ac_objext; then
18529   ac_lo=$ac_mid; break
18530 else
18531   $as_echo "$as_me: failed program was:" >&5
18532 sed 's/^/| /' conftest.$ac_ext >&5
18533
18534         ac_hi=`expr '(' $ac_mid ')' - 1`
18535                         if test $ac_mid -le $ac_hi; then
18536                           ac_lo= ac_hi=
18537                           break
18538                         fi
18539                         ac_mid=`expr 2 '*' $ac_mid`
18540 fi
18541
18542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18543   done
18544 else
18545   $as_echo "$as_me: failed program was:" >&5
18546 sed 's/^/| /' conftest.$ac_ext >&5
18547
18548         ac_lo= ac_hi=
18549 fi
18550
18551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18552 fi
18553
18554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18555 # Binary search between lo and hi bounds.
18556 while test "x$ac_lo" != "x$ac_hi"; do
18557   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18558   cat >conftest.$ac_ext <<_ACEOF
18559 /* confdefs.h.  */
18560 _ACEOF
18561 cat confdefs.h >>conftest.$ac_ext
18562 cat >>conftest.$ac_ext <<_ACEOF
18563 /* end confdefs.h.  */
18564 $ac_includes_default
18565 int
18566 main ()
18567 {
18568 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
18569 test_array [0] = 0
18570
18571   ;
18572   return 0;
18573 }
18574 _ACEOF
18575 rm -f conftest.$ac_objext
18576 if { (ac_try="$ac_compile"
18577 case "(($ac_try" in
18578   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18579   *) ac_try_echo=$ac_try;;
18580 esac
18581 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18582 $as_echo "$ac_try_echo") >&5
18583   (eval "$ac_compile") 2>conftest.er1
18584   ac_status=$?
18585   grep -v '^ *+' conftest.er1 >conftest.err
18586   rm -f conftest.er1
18587   cat conftest.err >&5
18588   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18589   (exit $ac_status); } && {
18590          test -z "$ac_c_werror_flag" ||
18591          test ! -s conftest.err
18592        } && test -s conftest.$ac_objext; then
18593   ac_hi=$ac_mid
18594 else
18595   $as_echo "$as_me: failed program was:" >&5
18596 sed 's/^/| /' conftest.$ac_ext >&5
18597
18598         ac_lo=`expr '(' $ac_mid ')' + 1`
18599 fi
18600
18601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18602 done
18603 case $ac_lo in
18604 ?*) ac_cv_sizeof_off_t=$ac_lo;;
18605 '') if test "$ac_cv_type_off_t" = yes; then
18606      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18607 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18608 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
18609 See \`config.log' for more details." >&5
18610 $as_echo "$as_me: error: cannot compute sizeof (off_t)
18611 See \`config.log' for more details." >&2;}
18612    { (exit 77); exit 77; }; }; }
18613    else
18614      ac_cv_sizeof_off_t=0
18615    fi ;;
18616 esac
18617 else
18618   cat >conftest.$ac_ext <<_ACEOF
18619 /* confdefs.h.  */
18620 _ACEOF
18621 cat confdefs.h >>conftest.$ac_ext
18622 cat >>conftest.$ac_ext <<_ACEOF
18623 /* end confdefs.h.  */
18624 $ac_includes_default
18625 static long int longval () { return (long int) (sizeof (off_t)); }
18626 static unsigned long int ulongval () { return (long int) (sizeof (off_t)); }
18627 #include <stdio.h>
18628 #include <stdlib.h>
18629 int
18630 main ()
18631 {
18632
18633   FILE *f = fopen ("conftest.val", "w");
18634   if (! f)
18635     return 1;
18636   if (((long int) (sizeof (off_t))) < 0)
18637     {
18638       long int i = longval ();
18639       if (i != ((long int) (sizeof (off_t))))
18640         return 1;
18641       fprintf (f, "%ld", i);
18642     }
18643   else
18644     {
18645       unsigned long int i = ulongval ();
18646       if (i != ((long int) (sizeof (off_t))))
18647         return 1;
18648       fprintf (f, "%lu", i);
18649     }
18650   /* Do not output a trailing newline, as this causes \r\n confusion
18651      on some platforms.  */
18652   return ferror (f) || fclose (f) != 0;
18653
18654   ;
18655   return 0;
18656 }
18657 _ACEOF
18658 rm -f conftest$ac_exeext
18659 if { (ac_try="$ac_link"
18660 case "(($ac_try" in
18661   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18662   *) ac_try_echo=$ac_try;;
18663 esac
18664 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18665 $as_echo "$ac_try_echo") >&5
18666   (eval "$ac_link") 2>&5
18667   ac_status=$?
18668   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18669   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18670   { (case "(($ac_try" in
18671   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18672   *) ac_try_echo=$ac_try;;
18673 esac
18674 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18675 $as_echo "$ac_try_echo") >&5
18676   (eval "$ac_try") 2>&5
18677   ac_status=$?
18678   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18679   (exit $ac_status); }; }; then
18680   ac_cv_sizeof_off_t=`cat conftest.val`
18681 else
18682   $as_echo "$as_me: program exited with status $ac_status" >&5
18683 $as_echo "$as_me: failed program was:" >&5
18684 sed 's/^/| /' conftest.$ac_ext >&5
18685
18686 ( exit $ac_status )
18687 if test "$ac_cv_type_off_t" = yes; then
18688      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
18689 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18690 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
18691 See \`config.log' for more details." >&5
18692 $as_echo "$as_me: error: cannot compute sizeof (off_t)
18693 See \`config.log' for more details." >&2;}
18694    { (exit 77); exit 77; }; }; }
18695    else
18696      ac_cv_sizeof_off_t=0
18697    fi
18698 fi
18699 rm -rf conftest.dSYM
18700 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18701 fi
18702 rm -f conftest.val
18703 fi
18704 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
18705 $as_echo "$ac_cv_sizeof_off_t" >&6; }
18706
18707
18708
18709 cat >>confdefs.h <<_ACEOF
18710 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
18711 _ACEOF
18712
18713
18714
18715 # If we don't have largefile support, can't handle segsize >= 2GB.
18716 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
18717    { { $as_echo "$as_me:$LINENO: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&5
18718 $as_echo "$as_me: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&2;}
18719    { (exit 1); exit 1; }; }
18720 fi
18721
18722
18723 ##
18724 ## Functions, global variables
18725 ##
18726
18727 { $as_echo "$as_me:$LINENO: checking for int timezone" >&5
18728 $as_echo_n "checking for int timezone... " >&6; }
18729 if test "${pgac_cv_var_int_timezone+set}" = set; then
18730   $as_echo_n "(cached) " >&6
18731 else
18732   cat >conftest.$ac_ext <<_ACEOF
18733 /* confdefs.h.  */
18734 _ACEOF
18735 cat confdefs.h >>conftest.$ac_ext
18736 cat >>conftest.$ac_ext <<_ACEOF
18737 /* end confdefs.h.  */
18738 #include <time.h>
18739 int res;
18740 int
18741 main ()
18742 {
18743 #ifndef __CYGWIN__
18744 res = timezone / 60;
18745 #else
18746 res = _timezone / 60;
18747 #endif
18748   ;
18749   return 0;
18750 }
18751 _ACEOF
18752 rm -f conftest.$ac_objext conftest$ac_exeext
18753 if { (ac_try="$ac_link"
18754 case "(($ac_try" in
18755   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18756   *) ac_try_echo=$ac_try;;
18757 esac
18758 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18759 $as_echo "$ac_try_echo") >&5
18760   (eval "$ac_link") 2>conftest.er1
18761   ac_status=$?
18762   grep -v '^ *+' conftest.er1 >conftest.err
18763   rm -f conftest.er1
18764   cat conftest.err >&5
18765   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18766   (exit $ac_status); } && {
18767          test -z "$ac_c_werror_flag" ||
18768          test ! -s conftest.err
18769        } && test -s conftest$ac_exeext && {
18770          test "$cross_compiling" = yes ||
18771          $as_test_x conftest$ac_exeext
18772        }; then
18773   pgac_cv_var_int_timezone=yes
18774 else
18775   $as_echo "$as_me: failed program was:" >&5
18776 sed 's/^/| /' conftest.$ac_ext >&5
18777
18778         pgac_cv_var_int_timezone=no
18779 fi
18780
18781 rm -rf conftest.dSYM
18782 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18783       conftest$ac_exeext conftest.$ac_ext
18784 fi
18785 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
18786 $as_echo "$pgac_cv_var_int_timezone" >&6; }
18787 if test x"$pgac_cv_var_int_timezone" = xyes ; then
18788
18789 cat >>confdefs.h <<\_ACEOF
18790 #define HAVE_INT_TIMEZONE /**/
18791 _ACEOF
18792
18793 fi
18794 { $as_echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
18795 $as_echo_n "checking types of arguments for accept()... " >&6; }
18796  if test "${ac_cv_func_accept_return+set}" = set; then
18797   $as_echo_n "(cached) " >&6
18798 else
18799    if test "${ac_cv_func_accept_arg1+set}" = set; then
18800   $as_echo_n "(cached) " >&6
18801 else
18802     if test "${ac_cv_func_accept_arg2+set}" = set; then
18803   $as_echo_n "(cached) " >&6
18804 else
18805      if test "${ac_cv_func_accept_arg3+set}" = set; then
18806   $as_echo_n "(cached) " >&6
18807 else
18808       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET'; do
18809       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
18810        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
18811         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
18812          cat >conftest.$ac_ext <<_ACEOF
18813 /* confdefs.h.  */
18814 _ACEOF
18815 cat confdefs.h >>conftest.$ac_ext
18816 cat >>conftest.$ac_ext <<_ACEOF
18817 /* end confdefs.h.  */
18818 #ifdef HAVE_SYS_TYPES_H
18819 #include <sys/types.h>
18820 #endif
18821 #ifdef HAVE_SYS_SOCKET_H
18822 #include <sys/socket.h>
18823 #endif
18824 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
18825 int
18826 main ()
18827 {
18828
18829   ;
18830   return 0;
18831 }
18832 _ACEOF
18833 rm -f conftest.$ac_objext
18834 if { (ac_try="$ac_compile"
18835 case "(($ac_try" in
18836   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18837   *) ac_try_echo=$ac_try;;
18838 esac
18839 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18840 $as_echo "$ac_try_echo") >&5
18841   (eval "$ac_compile") 2>conftest.er1
18842   ac_status=$?
18843   grep -v '^ *+' conftest.er1 >conftest.err
18844   rm -f conftest.er1
18845   cat conftest.err >&5
18846   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18847   (exit $ac_status); } && {
18848          test -z "$ac_c_werror_flag" ||
18849          test ! -s conftest.err
18850        } && test -s conftest.$ac_objext; then
18851   ac_not_found=no; break 4
18852 else
18853   $as_echo "$as_me: failed program was:" >&5
18854 sed 's/^/| /' conftest.$ac_ext >&5
18855
18856         ac_not_found=yes
18857 fi
18858
18859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18860        done
18861       done
18862      done
18863     done
18864     if test "$ac_not_found" = yes; then
18865       { { $as_echo "$as_me:$LINENO: error: could not determine argument types" >&5
18866 $as_echo "$as_me: error: could not determine argument types" >&2;}
18867    { (exit 1); exit 1; }; }
18868     fi
18869     if test "$ac_cv_func_accept_arg3" = "void"; then
18870       ac_cv_func_accept_arg3=int
18871     fi
18872
18873 fi
18874
18875 fi
18876
18877 fi
18878
18879 fi
18880  { $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
18881 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
18882
18883 cat >>confdefs.h <<_ACEOF
18884 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
18885 _ACEOF
18886
18887
18888 cat >>confdefs.h <<_ACEOF
18889 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
18890 _ACEOF
18891
18892
18893 cat >>confdefs.h <<_ACEOF
18894 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
18895 _ACEOF
18896
18897
18898 cat >>confdefs.h <<_ACEOF
18899 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
18900 _ACEOF
18901
18902
18903 { $as_echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
18904 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
18905 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
18906   $as_echo_n "(cached) " >&6
18907 else
18908   cat >conftest.$ac_ext <<_ACEOF
18909 /* confdefs.h.  */
18910 _ACEOF
18911 cat confdefs.h >>conftest.$ac_ext
18912 cat >>conftest.$ac_ext <<_ACEOF
18913 /* end confdefs.h.  */
18914 #include <sys/time.h>
18915 int
18916 main ()
18917 {
18918 struct timeval *tp;
18919 struct timezone *tzp;
18920 gettimeofday(tp,tzp);
18921   ;
18922   return 0;
18923 }
18924 _ACEOF
18925 rm -f conftest.$ac_objext
18926 if { (ac_try="$ac_compile"
18927 case "(($ac_try" in
18928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18929   *) ac_try_echo=$ac_try;;
18930 esac
18931 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18932 $as_echo "$ac_try_echo") >&5
18933   (eval "$ac_compile") 2>conftest.er1
18934   ac_status=$?
18935   grep -v '^ *+' conftest.er1 >conftest.err
18936   rm -f conftest.er1
18937   cat conftest.err >&5
18938   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18939   (exit $ac_status); } && {
18940          test -z "$ac_c_werror_flag" ||
18941          test ! -s conftest.err
18942        } && test -s conftest.$ac_objext; then
18943   pgac_cv_func_gettimeofday_1arg=no
18944 else
18945   $as_echo "$as_me: failed program was:" >&5
18946 sed 's/^/| /' conftest.$ac_ext >&5
18947
18948         pgac_cv_func_gettimeofday_1arg=yes
18949 fi
18950
18951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18952 fi
18953 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
18954 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
18955 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
18956
18957 cat >>confdefs.h <<\_ACEOF
18958 #define GETTIMEOFDAY_1ARG /**/
18959 _ACEOF
18960
18961 fi
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989 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 wcstombs_l
18990 do
18991 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18992 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18993 $as_echo_n "checking for $ac_func... " >&6; }
18994 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18995   $as_echo_n "(cached) " >&6
18996 else
18997   cat >conftest.$ac_ext <<_ACEOF
18998 /* confdefs.h.  */
18999 _ACEOF
19000 cat confdefs.h >>conftest.$ac_ext
19001 cat >>conftest.$ac_ext <<_ACEOF
19002 /* end confdefs.h.  */
19003 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19004    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19005 #define $ac_func innocuous_$ac_func
19006
19007 /* System header to define __stub macros and hopefully few prototypes,
19008     which can conflict with char $ac_func (); below.
19009     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19010     <limits.h> exists even on freestanding compilers.  */
19011
19012 #ifdef __STDC__
19013 # include <limits.h>
19014 #else
19015 # include <assert.h>
19016 #endif
19017
19018 #undef $ac_func
19019
19020 /* Override any GCC internal prototype to avoid an error.
19021    Use char because int might match the return type of a GCC
19022    builtin and then its argument prototype would still apply.  */
19023 #ifdef __cplusplus
19024 extern "C"
19025 #endif
19026 char $ac_func ();
19027 /* The GNU C library defines this for functions which it implements
19028     to always fail with ENOSYS.  Some functions are actually named
19029     something starting with __ and the normal name is an alias.  */
19030 #if defined __stub_$ac_func || defined __stub___$ac_func
19031 choke me
19032 #endif
19033
19034 int
19035 main ()
19036 {
19037 return $ac_func ();
19038   ;
19039   return 0;
19040 }
19041 _ACEOF
19042 rm -f conftest.$ac_objext conftest$ac_exeext
19043 if { (ac_try="$ac_link"
19044 case "(($ac_try" in
19045   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19046   *) ac_try_echo=$ac_try;;
19047 esac
19048 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19049 $as_echo "$ac_try_echo") >&5
19050   (eval "$ac_link") 2>conftest.er1
19051   ac_status=$?
19052   grep -v '^ *+' conftest.er1 >conftest.err
19053   rm -f conftest.er1
19054   cat conftest.err >&5
19055   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19056   (exit $ac_status); } && {
19057          test -z "$ac_c_werror_flag" ||
19058          test ! -s conftest.err
19059        } && test -s conftest$ac_exeext && {
19060          test "$cross_compiling" = yes ||
19061          $as_test_x conftest$ac_exeext
19062        }; then
19063   eval "$as_ac_var=yes"
19064 else
19065   $as_echo "$as_me: failed program was:" >&5
19066 sed 's/^/| /' conftest.$ac_ext >&5
19067
19068         eval "$as_ac_var=no"
19069 fi
19070
19071 rm -rf conftest.dSYM
19072 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19073       conftest$ac_exeext conftest.$ac_ext
19074 fi
19075 ac_res=`eval 'as_val=${'$as_ac_var'}
19076                  $as_echo "$as_val"'`
19077                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19078 $as_echo "$ac_res" >&6; }
19079 as_val=`eval 'as_val=${'$as_ac_var'}
19080                  $as_echo "$as_val"'`
19081    if test "x$as_val" = x""yes; then
19082   cat >>confdefs.h <<_ACEOF
19083 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19084 _ACEOF
19085
19086 fi
19087 done
19088
19089
19090
19091 for ac_func in fseeko
19092 do
19093 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19094 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19095 $as_echo_n "checking for $ac_func... " >&6; }
19096 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19097   $as_echo_n "(cached) " >&6
19098 else
19099   cat >conftest.$ac_ext <<_ACEOF
19100 /* confdefs.h.  */
19101 _ACEOF
19102 cat confdefs.h >>conftest.$ac_ext
19103 cat >>conftest.$ac_ext <<_ACEOF
19104 /* end confdefs.h.  */
19105 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19106    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19107 #define $ac_func innocuous_$ac_func
19108
19109 /* System header to define __stub macros and hopefully few prototypes,
19110     which can conflict with char $ac_func (); below.
19111     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19112     <limits.h> exists even on freestanding compilers.  */
19113
19114 #ifdef __STDC__
19115 # include <limits.h>
19116 #else
19117 # include <assert.h>
19118 #endif
19119
19120 #undef $ac_func
19121
19122 /* Override any GCC internal prototype to avoid an error.
19123    Use char because int might match the return type of a GCC
19124    builtin and then its argument prototype would still apply.  */
19125 #ifdef __cplusplus
19126 extern "C"
19127 #endif
19128 char $ac_func ();
19129 /* The GNU C library defines this for functions which it implements
19130     to always fail with ENOSYS.  Some functions are actually named
19131     something starting with __ and the normal name is an alias.  */
19132 #if defined __stub_$ac_func || defined __stub___$ac_func
19133 choke me
19134 #endif
19135
19136 int
19137 main ()
19138 {
19139 return $ac_func ();
19140   ;
19141   return 0;
19142 }
19143 _ACEOF
19144 rm -f conftest.$ac_objext conftest$ac_exeext
19145 if { (ac_try="$ac_link"
19146 case "(($ac_try" in
19147   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19148   *) ac_try_echo=$ac_try;;
19149 esac
19150 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19151 $as_echo "$ac_try_echo") >&5
19152   (eval "$ac_link") 2>conftest.er1
19153   ac_status=$?
19154   grep -v '^ *+' conftest.er1 >conftest.err
19155   rm -f conftest.er1
19156   cat conftest.err >&5
19157   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19158   (exit $ac_status); } && {
19159          test -z "$ac_c_werror_flag" ||
19160          test ! -s conftest.err
19161        } && test -s conftest$ac_exeext && {
19162          test "$cross_compiling" = yes ||
19163          $as_test_x conftest$ac_exeext
19164        }; then
19165   eval "$as_ac_var=yes"
19166 else
19167   $as_echo "$as_me: failed program was:" >&5
19168 sed 's/^/| /' conftest.$ac_ext >&5
19169
19170         eval "$as_ac_var=no"
19171 fi
19172
19173 rm -rf conftest.dSYM
19174 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19175       conftest$ac_exeext conftest.$ac_ext
19176 fi
19177 ac_res=`eval 'as_val=${'$as_ac_var'}
19178                  $as_echo "$as_val"'`
19179                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19180 $as_echo "$ac_res" >&6; }
19181 as_val=`eval 'as_val=${'$as_ac_var'}
19182                  $as_echo "$as_val"'`
19183    if test "x$as_val" = x""yes; then
19184   cat >>confdefs.h <<_ACEOF
19185 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19186 _ACEOF
19187
19188 else
19189   case " $LIBOBJS " in
19190   *" $ac_func.$ac_objext "* ) ;;
19191   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19192  ;;
19193 esac
19194
19195 fi
19196 done
19197
19198
19199 case $host_os in
19200         # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
19201         # Mingw uses macros to access Win32 API calls
19202         bsdi*|netbsd*|mingw*)
19203
19204 cat >>confdefs.h <<\_ACEOF
19205 #define HAVE_FSEEKO 1
19206 _ACEOF
19207
19208                 ac_cv_func_fseeko=yes;;
19209         *)
19210                 { $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
19211 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
19212 if test "${ac_cv_sys_largefile_source+set}" = set; then
19213   $as_echo_n "(cached) " >&6
19214 else
19215   while :; do
19216   cat >conftest.$ac_ext <<_ACEOF
19217 /* confdefs.h.  */
19218 _ACEOF
19219 cat confdefs.h >>conftest.$ac_ext
19220 cat >>conftest.$ac_ext <<_ACEOF
19221 /* end confdefs.h.  */
19222 #include <sys/types.h> /* for off_t */
19223      #include <stdio.h>
19224 int
19225 main ()
19226 {
19227 int (*fp) (FILE *, off_t, int) = fseeko;
19228      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
19229   ;
19230   return 0;
19231 }
19232 _ACEOF
19233 rm -f conftest.$ac_objext conftest$ac_exeext
19234 if { (ac_try="$ac_link"
19235 case "(($ac_try" in
19236   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19237   *) ac_try_echo=$ac_try;;
19238 esac
19239 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19240 $as_echo "$ac_try_echo") >&5
19241   (eval "$ac_link") 2>conftest.er1
19242   ac_status=$?
19243   grep -v '^ *+' conftest.er1 >conftest.err
19244   rm -f conftest.er1
19245   cat conftest.err >&5
19246   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19247   (exit $ac_status); } && {
19248          test -z "$ac_c_werror_flag" ||
19249          test ! -s conftest.err
19250        } && test -s conftest$ac_exeext && {
19251          test "$cross_compiling" = yes ||
19252          $as_test_x conftest$ac_exeext
19253        }; then
19254   ac_cv_sys_largefile_source=no; break
19255 else
19256   $as_echo "$as_me: failed program was:" >&5
19257 sed 's/^/| /' conftest.$ac_ext >&5
19258
19259
19260 fi
19261
19262 rm -rf conftest.dSYM
19263 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19264       conftest$ac_exeext conftest.$ac_ext
19265   cat >conftest.$ac_ext <<_ACEOF
19266 /* confdefs.h.  */
19267 _ACEOF
19268 cat confdefs.h >>conftest.$ac_ext
19269 cat >>conftest.$ac_ext <<_ACEOF
19270 /* end confdefs.h.  */
19271 #define _LARGEFILE_SOURCE 1
19272 #include <sys/types.h> /* for off_t */
19273      #include <stdio.h>
19274 int
19275 main ()
19276 {
19277 int (*fp) (FILE *, off_t, int) = fseeko;
19278      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
19279   ;
19280   return 0;
19281 }
19282 _ACEOF
19283 rm -f conftest.$ac_objext conftest$ac_exeext
19284 if { (ac_try="$ac_link"
19285 case "(($ac_try" in
19286   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19287   *) ac_try_echo=$ac_try;;
19288 esac
19289 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19290 $as_echo "$ac_try_echo") >&5
19291   (eval "$ac_link") 2>conftest.er1
19292   ac_status=$?
19293   grep -v '^ *+' conftest.er1 >conftest.err
19294   rm -f conftest.er1
19295   cat conftest.err >&5
19296   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19297   (exit $ac_status); } && {
19298          test -z "$ac_c_werror_flag" ||
19299          test ! -s conftest.err
19300        } && test -s conftest$ac_exeext && {
19301          test "$cross_compiling" = yes ||
19302          $as_test_x conftest$ac_exeext
19303        }; then
19304   ac_cv_sys_largefile_source=1; break
19305 else
19306   $as_echo "$as_me: failed program was:" >&5
19307 sed 's/^/| /' conftest.$ac_ext >&5
19308
19309
19310 fi
19311
19312 rm -rf conftest.dSYM
19313 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19314       conftest$ac_exeext conftest.$ac_ext
19315   ac_cv_sys_largefile_source=unknown
19316   break
19317 done
19318 fi
19319 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
19320 $as_echo "$ac_cv_sys_largefile_source" >&6; }
19321 case $ac_cv_sys_largefile_source in #(
19322   no | unknown) ;;
19323   *)
19324 cat >>confdefs.h <<_ACEOF
19325 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
19326 _ACEOF
19327 ;;
19328 esac
19329 rm -rf conftest*
19330
19331 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
19332 # in glibc 2.1.3, but that breaks too many other things.
19333 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
19334 if test $ac_cv_sys_largefile_source != unknown; then
19335
19336 cat >>confdefs.h <<\_ACEOF
19337 #define HAVE_FSEEKO 1
19338 _ACEOF
19339
19340 fi
19341 ;;
19342 esac
19343
19344 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
19345 # by calling it, 2009-04-02
19346 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
19347 if test "$PORTNAME" != "solaris"; then
19348
19349 for ac_func in posix_fadvise
19350 do
19351 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19352 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19353 $as_echo_n "checking for $ac_func... " >&6; }
19354 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19355   $as_echo_n "(cached) " >&6
19356 else
19357   cat >conftest.$ac_ext <<_ACEOF
19358 /* confdefs.h.  */
19359 _ACEOF
19360 cat confdefs.h >>conftest.$ac_ext
19361 cat >>conftest.$ac_ext <<_ACEOF
19362 /* end confdefs.h.  */
19363 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19364    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19365 #define $ac_func innocuous_$ac_func
19366
19367 /* System header to define __stub macros and hopefully few prototypes,
19368     which can conflict with char $ac_func (); below.
19369     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19370     <limits.h> exists even on freestanding compilers.  */
19371
19372 #ifdef __STDC__
19373 # include <limits.h>
19374 #else
19375 # include <assert.h>
19376 #endif
19377
19378 #undef $ac_func
19379
19380 /* Override any GCC internal prototype to avoid an error.
19381    Use char because int might match the return type of a GCC
19382    builtin and then its argument prototype would still apply.  */
19383 #ifdef __cplusplus
19384 extern "C"
19385 #endif
19386 char $ac_func ();
19387 /* The GNU C library defines this for functions which it implements
19388     to always fail with ENOSYS.  Some functions are actually named
19389     something starting with __ and the normal name is an alias.  */
19390 #if defined __stub_$ac_func || defined __stub___$ac_func
19391 choke me
19392 #endif
19393
19394 int
19395 main ()
19396 {
19397 return $ac_func ();
19398   ;
19399   return 0;
19400 }
19401 _ACEOF
19402 rm -f conftest.$ac_objext conftest$ac_exeext
19403 if { (ac_try="$ac_link"
19404 case "(($ac_try" in
19405   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19406   *) ac_try_echo=$ac_try;;
19407 esac
19408 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19409 $as_echo "$ac_try_echo") >&5
19410   (eval "$ac_link") 2>conftest.er1
19411   ac_status=$?
19412   grep -v '^ *+' conftest.er1 >conftest.err
19413   rm -f conftest.er1
19414   cat conftest.err >&5
19415   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19416   (exit $ac_status); } && {
19417          test -z "$ac_c_werror_flag" ||
19418          test ! -s conftest.err
19419        } && test -s conftest$ac_exeext && {
19420          test "$cross_compiling" = yes ||
19421          $as_test_x conftest$ac_exeext
19422        }; then
19423   eval "$as_ac_var=yes"
19424 else
19425   $as_echo "$as_me: failed program was:" >&5
19426 sed 's/^/| /' conftest.$ac_ext >&5
19427
19428         eval "$as_ac_var=no"
19429 fi
19430
19431 rm -rf conftest.dSYM
19432 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19433       conftest$ac_exeext conftest.$ac_ext
19434 fi
19435 ac_res=`eval 'as_val=${'$as_ac_var'}
19436                  $as_echo "$as_val"'`
19437                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19438 $as_echo "$ac_res" >&6; }
19439 as_val=`eval 'as_val=${'$as_ac_var'}
19440                  $as_echo "$as_val"'`
19441    if test "x$as_val" = x""yes; then
19442   cat >>confdefs.h <<_ACEOF
19443 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19444 _ACEOF
19445
19446 fi
19447 done
19448
19449 { $as_echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
19450 $as_echo_n "checking whether posix_fadvise is declared... " >&6; }
19451 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
19452   $as_echo_n "(cached) " >&6
19453 else
19454   cat >conftest.$ac_ext <<_ACEOF
19455 /* confdefs.h.  */
19456 _ACEOF
19457 cat confdefs.h >>conftest.$ac_ext
19458 cat >>conftest.$ac_ext <<_ACEOF
19459 /* end confdefs.h.  */
19460 #include <fcntl.h>
19461
19462 int
19463 main ()
19464 {
19465 #ifndef posix_fadvise
19466   (void) posix_fadvise;
19467 #endif
19468
19469   ;
19470   return 0;
19471 }
19472 _ACEOF
19473 rm -f conftest.$ac_objext
19474 if { (ac_try="$ac_compile"
19475 case "(($ac_try" in
19476   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19477   *) ac_try_echo=$ac_try;;
19478 esac
19479 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19480 $as_echo "$ac_try_echo") >&5
19481   (eval "$ac_compile") 2>conftest.er1
19482   ac_status=$?
19483   grep -v '^ *+' conftest.er1 >conftest.err
19484   rm -f conftest.er1
19485   cat conftest.err >&5
19486   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19487   (exit $ac_status); } && {
19488          test -z "$ac_c_werror_flag" ||
19489          test ! -s conftest.err
19490        } && test -s conftest.$ac_objext; then
19491   ac_cv_have_decl_posix_fadvise=yes
19492 else
19493   $as_echo "$as_me: failed program was:" >&5
19494 sed 's/^/| /' conftest.$ac_ext >&5
19495
19496         ac_cv_have_decl_posix_fadvise=no
19497 fi
19498
19499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19500 fi
19501 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
19502 $as_echo "$ac_cv_have_decl_posix_fadvise" >&6; }
19503 if test "x$ac_cv_have_decl_posix_fadvise" = x""yes; then
19504
19505 cat >>confdefs.h <<_ACEOF
19506 #define HAVE_DECL_POSIX_FADVISE 1
19507 _ACEOF
19508
19509
19510 else
19511   cat >>confdefs.h <<_ACEOF
19512 #define HAVE_DECL_POSIX_FADVISE 0
19513 _ACEOF
19514
19515
19516 fi
19517
19518
19519 fi
19520
19521 { $as_echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
19522 $as_echo_n "checking whether fdatasync is declared... " >&6; }
19523 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
19524   $as_echo_n "(cached) " >&6
19525 else
19526   cat >conftest.$ac_ext <<_ACEOF
19527 /* confdefs.h.  */
19528 _ACEOF
19529 cat confdefs.h >>conftest.$ac_ext
19530 cat >>conftest.$ac_ext <<_ACEOF
19531 /* end confdefs.h.  */
19532 #include <unistd.h>
19533
19534 int
19535 main ()
19536 {
19537 #ifndef fdatasync
19538   (void) fdatasync;
19539 #endif
19540
19541   ;
19542   return 0;
19543 }
19544 _ACEOF
19545 rm -f conftest.$ac_objext
19546 if { (ac_try="$ac_compile"
19547 case "(($ac_try" in
19548   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19549   *) ac_try_echo=$ac_try;;
19550 esac
19551 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19552 $as_echo "$ac_try_echo") >&5
19553   (eval "$ac_compile") 2>conftest.er1
19554   ac_status=$?
19555   grep -v '^ *+' conftest.er1 >conftest.err
19556   rm -f conftest.er1
19557   cat conftest.err >&5
19558   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19559   (exit $ac_status); } && {
19560          test -z "$ac_c_werror_flag" ||
19561          test ! -s conftest.err
19562        } && test -s conftest.$ac_objext; then
19563   ac_cv_have_decl_fdatasync=yes
19564 else
19565   $as_echo "$as_me: failed program was:" >&5
19566 sed 's/^/| /' conftest.$ac_ext >&5
19567
19568         ac_cv_have_decl_fdatasync=no
19569 fi
19570
19571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19572 fi
19573 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
19574 $as_echo "$ac_cv_have_decl_fdatasync" >&6; }
19575 if test "x$ac_cv_have_decl_fdatasync" = x""yes; then
19576
19577 cat >>confdefs.h <<_ACEOF
19578 #define HAVE_DECL_FDATASYNC 1
19579 _ACEOF
19580
19581
19582 else
19583   cat >>confdefs.h <<_ACEOF
19584 #define HAVE_DECL_FDATASYNC 0
19585 _ACEOF
19586
19587
19588 fi
19589
19590
19591 { $as_echo "$as_me:$LINENO: checking whether strlcat is declared" >&5
19592 $as_echo_n "checking whether strlcat is declared... " >&6; }
19593 if test "${ac_cv_have_decl_strlcat+set}" = set; then
19594   $as_echo_n "(cached) " >&6
19595 else
19596   cat >conftest.$ac_ext <<_ACEOF
19597 /* confdefs.h.  */
19598 _ACEOF
19599 cat confdefs.h >>conftest.$ac_ext
19600 cat >>conftest.$ac_ext <<_ACEOF
19601 /* end confdefs.h.  */
19602 $ac_includes_default
19603 int
19604 main ()
19605 {
19606 #ifndef strlcat
19607   (void) strlcat;
19608 #endif
19609
19610   ;
19611   return 0;
19612 }
19613 _ACEOF
19614 rm -f conftest.$ac_objext
19615 if { (ac_try="$ac_compile"
19616 case "(($ac_try" in
19617   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19618   *) ac_try_echo=$ac_try;;
19619 esac
19620 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19621 $as_echo "$ac_try_echo") >&5
19622   (eval "$ac_compile") 2>conftest.er1
19623   ac_status=$?
19624   grep -v '^ *+' conftest.er1 >conftest.err
19625   rm -f conftest.er1
19626   cat conftest.err >&5
19627   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19628   (exit $ac_status); } && {
19629          test -z "$ac_c_werror_flag" ||
19630          test ! -s conftest.err
19631        } && test -s conftest.$ac_objext; then
19632   ac_cv_have_decl_strlcat=yes
19633 else
19634   $as_echo "$as_me: failed program was:" >&5
19635 sed 's/^/| /' conftest.$ac_ext >&5
19636
19637         ac_cv_have_decl_strlcat=no
19638 fi
19639
19640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19641 fi
19642 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcat" >&5
19643 $as_echo "$ac_cv_have_decl_strlcat" >&6; }
19644 if test "x$ac_cv_have_decl_strlcat" = x""yes; then
19645
19646 cat >>confdefs.h <<_ACEOF
19647 #define HAVE_DECL_STRLCAT 1
19648 _ACEOF
19649
19650
19651 else
19652   cat >>confdefs.h <<_ACEOF
19653 #define HAVE_DECL_STRLCAT 0
19654 _ACEOF
19655
19656
19657 fi
19658 { $as_echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
19659 $as_echo_n "checking whether strlcpy is declared... " >&6; }
19660 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
19661   $as_echo_n "(cached) " >&6
19662 else
19663   cat >conftest.$ac_ext <<_ACEOF
19664 /* confdefs.h.  */
19665 _ACEOF
19666 cat confdefs.h >>conftest.$ac_ext
19667 cat >>conftest.$ac_ext <<_ACEOF
19668 /* end confdefs.h.  */
19669 $ac_includes_default
19670 int
19671 main ()
19672 {
19673 #ifndef strlcpy
19674   (void) strlcpy;
19675 #endif
19676
19677   ;
19678   return 0;
19679 }
19680 _ACEOF
19681 rm -f conftest.$ac_objext
19682 if { (ac_try="$ac_compile"
19683 case "(($ac_try" in
19684   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19685   *) ac_try_echo=$ac_try;;
19686 esac
19687 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19688 $as_echo "$ac_try_echo") >&5
19689   (eval "$ac_compile") 2>conftest.er1
19690   ac_status=$?
19691   grep -v '^ *+' conftest.er1 >conftest.err
19692   rm -f conftest.er1
19693   cat conftest.err >&5
19694   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19695   (exit $ac_status); } && {
19696          test -z "$ac_c_werror_flag" ||
19697          test ! -s conftest.err
19698        } && test -s conftest.$ac_objext; then
19699   ac_cv_have_decl_strlcpy=yes
19700 else
19701   $as_echo "$as_me: failed program was:" >&5
19702 sed 's/^/| /' conftest.$ac_ext >&5
19703
19704         ac_cv_have_decl_strlcpy=no
19705 fi
19706
19707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19708 fi
19709 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
19710 $as_echo "$ac_cv_have_decl_strlcpy" >&6; }
19711 if test "x$ac_cv_have_decl_strlcpy" = x""yes; then
19712
19713 cat >>confdefs.h <<_ACEOF
19714 #define HAVE_DECL_STRLCPY 1
19715 _ACEOF
19716
19717
19718 else
19719   cat >>confdefs.h <<_ACEOF
19720 #define HAVE_DECL_STRLCPY 0
19721 _ACEOF
19722
19723
19724 fi
19725
19726
19727 # This is probably only present on Darwin, but may as well check always
19728 { $as_echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
19729 $as_echo_n "checking whether F_FULLFSYNC is declared... " >&6; }
19730 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
19731   $as_echo_n "(cached) " >&6
19732 else
19733   cat >conftest.$ac_ext <<_ACEOF
19734 /* confdefs.h.  */
19735 _ACEOF
19736 cat confdefs.h >>conftest.$ac_ext
19737 cat >>conftest.$ac_ext <<_ACEOF
19738 /* end confdefs.h.  */
19739 #include <fcntl.h>
19740
19741 int
19742 main ()
19743 {
19744 #ifndef F_FULLFSYNC
19745   (void) F_FULLFSYNC;
19746 #endif
19747
19748   ;
19749   return 0;
19750 }
19751 _ACEOF
19752 rm -f conftest.$ac_objext
19753 if { (ac_try="$ac_compile"
19754 case "(($ac_try" in
19755   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19756   *) ac_try_echo=$ac_try;;
19757 esac
19758 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19759 $as_echo "$ac_try_echo") >&5
19760   (eval "$ac_compile") 2>conftest.er1
19761   ac_status=$?
19762   grep -v '^ *+' conftest.er1 >conftest.err
19763   rm -f conftest.er1
19764   cat conftest.err >&5
19765   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19766   (exit $ac_status); } && {
19767          test -z "$ac_c_werror_flag" ||
19768          test ! -s conftest.err
19769        } && test -s conftest.$ac_objext; then
19770   ac_cv_have_decl_F_FULLFSYNC=yes
19771 else
19772   $as_echo "$as_me: failed program was:" >&5
19773 sed 's/^/| /' conftest.$ac_ext >&5
19774
19775         ac_cv_have_decl_F_FULLFSYNC=no
19776 fi
19777
19778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19779 fi
19780 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
19781 $as_echo "$ac_cv_have_decl_F_FULLFSYNC" >&6; }
19782 if test "x$ac_cv_have_decl_F_FULLFSYNC" = x""yes; then
19783
19784 cat >>confdefs.h <<_ACEOF
19785 #define HAVE_DECL_F_FULLFSYNC 1
19786 _ACEOF
19787
19788
19789 else
19790   cat >>confdefs.h <<_ACEOF
19791 #define HAVE_DECL_F_FULLFSYNC 0
19792 _ACEOF
19793
19794
19795 fi
19796
19797
19798
19799 HAVE_IPV6=no
19800 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
19801 $as_echo_n "checking for struct sockaddr_in6... " >&6; }
19802 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
19803   $as_echo_n "(cached) " >&6
19804 else
19805   ac_cv_type_struct_sockaddr_in6=no
19806 cat >conftest.$ac_ext <<_ACEOF
19807 /* confdefs.h.  */
19808 _ACEOF
19809 cat confdefs.h >>conftest.$ac_ext
19810 cat >>conftest.$ac_ext <<_ACEOF
19811 /* end confdefs.h.  */
19812 $ac_includes_default
19813 #include <netinet/in.h>
19814
19815 int
19816 main ()
19817 {
19818 if (sizeof (struct sockaddr_in6))
19819        return 0;
19820   ;
19821   return 0;
19822 }
19823 _ACEOF
19824 rm -f conftest.$ac_objext
19825 if { (ac_try="$ac_compile"
19826 case "(($ac_try" in
19827   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19828   *) ac_try_echo=$ac_try;;
19829 esac
19830 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19831 $as_echo "$ac_try_echo") >&5
19832   (eval "$ac_compile") 2>conftest.er1
19833   ac_status=$?
19834   grep -v '^ *+' conftest.er1 >conftest.err
19835   rm -f conftest.er1
19836   cat conftest.err >&5
19837   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19838   (exit $ac_status); } && {
19839          test -z "$ac_c_werror_flag" ||
19840          test ! -s conftest.err
19841        } && test -s conftest.$ac_objext; then
19842   cat >conftest.$ac_ext <<_ACEOF
19843 /* confdefs.h.  */
19844 _ACEOF
19845 cat confdefs.h >>conftest.$ac_ext
19846 cat >>conftest.$ac_ext <<_ACEOF
19847 /* end confdefs.h.  */
19848 $ac_includes_default
19849 #include <netinet/in.h>
19850
19851 int
19852 main ()
19853 {
19854 if (sizeof ((struct sockaddr_in6)))
19855           return 0;
19856   ;
19857   return 0;
19858 }
19859 _ACEOF
19860 rm -f conftest.$ac_objext
19861 if { (ac_try="$ac_compile"
19862 case "(($ac_try" in
19863   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19864   *) ac_try_echo=$ac_try;;
19865 esac
19866 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19867 $as_echo "$ac_try_echo") >&5
19868   (eval "$ac_compile") 2>conftest.er1
19869   ac_status=$?
19870   grep -v '^ *+' conftest.er1 >conftest.err
19871   rm -f conftest.er1
19872   cat conftest.err >&5
19873   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19874   (exit $ac_status); } && {
19875          test -z "$ac_c_werror_flag" ||
19876          test ! -s conftest.err
19877        } && test -s conftest.$ac_objext; then
19878   :
19879 else
19880   $as_echo "$as_me: failed program was:" >&5
19881 sed 's/^/| /' conftest.$ac_ext >&5
19882
19883         ac_cv_type_struct_sockaddr_in6=yes
19884 fi
19885
19886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19887 else
19888   $as_echo "$as_me: failed program was:" >&5
19889 sed 's/^/| /' conftest.$ac_ext >&5
19890
19891
19892 fi
19893
19894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19895 fi
19896 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
19897 $as_echo "$ac_cv_type_struct_sockaddr_in6" >&6; }
19898 if test "x$ac_cv_type_struct_sockaddr_in6" = x""yes; then
19899
19900 cat >>confdefs.h <<\_ACEOF
19901 #define HAVE_IPV6 1
19902 _ACEOF
19903
19904          HAVE_IPV6=yes
19905 fi
19906
19907
19908
19909 { $as_echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
19910 $as_echo_n "checking for PS_STRINGS... " >&6; }
19911 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
19912   $as_echo_n "(cached) " >&6
19913 else
19914   cat >conftest.$ac_ext <<_ACEOF
19915 /* confdefs.h.  */
19916 _ACEOF
19917 cat confdefs.h >>conftest.$ac_ext
19918 cat >>conftest.$ac_ext <<_ACEOF
19919 /* end confdefs.h.  */
19920 #include <machine/vmparam.h>
19921 #include <sys/exec.h>
19922
19923 int
19924 main ()
19925 {
19926 PS_STRINGS->ps_nargvstr = 1;
19927 PS_STRINGS->ps_argvstr = "foo";
19928   ;
19929   return 0;
19930 }
19931 _ACEOF
19932 rm -f conftest.$ac_objext conftest$ac_exeext
19933 if { (ac_try="$ac_link"
19934 case "(($ac_try" in
19935   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19936   *) ac_try_echo=$ac_try;;
19937 esac
19938 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19939 $as_echo "$ac_try_echo") >&5
19940   (eval "$ac_link") 2>conftest.er1
19941   ac_status=$?
19942   grep -v '^ *+' conftest.er1 >conftest.err
19943   rm -f conftest.er1
19944   cat conftest.err >&5
19945   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19946   (exit $ac_status); } && {
19947          test -z "$ac_c_werror_flag" ||
19948          test ! -s conftest.err
19949        } && test -s conftest$ac_exeext && {
19950          test "$cross_compiling" = yes ||
19951          $as_test_x conftest$ac_exeext
19952        }; then
19953   pgac_cv_var_PS_STRINGS=yes
19954 else
19955   $as_echo "$as_me: failed program was:" >&5
19956 sed 's/^/| /' conftest.$ac_ext >&5
19957
19958         pgac_cv_var_PS_STRINGS=no
19959 fi
19960
19961 rm -rf conftest.dSYM
19962 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19963       conftest$ac_exeext conftest.$ac_ext
19964 fi
19965 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
19966 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
19967 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
19968
19969 cat >>confdefs.h <<\_ACEOF
19970 #define HAVE_PS_STRINGS /**/
19971 _ACEOF
19972
19973 fi
19974
19975
19976 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
19977 # is missing.  Yes, there are machines that have only one.  We may
19978 # also decide to use snprintf.c if snprintf() is present but does not
19979 # have all the features we need --- see below.
19980
19981 if test "$PORTNAME" = "win32"; then
19982   # Win32 gets snprintf.c built unconditionally.
19983   #
19984   # To properly translate all NLS languages strings, we must support the
19985   # *printf() %$ format, which allows *printf() arguments to be selected
19986   # by position in the translated string.
19987   #
19988   # libintl versions < 0.13 use the native *printf() functions, and Win32
19989   # *printf() doesn't understand %$, so we must use our /port versions,
19990   # which do understand %$. libintl versions >= 0.13 include their own
19991   # *printf versions on Win32.  The libintl 0.13 release note text is:
19992   #
19993   #   C format strings with positions, as they arise when a translator
19994   #   needs to reorder a sentence, are now supported on all platforms.
19995   #   On those few platforms (NetBSD and Woe32) for which the native
19996   #   printf()/fprintf()/... functions don't support such format
19997   #   strings, replacements are provided through <libintl.h>.
19998   #
19999   # We could use libintl >= 0.13's *printf() if we were sure that we had
20000   # a litint >= 0.13 at runtime, but seeing that there is no clean way
20001   # to guarantee that, it is best to just use our own, so we are sure to
20002   # get %$ support. In include/port.h we disable the *printf() macros
20003   # that might have been defined by libintl.
20004   #
20005   # We do this unconditionally whether NLS is used or not so we are sure
20006   # that all Win32 libraries and binaries behave the same.
20007   pgac_need_repl_snprintf=yes
20008 else
20009   pgac_need_repl_snprintf=no
20010
20011 for ac_func in snprintf
20012 do
20013 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20014 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20015 $as_echo_n "checking for $ac_func... " >&6; }
20016 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20017   $as_echo_n "(cached) " >&6
20018 else
20019   cat >conftest.$ac_ext <<_ACEOF
20020 /* confdefs.h.  */
20021 _ACEOF
20022 cat confdefs.h >>conftest.$ac_ext
20023 cat >>conftest.$ac_ext <<_ACEOF
20024 /* end confdefs.h.  */
20025 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20026    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20027 #define $ac_func innocuous_$ac_func
20028
20029 /* System header to define __stub macros and hopefully few prototypes,
20030     which can conflict with char $ac_func (); below.
20031     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20032     <limits.h> exists even on freestanding compilers.  */
20033
20034 #ifdef __STDC__
20035 # include <limits.h>
20036 #else
20037 # include <assert.h>
20038 #endif
20039
20040 #undef $ac_func
20041
20042 /* Override any GCC internal prototype to avoid an error.
20043    Use char because int might match the return type of a GCC
20044    builtin and then its argument prototype would still apply.  */
20045 #ifdef __cplusplus
20046 extern "C"
20047 #endif
20048 char $ac_func ();
20049 /* The GNU C library defines this for functions which it implements
20050     to always fail with ENOSYS.  Some functions are actually named
20051     something starting with __ and the normal name is an alias.  */
20052 #if defined __stub_$ac_func || defined __stub___$ac_func
20053 choke me
20054 #endif
20055
20056 int
20057 main ()
20058 {
20059 return $ac_func ();
20060   ;
20061   return 0;
20062 }
20063 _ACEOF
20064 rm -f conftest.$ac_objext conftest$ac_exeext
20065 if { (ac_try="$ac_link"
20066 case "(($ac_try" in
20067   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20068   *) ac_try_echo=$ac_try;;
20069 esac
20070 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20071 $as_echo "$ac_try_echo") >&5
20072   (eval "$ac_link") 2>conftest.er1
20073   ac_status=$?
20074   grep -v '^ *+' conftest.er1 >conftest.err
20075   rm -f conftest.er1
20076   cat conftest.err >&5
20077   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20078   (exit $ac_status); } && {
20079          test -z "$ac_c_werror_flag" ||
20080          test ! -s conftest.err
20081        } && test -s conftest$ac_exeext && {
20082          test "$cross_compiling" = yes ||
20083          $as_test_x conftest$ac_exeext
20084        }; then
20085   eval "$as_ac_var=yes"
20086 else
20087   $as_echo "$as_me: failed program was:" >&5
20088 sed 's/^/| /' conftest.$ac_ext >&5
20089
20090         eval "$as_ac_var=no"
20091 fi
20092
20093 rm -rf conftest.dSYM
20094 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20095       conftest$ac_exeext conftest.$ac_ext
20096 fi
20097 ac_res=`eval 'as_val=${'$as_ac_var'}
20098                  $as_echo "$as_val"'`
20099                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20100 $as_echo "$ac_res" >&6; }
20101 as_val=`eval 'as_val=${'$as_ac_var'}
20102                  $as_echo "$as_val"'`
20103    if test "x$as_val" = x""yes; then
20104   cat >>confdefs.h <<_ACEOF
20105 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20106 _ACEOF
20107
20108 else
20109   pgac_need_repl_snprintf=yes
20110 fi
20111 done
20112
20113
20114 for ac_func in vsnprintf
20115 do
20116 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20117 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20118 $as_echo_n "checking for $ac_func... " >&6; }
20119 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20120   $as_echo_n "(cached) " >&6
20121 else
20122   cat >conftest.$ac_ext <<_ACEOF
20123 /* confdefs.h.  */
20124 _ACEOF
20125 cat confdefs.h >>conftest.$ac_ext
20126 cat >>conftest.$ac_ext <<_ACEOF
20127 /* end confdefs.h.  */
20128 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20129    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20130 #define $ac_func innocuous_$ac_func
20131
20132 /* System header to define __stub macros and hopefully few prototypes,
20133     which can conflict with char $ac_func (); below.
20134     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20135     <limits.h> exists even on freestanding compilers.  */
20136
20137 #ifdef __STDC__
20138 # include <limits.h>
20139 #else
20140 # include <assert.h>
20141 #endif
20142
20143 #undef $ac_func
20144
20145 /* Override any GCC internal prototype to avoid an error.
20146    Use char because int might match the return type of a GCC
20147    builtin and then its argument prototype would still apply.  */
20148 #ifdef __cplusplus
20149 extern "C"
20150 #endif
20151 char $ac_func ();
20152 /* The GNU C library defines this for functions which it implements
20153     to always fail with ENOSYS.  Some functions are actually named
20154     something starting with __ and the normal name is an alias.  */
20155 #if defined __stub_$ac_func || defined __stub___$ac_func
20156 choke me
20157 #endif
20158
20159 int
20160 main ()
20161 {
20162 return $ac_func ();
20163   ;
20164   return 0;
20165 }
20166 _ACEOF
20167 rm -f conftest.$ac_objext conftest$ac_exeext
20168 if { (ac_try="$ac_link"
20169 case "(($ac_try" in
20170   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20171   *) ac_try_echo=$ac_try;;
20172 esac
20173 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20174 $as_echo "$ac_try_echo") >&5
20175   (eval "$ac_link") 2>conftest.er1
20176   ac_status=$?
20177   grep -v '^ *+' conftest.er1 >conftest.err
20178   rm -f conftest.er1
20179   cat conftest.err >&5
20180   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20181   (exit $ac_status); } && {
20182          test -z "$ac_c_werror_flag" ||
20183          test ! -s conftest.err
20184        } && test -s conftest$ac_exeext && {
20185          test "$cross_compiling" = yes ||
20186          $as_test_x conftest$ac_exeext
20187        }; then
20188   eval "$as_ac_var=yes"
20189 else
20190   $as_echo "$as_me: failed program was:" >&5
20191 sed 's/^/| /' conftest.$ac_ext >&5
20192
20193         eval "$as_ac_var=no"
20194 fi
20195
20196 rm -rf conftest.dSYM
20197 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20198       conftest$ac_exeext conftest.$ac_ext
20199 fi
20200 ac_res=`eval 'as_val=${'$as_ac_var'}
20201                  $as_echo "$as_val"'`
20202                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20203 $as_echo "$ac_res" >&6; }
20204 as_val=`eval 'as_val=${'$as_ac_var'}
20205                  $as_echo "$as_val"'`
20206    if test "x$as_val" = x""yes; then
20207   cat >>confdefs.h <<_ACEOF
20208 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20209 _ACEOF
20210
20211 else
20212   pgac_need_repl_snprintf=yes
20213 fi
20214 done
20215
20216 fi
20217
20218
20219 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
20220 # include/c.h will provide declarations.  Note this is a separate test
20221 # from whether the functions exist in the C library --- there are
20222 # systems that have the functions but don't bother to declare them :-(
20223
20224 { $as_echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
20225 $as_echo_n "checking whether snprintf is declared... " >&6; }
20226 if test "${ac_cv_have_decl_snprintf+set}" = set; then
20227   $as_echo_n "(cached) " >&6
20228 else
20229   cat >conftest.$ac_ext <<_ACEOF
20230 /* confdefs.h.  */
20231 _ACEOF
20232 cat confdefs.h >>conftest.$ac_ext
20233 cat >>conftest.$ac_ext <<_ACEOF
20234 /* end confdefs.h.  */
20235 $ac_includes_default
20236 int
20237 main ()
20238 {
20239 #ifndef snprintf
20240   (void) snprintf;
20241 #endif
20242
20243   ;
20244   return 0;
20245 }
20246 _ACEOF
20247 rm -f conftest.$ac_objext
20248 if { (ac_try="$ac_compile"
20249 case "(($ac_try" in
20250   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20251   *) ac_try_echo=$ac_try;;
20252 esac
20253 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20254 $as_echo "$ac_try_echo") >&5
20255   (eval "$ac_compile") 2>conftest.er1
20256   ac_status=$?
20257   grep -v '^ *+' conftest.er1 >conftest.err
20258   rm -f conftest.er1
20259   cat conftest.err >&5
20260   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20261   (exit $ac_status); } && {
20262          test -z "$ac_c_werror_flag" ||
20263          test ! -s conftest.err
20264        } && test -s conftest.$ac_objext; then
20265   ac_cv_have_decl_snprintf=yes
20266 else
20267   $as_echo "$as_me: failed program was:" >&5
20268 sed 's/^/| /' conftest.$ac_ext >&5
20269
20270         ac_cv_have_decl_snprintf=no
20271 fi
20272
20273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20274 fi
20275 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
20276 $as_echo "$ac_cv_have_decl_snprintf" >&6; }
20277 if test "x$ac_cv_have_decl_snprintf" = x""yes; then
20278
20279 cat >>confdefs.h <<_ACEOF
20280 #define HAVE_DECL_SNPRINTF 1
20281 _ACEOF
20282
20283
20284 else
20285   cat >>confdefs.h <<_ACEOF
20286 #define HAVE_DECL_SNPRINTF 0
20287 _ACEOF
20288
20289
20290 fi
20291 { $as_echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
20292 $as_echo_n "checking whether vsnprintf is declared... " >&6; }
20293 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
20294   $as_echo_n "(cached) " >&6
20295 else
20296   cat >conftest.$ac_ext <<_ACEOF
20297 /* confdefs.h.  */
20298 _ACEOF
20299 cat confdefs.h >>conftest.$ac_ext
20300 cat >>conftest.$ac_ext <<_ACEOF
20301 /* end confdefs.h.  */
20302 $ac_includes_default
20303 int
20304 main ()
20305 {
20306 #ifndef vsnprintf
20307   (void) vsnprintf;
20308 #endif
20309
20310   ;
20311   return 0;
20312 }
20313 _ACEOF
20314 rm -f conftest.$ac_objext
20315 if { (ac_try="$ac_compile"
20316 case "(($ac_try" in
20317   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20318   *) ac_try_echo=$ac_try;;
20319 esac
20320 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20321 $as_echo "$ac_try_echo") >&5
20322   (eval "$ac_compile") 2>conftest.er1
20323   ac_status=$?
20324   grep -v '^ *+' conftest.er1 >conftest.err
20325   rm -f conftest.er1
20326   cat conftest.err >&5
20327   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20328   (exit $ac_status); } && {
20329          test -z "$ac_c_werror_flag" ||
20330          test ! -s conftest.err
20331        } && test -s conftest.$ac_objext; then
20332   ac_cv_have_decl_vsnprintf=yes
20333 else
20334   $as_echo "$as_me: failed program was:" >&5
20335 sed 's/^/| /' conftest.$ac_ext >&5
20336
20337         ac_cv_have_decl_vsnprintf=no
20338 fi
20339
20340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20341 fi
20342 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
20343 $as_echo "$ac_cv_have_decl_vsnprintf" >&6; }
20344 if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then
20345
20346 cat >>confdefs.h <<_ACEOF
20347 #define HAVE_DECL_VSNPRINTF 1
20348 _ACEOF
20349
20350
20351 else
20352   cat >>confdefs.h <<_ACEOF
20353 #define HAVE_DECL_VSNPRINTF 0
20354 _ACEOF
20355
20356
20357 fi
20358
20359
20360
20361
20362 { $as_echo "$as_me:$LINENO: checking for isinf" >&5
20363 $as_echo_n "checking for isinf... " >&6; }
20364 if test "${ac_cv_func_isinf+set}" = set; then
20365   $as_echo_n "(cached) " >&6
20366 else
20367   cat >conftest.$ac_ext <<_ACEOF
20368 /* confdefs.h.  */
20369 _ACEOF
20370 cat confdefs.h >>conftest.$ac_ext
20371 cat >>conftest.$ac_ext <<_ACEOF
20372 /* end confdefs.h.  */
20373
20374 #include <math.h>
20375 double glob_double;
20376
20377 int
20378 main ()
20379 {
20380 return isinf(glob_double) ? 0 : 1;
20381   ;
20382   return 0;
20383 }
20384 _ACEOF
20385 rm -f conftest.$ac_objext conftest$ac_exeext
20386 if { (ac_try="$ac_link"
20387 case "(($ac_try" in
20388   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20389   *) ac_try_echo=$ac_try;;
20390 esac
20391 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20392 $as_echo "$ac_try_echo") >&5
20393   (eval "$ac_link") 2>conftest.er1
20394   ac_status=$?
20395   grep -v '^ *+' conftest.er1 >conftest.err
20396   rm -f conftest.er1
20397   cat conftest.err >&5
20398   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20399   (exit $ac_status); } && {
20400          test -z "$ac_c_werror_flag" ||
20401          test ! -s conftest.err
20402        } && test -s conftest$ac_exeext && {
20403          test "$cross_compiling" = yes ||
20404          $as_test_x conftest$ac_exeext
20405        }; then
20406   ac_cv_func_isinf=yes
20407 else
20408   $as_echo "$as_me: failed program was:" >&5
20409 sed 's/^/| /' conftest.$ac_ext >&5
20410
20411         ac_cv_func_isinf=no
20412 fi
20413
20414 rm -rf conftest.dSYM
20415 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20416       conftest$ac_exeext conftest.$ac_ext
20417 fi
20418 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
20419 $as_echo "$ac_cv_func_isinf" >&6; }
20420
20421 if test $ac_cv_func_isinf = yes ; then
20422
20423 cat >>confdefs.h <<\_ACEOF
20424 #define HAVE_ISINF 1
20425 _ACEOF
20426
20427 else
20428   case " $LIBOBJS " in
20429   *" isinf.$ac_objext "* ) ;;
20430   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
20431  ;;
20432 esac
20433
20434   # Look for a way to implement a substitute for isinf()
20435
20436
20437
20438
20439 for ac_func in fpclass fp_class fp_class_d class
20440 do
20441 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20442 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20443 $as_echo_n "checking for $ac_func... " >&6; }
20444 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20445   $as_echo_n "(cached) " >&6
20446 else
20447   cat >conftest.$ac_ext <<_ACEOF
20448 /* confdefs.h.  */
20449 _ACEOF
20450 cat confdefs.h >>conftest.$ac_ext
20451 cat >>conftest.$ac_ext <<_ACEOF
20452 /* end confdefs.h.  */
20453 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20454    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20455 #define $ac_func innocuous_$ac_func
20456
20457 /* System header to define __stub macros and hopefully few prototypes,
20458     which can conflict with char $ac_func (); below.
20459     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20460     <limits.h> exists even on freestanding compilers.  */
20461
20462 #ifdef __STDC__
20463 # include <limits.h>
20464 #else
20465 # include <assert.h>
20466 #endif
20467
20468 #undef $ac_func
20469
20470 /* Override any GCC internal prototype to avoid an error.
20471    Use char because int might match the return type of a GCC
20472    builtin and then its argument prototype would still apply.  */
20473 #ifdef __cplusplus
20474 extern "C"
20475 #endif
20476 char $ac_func ();
20477 /* The GNU C library defines this for functions which it implements
20478     to always fail with ENOSYS.  Some functions are actually named
20479     something starting with __ and the normal name is an alias.  */
20480 #if defined __stub_$ac_func || defined __stub___$ac_func
20481 choke me
20482 #endif
20483
20484 int
20485 main ()
20486 {
20487 return $ac_func ();
20488   ;
20489   return 0;
20490 }
20491 _ACEOF
20492 rm -f conftest.$ac_objext conftest$ac_exeext
20493 if { (ac_try="$ac_link"
20494 case "(($ac_try" in
20495   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20496   *) ac_try_echo=$ac_try;;
20497 esac
20498 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20499 $as_echo "$ac_try_echo") >&5
20500   (eval "$ac_link") 2>conftest.er1
20501   ac_status=$?
20502   grep -v '^ *+' conftest.er1 >conftest.err
20503   rm -f conftest.er1
20504   cat conftest.err >&5
20505   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20506   (exit $ac_status); } && {
20507          test -z "$ac_c_werror_flag" ||
20508          test ! -s conftest.err
20509        } && test -s conftest$ac_exeext && {
20510          test "$cross_compiling" = yes ||
20511          $as_test_x conftest$ac_exeext
20512        }; then
20513   eval "$as_ac_var=yes"
20514 else
20515   $as_echo "$as_me: failed program was:" >&5
20516 sed 's/^/| /' conftest.$ac_ext >&5
20517
20518         eval "$as_ac_var=no"
20519 fi
20520
20521 rm -rf conftest.dSYM
20522 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20523       conftest$ac_exeext conftest.$ac_ext
20524 fi
20525 ac_res=`eval 'as_val=${'$as_ac_var'}
20526                  $as_echo "$as_val"'`
20527                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20528 $as_echo "$ac_res" >&6; }
20529 as_val=`eval 'as_val=${'$as_ac_var'}
20530                  $as_echo "$as_val"'`
20531    if test "x$as_val" = x""yes; then
20532   cat >>confdefs.h <<_ACEOF
20533 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20534 _ACEOF
20535  break
20536 fi
20537 done
20538
20539 fi
20540
20541 # Some versions of libedit contain strlcpy(); so disregard that library while
20542 # checking for these standard libc functions.
20543 pgac_save_LIBS="$LIBS"
20544 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560 for ac_func in crypt erand48 getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul
20561 do
20562 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20563 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20564 $as_echo_n "checking for $ac_func... " >&6; }
20565 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20566   $as_echo_n "(cached) " >&6
20567 else
20568   cat >conftest.$ac_ext <<_ACEOF
20569 /* confdefs.h.  */
20570 _ACEOF
20571 cat confdefs.h >>conftest.$ac_ext
20572 cat >>conftest.$ac_ext <<_ACEOF
20573 /* end confdefs.h.  */
20574 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20575    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20576 #define $ac_func innocuous_$ac_func
20577
20578 /* System header to define __stub macros and hopefully few prototypes,
20579     which can conflict with char $ac_func (); below.
20580     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20581     <limits.h> exists even on freestanding compilers.  */
20582
20583 #ifdef __STDC__
20584 # include <limits.h>
20585 #else
20586 # include <assert.h>
20587 #endif
20588
20589 #undef $ac_func
20590
20591 /* Override any GCC internal prototype to avoid an error.
20592    Use char because int might match the return type of a GCC
20593    builtin and then its argument prototype would still apply.  */
20594 #ifdef __cplusplus
20595 extern "C"
20596 #endif
20597 char $ac_func ();
20598 /* The GNU C library defines this for functions which it implements
20599     to always fail with ENOSYS.  Some functions are actually named
20600     something starting with __ and the normal name is an alias.  */
20601 #if defined __stub_$ac_func || defined __stub___$ac_func
20602 choke me
20603 #endif
20604
20605 int
20606 main ()
20607 {
20608 return $ac_func ();
20609   ;
20610   return 0;
20611 }
20612 _ACEOF
20613 rm -f conftest.$ac_objext conftest$ac_exeext
20614 if { (ac_try="$ac_link"
20615 case "(($ac_try" in
20616   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20617   *) ac_try_echo=$ac_try;;
20618 esac
20619 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20620 $as_echo "$ac_try_echo") >&5
20621   (eval "$ac_link") 2>conftest.er1
20622   ac_status=$?
20623   grep -v '^ *+' conftest.er1 >conftest.err
20624   rm -f conftest.er1
20625   cat conftest.err >&5
20626   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20627   (exit $ac_status); } && {
20628          test -z "$ac_c_werror_flag" ||
20629          test ! -s conftest.err
20630        } && test -s conftest$ac_exeext && {
20631          test "$cross_compiling" = yes ||
20632          $as_test_x conftest$ac_exeext
20633        }; then
20634   eval "$as_ac_var=yes"
20635 else
20636   $as_echo "$as_me: failed program was:" >&5
20637 sed 's/^/| /' conftest.$ac_ext >&5
20638
20639         eval "$as_ac_var=no"
20640 fi
20641
20642 rm -rf conftest.dSYM
20643 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20644       conftest$ac_exeext conftest.$ac_ext
20645 fi
20646 ac_res=`eval 'as_val=${'$as_ac_var'}
20647                  $as_echo "$as_val"'`
20648                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20649 $as_echo "$ac_res" >&6; }
20650 as_val=`eval 'as_val=${'$as_ac_var'}
20651                  $as_echo "$as_val"'`
20652    if test "x$as_val" = x""yes; then
20653   cat >>confdefs.h <<_ACEOF
20654 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20655 _ACEOF
20656
20657 else
20658   case " $LIBOBJS " in
20659   *" $ac_func.$ac_objext "* ) ;;
20660   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20661  ;;
20662 esac
20663
20664 fi
20665 done
20666
20667
20668
20669 case $host_os in
20670
20671         # Windows uses a specialised env handler
20672         mingw*)
20673
20674 cat >>confdefs.h <<\_ACEOF
20675 #define HAVE_UNSETENV 1
20676 _ACEOF
20677
20678                 ac_cv_func_unsetenv=yes;;
20679         *)
20680
20681 for ac_func in unsetenv
20682 do
20683 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20684 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20685 $as_echo_n "checking for $ac_func... " >&6; }
20686 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20687   $as_echo_n "(cached) " >&6
20688 else
20689   cat >conftest.$ac_ext <<_ACEOF
20690 /* confdefs.h.  */
20691 _ACEOF
20692 cat confdefs.h >>conftest.$ac_ext
20693 cat >>conftest.$ac_ext <<_ACEOF
20694 /* end confdefs.h.  */
20695 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20696    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20697 #define $ac_func innocuous_$ac_func
20698
20699 /* System header to define __stub macros and hopefully few prototypes,
20700     which can conflict with char $ac_func (); below.
20701     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20702     <limits.h> exists even on freestanding compilers.  */
20703
20704 #ifdef __STDC__
20705 # include <limits.h>
20706 #else
20707 # include <assert.h>
20708 #endif
20709
20710 #undef $ac_func
20711
20712 /* Override any GCC internal prototype to avoid an error.
20713    Use char because int might match the return type of a GCC
20714    builtin and then its argument prototype would still apply.  */
20715 #ifdef __cplusplus
20716 extern "C"
20717 #endif
20718 char $ac_func ();
20719 /* The GNU C library defines this for functions which it implements
20720     to always fail with ENOSYS.  Some functions are actually named
20721     something starting with __ and the normal name is an alias.  */
20722 #if defined __stub_$ac_func || defined __stub___$ac_func
20723 choke me
20724 #endif
20725
20726 int
20727 main ()
20728 {
20729 return $ac_func ();
20730   ;
20731   return 0;
20732 }
20733 _ACEOF
20734 rm -f conftest.$ac_objext conftest$ac_exeext
20735 if { (ac_try="$ac_link"
20736 case "(($ac_try" in
20737   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20738   *) ac_try_echo=$ac_try;;
20739 esac
20740 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20741 $as_echo "$ac_try_echo") >&5
20742   (eval "$ac_link") 2>conftest.er1
20743   ac_status=$?
20744   grep -v '^ *+' conftest.er1 >conftest.err
20745   rm -f conftest.er1
20746   cat conftest.err >&5
20747   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20748   (exit $ac_status); } && {
20749          test -z "$ac_c_werror_flag" ||
20750          test ! -s conftest.err
20751        } && test -s conftest$ac_exeext && {
20752          test "$cross_compiling" = yes ||
20753          $as_test_x conftest$ac_exeext
20754        }; then
20755   eval "$as_ac_var=yes"
20756 else
20757   $as_echo "$as_me: failed program was:" >&5
20758 sed 's/^/| /' conftest.$ac_ext >&5
20759
20760         eval "$as_ac_var=no"
20761 fi
20762
20763 rm -rf conftest.dSYM
20764 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20765       conftest$ac_exeext conftest.$ac_ext
20766 fi
20767 ac_res=`eval 'as_val=${'$as_ac_var'}
20768                  $as_echo "$as_val"'`
20769                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20770 $as_echo "$ac_res" >&6; }
20771 as_val=`eval 'as_val=${'$as_ac_var'}
20772                  $as_echo "$as_val"'`
20773    if test "x$as_val" = x""yes; then
20774   cat >>confdefs.h <<_ACEOF
20775 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20776 _ACEOF
20777
20778 else
20779   case " $LIBOBJS " in
20780   *" $ac_func.$ac_objext "* ) ;;
20781   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20782  ;;
20783 esac
20784
20785 fi
20786 done
20787
20788
20789                 ;;
20790 esac
20791
20792
20793 LIBS="$pgac_save_LIBS"
20794
20795 # System's version of getaddrinfo(), if any, may be used only if we found
20796 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
20797 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
20798 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
20799 # because we want to use our own getaddrinfo.c on Windows anyway.)
20800 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
20801
20802 for ac_func in getaddrinfo
20803 do
20804 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20805 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20806 $as_echo_n "checking for $ac_func... " >&6; }
20807 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20808   $as_echo_n "(cached) " >&6
20809 else
20810   cat >conftest.$ac_ext <<_ACEOF
20811 /* confdefs.h.  */
20812 _ACEOF
20813 cat confdefs.h >>conftest.$ac_ext
20814 cat >>conftest.$ac_ext <<_ACEOF
20815 /* end confdefs.h.  */
20816 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20817    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20818 #define $ac_func innocuous_$ac_func
20819
20820 /* System header to define __stub macros and hopefully few prototypes,
20821     which can conflict with char $ac_func (); below.
20822     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20823     <limits.h> exists even on freestanding compilers.  */
20824
20825 #ifdef __STDC__
20826 # include <limits.h>
20827 #else
20828 # include <assert.h>
20829 #endif
20830
20831 #undef $ac_func
20832
20833 /* Override any GCC internal prototype to avoid an error.
20834    Use char because int might match the return type of a GCC
20835    builtin and then its argument prototype would still apply.  */
20836 #ifdef __cplusplus
20837 extern "C"
20838 #endif
20839 char $ac_func ();
20840 /* The GNU C library defines this for functions which it implements
20841     to always fail with ENOSYS.  Some functions are actually named
20842     something starting with __ and the normal name is an alias.  */
20843 #if defined __stub_$ac_func || defined __stub___$ac_func
20844 choke me
20845 #endif
20846
20847 int
20848 main ()
20849 {
20850 return $ac_func ();
20851   ;
20852   return 0;
20853 }
20854 _ACEOF
20855 rm -f conftest.$ac_objext conftest$ac_exeext
20856 if { (ac_try="$ac_link"
20857 case "(($ac_try" in
20858   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20859   *) ac_try_echo=$ac_try;;
20860 esac
20861 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20862 $as_echo "$ac_try_echo") >&5
20863   (eval "$ac_link") 2>conftest.er1
20864   ac_status=$?
20865   grep -v '^ *+' conftest.er1 >conftest.err
20866   rm -f conftest.er1
20867   cat conftest.err >&5
20868   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20869   (exit $ac_status); } && {
20870          test -z "$ac_c_werror_flag" ||
20871          test ! -s conftest.err
20872        } && test -s conftest$ac_exeext && {
20873          test "$cross_compiling" = yes ||
20874          $as_test_x conftest$ac_exeext
20875        }; then
20876   eval "$as_ac_var=yes"
20877 else
20878   $as_echo "$as_me: failed program was:" >&5
20879 sed 's/^/| /' conftest.$ac_ext >&5
20880
20881         eval "$as_ac_var=no"
20882 fi
20883
20884 rm -rf conftest.dSYM
20885 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20886       conftest$ac_exeext conftest.$ac_ext
20887 fi
20888 ac_res=`eval 'as_val=${'$as_ac_var'}
20889                  $as_echo "$as_val"'`
20890                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20891 $as_echo "$ac_res" >&6; }
20892 as_val=`eval 'as_val=${'$as_ac_var'}
20893                  $as_echo "$as_val"'`
20894    if test "x$as_val" = x""yes; then
20895   cat >>confdefs.h <<_ACEOF
20896 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20897 _ACEOF
20898
20899 else
20900   case " $LIBOBJS " in
20901   *" $ac_func.$ac_objext "* ) ;;
20902   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20903  ;;
20904 esac
20905
20906 fi
20907 done
20908
20909
20910 else
20911   case " $LIBOBJS " in
20912   *" getaddrinfo.$ac_objext "* ) ;;
20913   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
20914  ;;
20915 esac
20916
20917 fi
20918
20919 # Similarly, use system's getopt_long() only if system provides struct option.
20920 if test x"$ac_cv_type_struct_option" = xyes ; then
20921
20922 for ac_func in getopt_long
20923 do
20924 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20925 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20926 $as_echo_n "checking for $ac_func... " >&6; }
20927 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20928   $as_echo_n "(cached) " >&6
20929 else
20930   cat >conftest.$ac_ext <<_ACEOF
20931 /* confdefs.h.  */
20932 _ACEOF
20933 cat confdefs.h >>conftest.$ac_ext
20934 cat >>conftest.$ac_ext <<_ACEOF
20935 /* end confdefs.h.  */
20936 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20937    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20938 #define $ac_func innocuous_$ac_func
20939
20940 /* System header to define __stub macros and hopefully few prototypes,
20941     which can conflict with char $ac_func (); below.
20942     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20943     <limits.h> exists even on freestanding compilers.  */
20944
20945 #ifdef __STDC__
20946 # include <limits.h>
20947 #else
20948 # include <assert.h>
20949 #endif
20950
20951 #undef $ac_func
20952
20953 /* Override any GCC internal prototype to avoid an error.
20954    Use char because int might match the return type of a GCC
20955    builtin and then its argument prototype would still apply.  */
20956 #ifdef __cplusplus
20957 extern "C"
20958 #endif
20959 char $ac_func ();
20960 /* The GNU C library defines this for functions which it implements
20961     to always fail with ENOSYS.  Some functions are actually named
20962     something starting with __ and the normal name is an alias.  */
20963 #if defined __stub_$ac_func || defined __stub___$ac_func
20964 choke me
20965 #endif
20966
20967 int
20968 main ()
20969 {
20970 return $ac_func ();
20971   ;
20972   return 0;
20973 }
20974 _ACEOF
20975 rm -f conftest.$ac_objext conftest$ac_exeext
20976 if { (ac_try="$ac_link"
20977 case "(($ac_try" in
20978   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20979   *) ac_try_echo=$ac_try;;
20980 esac
20981 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20982 $as_echo "$ac_try_echo") >&5
20983   (eval "$ac_link") 2>conftest.er1
20984   ac_status=$?
20985   grep -v '^ *+' conftest.er1 >conftest.err
20986   rm -f conftest.er1
20987   cat conftest.err >&5
20988   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20989   (exit $ac_status); } && {
20990          test -z "$ac_c_werror_flag" ||
20991          test ! -s conftest.err
20992        } && test -s conftest$ac_exeext && {
20993          test "$cross_compiling" = yes ||
20994          $as_test_x conftest$ac_exeext
20995        }; then
20996   eval "$as_ac_var=yes"
20997 else
20998   $as_echo "$as_me: failed program was:" >&5
20999 sed 's/^/| /' conftest.$ac_ext >&5
21000
21001         eval "$as_ac_var=no"
21002 fi
21003
21004 rm -rf conftest.dSYM
21005 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21006       conftest$ac_exeext conftest.$ac_ext
21007 fi
21008 ac_res=`eval 'as_val=${'$as_ac_var'}
21009                  $as_echo "$as_val"'`
21010                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21011 $as_echo "$ac_res" >&6; }
21012 as_val=`eval 'as_val=${'$as_ac_var'}
21013                  $as_echo "$as_val"'`
21014    if test "x$as_val" = x""yes; then
21015   cat >>confdefs.h <<_ACEOF
21016 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21017 _ACEOF
21018
21019 else
21020   case " $LIBOBJS " in
21021   *" $ac_func.$ac_objext "* ) ;;
21022   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21023  ;;
21024 esac
21025
21026 fi
21027 done
21028
21029
21030 else
21031   case " $LIBOBJS " in
21032   *" getopt_long.$ac_objext "* ) ;;
21033   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
21034  ;;
21035 esac
21036
21037 fi
21038
21039 # Solaris' getopt() doesn't do what we want for long options, so always use
21040 # our version on that platform.
21041 if test "$PORTNAME" = "solaris"; then
21042   case " $LIBOBJS " in
21043   *" getopt.$ac_objext "* ) ;;
21044   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
21045  ;;
21046 esac
21047
21048 fi
21049
21050 # mingw has adopted a GNU-centric interpretation of optind/optreset,
21051 # so always use our version on Windows.
21052 if test "$PORTNAME" = "win32"; then
21053   case " $LIBOBJS " in
21054   *" getopt.$ac_objext "* ) ;;
21055   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
21056  ;;
21057 esac
21058
21059   case " $LIBOBJS " in
21060   *" getopt_long.$ac_objext "* ) ;;
21061   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
21062  ;;
21063 esac
21064
21065 fi
21066
21067 # Cygwin's erand48() is broken (always returns zero) in some releases,
21068 # so force use of ours.
21069 if test "$PORTNAME" = "cygwin"; then
21070   case " $LIBOBJS " in
21071   *" erand48.$ac_objext "* ) ;;
21072   *) LIBOBJS="$LIBOBJS erand48.$ac_objext"
21073  ;;
21074 esac
21075
21076 fi
21077
21078 # Win32 support
21079 if test "$PORTNAME" = "win32"; then
21080
21081 for ac_func in gettimeofday
21082 do
21083 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21084 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21085 $as_echo_n "checking for $ac_func... " >&6; }
21086 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21087   $as_echo_n "(cached) " >&6
21088 else
21089   cat >conftest.$ac_ext <<_ACEOF
21090 /* confdefs.h.  */
21091 _ACEOF
21092 cat confdefs.h >>conftest.$ac_ext
21093 cat >>conftest.$ac_ext <<_ACEOF
21094 /* end confdefs.h.  */
21095 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21096    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21097 #define $ac_func innocuous_$ac_func
21098
21099 /* System header to define __stub macros and hopefully few prototypes,
21100     which can conflict with char $ac_func (); below.
21101     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21102     <limits.h> exists even on freestanding compilers.  */
21103
21104 #ifdef __STDC__
21105 # include <limits.h>
21106 #else
21107 # include <assert.h>
21108 #endif
21109
21110 #undef $ac_func
21111
21112 /* Override any GCC internal prototype to avoid an error.
21113    Use char because int might match the return type of a GCC
21114    builtin and then its argument prototype would still apply.  */
21115 #ifdef __cplusplus
21116 extern "C"
21117 #endif
21118 char $ac_func ();
21119 /* The GNU C library defines this for functions which it implements
21120     to always fail with ENOSYS.  Some functions are actually named
21121     something starting with __ and the normal name is an alias.  */
21122 #if defined __stub_$ac_func || defined __stub___$ac_func
21123 choke me
21124 #endif
21125
21126 int
21127 main ()
21128 {
21129 return $ac_func ();
21130   ;
21131   return 0;
21132 }
21133 _ACEOF
21134 rm -f conftest.$ac_objext conftest$ac_exeext
21135 if { (ac_try="$ac_link"
21136 case "(($ac_try" in
21137   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21138   *) ac_try_echo=$ac_try;;
21139 esac
21140 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21141 $as_echo "$ac_try_echo") >&5
21142   (eval "$ac_link") 2>conftest.er1
21143   ac_status=$?
21144   grep -v '^ *+' conftest.er1 >conftest.err
21145   rm -f conftest.er1
21146   cat conftest.err >&5
21147   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21148   (exit $ac_status); } && {
21149          test -z "$ac_c_werror_flag" ||
21150          test ! -s conftest.err
21151        } && test -s conftest$ac_exeext && {
21152          test "$cross_compiling" = yes ||
21153          $as_test_x conftest$ac_exeext
21154        }; then
21155   eval "$as_ac_var=yes"
21156 else
21157   $as_echo "$as_me: failed program was:" >&5
21158 sed 's/^/| /' conftest.$ac_ext >&5
21159
21160         eval "$as_ac_var=no"
21161 fi
21162
21163 rm -rf conftest.dSYM
21164 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21165       conftest$ac_exeext conftest.$ac_ext
21166 fi
21167 ac_res=`eval 'as_val=${'$as_ac_var'}
21168                  $as_echo "$as_val"'`
21169                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21170 $as_echo "$ac_res" >&6; }
21171 as_val=`eval 'as_val=${'$as_ac_var'}
21172                  $as_echo "$as_val"'`
21173    if test "x$as_val" = x""yes; then
21174   cat >>confdefs.h <<_ACEOF
21175 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21176 _ACEOF
21177
21178 else
21179   case " $LIBOBJS " in
21180   *" $ac_func.$ac_objext "* ) ;;
21181   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21182  ;;
21183 esac
21184
21185 fi
21186 done
21187
21188
21189   case " $LIBOBJS " in
21190   *" kill.$ac_objext "* ) ;;
21191   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
21192  ;;
21193 esac
21194
21195   case " $LIBOBJS " in
21196   *" open.$ac_objext "* ) ;;
21197   *) LIBOBJS="$LIBOBJS open.$ac_objext"
21198  ;;
21199 esac
21200
21201   case " $LIBOBJS " in
21202   *" win32env.$ac_objext "* ) ;;
21203   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
21204  ;;
21205 esac
21206
21207   case " $LIBOBJS " in
21208   *" win32error.$ac_objext "* ) ;;
21209   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
21210  ;;
21211 esac
21212
21213
21214 cat >>confdefs.h <<\_ACEOF
21215 #define HAVE_SYMLINK 1
21216 _ACEOF
21217
21218   { $as_echo "$as_me:$LINENO: checking for MINIDUMP_TYPE" >&5
21219 $as_echo_n "checking for MINIDUMP_TYPE... " >&6; }
21220 if test "${ac_cv_type_MINIDUMP_TYPE+set}" = set; then
21221   $as_echo_n "(cached) " >&6
21222 else
21223   ac_cv_type_MINIDUMP_TYPE=no
21224 cat >conftest.$ac_ext <<_ACEOF
21225 /* confdefs.h.  */
21226 _ACEOF
21227 cat confdefs.h >>conftest.$ac_ext
21228 cat >>conftest.$ac_ext <<_ACEOF
21229 /* end confdefs.h.  */
21230
21231 #define WIN32_LEAN_AND_MEAN
21232 #include <windows.h>
21233 #include <string.h>
21234 #include <dbghelp.h>
21235
21236 int
21237 main ()
21238 {
21239 if (sizeof (MINIDUMP_TYPE))
21240        return 0;
21241   ;
21242   return 0;
21243 }
21244 _ACEOF
21245 rm -f conftest.$ac_objext
21246 if { (ac_try="$ac_compile"
21247 case "(($ac_try" in
21248   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21249   *) ac_try_echo=$ac_try;;
21250 esac
21251 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21252 $as_echo "$ac_try_echo") >&5
21253   (eval "$ac_compile") 2>conftest.er1
21254   ac_status=$?
21255   grep -v '^ *+' conftest.er1 >conftest.err
21256   rm -f conftest.er1
21257   cat conftest.err >&5
21258   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21259   (exit $ac_status); } && {
21260          test -z "$ac_c_werror_flag" ||
21261          test ! -s conftest.err
21262        } && test -s conftest.$ac_objext; then
21263   cat >conftest.$ac_ext <<_ACEOF
21264 /* confdefs.h.  */
21265 _ACEOF
21266 cat confdefs.h >>conftest.$ac_ext
21267 cat >>conftest.$ac_ext <<_ACEOF
21268 /* end confdefs.h.  */
21269
21270 #define WIN32_LEAN_AND_MEAN
21271 #include <windows.h>
21272 #include <string.h>
21273 #include <dbghelp.h>
21274
21275 int
21276 main ()
21277 {
21278 if (sizeof ((MINIDUMP_TYPE)))
21279           return 0;
21280   ;
21281   return 0;
21282 }
21283 _ACEOF
21284 rm -f conftest.$ac_objext
21285 if { (ac_try="$ac_compile"
21286 case "(($ac_try" in
21287   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21288   *) ac_try_echo=$ac_try;;
21289 esac
21290 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21291 $as_echo "$ac_try_echo") >&5
21292   (eval "$ac_compile") 2>conftest.er1
21293   ac_status=$?
21294   grep -v '^ *+' conftest.er1 >conftest.err
21295   rm -f conftest.er1
21296   cat conftest.err >&5
21297   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21298   (exit $ac_status); } && {
21299          test -z "$ac_c_werror_flag" ||
21300          test ! -s conftest.err
21301        } && test -s conftest.$ac_objext; then
21302   :
21303 else
21304   $as_echo "$as_me: failed program was:" >&5
21305 sed 's/^/| /' conftest.$ac_ext >&5
21306
21307         ac_cv_type_MINIDUMP_TYPE=yes
21308 fi
21309
21310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21311 else
21312   $as_echo "$as_me: failed program was:" >&5
21313 sed 's/^/| /' conftest.$ac_ext >&5
21314
21315
21316 fi
21317
21318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21319 fi
21320 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_MINIDUMP_TYPE" >&5
21321 $as_echo "$ac_cv_type_MINIDUMP_TYPE" >&6; }
21322 if test "x$ac_cv_type_MINIDUMP_TYPE" = x""yes; then
21323
21324 cat >>confdefs.h <<_ACEOF
21325 #define HAVE_MINIDUMP_TYPE 1
21326 _ACEOF
21327
21328 pgac_minidump_type=yes
21329 else
21330   pgac_minidump_type=no
21331 fi
21332
21333 fi
21334 if test x"$pgac_minidump_type" = x"yes" ; then
21335   have_win32_dbghelp=yes
21336
21337 else
21338   have_win32_dbghelp=no
21339
21340 fi
21341
21342 if test "$with_readline" = yes; then
21343   { $as_echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
21344 $as_echo_n "checking for rl_completion_append_character... " >&6; }
21345 if test "${pgac_cv_var_rl_completion_append_character+set}" = set; then
21346   $as_echo_n "(cached) " >&6
21347 else
21348   cat >conftest.$ac_ext <<_ACEOF
21349 /* confdefs.h.  */
21350 _ACEOF
21351 cat confdefs.h >>conftest.$ac_ext
21352 cat >>conftest.$ac_ext <<_ACEOF
21353 /* end confdefs.h.  */
21354 #include <stdio.h>
21355 #ifdef HAVE_READLINE_READLINE_H
21356 # include <readline/readline.h>
21357 #elif defined(HAVE_READLINE_H)
21358 # include <readline.h>
21359 #endif
21360
21361 int
21362 main ()
21363 {
21364 rl_completion_append_character = 'x';
21365   ;
21366   return 0;
21367 }
21368 _ACEOF
21369 rm -f conftest.$ac_objext conftest$ac_exeext
21370 if { (ac_try="$ac_link"
21371 case "(($ac_try" in
21372   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21373   *) ac_try_echo=$ac_try;;
21374 esac
21375 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21376 $as_echo "$ac_try_echo") >&5
21377   (eval "$ac_link") 2>conftest.er1
21378   ac_status=$?
21379   grep -v '^ *+' conftest.er1 >conftest.err
21380   rm -f conftest.er1
21381   cat conftest.err >&5
21382   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21383   (exit $ac_status); } && {
21384          test -z "$ac_c_werror_flag" ||
21385          test ! -s conftest.err
21386        } && test -s conftest$ac_exeext && {
21387          test "$cross_compiling" = yes ||
21388          $as_test_x conftest$ac_exeext
21389        }; then
21390   pgac_cv_var_rl_completion_append_character=yes
21391 else
21392   $as_echo "$as_me: failed program was:" >&5
21393 sed 's/^/| /' conftest.$ac_ext >&5
21394
21395         pgac_cv_var_rl_completion_append_character=no
21396 fi
21397
21398 rm -rf conftest.dSYM
21399 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21400       conftest$ac_exeext conftest.$ac_ext
21401 fi
21402 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_rl_completion_append_character" >&5
21403 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
21404 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
21405
21406 cat >>confdefs.h <<\_ACEOF
21407 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
21408 _ACEOF
21409
21410 fi
21411
21412
21413 for ac_func in rl_completion_matches rl_filename_completion_function
21414 do
21415 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21416 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21417 $as_echo_n "checking for $ac_func... " >&6; }
21418 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21419   $as_echo_n "(cached) " >&6
21420 else
21421   cat >conftest.$ac_ext <<_ACEOF
21422 /* confdefs.h.  */
21423 _ACEOF
21424 cat confdefs.h >>conftest.$ac_ext
21425 cat >>conftest.$ac_ext <<_ACEOF
21426 /* end confdefs.h.  */
21427 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21428    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21429 #define $ac_func innocuous_$ac_func
21430
21431 /* System header to define __stub macros and hopefully few prototypes,
21432     which can conflict with char $ac_func (); below.
21433     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21434     <limits.h> exists even on freestanding compilers.  */
21435
21436 #ifdef __STDC__
21437 # include <limits.h>
21438 #else
21439 # include <assert.h>
21440 #endif
21441
21442 #undef $ac_func
21443
21444 /* Override any GCC internal prototype to avoid an error.
21445    Use char because int might match the return type of a GCC
21446    builtin and then its argument prototype would still apply.  */
21447 #ifdef __cplusplus
21448 extern "C"
21449 #endif
21450 char $ac_func ();
21451 /* The GNU C library defines this for functions which it implements
21452     to always fail with ENOSYS.  Some functions are actually named
21453     something starting with __ and the normal name is an alias.  */
21454 #if defined __stub_$ac_func || defined __stub___$ac_func
21455 choke me
21456 #endif
21457
21458 int
21459 main ()
21460 {
21461 return $ac_func ();
21462   ;
21463   return 0;
21464 }
21465 _ACEOF
21466 rm -f conftest.$ac_objext conftest$ac_exeext
21467 if { (ac_try="$ac_link"
21468 case "(($ac_try" in
21469   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21470   *) ac_try_echo=$ac_try;;
21471 esac
21472 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21473 $as_echo "$ac_try_echo") >&5
21474   (eval "$ac_link") 2>conftest.er1
21475   ac_status=$?
21476   grep -v '^ *+' conftest.er1 >conftest.err
21477   rm -f conftest.er1
21478   cat conftest.err >&5
21479   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21480   (exit $ac_status); } && {
21481          test -z "$ac_c_werror_flag" ||
21482          test ! -s conftest.err
21483        } && test -s conftest$ac_exeext && {
21484          test "$cross_compiling" = yes ||
21485          $as_test_x conftest$ac_exeext
21486        }; then
21487   eval "$as_ac_var=yes"
21488 else
21489   $as_echo "$as_me: failed program was:" >&5
21490 sed 's/^/| /' conftest.$ac_ext >&5
21491
21492         eval "$as_ac_var=no"
21493 fi
21494
21495 rm -rf conftest.dSYM
21496 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21497       conftest$ac_exeext conftest.$ac_ext
21498 fi
21499 ac_res=`eval 'as_val=${'$as_ac_var'}
21500                  $as_echo "$as_val"'`
21501                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21502 $as_echo "$ac_res" >&6; }
21503 as_val=`eval 'as_val=${'$as_ac_var'}
21504                  $as_echo "$as_val"'`
21505    if test "x$as_val" = x""yes; then
21506   cat >>confdefs.h <<_ACEOF
21507 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21508 _ACEOF
21509
21510 fi
21511 done
21512
21513
21514
21515 for ac_func in append_history history_truncate_file
21516 do
21517 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21518 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21519 $as_echo_n "checking for $ac_func... " >&6; }
21520 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21521   $as_echo_n "(cached) " >&6
21522 else
21523   cat >conftest.$ac_ext <<_ACEOF
21524 /* confdefs.h.  */
21525 _ACEOF
21526 cat confdefs.h >>conftest.$ac_ext
21527 cat >>conftest.$ac_ext <<_ACEOF
21528 /* end confdefs.h.  */
21529 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21530    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21531 #define $ac_func innocuous_$ac_func
21532
21533 /* System header to define __stub macros and hopefully few prototypes,
21534     which can conflict with char $ac_func (); below.
21535     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21536     <limits.h> exists even on freestanding compilers.  */
21537
21538 #ifdef __STDC__
21539 # include <limits.h>
21540 #else
21541 # include <assert.h>
21542 #endif
21543
21544 #undef $ac_func
21545
21546 /* Override any GCC internal prototype to avoid an error.
21547    Use char because int might match the return type of a GCC
21548    builtin and then its argument prototype would still apply.  */
21549 #ifdef __cplusplus
21550 extern "C"
21551 #endif
21552 char $ac_func ();
21553 /* The GNU C library defines this for functions which it implements
21554     to always fail with ENOSYS.  Some functions are actually named
21555     something starting with __ and the normal name is an alias.  */
21556 #if defined __stub_$ac_func || defined __stub___$ac_func
21557 choke me
21558 #endif
21559
21560 int
21561 main ()
21562 {
21563 return $ac_func ();
21564   ;
21565   return 0;
21566 }
21567 _ACEOF
21568 rm -f conftest.$ac_objext conftest$ac_exeext
21569 if { (ac_try="$ac_link"
21570 case "(($ac_try" in
21571   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21572   *) ac_try_echo=$ac_try;;
21573 esac
21574 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21575 $as_echo "$ac_try_echo") >&5
21576   (eval "$ac_link") 2>conftest.er1
21577   ac_status=$?
21578   grep -v '^ *+' conftest.er1 >conftest.err
21579   rm -f conftest.er1
21580   cat conftest.err >&5
21581   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21582   (exit $ac_status); } && {
21583          test -z "$ac_c_werror_flag" ||
21584          test ! -s conftest.err
21585        } && test -s conftest$ac_exeext && {
21586          test "$cross_compiling" = yes ||
21587          $as_test_x conftest$ac_exeext
21588        }; then
21589   eval "$as_ac_var=yes"
21590 else
21591   $as_echo "$as_me: failed program was:" >&5
21592 sed 's/^/| /' conftest.$ac_ext >&5
21593
21594         eval "$as_ac_var=no"
21595 fi
21596
21597 rm -rf conftest.dSYM
21598 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21599       conftest$ac_exeext conftest.$ac_ext
21600 fi
21601 ac_res=`eval 'as_val=${'$as_ac_var'}
21602                  $as_echo "$as_val"'`
21603                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21604 $as_echo "$ac_res" >&6; }
21605 as_val=`eval 'as_val=${'$as_ac_var'}
21606                  $as_echo "$as_val"'`
21607    if test "x$as_val" = x""yes; then
21608   cat >>confdefs.h <<_ACEOF
21609 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21610 _ACEOF
21611
21612 fi
21613 done
21614
21615 fi
21616
21617
21618 { $as_echo "$as_me:$LINENO: checking for sigsetjmp" >&5
21619 $as_echo_n "checking for sigsetjmp... " >&6; }
21620 if test "${pgac_cv_func_sigsetjmp+set}" = set; then
21621   $as_echo_n "(cached) " >&6
21622 else
21623   cat >conftest.$ac_ext <<_ACEOF
21624 /* confdefs.h.  */
21625 _ACEOF
21626 cat confdefs.h >>conftest.$ac_ext
21627 cat >>conftest.$ac_ext <<_ACEOF
21628 /* end confdefs.h.  */
21629 #include <setjmp.h>
21630 int
21631 main ()
21632 {
21633 sigjmp_buf x; sigsetjmp(x, 1);
21634   ;
21635   return 0;
21636 }
21637 _ACEOF
21638 rm -f conftest.$ac_objext conftest$ac_exeext
21639 if { (ac_try="$ac_link"
21640 case "(($ac_try" in
21641   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21642   *) ac_try_echo=$ac_try;;
21643 esac
21644 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21645 $as_echo "$ac_try_echo") >&5
21646   (eval "$ac_link") 2>conftest.er1
21647   ac_status=$?
21648   grep -v '^ *+' conftest.er1 >conftest.err
21649   rm -f conftest.er1
21650   cat conftest.err >&5
21651   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21652   (exit $ac_status); } && {
21653          test -z "$ac_c_werror_flag" ||
21654          test ! -s conftest.err
21655        } && test -s conftest$ac_exeext && {
21656          test "$cross_compiling" = yes ||
21657          $as_test_x conftest$ac_exeext
21658        }; then
21659   pgac_cv_func_sigsetjmp=yes
21660 else
21661   $as_echo "$as_me: failed program was:" >&5
21662 sed 's/^/| /' conftest.$ac_ext >&5
21663
21664         pgac_cv_func_sigsetjmp=no
21665 fi
21666
21667 rm -rf conftest.dSYM
21668 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21669       conftest$ac_exeext conftest.$ac_ext
21670 fi
21671 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_sigsetjmp" >&5
21672 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
21673 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
21674
21675 cat >>confdefs.h <<\_ACEOF
21676 #define HAVE_SIGSETJMP 1
21677 _ACEOF
21678
21679 fi
21680
21681 { $as_echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
21682 $as_echo_n "checking whether sys_siglist is declared... " >&6; }
21683 if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
21684   $as_echo_n "(cached) " >&6
21685 else
21686   cat >conftest.$ac_ext <<_ACEOF
21687 /* confdefs.h.  */
21688 _ACEOF
21689 cat confdefs.h >>conftest.$ac_ext
21690 cat >>conftest.$ac_ext <<_ACEOF
21691 /* end confdefs.h.  */
21692 #include <signal.h>
21693 /* NetBSD declares sys_siglist in unistd.h.  */
21694 #ifdef HAVE_UNISTD_H
21695 # include <unistd.h>
21696 #endif
21697
21698
21699 int
21700 main ()
21701 {
21702 #ifndef sys_siglist
21703   (void) sys_siglist;
21704 #endif
21705
21706   ;
21707   return 0;
21708 }
21709 _ACEOF
21710 rm -f conftest.$ac_objext
21711 if { (ac_try="$ac_compile"
21712 case "(($ac_try" in
21713   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21714   *) ac_try_echo=$ac_try;;
21715 esac
21716 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21717 $as_echo "$ac_try_echo") >&5
21718   (eval "$ac_compile") 2>conftest.er1
21719   ac_status=$?
21720   grep -v '^ *+' conftest.er1 >conftest.err
21721   rm -f conftest.er1
21722   cat conftest.err >&5
21723   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21724   (exit $ac_status); } && {
21725          test -z "$ac_c_werror_flag" ||
21726          test ! -s conftest.err
21727        } && test -s conftest.$ac_objext; then
21728   ac_cv_have_decl_sys_siglist=yes
21729 else
21730   $as_echo "$as_me: failed program was:" >&5
21731 sed 's/^/| /' conftest.$ac_ext >&5
21732
21733         ac_cv_have_decl_sys_siglist=no
21734 fi
21735
21736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21737 fi
21738 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
21739 $as_echo "$ac_cv_have_decl_sys_siglist" >&6; }
21740 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then
21741
21742 cat >>confdefs.h <<_ACEOF
21743 #define HAVE_DECL_SYS_SIGLIST 1
21744 _ACEOF
21745
21746
21747 else
21748   cat >>confdefs.h <<_ACEOF
21749 #define HAVE_DECL_SYS_SIGLIST 0
21750 _ACEOF
21751
21752
21753 fi
21754
21755
21756
21757
21758 { $as_echo "$as_me:$LINENO: checking for syslog" >&5
21759 $as_echo_n "checking for syslog... " >&6; }
21760 if test "${ac_cv_func_syslog+set}" = set; then
21761   $as_echo_n "(cached) " >&6
21762 else
21763   cat >conftest.$ac_ext <<_ACEOF
21764 /* confdefs.h.  */
21765 _ACEOF
21766 cat confdefs.h >>conftest.$ac_ext
21767 cat >>conftest.$ac_ext <<_ACEOF
21768 /* end confdefs.h.  */
21769 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
21770    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21771 #define syslog innocuous_syslog
21772
21773 /* System header to define __stub macros and hopefully few prototypes,
21774     which can conflict with char syslog (); below.
21775     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21776     <limits.h> exists even on freestanding compilers.  */
21777
21778 #ifdef __STDC__
21779 # include <limits.h>
21780 #else
21781 # include <assert.h>
21782 #endif
21783
21784 #undef syslog
21785
21786 /* Override any GCC internal prototype to avoid an error.
21787    Use char because int might match the return type of a GCC
21788    builtin and then its argument prototype would still apply.  */
21789 #ifdef __cplusplus
21790 extern "C"
21791 #endif
21792 char syslog ();
21793 /* The GNU C library defines this for functions which it implements
21794     to always fail with ENOSYS.  Some functions are actually named
21795     something starting with __ and the normal name is an alias.  */
21796 #if defined __stub_syslog || defined __stub___syslog
21797 choke me
21798 #endif
21799
21800 int
21801 main ()
21802 {
21803 return syslog ();
21804   ;
21805   return 0;
21806 }
21807 _ACEOF
21808 rm -f conftest.$ac_objext conftest$ac_exeext
21809 if { (ac_try="$ac_link"
21810 case "(($ac_try" in
21811   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21812   *) ac_try_echo=$ac_try;;
21813 esac
21814 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21815 $as_echo "$ac_try_echo") >&5
21816   (eval "$ac_link") 2>conftest.er1
21817   ac_status=$?
21818   grep -v '^ *+' conftest.er1 >conftest.err
21819   rm -f conftest.er1
21820   cat conftest.err >&5
21821   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21822   (exit $ac_status); } && {
21823          test -z "$ac_c_werror_flag" ||
21824          test ! -s conftest.err
21825        } && test -s conftest$ac_exeext && {
21826          test "$cross_compiling" = yes ||
21827          $as_test_x conftest$ac_exeext
21828        }; then
21829   ac_cv_func_syslog=yes
21830 else
21831   $as_echo "$as_me: failed program was:" >&5
21832 sed 's/^/| /' conftest.$ac_ext >&5
21833
21834         ac_cv_func_syslog=no
21835 fi
21836
21837 rm -rf conftest.dSYM
21838 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21839       conftest$ac_exeext conftest.$ac_ext
21840 fi
21841 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
21842 $as_echo "$ac_cv_func_syslog" >&6; }
21843 if test "x$ac_cv_func_syslog" = x""yes; then
21844   if test "${ac_cv_header_syslog_h+set}" = set; then
21845   { $as_echo "$as_me:$LINENO: checking for syslog.h" >&5
21846 $as_echo_n "checking for syslog.h... " >&6; }
21847 if test "${ac_cv_header_syslog_h+set}" = set; then
21848   $as_echo_n "(cached) " >&6
21849 fi
21850 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
21851 $as_echo "$ac_cv_header_syslog_h" >&6; }
21852 else
21853   # Is the header compilable?
21854 { $as_echo "$as_me:$LINENO: checking syslog.h usability" >&5
21855 $as_echo_n "checking syslog.h usability... " >&6; }
21856 cat >conftest.$ac_ext <<_ACEOF
21857 /* confdefs.h.  */
21858 _ACEOF
21859 cat confdefs.h >>conftest.$ac_ext
21860 cat >>conftest.$ac_ext <<_ACEOF
21861 /* end confdefs.h.  */
21862 $ac_includes_default
21863 #include <syslog.h>
21864 _ACEOF
21865 rm -f conftest.$ac_objext
21866 if { (ac_try="$ac_compile"
21867 case "(($ac_try" in
21868   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21869   *) ac_try_echo=$ac_try;;
21870 esac
21871 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21872 $as_echo "$ac_try_echo") >&5
21873   (eval "$ac_compile") 2>conftest.er1
21874   ac_status=$?
21875   grep -v '^ *+' conftest.er1 >conftest.err
21876   rm -f conftest.er1
21877   cat conftest.err >&5
21878   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21879   (exit $ac_status); } && {
21880          test -z "$ac_c_werror_flag" ||
21881          test ! -s conftest.err
21882        } && test -s conftest.$ac_objext; then
21883   ac_header_compiler=yes
21884 else
21885   $as_echo "$as_me: failed program was:" >&5
21886 sed 's/^/| /' conftest.$ac_ext >&5
21887
21888         ac_header_compiler=no
21889 fi
21890
21891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21892 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21893 $as_echo "$ac_header_compiler" >&6; }
21894
21895 # Is the header present?
21896 { $as_echo "$as_me:$LINENO: checking syslog.h presence" >&5
21897 $as_echo_n "checking syslog.h presence... " >&6; }
21898 cat >conftest.$ac_ext <<_ACEOF
21899 /* confdefs.h.  */
21900 _ACEOF
21901 cat confdefs.h >>conftest.$ac_ext
21902 cat >>conftest.$ac_ext <<_ACEOF
21903 /* end confdefs.h.  */
21904 #include <syslog.h>
21905 _ACEOF
21906 if { (ac_try="$ac_cpp conftest.$ac_ext"
21907 case "(($ac_try" in
21908   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21909   *) ac_try_echo=$ac_try;;
21910 esac
21911 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21912 $as_echo "$ac_try_echo") >&5
21913   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
21914   ac_status=$?
21915   grep -v '^ *+' conftest.er1 >conftest.err
21916   rm -f conftest.er1
21917   cat conftest.err >&5
21918   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21919   (exit $ac_status); } >/dev/null && {
21920          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21921          test ! -s conftest.err
21922        }; then
21923   ac_header_preproc=yes
21924 else
21925   $as_echo "$as_me: failed program was:" >&5
21926 sed 's/^/| /' conftest.$ac_ext >&5
21927
21928   ac_header_preproc=no
21929 fi
21930
21931 rm -f conftest.err conftest.$ac_ext
21932 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21933 $as_echo "$ac_header_preproc" >&6; }
21934
21935 # So?  What about this header?
21936 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21937   yes:no: )
21938     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
21939 $as_echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21940     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
21941 $as_echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
21942     ac_header_preproc=yes
21943     ;;
21944   no:yes:* )
21945     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
21946 $as_echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
21947     { $as_echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
21948 $as_echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
21949     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
21950 $as_echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
21951     { $as_echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
21952 $as_echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
21953     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
21954 $as_echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
21955     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
21956 $as_echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
21957     ( cat <<\_ASBOX
21958 ## ---------------------------------------- ##
21959 ## Report this to pgsql-bugs@postgresql.org ##
21960 ## ---------------------------------------- ##
21961 _ASBOX
21962      ) | sed "s/^/$as_me: WARNING:     /" >&2
21963     ;;
21964 esac
21965 { $as_echo "$as_me:$LINENO: checking for syslog.h" >&5
21966 $as_echo_n "checking for syslog.h... " >&6; }
21967 if test "${ac_cv_header_syslog_h+set}" = set; then
21968   $as_echo_n "(cached) " >&6
21969 else
21970   ac_cv_header_syslog_h=$ac_header_preproc
21971 fi
21972 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
21973 $as_echo "$ac_cv_header_syslog_h" >&6; }
21974
21975 fi
21976 if test "x$ac_cv_header_syslog_h" = x""yes; then
21977
21978 cat >>confdefs.h <<\_ACEOF
21979 #define HAVE_SYSLOG 1
21980 _ACEOF
21981
21982 fi
21983
21984
21985 fi
21986
21987
21988 { $as_echo "$as_me:$LINENO: checking for opterr" >&5
21989 $as_echo_n "checking for opterr... " >&6; }
21990 if test "${pgac_cv_var_int_opterr+set}" = set; then
21991   $as_echo_n "(cached) " >&6
21992 else
21993   cat >conftest.$ac_ext <<_ACEOF
21994 /* confdefs.h.  */
21995 _ACEOF
21996 cat confdefs.h >>conftest.$ac_ext
21997 cat >>conftest.$ac_ext <<_ACEOF
21998 /* end confdefs.h.  */
21999 #include <unistd.h>
22000 int
22001 main ()
22002 {
22003 extern int opterr; opterr = 1;
22004   ;
22005   return 0;
22006 }
22007 _ACEOF
22008 rm -f conftest.$ac_objext conftest$ac_exeext
22009 if { (ac_try="$ac_link"
22010 case "(($ac_try" in
22011   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22012   *) ac_try_echo=$ac_try;;
22013 esac
22014 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22015 $as_echo "$ac_try_echo") >&5
22016   (eval "$ac_link") 2>conftest.er1
22017   ac_status=$?
22018   grep -v '^ *+' conftest.er1 >conftest.err
22019   rm -f conftest.er1
22020   cat conftest.err >&5
22021   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22022   (exit $ac_status); } && {
22023          test -z "$ac_c_werror_flag" ||
22024          test ! -s conftest.err
22025        } && test -s conftest$ac_exeext && {
22026          test "$cross_compiling" = yes ||
22027          $as_test_x conftest$ac_exeext
22028        }; then
22029   pgac_cv_var_int_opterr=yes
22030 else
22031   $as_echo "$as_me: failed program was:" >&5
22032 sed 's/^/| /' conftest.$ac_ext >&5
22033
22034         pgac_cv_var_int_opterr=no
22035 fi
22036
22037 rm -rf conftest.dSYM
22038 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22039       conftest$ac_exeext conftest.$ac_ext
22040 fi
22041 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_opterr" >&5
22042 $as_echo "$pgac_cv_var_int_opterr" >&6; }
22043 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
22044
22045 cat >>confdefs.h <<\_ACEOF
22046 #define HAVE_INT_OPTERR 1
22047 _ACEOF
22048
22049 fi
22050
22051 { $as_echo "$as_me:$LINENO: checking for optreset" >&5
22052 $as_echo_n "checking for optreset... " >&6; }
22053 if test "${pgac_cv_var_int_optreset+set}" = set; then
22054   $as_echo_n "(cached) " >&6
22055 else
22056   cat >conftest.$ac_ext <<_ACEOF
22057 /* confdefs.h.  */
22058 _ACEOF
22059 cat confdefs.h >>conftest.$ac_ext
22060 cat >>conftest.$ac_ext <<_ACEOF
22061 /* end confdefs.h.  */
22062 #include <unistd.h>
22063 int
22064 main ()
22065 {
22066 extern int optreset; optreset = 1;
22067   ;
22068   return 0;
22069 }
22070 _ACEOF
22071 rm -f conftest.$ac_objext conftest$ac_exeext
22072 if { (ac_try="$ac_link"
22073 case "(($ac_try" in
22074   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22075   *) ac_try_echo=$ac_try;;
22076 esac
22077 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22078 $as_echo "$ac_try_echo") >&5
22079   (eval "$ac_link") 2>conftest.er1
22080   ac_status=$?
22081   grep -v '^ *+' conftest.er1 >conftest.err
22082   rm -f conftest.er1
22083   cat conftest.err >&5
22084   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22085   (exit $ac_status); } && {
22086          test -z "$ac_c_werror_flag" ||
22087          test ! -s conftest.err
22088        } && test -s conftest$ac_exeext && {
22089          test "$cross_compiling" = yes ||
22090          $as_test_x conftest$ac_exeext
22091        }; then
22092   pgac_cv_var_int_optreset=yes
22093 else
22094   $as_echo "$as_me: failed program was:" >&5
22095 sed 's/^/| /' conftest.$ac_ext >&5
22096
22097         pgac_cv_var_int_optreset=no
22098 fi
22099
22100 rm -rf conftest.dSYM
22101 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22102       conftest$ac_exeext conftest.$ac_ext
22103 fi
22104 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
22105 $as_echo "$pgac_cv_var_int_optreset" >&6; }
22106 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
22107
22108 cat >>confdefs.h <<\_ACEOF
22109 #define HAVE_INT_OPTRESET 1
22110 _ACEOF
22111
22112 fi
22113
22114
22115
22116 for ac_func in strtoll strtoq
22117 do
22118 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22119 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22120 $as_echo_n "checking for $ac_func... " >&6; }
22121 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22122   $as_echo_n "(cached) " >&6
22123 else
22124   cat >conftest.$ac_ext <<_ACEOF
22125 /* confdefs.h.  */
22126 _ACEOF
22127 cat confdefs.h >>conftest.$ac_ext
22128 cat >>conftest.$ac_ext <<_ACEOF
22129 /* end confdefs.h.  */
22130 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22131    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22132 #define $ac_func innocuous_$ac_func
22133
22134 /* System header to define __stub macros and hopefully few prototypes,
22135     which can conflict with char $ac_func (); below.
22136     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22137     <limits.h> exists even on freestanding compilers.  */
22138
22139 #ifdef __STDC__
22140 # include <limits.h>
22141 #else
22142 # include <assert.h>
22143 #endif
22144
22145 #undef $ac_func
22146
22147 /* Override any GCC internal prototype to avoid an error.
22148    Use char because int might match the return type of a GCC
22149    builtin and then its argument prototype would still apply.  */
22150 #ifdef __cplusplus
22151 extern "C"
22152 #endif
22153 char $ac_func ();
22154 /* The GNU C library defines this for functions which it implements
22155     to always fail with ENOSYS.  Some functions are actually named
22156     something starting with __ and the normal name is an alias.  */
22157 #if defined __stub_$ac_func || defined __stub___$ac_func
22158 choke me
22159 #endif
22160
22161 int
22162 main ()
22163 {
22164 return $ac_func ();
22165   ;
22166   return 0;
22167 }
22168 _ACEOF
22169 rm -f conftest.$ac_objext conftest$ac_exeext
22170 if { (ac_try="$ac_link"
22171 case "(($ac_try" in
22172   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22173   *) ac_try_echo=$ac_try;;
22174 esac
22175 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22176 $as_echo "$ac_try_echo") >&5
22177   (eval "$ac_link") 2>conftest.er1
22178   ac_status=$?
22179   grep -v '^ *+' conftest.er1 >conftest.err
22180   rm -f conftest.er1
22181   cat conftest.err >&5
22182   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22183   (exit $ac_status); } && {
22184          test -z "$ac_c_werror_flag" ||
22185          test ! -s conftest.err
22186        } && test -s conftest$ac_exeext && {
22187          test "$cross_compiling" = yes ||
22188          $as_test_x conftest$ac_exeext
22189        }; then
22190   eval "$as_ac_var=yes"
22191 else
22192   $as_echo "$as_me: failed program was:" >&5
22193 sed 's/^/| /' conftest.$ac_ext >&5
22194
22195         eval "$as_ac_var=no"
22196 fi
22197
22198 rm -rf conftest.dSYM
22199 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22200       conftest$ac_exeext conftest.$ac_ext
22201 fi
22202 ac_res=`eval 'as_val=${'$as_ac_var'}
22203                  $as_echo "$as_val"'`
22204                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22205 $as_echo "$ac_res" >&6; }
22206 as_val=`eval 'as_val=${'$as_ac_var'}
22207                  $as_echo "$as_val"'`
22208    if test "x$as_val" = x""yes; then
22209   cat >>confdefs.h <<_ACEOF
22210 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22211 _ACEOF
22212  break
22213 fi
22214 done
22215
22216
22217
22218 for ac_func in strtoull strtouq
22219 do
22220 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22221 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22222 $as_echo_n "checking for $ac_func... " >&6; }
22223 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22224   $as_echo_n "(cached) " >&6
22225 else
22226   cat >conftest.$ac_ext <<_ACEOF
22227 /* confdefs.h.  */
22228 _ACEOF
22229 cat confdefs.h >>conftest.$ac_ext
22230 cat >>conftest.$ac_ext <<_ACEOF
22231 /* end confdefs.h.  */
22232 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22233    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22234 #define $ac_func innocuous_$ac_func
22235
22236 /* System header to define __stub macros and hopefully few prototypes,
22237     which can conflict with char $ac_func (); below.
22238     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22239     <limits.h> exists even on freestanding compilers.  */
22240
22241 #ifdef __STDC__
22242 # include <limits.h>
22243 #else
22244 # include <assert.h>
22245 #endif
22246
22247 #undef $ac_func
22248
22249 /* Override any GCC internal prototype to avoid an error.
22250    Use char because int might match the return type of a GCC
22251    builtin and then its argument prototype would still apply.  */
22252 #ifdef __cplusplus
22253 extern "C"
22254 #endif
22255 char $ac_func ();
22256 /* The GNU C library defines this for functions which it implements
22257     to always fail with ENOSYS.  Some functions are actually named
22258     something starting with __ and the normal name is an alias.  */
22259 #if defined __stub_$ac_func || defined __stub___$ac_func
22260 choke me
22261 #endif
22262
22263 int
22264 main ()
22265 {
22266 return $ac_func ();
22267   ;
22268   return 0;
22269 }
22270 _ACEOF
22271 rm -f conftest.$ac_objext conftest$ac_exeext
22272 if { (ac_try="$ac_link"
22273 case "(($ac_try" in
22274   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22275   *) ac_try_echo=$ac_try;;
22276 esac
22277 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22278 $as_echo "$ac_try_echo") >&5
22279   (eval "$ac_link") 2>conftest.er1
22280   ac_status=$?
22281   grep -v '^ *+' conftest.er1 >conftest.err
22282   rm -f conftest.er1
22283   cat conftest.err >&5
22284   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22285   (exit $ac_status); } && {
22286          test -z "$ac_c_werror_flag" ||
22287          test ! -s conftest.err
22288        } && test -s conftest$ac_exeext && {
22289          test "$cross_compiling" = yes ||
22290          $as_test_x conftest$ac_exeext
22291        }; then
22292   eval "$as_ac_var=yes"
22293 else
22294   $as_echo "$as_me: failed program was:" >&5
22295 sed 's/^/| /' conftest.$ac_ext >&5
22296
22297         eval "$as_ac_var=no"
22298 fi
22299
22300 rm -rf conftest.dSYM
22301 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22302       conftest$ac_exeext conftest.$ac_ext
22303 fi
22304 ac_res=`eval 'as_val=${'$as_ac_var'}
22305                  $as_echo "$as_val"'`
22306                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22307 $as_echo "$ac_res" >&6; }
22308 as_val=`eval 'as_val=${'$as_ac_var'}
22309                  $as_echo "$as_val"'`
22310    if test "x$as_val" = x""yes; then
22311   cat >>confdefs.h <<_ACEOF
22312 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22313 _ACEOF
22314  break
22315 fi
22316 done
22317
22318
22319 # Check for one of atexit() or on_exit()
22320
22321 for ac_func in atexit
22322 do
22323 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22324 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22325 $as_echo_n "checking for $ac_func... " >&6; }
22326 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22327   $as_echo_n "(cached) " >&6
22328 else
22329   cat >conftest.$ac_ext <<_ACEOF
22330 /* confdefs.h.  */
22331 _ACEOF
22332 cat confdefs.h >>conftest.$ac_ext
22333 cat >>conftest.$ac_ext <<_ACEOF
22334 /* end confdefs.h.  */
22335 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22336    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22337 #define $ac_func innocuous_$ac_func
22338
22339 /* System header to define __stub macros and hopefully few prototypes,
22340     which can conflict with char $ac_func (); below.
22341     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22342     <limits.h> exists even on freestanding compilers.  */
22343
22344 #ifdef __STDC__
22345 # include <limits.h>
22346 #else
22347 # include <assert.h>
22348 #endif
22349
22350 #undef $ac_func
22351
22352 /* Override any GCC internal prototype to avoid an error.
22353    Use char because int might match the return type of a GCC
22354    builtin and then its argument prototype would still apply.  */
22355 #ifdef __cplusplus
22356 extern "C"
22357 #endif
22358 char $ac_func ();
22359 /* The GNU C library defines this for functions which it implements
22360     to always fail with ENOSYS.  Some functions are actually named
22361     something starting with __ and the normal name is an alias.  */
22362 #if defined __stub_$ac_func || defined __stub___$ac_func
22363 choke me
22364 #endif
22365
22366 int
22367 main ()
22368 {
22369 return $ac_func ();
22370   ;
22371   return 0;
22372 }
22373 _ACEOF
22374 rm -f conftest.$ac_objext conftest$ac_exeext
22375 if { (ac_try="$ac_link"
22376 case "(($ac_try" in
22377   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22378   *) ac_try_echo=$ac_try;;
22379 esac
22380 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22381 $as_echo "$ac_try_echo") >&5
22382   (eval "$ac_link") 2>conftest.er1
22383   ac_status=$?
22384   grep -v '^ *+' conftest.er1 >conftest.err
22385   rm -f conftest.er1
22386   cat conftest.err >&5
22387   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22388   (exit $ac_status); } && {
22389          test -z "$ac_c_werror_flag" ||
22390          test ! -s conftest.err
22391        } && test -s conftest$ac_exeext && {
22392          test "$cross_compiling" = yes ||
22393          $as_test_x conftest$ac_exeext
22394        }; then
22395   eval "$as_ac_var=yes"
22396 else
22397   $as_echo "$as_me: failed program was:" >&5
22398 sed 's/^/| /' conftest.$ac_ext >&5
22399
22400         eval "$as_ac_var=no"
22401 fi
22402
22403 rm -rf conftest.dSYM
22404 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22405       conftest$ac_exeext conftest.$ac_ext
22406 fi
22407 ac_res=`eval 'as_val=${'$as_ac_var'}
22408                  $as_echo "$as_val"'`
22409                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22410 $as_echo "$ac_res" >&6; }
22411 as_val=`eval 'as_val=${'$as_ac_var'}
22412                  $as_echo "$as_val"'`
22413    if test "x$as_val" = x""yes; then
22414   cat >>confdefs.h <<_ACEOF
22415 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22416 _ACEOF
22417
22418 else
22419
22420 for ac_func in on_exit
22421 do
22422 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22423 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22424 $as_echo_n "checking for $ac_func... " >&6; }
22425 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22426   $as_echo_n "(cached) " >&6
22427 else
22428   cat >conftest.$ac_ext <<_ACEOF
22429 /* confdefs.h.  */
22430 _ACEOF
22431 cat confdefs.h >>conftest.$ac_ext
22432 cat >>conftest.$ac_ext <<_ACEOF
22433 /* end confdefs.h.  */
22434 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22435    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22436 #define $ac_func innocuous_$ac_func
22437
22438 /* System header to define __stub macros and hopefully few prototypes,
22439     which can conflict with char $ac_func (); below.
22440     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22441     <limits.h> exists even on freestanding compilers.  */
22442
22443 #ifdef __STDC__
22444 # include <limits.h>
22445 #else
22446 # include <assert.h>
22447 #endif
22448
22449 #undef $ac_func
22450
22451 /* Override any GCC internal prototype to avoid an error.
22452    Use char because int might match the return type of a GCC
22453    builtin and then its argument prototype would still apply.  */
22454 #ifdef __cplusplus
22455 extern "C"
22456 #endif
22457 char $ac_func ();
22458 /* The GNU C library defines this for functions which it implements
22459     to always fail with ENOSYS.  Some functions are actually named
22460     something starting with __ and the normal name is an alias.  */
22461 #if defined __stub_$ac_func || defined __stub___$ac_func
22462 choke me
22463 #endif
22464
22465 int
22466 main ()
22467 {
22468 return $ac_func ();
22469   ;
22470   return 0;
22471 }
22472 _ACEOF
22473 rm -f conftest.$ac_objext conftest$ac_exeext
22474 if { (ac_try="$ac_link"
22475 case "(($ac_try" in
22476   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22477   *) ac_try_echo=$ac_try;;
22478 esac
22479 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22480 $as_echo "$ac_try_echo") >&5
22481   (eval "$ac_link") 2>conftest.er1
22482   ac_status=$?
22483   grep -v '^ *+' conftest.er1 >conftest.err
22484   rm -f conftest.er1
22485   cat conftest.err >&5
22486   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22487   (exit $ac_status); } && {
22488          test -z "$ac_c_werror_flag" ||
22489          test ! -s conftest.err
22490        } && test -s conftest$ac_exeext && {
22491          test "$cross_compiling" = yes ||
22492          $as_test_x conftest$ac_exeext
22493        }; then
22494   eval "$as_ac_var=yes"
22495 else
22496   $as_echo "$as_me: failed program was:" >&5
22497 sed 's/^/| /' conftest.$ac_ext >&5
22498
22499         eval "$as_ac_var=no"
22500 fi
22501
22502 rm -rf conftest.dSYM
22503 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22504       conftest$ac_exeext conftest.$ac_ext
22505 fi
22506 ac_res=`eval 'as_val=${'$as_ac_var'}
22507                  $as_echo "$as_val"'`
22508                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22509 $as_echo "$ac_res" >&6; }
22510 as_val=`eval 'as_val=${'$as_ac_var'}
22511                  $as_echo "$as_val"'`
22512    if test "x$as_val" = x""yes; then
22513   cat >>confdefs.h <<_ACEOF
22514 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22515 _ACEOF
22516
22517 else
22518   { { $as_echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
22519 $as_echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
22520    { (exit 1); exit 1; }; }
22521 fi
22522 done
22523
22524 fi
22525 done
22526
22527
22528
22529 #
22530 # Pthreads
22531 #
22532 # For each platform, we need to know about any special compile and link
22533 # libraries, and whether the normal C function names are thread-safe.
22534 # See the comment at the top of src/port/thread.c for more information.
22535 # WIN32 doesn't need the pthread tests;  it always uses threads
22536 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
22537
22538
22539
22540 ac_ext=c
22541 ac_cpp='$CPP $CPPFLAGS'
22542 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22543 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22544 ac_compiler_gnu=$ac_cv_c_compiler_gnu
22545
22546 acx_pthread_ok=no
22547
22548 # We used to check for pthread.h first, but this fails if pthread.h
22549 # requires special compiler flags (e.g. on True64 or Sequent).
22550 # It gets checked for in the link test anyway.
22551
22552 # First of all, check if the user has set any of the PTHREAD_LIBS,
22553 # etcetera environment variables, and if threads linking works using
22554 # them:
22555 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
22556         save_CFLAGS="$CFLAGS"
22557         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
22558         save_LIBS="$LIBS"
22559         LIBS="$PTHREAD_LIBS $LIBS"
22560         { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
22561 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
22562         cat >conftest.$ac_ext <<_ACEOF
22563 /* confdefs.h.  */
22564 _ACEOF
22565 cat confdefs.h >>conftest.$ac_ext
22566 cat >>conftest.$ac_ext <<_ACEOF
22567 /* end confdefs.h.  */
22568
22569 /* Override any GCC internal prototype to avoid an error.
22570    Use char because int might match the return type of a GCC
22571    builtin and then its argument prototype would still apply.  */
22572 #ifdef __cplusplus
22573 extern "C"
22574 #endif
22575 char pthread_join ();
22576 int
22577 main ()
22578 {
22579 return pthread_join ();
22580   ;
22581   return 0;
22582 }
22583 _ACEOF
22584 rm -f conftest.$ac_objext conftest$ac_exeext
22585 if { (ac_try="$ac_link"
22586 case "(($ac_try" in
22587   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22588   *) ac_try_echo=$ac_try;;
22589 esac
22590 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22591 $as_echo "$ac_try_echo") >&5
22592   (eval "$ac_link") 2>conftest.er1
22593   ac_status=$?
22594   grep -v '^ *+' conftest.er1 >conftest.err
22595   rm -f conftest.er1
22596   cat conftest.err >&5
22597   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22598   (exit $ac_status); } && {
22599          test -z "$ac_c_werror_flag" ||
22600          test ! -s conftest.err
22601        } && test -s conftest$ac_exeext && {
22602          test "$cross_compiling" = yes ||
22603          $as_test_x conftest$ac_exeext
22604        }; then
22605   acx_pthread_ok=yes
22606 else
22607   $as_echo "$as_me: failed program was:" >&5
22608 sed 's/^/| /' conftest.$ac_ext >&5
22609
22610
22611 fi
22612
22613 rm -rf conftest.dSYM
22614 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22615       conftest$ac_exeext conftest.$ac_ext
22616         { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
22617 $as_echo "$acx_pthread_ok" >&6; }
22618         if test x"$acx_pthread_ok" = xno; then
22619                 PTHREAD_LIBS=""
22620                 PTHREAD_CFLAGS=""
22621         fi
22622         LIBS="$save_LIBS"
22623         CFLAGS="$save_CFLAGS"
22624 fi
22625
22626 # We must check for the threads library under a number of different
22627 # names; the ordering is very important because some systems
22628 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
22629 # libraries is broken (non-POSIX).
22630
22631 # Create a list of thread flags to try.  Items starting with a "-" are
22632 # C compiler flags, and other items are library names, except for "none"
22633 # which indicates that we try without any flags at all, and "pthread-config"
22634 # which is a program returning the flags for the Pth emulation library.
22635
22636 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
22637
22638 # The ordering *is* (sometimes) important.  Some notes on the
22639 # individual items follow:
22640
22641 # pthreads: AIX (must check this before -lpthread)
22642 # none: in case threads are in libc; should be tried before -Kthread and
22643 #       other compiler flags to prevent continual compiler warnings
22644 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
22645 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
22646 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
22647 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
22648 # -pthreads: Solaris/gcc
22649 # -mthreads: Mingw32/gcc, Lynx/gcc
22650 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
22651 #      doesn't hurt to check since this sometimes defines pthreads too;
22652 #      also defines -D_REENTRANT)
22653 # pthread: Linux, etcetera
22654 # --thread-safe: KAI C++
22655 # pthread-config: use pthread-config program (for GNU Pth library)
22656
22657 case "${host_cpu}-${host_os}" in
22658         *solaris*)
22659
22660         # On Solaris (at least, for some versions), libc contains stubbed
22661         # (non-functional) versions of the pthreads routines, so link-based
22662         # tests will erroneously succeed.  (We need to link with -pthread or
22663         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
22664         # a function called by this macro, so we could check for that, but
22665         # who knows whether they'll stub that too in a future libc.)  So,
22666         # we'll just look for -pthreads and -lpthread first:
22667
22668         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
22669         ;;
22670 esac
22671
22672 if test x"$acx_pthread_ok" = xno; then
22673 for flag in $acx_pthread_flags; do
22674
22675         tryPTHREAD_CFLAGS=""
22676         tryPTHREAD_LIBS=""
22677         case $flag in
22678                 none)
22679                 { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
22680 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
22681                 ;;
22682
22683                 -*)
22684                 { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
22685 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
22686                 tryPTHREAD_CFLAGS="$flag"
22687                 ;;
22688
22689                 pthread-config)
22690                 # skip this if we already have flags defined, for PostgreSQL
22691                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
22692                 # Extract the first word of "pthread-config", so it can be a program name with args.
22693 set dummy pthread-config; ac_word=$2
22694 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
22695 $as_echo_n "checking for $ac_word... " >&6; }
22696 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
22697   $as_echo_n "(cached) " >&6
22698 else
22699   if test -n "$acx_pthread_config"; then
22700   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
22701 else
22702 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22703 for as_dir in $PATH
22704 do
22705   IFS=$as_save_IFS
22706   test -z "$as_dir" && as_dir=.
22707   for ac_exec_ext in '' $ac_executable_extensions; do
22708   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22709     ac_cv_prog_acx_pthread_config="yes"
22710     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22711     break 2
22712   fi
22713 done
22714 done
22715 IFS=$as_save_IFS
22716
22717   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
22718 fi
22719 fi
22720 acx_pthread_config=$ac_cv_prog_acx_pthread_config
22721 if test -n "$acx_pthread_config"; then
22722   { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
22723 $as_echo "$acx_pthread_config" >&6; }
22724 else
22725   { $as_echo "$as_me:$LINENO: result: no" >&5
22726 $as_echo "no" >&6; }
22727 fi
22728
22729
22730                 if test x"$acx_pthread_config" = xno; then continue; fi
22731                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
22732                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
22733                 ;;
22734
22735                 *)
22736                 { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
22737 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
22738                 tryPTHREAD_LIBS="-l$flag"
22739                 ;;
22740         esac
22741
22742         save_LIBS="$LIBS"
22743         save_CFLAGS="$CFLAGS"
22744         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
22745         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
22746
22747         # Check for various functions.  We must include pthread.h,
22748         # since some functions may be macros.  (On the Sequent, we
22749         # need a special flag -Kthread to make this header compile.)
22750         # We check for pthread_join because it is in -lpthread on IRIX
22751         # while pthread_create is in libc.  We check for pthread_attr_init
22752         # due to DEC craziness with -lpthreads.  We check for
22753         # pthread_cleanup_push because it is one of the few pthread
22754         # functions on Solaris that doesn't have a non-functional libc stub.
22755         # We try pthread_create on general principles.
22756         cat >conftest.$ac_ext <<_ACEOF
22757 /* confdefs.h.  */
22758 _ACEOF
22759 cat confdefs.h >>conftest.$ac_ext
22760 cat >>conftest.$ac_ext <<_ACEOF
22761 /* end confdefs.h.  */
22762 #include <pthread.h>
22763 int
22764 main ()
22765 {
22766 pthread_t th; pthread_join(th, 0);
22767                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
22768                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
22769   ;
22770   return 0;
22771 }
22772 _ACEOF
22773 rm -f conftest.$ac_objext conftest$ac_exeext
22774 if { (ac_try="$ac_link"
22775 case "(($ac_try" in
22776   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22777   *) ac_try_echo=$ac_try;;
22778 esac
22779 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22780 $as_echo "$ac_try_echo") >&5
22781   (eval "$ac_link") 2>conftest.er1
22782   ac_status=$?
22783   grep -v '^ *+' conftest.er1 >conftest.err
22784   rm -f conftest.er1
22785   cat conftest.err >&5
22786   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22787   (exit $ac_status); } && {
22788          test -z "$ac_c_werror_flag" ||
22789          test ! -s conftest.err
22790        } && test -s conftest$ac_exeext && {
22791          test "$cross_compiling" = yes ||
22792          $as_test_x conftest$ac_exeext
22793        }; then
22794   acx_pthread_ok=yes
22795 else
22796   $as_echo "$as_me: failed program was:" >&5
22797 sed 's/^/| /' conftest.$ac_ext >&5
22798
22799         acx_pthread_ok=no
22800 fi
22801
22802 rm -rf conftest.dSYM
22803 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22804       conftest$ac_exeext conftest.$ac_ext
22805
22806         if test "x$acx_pthread_ok" = xyes; then
22807             # Don't use options that are ignored by the compiler.
22808             # We find them by checking stderror.
22809             cat >conftest.$ac_ext <<_ACEOF
22810 int
22811 main (int argc, char **argv)
22812 {
22813   (void) argc;
22814   (void) argv;
22815   return 0;
22816 }
22817 _ACEOF
22818             rm -f conftest.$ac_objext conftest$ac_exeext
22819             # Check both linking and compiling, because they might tolerate different options.
22820             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
22821                 # we continue with more flags because Linux needs -lpthread
22822                 # for libpq builds on PostgreSQL.  The test above only
22823                 # tests for building binaries, not shared libraries.
22824                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
22825                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
22826             else   acx_pthread_ok=no
22827             fi
22828         fi
22829
22830         LIBS="$save_LIBS"
22831         CFLAGS="$save_CFLAGS"
22832
22833         { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
22834 $as_echo "$acx_pthread_ok" >&6; }
22835 done
22836 fi
22837
22838 # Various other checks:
22839 if test "x$acx_pthread_ok" = xyes; then
22840         save_LIBS="$LIBS"
22841         LIBS="$PTHREAD_LIBS $LIBS"
22842         save_CFLAGS="$CFLAGS"
22843         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
22844
22845         # Detect AIX lossage: threads are created detached by default
22846         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
22847         { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
22848 $as_echo_n "checking for joinable pthread attribute... " >&6; }
22849         cat >conftest.$ac_ext <<_ACEOF
22850 /* confdefs.h.  */
22851 _ACEOF
22852 cat confdefs.h >>conftest.$ac_ext
22853 cat >>conftest.$ac_ext <<_ACEOF
22854 /* end confdefs.h.  */
22855 #include <pthread.h>
22856 int
22857 main ()
22858 {
22859 int attr=PTHREAD_CREATE_JOINABLE;
22860   ;
22861   return 0;
22862 }
22863 _ACEOF
22864 rm -f conftest.$ac_objext conftest$ac_exeext
22865 if { (ac_try="$ac_link"
22866 case "(($ac_try" in
22867   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22868   *) ac_try_echo=$ac_try;;
22869 esac
22870 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22871 $as_echo "$ac_try_echo") >&5
22872   (eval "$ac_link") 2>conftest.er1
22873   ac_status=$?
22874   grep -v '^ *+' conftest.er1 >conftest.err
22875   rm -f conftest.er1
22876   cat conftest.err >&5
22877   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22878   (exit $ac_status); } && {
22879          test -z "$ac_c_werror_flag" ||
22880          test ! -s conftest.err
22881        } && test -s conftest$ac_exeext && {
22882          test "$cross_compiling" = yes ||
22883          $as_test_x conftest$ac_exeext
22884        }; then
22885   ok=PTHREAD_CREATE_JOINABLE
22886 else
22887   $as_echo "$as_me: failed program was:" >&5
22888 sed 's/^/| /' conftest.$ac_ext >&5
22889
22890         ok=unknown
22891 fi
22892
22893 rm -rf conftest.dSYM
22894 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22895       conftest$ac_exeext conftest.$ac_ext
22896         if test x"$ok" = xunknown; then
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 <pthread.h>
22904 int
22905 main ()
22906 {
22907 int attr=PTHREAD_CREATE_UNDETACHED;
22908   ;
22909   return 0;
22910 }
22911 _ACEOF
22912 rm -f conftest.$ac_objext conftest$ac_exeext
22913 if { (ac_try="$ac_link"
22914 case "(($ac_try" in
22915   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22916   *) ac_try_echo=$ac_try;;
22917 esac
22918 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22919 $as_echo "$ac_try_echo") >&5
22920   (eval "$ac_link") 2>conftest.er1
22921   ac_status=$?
22922   grep -v '^ *+' conftest.er1 >conftest.err
22923   rm -f conftest.er1
22924   cat conftest.err >&5
22925   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22926   (exit $ac_status); } && {
22927          test -z "$ac_c_werror_flag" ||
22928          test ! -s conftest.err
22929        } && test -s conftest$ac_exeext && {
22930          test "$cross_compiling" = yes ||
22931          $as_test_x conftest$ac_exeext
22932        }; then
22933   ok=PTHREAD_CREATE_UNDETACHED
22934 else
22935   $as_echo "$as_me: failed program was:" >&5
22936 sed 's/^/| /' conftest.$ac_ext >&5
22937
22938         ok=unknown
22939 fi
22940
22941 rm -rf conftest.dSYM
22942 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22943       conftest$ac_exeext conftest.$ac_ext
22944         fi
22945         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
22946
22947 cat >>confdefs.h <<\_ACEOF
22948 #define PTHREAD_CREATE_JOINABLE $ok
22949 _ACEOF
22950
22951         fi
22952         { $as_echo "$as_me:$LINENO: result: ${ok}" >&5
22953 $as_echo "${ok}" >&6; }
22954         if test x"$ok" = xunknown; then
22955                 { $as_echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
22956 $as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
22957         fi
22958
22959         { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
22960 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
22961         flag=no
22962 # We always add these in PostgreSQL
22963 #       case "${host_cpu}-${host_os}" in
22964 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
22965 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
22966 #       esac
22967         { $as_echo "$as_me:$LINENO: result: ${flag}" >&5
22968 $as_echo "${flag}" >&6; }
22969         if test "x$flag" != xno; then
22970                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
22971         fi
22972
22973         LIBS="$save_LIBS"
22974         CFLAGS="$save_CFLAGS"
22975
22976 # Supporting cc_r would require a special CC in all places that
22977 # use libpq, and that is ugly, so we don't do it.  Users can still
22978 # define their compiler as cc_r to do thread builds of everything.
22979         # More AIX lossage: must compile with cc_r
22980         # Extract the first word of "cc_r", so it can be a program name with args.
22981 set dummy cc_r; ac_word=$2
22982 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
22983 $as_echo_n "checking for $ac_word... " >&6; }
22984 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
22985   $as_echo_n "(cached) " >&6
22986 else
22987   if test -n "$PTHREAD_CC"; then
22988   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
22989 else
22990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22991 for as_dir in $PATH
22992 do
22993   IFS=$as_save_IFS
22994   test -z "$as_dir" && as_dir=.
22995   for ac_exec_ext in '' $ac_executable_extensions; do
22996   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22997     ac_cv_prog_PTHREAD_CC="cc_r"
22998     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22999     break 2
23000   fi
23001 done
23002 done
23003 IFS=$as_save_IFS
23004
23005   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
23006 fi
23007 fi
23008 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
23009 if test -n "$PTHREAD_CC"; then
23010   { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
23011 $as_echo "$PTHREAD_CC" >&6; }
23012 else
23013   { $as_echo "$as_me:$LINENO: result: no" >&5
23014 $as_echo "no" >&6; }
23015 fi
23016
23017
23018 else
23019         PTHREAD_CC="$CC"
23020 fi
23021
23022
23023
23024
23025
23026 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
23027 if test x"$acx_pthread_ok" = xyes; then
23028
23029 cat >>confdefs.h <<\_ACEOF
23030 #define HAVE_PTHREAD 1
23031 _ACEOF
23032
23033         :
23034 else
23035         acx_pthread_ok=no
23036
23037 fi
23038 ac_ext=c
23039 ac_cpp='$CPP $CPPFLAGS'
23040 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23041 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23042 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23043
23044         # set thread flags
23045
23046 # Some platforms use these, so just define them.  They can't hurt if they
23047 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
23048 # enables 5-arg getpwuid_r, among other things.
23049 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
23050
23051
23052 # At this point, we don't want to muck with the compiler name for threading.
23053 # Let's see who fails, perhaps AIX.  2004-04-23
23054 if test "$PTHREAD_CC" != "$CC"; then
23055 { { $as_echo "$as_me:$LINENO: error:
23056 PostgreSQL does not support platforms that require a special compiler
23057 for thread safety;  use --disable-thread-safety to disable thread safety." >&5
23058 $as_echo "$as_me: error:
23059 PostgreSQL does not support platforms that require a special compiler
23060 for thread safety;  use --disable-thread-safety to disable thread safety." >&2;}
23061    { (exit 1); exit 1; }; }
23062 fi
23063
23064 # Check for *_r functions
23065 _CFLAGS="$CFLAGS"
23066 _LIBS="$LIBS"
23067 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
23068 LIBS="$LIBS $PTHREAD_LIBS"
23069
23070 if test "$PORTNAME" != "win32"; then
23071 if test "${ac_cv_header_pthread_h+set}" = set; then
23072   { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
23073 $as_echo_n "checking for pthread.h... " >&6; }
23074 if test "${ac_cv_header_pthread_h+set}" = set; then
23075   $as_echo_n "(cached) " >&6
23076 fi
23077 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
23078 $as_echo "$ac_cv_header_pthread_h" >&6; }
23079 else
23080   # Is the header compilable?
23081 { $as_echo "$as_me:$LINENO: checking pthread.h usability" >&5
23082 $as_echo_n "checking pthread.h usability... " >&6; }
23083 cat >conftest.$ac_ext <<_ACEOF
23084 /* confdefs.h.  */
23085 _ACEOF
23086 cat confdefs.h >>conftest.$ac_ext
23087 cat >>conftest.$ac_ext <<_ACEOF
23088 /* end confdefs.h.  */
23089 $ac_includes_default
23090 #include <pthread.h>
23091 _ACEOF
23092 rm -f conftest.$ac_objext
23093 if { (ac_try="$ac_compile"
23094 case "(($ac_try" in
23095   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23096   *) ac_try_echo=$ac_try;;
23097 esac
23098 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23099 $as_echo "$ac_try_echo") >&5
23100   (eval "$ac_compile") 2>conftest.er1
23101   ac_status=$?
23102   grep -v '^ *+' conftest.er1 >conftest.err
23103   rm -f conftest.er1
23104   cat conftest.err >&5
23105   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23106   (exit $ac_status); } && {
23107          test -z "$ac_c_werror_flag" ||
23108          test ! -s conftest.err
23109        } && test -s conftest.$ac_objext; then
23110   ac_header_compiler=yes
23111 else
23112   $as_echo "$as_me: failed program was:" >&5
23113 sed 's/^/| /' conftest.$ac_ext >&5
23114
23115         ac_header_compiler=no
23116 fi
23117
23118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23119 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23120 $as_echo "$ac_header_compiler" >&6; }
23121
23122 # Is the header present?
23123 { $as_echo "$as_me:$LINENO: checking pthread.h presence" >&5
23124 $as_echo_n "checking pthread.h presence... " >&6; }
23125 cat >conftest.$ac_ext <<_ACEOF
23126 /* confdefs.h.  */
23127 _ACEOF
23128 cat confdefs.h >>conftest.$ac_ext
23129 cat >>conftest.$ac_ext <<_ACEOF
23130 /* end confdefs.h.  */
23131 #include <pthread.h>
23132 _ACEOF
23133 if { (ac_try="$ac_cpp conftest.$ac_ext"
23134 case "(($ac_try" in
23135   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23136   *) ac_try_echo=$ac_try;;
23137 esac
23138 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23139 $as_echo "$ac_try_echo") >&5
23140   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23141   ac_status=$?
23142   grep -v '^ *+' conftest.er1 >conftest.err
23143   rm -f conftest.er1
23144   cat conftest.err >&5
23145   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23146   (exit $ac_status); } >/dev/null && {
23147          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23148          test ! -s conftest.err
23149        }; then
23150   ac_header_preproc=yes
23151 else
23152   $as_echo "$as_me: failed program was:" >&5
23153 sed 's/^/| /' conftest.$ac_ext >&5
23154
23155   ac_header_preproc=no
23156 fi
23157
23158 rm -f conftest.err conftest.$ac_ext
23159 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23160 $as_echo "$ac_header_preproc" >&6; }
23161
23162 # So?  What about this header?
23163 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23164   yes:no: )
23165     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
23166 $as_echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23167     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
23168 $as_echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
23169     ac_header_preproc=yes
23170     ;;
23171   no:yes:* )
23172     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
23173 $as_echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
23174     { $as_echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
23175 $as_echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
23176     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
23177 $as_echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
23178     { $as_echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
23179 $as_echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
23180     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
23181 $as_echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
23182     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
23183 $as_echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
23184     ( cat <<\_ASBOX
23185 ## ---------------------------------------- ##
23186 ## Report this to pgsql-bugs@postgresql.org ##
23187 ## ---------------------------------------- ##
23188 _ASBOX
23189      ) | sed "s/^/$as_me: WARNING:     /" >&2
23190     ;;
23191 esac
23192 { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
23193 $as_echo_n "checking for pthread.h... " >&6; }
23194 if test "${ac_cv_header_pthread_h+set}" = set; then
23195   $as_echo_n "(cached) " >&6
23196 else
23197   ac_cv_header_pthread_h=$ac_header_preproc
23198 fi
23199 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
23200 $as_echo "$ac_cv_header_pthread_h" >&6; }
23201
23202 fi
23203 if test "x$ac_cv_header_pthread_h" = x""yes; then
23204   :
23205 else
23206   { { $as_echo "$as_me:$LINENO: error:
23207 pthread.h not found;  use --disable-thread-safety to disable thread safety" >&5
23208 $as_echo "$as_me: error:
23209 pthread.h not found;  use --disable-thread-safety to disable thread safety" >&2;}
23210    { (exit 1); exit 1; }; }
23211 fi
23212
23213
23214 fi
23215
23216
23217
23218
23219 for ac_func in strerror_r getpwuid_r gethostbyname_r
23220 do
23221 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23222 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
23223 $as_echo_n "checking for $ac_func... " >&6; }
23224 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23225   $as_echo_n "(cached) " >&6
23226 else
23227   cat >conftest.$ac_ext <<_ACEOF
23228 /* confdefs.h.  */
23229 _ACEOF
23230 cat confdefs.h >>conftest.$ac_ext
23231 cat >>conftest.$ac_ext <<_ACEOF
23232 /* end confdefs.h.  */
23233 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23234    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
23235 #define $ac_func innocuous_$ac_func
23236
23237 /* System header to define __stub macros and hopefully few prototypes,
23238     which can conflict with char $ac_func (); below.
23239     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23240     <limits.h> exists even on freestanding compilers.  */
23241
23242 #ifdef __STDC__
23243 # include <limits.h>
23244 #else
23245 # include <assert.h>
23246 #endif
23247
23248 #undef $ac_func
23249
23250 /* Override any GCC internal prototype to avoid an error.
23251    Use char because int might match the return type of a GCC
23252    builtin and then its argument prototype would still apply.  */
23253 #ifdef __cplusplus
23254 extern "C"
23255 #endif
23256 char $ac_func ();
23257 /* The GNU C library defines this for functions which it implements
23258     to always fail with ENOSYS.  Some functions are actually named
23259     something starting with __ and the normal name is an alias.  */
23260 #if defined __stub_$ac_func || defined __stub___$ac_func
23261 choke me
23262 #endif
23263
23264 int
23265 main ()
23266 {
23267 return $ac_func ();
23268   ;
23269   return 0;
23270 }
23271 _ACEOF
23272 rm -f conftest.$ac_objext conftest$ac_exeext
23273 if { (ac_try="$ac_link"
23274 case "(($ac_try" in
23275   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23276   *) ac_try_echo=$ac_try;;
23277 esac
23278 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23279 $as_echo "$ac_try_echo") >&5
23280   (eval "$ac_link") 2>conftest.er1
23281   ac_status=$?
23282   grep -v '^ *+' conftest.er1 >conftest.err
23283   rm -f conftest.er1
23284   cat conftest.err >&5
23285   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23286   (exit $ac_status); } && {
23287          test -z "$ac_c_werror_flag" ||
23288          test ! -s conftest.err
23289        } && test -s conftest$ac_exeext && {
23290          test "$cross_compiling" = yes ||
23291          $as_test_x conftest$ac_exeext
23292        }; then
23293   eval "$as_ac_var=yes"
23294 else
23295   $as_echo "$as_me: failed program was:" >&5
23296 sed 's/^/| /' conftest.$ac_ext >&5
23297
23298         eval "$as_ac_var=no"
23299 fi
23300
23301 rm -rf conftest.dSYM
23302 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23303       conftest$ac_exeext conftest.$ac_ext
23304 fi
23305 ac_res=`eval 'as_val=${'$as_ac_var'}
23306                  $as_echo "$as_val"'`
23307                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
23308 $as_echo "$ac_res" >&6; }
23309 as_val=`eval 'as_val=${'$as_ac_var'}
23310                  $as_echo "$as_val"'`
23311    if test "x$as_val" = x""yes; then
23312   cat >>confdefs.h <<_ACEOF
23313 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23314 _ACEOF
23315
23316 fi
23317 done
23318
23319
23320 # Do test here with the proper thread flags
23321 { $as_echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
23322 $as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
23323 if test "${pgac_cv_func_getpwuid_r_5arg+set}" = set; then
23324   $as_echo_n "(cached) " >&6
23325 else
23326   cat >conftest.$ac_ext <<_ACEOF
23327 /* confdefs.h.  */
23328 _ACEOF
23329 cat confdefs.h >>conftest.$ac_ext
23330 cat >>conftest.$ac_ext <<_ACEOF
23331 /* end confdefs.h.  */
23332 #include <sys/types.h>
23333 #include <pwd.h>
23334 int
23335 main ()
23336 {
23337 uid_t uid;
23338 struct passwd *space;
23339 char *buf;
23340 size_t bufsize;
23341 struct passwd **result;
23342 getpwuid_r(uid, space, buf, bufsize, result);
23343   ;
23344   return 0;
23345 }
23346 _ACEOF
23347 rm -f conftest.$ac_objext
23348 if { (ac_try="$ac_compile"
23349 case "(($ac_try" in
23350   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23351   *) ac_try_echo=$ac_try;;
23352 esac
23353 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23354 $as_echo "$ac_try_echo") >&5
23355   (eval "$ac_compile") 2>conftest.er1
23356   ac_status=$?
23357   grep -v '^ *+' conftest.er1 >conftest.err
23358   rm -f conftest.er1
23359   cat conftest.err >&5
23360   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23361   (exit $ac_status); } && {
23362          test -z "$ac_c_werror_flag" ||
23363          test ! -s conftest.err
23364        } && test -s conftest.$ac_objext; then
23365   pgac_cv_func_getpwuid_r_5arg=yes
23366 else
23367   $as_echo "$as_me: failed program was:" >&5
23368 sed 's/^/| /' conftest.$ac_ext >&5
23369
23370         pgac_cv_func_getpwuid_r_5arg=no
23371 fi
23372
23373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23374 fi
23375 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_getpwuid_r_5arg" >&5
23376 $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
23377 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
23378
23379 cat >>confdefs.h <<\_ACEOF
23380 #define GETPWUID_R_5ARG /**/
23381 _ACEOF
23382
23383 fi
23384
23385 { $as_echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
23386 $as_echo_n "checking whether strerror_r returns int... " >&6; }
23387 if test "${pgac_cv_func_strerror_r_int+set}" = set; then
23388   $as_echo_n "(cached) " >&6
23389 else
23390   cat >conftest.$ac_ext <<_ACEOF
23391 /* confdefs.h.  */
23392 _ACEOF
23393 cat confdefs.h >>conftest.$ac_ext
23394 cat >>conftest.$ac_ext <<_ACEOF
23395 /* end confdefs.h.  */
23396 #include <string.h>
23397 int
23398 main ()
23399 {
23400 #ifndef _AIX
23401 int strerror_r(int, char *, size_t);
23402 #else
23403 /* Older AIX has 'int' for the third argument so we don't test the args. */
23404 int strerror_r();
23405 #endif
23406   ;
23407   return 0;
23408 }
23409 _ACEOF
23410 rm -f conftest.$ac_objext
23411 if { (ac_try="$ac_compile"
23412 case "(($ac_try" in
23413   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23414   *) ac_try_echo=$ac_try;;
23415 esac
23416 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23417 $as_echo "$ac_try_echo") >&5
23418   (eval "$ac_compile") 2>conftest.er1
23419   ac_status=$?
23420   grep -v '^ *+' conftest.er1 >conftest.err
23421   rm -f conftest.er1
23422   cat conftest.err >&5
23423   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23424   (exit $ac_status); } && {
23425          test -z "$ac_c_werror_flag" ||
23426          test ! -s conftest.err
23427        } && test -s conftest.$ac_objext; then
23428   pgac_cv_func_strerror_r_int=yes
23429 else
23430   $as_echo "$as_me: failed program was:" >&5
23431 sed 's/^/| /' conftest.$ac_ext >&5
23432
23433         pgac_cv_func_strerror_r_int=no
23434 fi
23435
23436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23437 fi
23438 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_strerror_r_int" >&5
23439 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
23440 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
23441
23442 cat >>confdefs.h <<\_ACEOF
23443 #define STRERROR_R_INT /**/
23444 _ACEOF
23445
23446 fi
23447
23448
23449 CFLAGS="$_CFLAGS"
23450 LIBS="$_LIBS"
23451
23452 else
23453 # do not use values from template file
23454 PTHREAD_CFLAGS=
23455 PTHREAD_LIBS=
23456 fi
23457
23458
23459
23460
23461
23462 # We can test for libldap_r only after we know PTHREAD_LIBS
23463 if test "$with_ldap" = yes ; then
23464   _LIBS="$LIBS"
23465   if test "$PORTNAME" != "win32"; then
23466
23467 { $as_echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
23468 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
23469 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
23470   $as_echo_n "(cached) " >&6
23471 else
23472   ac_check_lib_save_LIBS=$LIBS
23473 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
23474 cat >conftest.$ac_ext <<_ACEOF
23475 /* confdefs.h.  */
23476 _ACEOF
23477 cat confdefs.h >>conftest.$ac_ext
23478 cat >>conftest.$ac_ext <<_ACEOF
23479 /* end confdefs.h.  */
23480
23481 /* Override any GCC internal prototype to avoid an error.
23482    Use char because int might match the return type of a GCC
23483    builtin and then its argument prototype would still apply.  */
23484 #ifdef __cplusplus
23485 extern "C"
23486 #endif
23487 char ldap_bind ();
23488 int
23489 main ()
23490 {
23491 return ldap_bind ();
23492   ;
23493   return 0;
23494 }
23495 _ACEOF
23496 rm -f conftest.$ac_objext conftest$ac_exeext
23497 if { (ac_try="$ac_link"
23498 case "(($ac_try" in
23499   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23500   *) ac_try_echo=$ac_try;;
23501 esac
23502 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23503 $as_echo "$ac_try_echo") >&5
23504   (eval "$ac_link") 2>conftest.er1
23505   ac_status=$?
23506   grep -v '^ *+' conftest.er1 >conftest.err
23507   rm -f conftest.er1
23508   cat conftest.err >&5
23509   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23510   (exit $ac_status); } && {
23511          test -z "$ac_c_werror_flag" ||
23512          test ! -s conftest.err
23513        } && test -s conftest$ac_exeext && {
23514          test "$cross_compiling" = yes ||
23515          $as_test_x conftest$ac_exeext
23516        }; then
23517   ac_cv_lib_ldap_ldap_bind=yes
23518 else
23519   $as_echo "$as_me: failed program was:" >&5
23520 sed 's/^/| /' conftest.$ac_ext >&5
23521
23522         ac_cv_lib_ldap_ldap_bind=no
23523 fi
23524
23525 rm -rf conftest.dSYM
23526 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23527       conftest$ac_exeext conftest.$ac_ext
23528 LIBS=$ac_check_lib_save_LIBS
23529 fi
23530 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
23531 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
23532 if test "x$ac_cv_lib_ldap_ldap_bind" = x""yes; then
23533   cat >>confdefs.h <<_ACEOF
23534 #define HAVE_LIBLDAP 1
23535 _ACEOF
23536
23537   LIBS="-lldap $LIBS"
23538
23539 else
23540   { { $as_echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
23541 $as_echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
23542    { (exit 1); exit 1; }; }
23543 fi
23544
23545     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
23546     if test "$enable_thread_safety" = yes; then
23547       # on some platforms ldap_r fails to link without PTHREAD_LIBS
23548
23549 { $as_echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
23550 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
23551 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
23552   $as_echo_n "(cached) " >&6
23553 else
23554   ac_check_lib_save_LIBS=$LIBS
23555 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
23556 cat >conftest.$ac_ext <<_ACEOF
23557 /* confdefs.h.  */
23558 _ACEOF
23559 cat confdefs.h >>conftest.$ac_ext
23560 cat >>conftest.$ac_ext <<_ACEOF
23561 /* end confdefs.h.  */
23562
23563 /* Override any GCC internal prototype to avoid an error.
23564    Use char because int might match the return type of a GCC
23565    builtin and then its argument prototype would still apply.  */
23566 #ifdef __cplusplus
23567 extern "C"
23568 #endif
23569 char ldap_simple_bind ();
23570 int
23571 main ()
23572 {
23573 return ldap_simple_bind ();
23574   ;
23575   return 0;
23576 }
23577 _ACEOF
23578 rm -f conftest.$ac_objext conftest$ac_exeext
23579 if { (ac_try="$ac_link"
23580 case "(($ac_try" in
23581   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23582   *) ac_try_echo=$ac_try;;
23583 esac
23584 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23585 $as_echo "$ac_try_echo") >&5
23586   (eval "$ac_link") 2>conftest.er1
23587   ac_status=$?
23588   grep -v '^ *+' conftest.er1 >conftest.err
23589   rm -f conftest.er1
23590   cat conftest.err >&5
23591   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23592   (exit $ac_status); } && {
23593          test -z "$ac_c_werror_flag" ||
23594          test ! -s conftest.err
23595        } && test -s conftest$ac_exeext && {
23596          test "$cross_compiling" = yes ||
23597          $as_test_x conftest$ac_exeext
23598        }; then
23599   ac_cv_lib_ldap_r_ldap_simple_bind=yes
23600 else
23601   $as_echo "$as_me: failed program was:" >&5
23602 sed 's/^/| /' conftest.$ac_ext >&5
23603
23604         ac_cv_lib_ldap_r_ldap_simple_bind=no
23605 fi
23606
23607 rm -rf conftest.dSYM
23608 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23609       conftest$ac_exeext conftest.$ac_ext
23610 LIBS=$ac_check_lib_save_LIBS
23611 fi
23612 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
23613 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
23614 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = x""yes; then
23615   cat >>confdefs.h <<_ACEOF
23616 #define HAVE_LIBLDAP_R 1
23617 _ACEOF
23618
23619   LIBS="-lldap_r $LIBS"
23620
23621 else
23622   { { $as_echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
23623 $as_echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
23624    { (exit 1); exit 1; }; }
23625 fi
23626
23627       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
23628     else
23629       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
23630     fi
23631   else
23632
23633 { $as_echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
23634 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
23635 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
23636   $as_echo_n "(cached) " >&6
23637 else
23638   ac_check_lib_save_LIBS=$LIBS
23639 LIBS="-lwldap32  $LIBS"
23640 cat >conftest.$ac_ext <<_ACEOF
23641 /* confdefs.h.  */
23642 _ACEOF
23643 cat confdefs.h >>conftest.$ac_ext
23644 cat >>conftest.$ac_ext <<_ACEOF
23645 /* end confdefs.h.  */
23646
23647 /* Override any GCC internal prototype to avoid an error.
23648    Use char because int might match the return type of a GCC
23649    builtin and then its argument prototype would still apply.  */
23650 #ifdef __cplusplus
23651 extern "C"
23652 #endif
23653 char ldap_bind ();
23654 int
23655 main ()
23656 {
23657 return ldap_bind ();
23658   ;
23659   return 0;
23660 }
23661 _ACEOF
23662 rm -f conftest.$ac_objext conftest$ac_exeext
23663 if { (ac_try="$ac_link"
23664 case "(($ac_try" in
23665   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23666   *) ac_try_echo=$ac_try;;
23667 esac
23668 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23669 $as_echo "$ac_try_echo") >&5
23670   (eval "$ac_link") 2>conftest.er1
23671   ac_status=$?
23672   grep -v '^ *+' conftest.er1 >conftest.err
23673   rm -f conftest.er1
23674   cat conftest.err >&5
23675   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23676   (exit $ac_status); } && {
23677          test -z "$ac_c_werror_flag" ||
23678          test ! -s conftest.err
23679        } && test -s conftest$ac_exeext && {
23680          test "$cross_compiling" = yes ||
23681          $as_test_x conftest$ac_exeext
23682        }; then
23683   ac_cv_lib_wldap32_ldap_bind=yes
23684 else
23685   $as_echo "$as_me: failed program was:" >&5
23686 sed 's/^/| /' conftest.$ac_ext >&5
23687
23688         ac_cv_lib_wldap32_ldap_bind=no
23689 fi
23690
23691 rm -rf conftest.dSYM
23692 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23693       conftest$ac_exeext conftest.$ac_ext
23694 LIBS=$ac_check_lib_save_LIBS
23695 fi
23696 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
23697 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
23698 if test "x$ac_cv_lib_wldap32_ldap_bind" = x""yes; then
23699   cat >>confdefs.h <<_ACEOF
23700 #define HAVE_LIBWLDAP32 1
23701 _ACEOF
23702
23703   LIBS="-lwldap32 $LIBS"
23704
23705 else
23706   { { $as_echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
23707 $as_echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
23708    { (exit 1); exit 1; }; }
23709 fi
23710
23711     LDAP_LIBS_FE="-lwldap32"
23712     LDAP_LIBS_BE="-lwldap32"
23713   fi
23714   LIBS="$_LIBS"
23715 fi
23716
23717
23718
23719
23720 # This test makes sure that run tests work at all.  Sometimes a shared
23721 # library is found by the linker, but the runtime linker can't find it.
23722 # This check should come after all modifications of compiler or linker
23723 # variables, and before any other run tests.
23724 { $as_echo "$as_me:$LINENO: checking test program" >&5
23725 $as_echo_n "checking test program... " >&6; }
23726 if test "$cross_compiling" = yes; then
23727   { $as_echo "$as_me:$LINENO: result: cross-compiling" >&5
23728 $as_echo "cross-compiling" >&6; }
23729 else
23730   cat >conftest.$ac_ext <<_ACEOF
23731 /* confdefs.h.  */
23732 _ACEOF
23733 cat confdefs.h >>conftest.$ac_ext
23734 cat >>conftest.$ac_ext <<_ACEOF
23735 /* end confdefs.h.  */
23736 int main() { return 0; }
23737 _ACEOF
23738 rm -f conftest$ac_exeext
23739 if { (ac_try="$ac_link"
23740 case "(($ac_try" in
23741   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23742   *) ac_try_echo=$ac_try;;
23743 esac
23744 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23745 $as_echo "$ac_try_echo") >&5
23746   (eval "$ac_link") 2>&5
23747   ac_status=$?
23748   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23749   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23750   { (case "(($ac_try" in
23751   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23752   *) ac_try_echo=$ac_try;;
23753 esac
23754 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23755 $as_echo "$ac_try_echo") >&5
23756   (eval "$ac_try") 2>&5
23757   ac_status=$?
23758   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23759   (exit $ac_status); }; }; then
23760   { $as_echo "$as_me:$LINENO: result: ok" >&5
23761 $as_echo "ok" >&6; }
23762 else
23763   $as_echo "$as_me: program exited with status $ac_status" >&5
23764 $as_echo "$as_me: failed program was:" >&5
23765 sed 's/^/| /' conftest.$ac_ext >&5
23766
23767 ( exit $ac_status )
23768 { $as_echo "$as_me:$LINENO: result: failed" >&5
23769 $as_echo "failed" >&6; }
23770 { { $as_echo "$as_me:$LINENO: error:
23771 Could not execute a simple test program.  This may be a problem
23772 related to locating shared libraries.  Check the file 'config.log'
23773 for the exact reason." >&5
23774 $as_echo "$as_me: error:
23775 Could not execute a simple test program.  This may be a problem
23776 related to locating shared libraries.  Check the file 'config.log'
23777 for the exact reason." >&2;}
23778    { (exit 1); exit 1; }; }
23779 fi
23780 rm -rf conftest.dSYM
23781 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23782 fi
23783
23784
23785
23786 # --------------------
23787 # Run tests below here
23788 # --------------------
23789
23790 # Force use of our snprintf if system's doesn't do arg control
23791 # See comment above at snprintf test for details.
23792 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
23793   { $as_echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
23794 $as_echo_n "checking whether printf supports argument control... " >&6; }
23795 if test "${pgac_cv_printf_arg_control+set}" = set; then
23796   $as_echo_n "(cached) " >&6
23797 else
23798   if test "$cross_compiling" = yes; then
23799   pgac_cv_printf_arg_control=cross
23800 else
23801   cat >conftest.$ac_ext <<_ACEOF
23802 /* confdefs.h.  */
23803 _ACEOF
23804 cat confdefs.h >>conftest.$ac_ext
23805 cat >>conftest.$ac_ext <<_ACEOF
23806 /* end confdefs.h.  */
23807 #include <stdio.h>
23808 #include <string.h>
23809
23810 int main()
23811 {
23812   char buf[100];
23813
23814   /* can it swap arguments? */
23815   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
23816   if (strcmp(buf, "4 3") != 0)
23817     return 1;
23818   return 0;
23819 }
23820 _ACEOF
23821 rm -f conftest$ac_exeext
23822 if { (ac_try="$ac_link"
23823 case "(($ac_try" in
23824   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23825   *) ac_try_echo=$ac_try;;
23826 esac
23827 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23828 $as_echo "$ac_try_echo") >&5
23829   (eval "$ac_link") 2>&5
23830   ac_status=$?
23831   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23832   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23833   { (case "(($ac_try" in
23834   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23835   *) ac_try_echo=$ac_try;;
23836 esac
23837 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23838 $as_echo "$ac_try_echo") >&5
23839   (eval "$ac_try") 2>&5
23840   ac_status=$?
23841   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23842   (exit $ac_status); }; }; then
23843   pgac_cv_printf_arg_control=yes
23844 else
23845   $as_echo "$as_me: program exited with status $ac_status" >&5
23846 $as_echo "$as_me: failed program was:" >&5
23847 sed 's/^/| /' conftest.$ac_ext >&5
23848
23849 ( exit $ac_status )
23850 pgac_cv_printf_arg_control=no
23851 fi
23852 rm -rf conftest.dSYM
23853 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23854 fi
23855
23856
23857
23858 fi
23859 { $as_echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
23860 $as_echo "$pgac_cv_printf_arg_control" >&6; }
23861
23862   if test $pgac_cv_printf_arg_control != yes ; then
23863     pgac_need_repl_snprintf=yes
23864   fi
23865 fi
23866
23867
23868
23869
23870 { $as_echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
23871 $as_echo_n "checking whether long int is 64 bits... " >&6; }
23872 if test "${pgac_cv_type_long_int_64+set}" = set; then
23873   $as_echo_n "(cached) " >&6
23874 else
23875   if test "$cross_compiling" = yes; then
23876   # If cross-compiling, check the size reported by the compiler and
23877 # trust that the arithmetic works.
23878 cat >conftest.$ac_ext <<_ACEOF
23879 /* confdefs.h.  */
23880 _ACEOF
23881 cat confdefs.h >>conftest.$ac_ext
23882 cat >>conftest.$ac_ext <<_ACEOF
23883 /* end confdefs.h.  */
23884
23885 int
23886 main ()
23887 {
23888 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
23889 test_array [0] = 0
23890
23891   ;
23892   return 0;
23893 }
23894 _ACEOF
23895 rm -f conftest.$ac_objext
23896 if { (ac_try="$ac_compile"
23897 case "(($ac_try" in
23898   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23899   *) ac_try_echo=$ac_try;;
23900 esac
23901 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23902 $as_echo "$ac_try_echo") >&5
23903   (eval "$ac_compile") 2>conftest.er1
23904   ac_status=$?
23905   grep -v '^ *+' conftest.er1 >conftest.err
23906   rm -f conftest.er1
23907   cat conftest.err >&5
23908   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23909   (exit $ac_status); } && {
23910          test -z "$ac_c_werror_flag" ||
23911          test ! -s conftest.err
23912        } && test -s conftest.$ac_objext; then
23913   pgac_cv_type_long_int_64=yes
23914 else
23915   $as_echo "$as_me: failed program was:" >&5
23916 sed 's/^/| /' conftest.$ac_ext >&5
23917
23918         pgac_cv_type_long_int_64=no
23919 fi
23920
23921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23922 else
23923   cat >conftest.$ac_ext <<_ACEOF
23924 /* confdefs.h.  */
23925 _ACEOF
23926 cat confdefs.h >>conftest.$ac_ext
23927 cat >>conftest.$ac_ext <<_ACEOF
23928 /* end confdefs.h.  */
23929 typedef long int ac_int64;
23930
23931 /*
23932  * These are globals to discourage the compiler from folding all the
23933  * arithmetic tests down to compile-time constants.
23934  */
23935 ac_int64 a = 20000001;
23936 ac_int64 b = 40000005;
23937
23938 int does_int64_work()
23939 {
23940   ac_int64 c,d;
23941
23942   if (sizeof(ac_int64) != 8)
23943     return 0;                   /* definitely not the right size */
23944
23945   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
23946   c = a * b;
23947   d = (c + b) / b;
23948   if (d != a+1)
23949     return 0;
23950   return 1;
23951 }
23952 main() {
23953   exit(! does_int64_work());
23954 }
23955 _ACEOF
23956 rm -f conftest$ac_exeext
23957 if { (ac_try="$ac_link"
23958 case "(($ac_try" in
23959   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23960   *) ac_try_echo=$ac_try;;
23961 esac
23962 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23963 $as_echo "$ac_try_echo") >&5
23964   (eval "$ac_link") 2>&5
23965   ac_status=$?
23966   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23967   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23968   { (case "(($ac_try" in
23969   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23970   *) ac_try_echo=$ac_try;;
23971 esac
23972 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23973 $as_echo "$ac_try_echo") >&5
23974   (eval "$ac_try") 2>&5
23975   ac_status=$?
23976   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23977   (exit $ac_status); }; }; then
23978   pgac_cv_type_long_int_64=yes
23979 else
23980   $as_echo "$as_me: program exited with status $ac_status" >&5
23981 $as_echo "$as_me: failed program was:" >&5
23982 sed 's/^/| /' conftest.$ac_ext >&5
23983
23984 ( exit $ac_status )
23985 pgac_cv_type_long_int_64=no
23986 fi
23987 rm -rf conftest.dSYM
23988 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23989 fi
23990
23991
23992 fi
23993 { $as_echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
23994 $as_echo "$pgac_cv_type_long_int_64" >&6; }
23995
23996 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
23997 if test x"$pgac_cv_type_long_int_64" = xyes ; then
23998
23999 cat >>confdefs.h <<\_ACEOF
24000 #define HAVE_LONG_INT_64 1
24001 _ACEOF
24002
24003 fi
24004
24005
24006 if test x"$HAVE_LONG_INT_64" = x"no" ; then
24007   { $as_echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
24008 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
24009 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
24010   $as_echo_n "(cached) " >&6
24011 else
24012   if test "$cross_compiling" = yes; then
24013   # If cross-compiling, check the size reported by the compiler and
24014 # trust that the arithmetic works.
24015 cat >conftest.$ac_ext <<_ACEOF
24016 /* confdefs.h.  */
24017 _ACEOF
24018 cat confdefs.h >>conftest.$ac_ext
24019 cat >>conftest.$ac_ext <<_ACEOF
24020 /* end confdefs.h.  */
24021
24022 int
24023 main ()
24024 {
24025 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
24026 test_array [0] = 0
24027
24028   ;
24029   return 0;
24030 }
24031 _ACEOF
24032 rm -f conftest.$ac_objext
24033 if { (ac_try="$ac_compile"
24034 case "(($ac_try" in
24035   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24036   *) ac_try_echo=$ac_try;;
24037 esac
24038 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24039 $as_echo "$ac_try_echo") >&5
24040   (eval "$ac_compile") 2>conftest.er1
24041   ac_status=$?
24042   grep -v '^ *+' conftest.er1 >conftest.err
24043   rm -f conftest.er1
24044   cat conftest.err >&5
24045   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24046   (exit $ac_status); } && {
24047          test -z "$ac_c_werror_flag" ||
24048          test ! -s conftest.err
24049        } && test -s conftest.$ac_objext; then
24050   pgac_cv_type_long_long_int_64=yes
24051 else
24052   $as_echo "$as_me: failed program was:" >&5
24053 sed 's/^/| /' conftest.$ac_ext >&5
24054
24055         pgac_cv_type_long_long_int_64=no
24056 fi
24057
24058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24059 else
24060   cat >conftest.$ac_ext <<_ACEOF
24061 /* confdefs.h.  */
24062 _ACEOF
24063 cat confdefs.h >>conftest.$ac_ext
24064 cat >>conftest.$ac_ext <<_ACEOF
24065 /* end confdefs.h.  */
24066 typedef long long int ac_int64;
24067
24068 /*
24069  * These are globals to discourage the compiler from folding all the
24070  * arithmetic tests down to compile-time constants.
24071  */
24072 ac_int64 a = 20000001;
24073 ac_int64 b = 40000005;
24074
24075 int does_int64_work()
24076 {
24077   ac_int64 c,d;
24078
24079   if (sizeof(ac_int64) != 8)
24080     return 0;                   /* definitely not the right size */
24081
24082   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
24083   c = a * b;
24084   d = (c + b) / b;
24085   if (d != a+1)
24086     return 0;
24087   return 1;
24088 }
24089 main() {
24090   exit(! does_int64_work());
24091 }
24092 _ACEOF
24093 rm -f conftest$ac_exeext
24094 if { (ac_try="$ac_link"
24095 case "(($ac_try" in
24096   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24097   *) ac_try_echo=$ac_try;;
24098 esac
24099 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24100 $as_echo "$ac_try_echo") >&5
24101   (eval "$ac_link") 2>&5
24102   ac_status=$?
24103   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24104   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24105   { (case "(($ac_try" in
24106   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24107   *) ac_try_echo=$ac_try;;
24108 esac
24109 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24110 $as_echo "$ac_try_echo") >&5
24111   (eval "$ac_try") 2>&5
24112   ac_status=$?
24113   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24114   (exit $ac_status); }; }; then
24115   pgac_cv_type_long_long_int_64=yes
24116 else
24117   $as_echo "$as_me: program exited with status $ac_status" >&5
24118 $as_echo "$as_me: failed program was:" >&5
24119 sed 's/^/| /' conftest.$ac_ext >&5
24120
24121 ( exit $ac_status )
24122 pgac_cv_type_long_long_int_64=no
24123 fi
24124 rm -rf conftest.dSYM
24125 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24126 fi
24127
24128
24129 fi
24130 { $as_echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
24131 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
24132
24133 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
24134 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
24135
24136 cat >>confdefs.h <<\_ACEOF
24137 #define HAVE_LONG_LONG_INT_64 1
24138 _ACEOF
24139
24140 fi
24141
24142   if test x"$HAVE_LONG_LONG_INT_64" = x"no" ; then
24143     { { $as_echo "$as_me:$LINENO: error: Cannot find a working 64-bit integer type." >&5
24144 $as_echo "$as_me: error: Cannot find a working 64-bit integer type." >&2;}
24145    { (exit 1); exit 1; }; }
24146   fi
24147 fi
24148
24149
24150
24151 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
24152   cat >conftest.$ac_ext <<_ACEOF
24153 /* confdefs.h.  */
24154 _ACEOF
24155 cat confdefs.h >>conftest.$ac_ext
24156 cat >>conftest.$ac_ext <<_ACEOF
24157 /* end confdefs.h.  */
24158
24159 #define INT64CONST(x)  x##LL
24160 long long int foo = INT64CONST(0x1234567890123456);
24161
24162 int
24163 main ()
24164 {
24165
24166   ;
24167   return 0;
24168 }
24169 _ACEOF
24170 rm -f conftest.$ac_objext
24171 if { (ac_try="$ac_compile"
24172 case "(($ac_try" in
24173   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24174   *) ac_try_echo=$ac_try;;
24175 esac
24176 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24177 $as_echo "$ac_try_echo") >&5
24178   (eval "$ac_compile") 2>conftest.er1
24179   ac_status=$?
24180   grep -v '^ *+' conftest.er1 >conftest.err
24181   rm -f conftest.er1
24182   cat conftest.err >&5
24183   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24184   (exit $ac_status); } && {
24185          test -z "$ac_c_werror_flag" ||
24186          test ! -s conftest.err
24187        } && test -s conftest.$ac_objext; then
24188
24189 cat >>confdefs.h <<\_ACEOF
24190 #define HAVE_LL_CONSTANTS 1
24191 _ACEOF
24192
24193 else
24194   $as_echo "$as_me: failed program was:" >&5
24195 sed 's/^/| /' conftest.$ac_ext >&5
24196
24197
24198 fi
24199
24200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24201 fi
24202
24203
24204 # If we found "long int" is 64 bits, assume snprintf handles it.  If
24205 # we found we need to use "long long int", better check.  We cope with
24206 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
24207 # work, fall back to our own snprintf emulation (which we know uses %lld).
24208
24209 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
24210   if test $pgac_need_repl_snprintf = no; then
24211     { $as_echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
24212 $as_echo_n "checking snprintf format for long long int... " >&6; }
24213 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
24214   $as_echo_n "(cached) " >&6
24215 else
24216   for pgac_format in '%lld' '%qd' '%I64d'; do
24217 if test "$cross_compiling" = yes; then
24218   pgac_cv_snprintf_long_long_int_format=cross; break
24219 else
24220   cat >conftest.$ac_ext <<_ACEOF
24221 /* confdefs.h.  */
24222 _ACEOF
24223 cat confdefs.h >>conftest.$ac_ext
24224 cat >>conftest.$ac_ext <<_ACEOF
24225 /* end confdefs.h.  */
24226 #include <stdio.h>
24227 typedef long long int ac_int64;
24228 #define INT64_FORMAT "$pgac_format"
24229
24230 ac_int64 a = 20000001;
24231 ac_int64 b = 40000005;
24232
24233 int does_int64_snprintf_work()
24234 {
24235   ac_int64 c;
24236   char buf[100];
24237
24238   if (sizeof(ac_int64) != 8)
24239     return 0;                   /* doesn't look like the right size */
24240
24241   c = a * b;
24242   snprintf(buf, 100, INT64_FORMAT, c);
24243   if (strcmp(buf, "800000140000005") != 0)
24244     return 0;                   /* either multiply or snprintf is busted */
24245   return 1;
24246 }
24247 main() {
24248   exit(! does_int64_snprintf_work());
24249 }
24250 _ACEOF
24251 rm -f conftest$ac_exeext
24252 if { (ac_try="$ac_link"
24253 case "(($ac_try" in
24254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24255   *) ac_try_echo=$ac_try;;
24256 esac
24257 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24258 $as_echo "$ac_try_echo") >&5
24259   (eval "$ac_link") 2>&5
24260   ac_status=$?
24261   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24262   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24263   { (case "(($ac_try" in
24264   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24265   *) ac_try_echo=$ac_try;;
24266 esac
24267 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24268 $as_echo "$ac_try_echo") >&5
24269   (eval "$ac_try") 2>&5
24270   ac_status=$?
24271   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24272   (exit $ac_status); }; }; then
24273   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
24274 else
24275   $as_echo "$as_me: program exited with status $ac_status" >&5
24276 $as_echo "$as_me: failed program was:" >&5
24277 sed 's/^/| /' conftest.$ac_ext >&5
24278
24279 fi
24280 rm -rf conftest.dSYM
24281 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24282 fi
24283
24284
24285 done
24286 fi
24287
24288 LONG_LONG_INT_FORMAT=''
24289
24290 case $pgac_cv_snprintf_long_long_int_format in
24291   cross) { $as_echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
24292 $as_echo "cannot test (not on host machine)" >&6; };;
24293   ?*)    { $as_echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
24294 $as_echo "$pgac_cv_snprintf_long_long_int_format" >&6; }
24295          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
24296   *)     { $as_echo "$as_me:$LINENO: result: none" >&5
24297 $as_echo "none" >&6; };;
24298 esac
24299     if test "$LONG_LONG_INT_FORMAT" = ""; then
24300       # Force usage of our own snprintf, since system snprintf is broken
24301       pgac_need_repl_snprintf=yes
24302       LONG_LONG_INT_FORMAT='%lld'
24303     fi
24304   else
24305     # Here if we previously decided we needed to use our own snprintf
24306     LONG_LONG_INT_FORMAT='%lld'
24307   fi
24308   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
24309   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
24310   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
24311 else
24312   # Here if we are not using 'long long int' at all
24313   INT64_FORMAT='"%ld"'
24314   UINT64_FORMAT='"%lu"'
24315 fi
24316
24317
24318 cat >>confdefs.h <<_ACEOF
24319 #define INT64_FORMAT $INT64_FORMAT
24320 _ACEOF
24321
24322
24323
24324 cat >>confdefs.h <<_ACEOF
24325 #define UINT64_FORMAT $UINT64_FORMAT
24326 _ACEOF
24327
24328
24329 # Now we have checked all the reasons to replace snprintf
24330 if test $pgac_need_repl_snprintf = yes; then
24331
24332 cat >>confdefs.h <<\_ACEOF
24333 #define USE_REPL_SNPRINTF 1
24334 _ACEOF
24335
24336   case " $LIBOBJS " in
24337   *" snprintf.$ac_objext "* ) ;;
24338   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
24339  ;;
24340 esac
24341
24342 fi
24343
24344 # Check size of void *, size_t (enables tweaks for > 32bit address space)
24345 # The cast to long int works around a bug in the HP C Compiler
24346 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24347 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24348 # This bug is HP SR number 8606223364.
24349 { $as_echo "$as_me:$LINENO: checking size of void *" >&5
24350 $as_echo_n "checking size of void *... " >&6; }
24351 if test "${ac_cv_sizeof_void_p+set}" = set; then
24352   $as_echo_n "(cached) " >&6
24353 else
24354   if test "$cross_compiling" = yes; then
24355   # Depending upon the size, compute the lo and hi bounds.
24356 cat >conftest.$ac_ext <<_ACEOF
24357 /* confdefs.h.  */
24358 _ACEOF
24359 cat confdefs.h >>conftest.$ac_ext
24360 cat >>conftest.$ac_ext <<_ACEOF
24361 /* end confdefs.h.  */
24362 $ac_includes_default
24363 int
24364 main ()
24365 {
24366 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
24367 test_array [0] = 0
24368
24369   ;
24370   return 0;
24371 }
24372 _ACEOF
24373 rm -f conftest.$ac_objext
24374 if { (ac_try="$ac_compile"
24375 case "(($ac_try" in
24376   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24377   *) ac_try_echo=$ac_try;;
24378 esac
24379 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24380 $as_echo "$ac_try_echo") >&5
24381   (eval "$ac_compile") 2>conftest.er1
24382   ac_status=$?
24383   grep -v '^ *+' conftest.er1 >conftest.err
24384   rm -f conftest.er1
24385   cat conftest.err >&5
24386   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24387   (exit $ac_status); } && {
24388          test -z "$ac_c_werror_flag" ||
24389          test ! -s conftest.err
24390        } && test -s conftest.$ac_objext; then
24391   ac_lo=0 ac_mid=0
24392   while :; do
24393     cat >conftest.$ac_ext <<_ACEOF
24394 /* confdefs.h.  */
24395 _ACEOF
24396 cat confdefs.h >>conftest.$ac_ext
24397 cat >>conftest.$ac_ext <<_ACEOF
24398 /* end confdefs.h.  */
24399 $ac_includes_default
24400 int
24401 main ()
24402 {
24403 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
24404 test_array [0] = 0
24405
24406   ;
24407   return 0;
24408 }
24409 _ACEOF
24410 rm -f conftest.$ac_objext
24411 if { (ac_try="$ac_compile"
24412 case "(($ac_try" in
24413   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24414   *) ac_try_echo=$ac_try;;
24415 esac
24416 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24417 $as_echo "$ac_try_echo") >&5
24418   (eval "$ac_compile") 2>conftest.er1
24419   ac_status=$?
24420   grep -v '^ *+' conftest.er1 >conftest.err
24421   rm -f conftest.er1
24422   cat conftest.err >&5
24423   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24424   (exit $ac_status); } && {
24425          test -z "$ac_c_werror_flag" ||
24426          test ! -s conftest.err
24427        } && test -s conftest.$ac_objext; then
24428   ac_hi=$ac_mid; break
24429 else
24430   $as_echo "$as_me: failed program was:" >&5
24431 sed 's/^/| /' conftest.$ac_ext >&5
24432
24433         ac_lo=`expr $ac_mid + 1`
24434                         if test $ac_lo -le $ac_mid; then
24435                           ac_lo= ac_hi=
24436                           break
24437                         fi
24438                         ac_mid=`expr 2 '*' $ac_mid + 1`
24439 fi
24440
24441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24442   done
24443 else
24444   $as_echo "$as_me: failed program was:" >&5
24445 sed 's/^/| /' conftest.$ac_ext >&5
24446
24447         cat >conftest.$ac_ext <<_ACEOF
24448 /* confdefs.h.  */
24449 _ACEOF
24450 cat confdefs.h >>conftest.$ac_ext
24451 cat >>conftest.$ac_ext <<_ACEOF
24452 /* end confdefs.h.  */
24453 $ac_includes_default
24454 int
24455 main ()
24456 {
24457 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
24458 test_array [0] = 0
24459
24460   ;
24461   return 0;
24462 }
24463 _ACEOF
24464 rm -f conftest.$ac_objext
24465 if { (ac_try="$ac_compile"
24466 case "(($ac_try" in
24467   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24468   *) ac_try_echo=$ac_try;;
24469 esac
24470 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24471 $as_echo "$ac_try_echo") >&5
24472   (eval "$ac_compile") 2>conftest.er1
24473   ac_status=$?
24474   grep -v '^ *+' conftest.er1 >conftest.err
24475   rm -f conftest.er1
24476   cat conftest.err >&5
24477   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24478   (exit $ac_status); } && {
24479          test -z "$ac_c_werror_flag" ||
24480          test ! -s conftest.err
24481        } && test -s conftest.$ac_objext; then
24482   ac_hi=-1 ac_mid=-1
24483   while :; do
24484     cat >conftest.$ac_ext <<_ACEOF
24485 /* confdefs.h.  */
24486 _ACEOF
24487 cat confdefs.h >>conftest.$ac_ext
24488 cat >>conftest.$ac_ext <<_ACEOF
24489 /* end confdefs.h.  */
24490 $ac_includes_default
24491 int
24492 main ()
24493 {
24494 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
24495 test_array [0] = 0
24496
24497   ;
24498   return 0;
24499 }
24500 _ACEOF
24501 rm -f conftest.$ac_objext
24502 if { (ac_try="$ac_compile"
24503 case "(($ac_try" in
24504   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24505   *) ac_try_echo=$ac_try;;
24506 esac
24507 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24508 $as_echo "$ac_try_echo") >&5
24509   (eval "$ac_compile") 2>conftest.er1
24510   ac_status=$?
24511   grep -v '^ *+' conftest.er1 >conftest.err
24512   rm -f conftest.er1
24513   cat conftest.err >&5
24514   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24515   (exit $ac_status); } && {
24516          test -z "$ac_c_werror_flag" ||
24517          test ! -s conftest.err
24518        } && test -s conftest.$ac_objext; then
24519   ac_lo=$ac_mid; break
24520 else
24521   $as_echo "$as_me: failed program was:" >&5
24522 sed 's/^/| /' conftest.$ac_ext >&5
24523
24524         ac_hi=`expr '(' $ac_mid ')' - 1`
24525                         if test $ac_mid -le $ac_hi; then
24526                           ac_lo= ac_hi=
24527                           break
24528                         fi
24529                         ac_mid=`expr 2 '*' $ac_mid`
24530 fi
24531
24532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24533   done
24534 else
24535   $as_echo "$as_me: failed program was:" >&5
24536 sed 's/^/| /' conftest.$ac_ext >&5
24537
24538         ac_lo= ac_hi=
24539 fi
24540
24541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24542 fi
24543
24544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24545 # Binary search between lo and hi bounds.
24546 while test "x$ac_lo" != "x$ac_hi"; do
24547   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24548   cat >conftest.$ac_ext <<_ACEOF
24549 /* confdefs.h.  */
24550 _ACEOF
24551 cat confdefs.h >>conftest.$ac_ext
24552 cat >>conftest.$ac_ext <<_ACEOF
24553 /* end confdefs.h.  */
24554 $ac_includes_default
24555 int
24556 main ()
24557 {
24558 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
24559 test_array [0] = 0
24560
24561   ;
24562   return 0;
24563 }
24564 _ACEOF
24565 rm -f conftest.$ac_objext
24566 if { (ac_try="$ac_compile"
24567 case "(($ac_try" in
24568   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24569   *) ac_try_echo=$ac_try;;
24570 esac
24571 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24572 $as_echo "$ac_try_echo") >&5
24573   (eval "$ac_compile") 2>conftest.er1
24574   ac_status=$?
24575   grep -v '^ *+' conftest.er1 >conftest.err
24576   rm -f conftest.er1
24577   cat conftest.err >&5
24578   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24579   (exit $ac_status); } && {
24580          test -z "$ac_c_werror_flag" ||
24581          test ! -s conftest.err
24582        } && test -s conftest.$ac_objext; then
24583   ac_hi=$ac_mid
24584 else
24585   $as_echo "$as_me: failed program was:" >&5
24586 sed 's/^/| /' conftest.$ac_ext >&5
24587
24588         ac_lo=`expr '(' $ac_mid ')' + 1`
24589 fi
24590
24591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24592 done
24593 case $ac_lo in
24594 ?*) ac_cv_sizeof_void_p=$ac_lo;;
24595 '') if test "$ac_cv_type_void_p" = yes; then
24596      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
24597 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24598 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
24599 See \`config.log' for more details." >&5
24600 $as_echo "$as_me: error: cannot compute sizeof (void *)
24601 See \`config.log' for more details." >&2;}
24602    { (exit 77); exit 77; }; }; }
24603    else
24604      ac_cv_sizeof_void_p=0
24605    fi ;;
24606 esac
24607 else
24608   cat >conftest.$ac_ext <<_ACEOF
24609 /* confdefs.h.  */
24610 _ACEOF
24611 cat confdefs.h >>conftest.$ac_ext
24612 cat >>conftest.$ac_ext <<_ACEOF
24613 /* end confdefs.h.  */
24614 $ac_includes_default
24615 static long int longval () { return (long int) (sizeof (void *)); }
24616 static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
24617 #include <stdio.h>
24618 #include <stdlib.h>
24619 int
24620 main ()
24621 {
24622
24623   FILE *f = fopen ("conftest.val", "w");
24624   if (! f)
24625     return 1;
24626   if (((long int) (sizeof (void *))) < 0)
24627     {
24628       long int i = longval ();
24629       if (i != ((long int) (sizeof (void *))))
24630         return 1;
24631       fprintf (f, "%ld", i);
24632     }
24633   else
24634     {
24635       unsigned long int i = ulongval ();
24636       if (i != ((long int) (sizeof (void *))))
24637         return 1;
24638       fprintf (f, "%lu", i);
24639     }
24640   /* Do not output a trailing newline, as this causes \r\n confusion
24641      on some platforms.  */
24642   return ferror (f) || fclose (f) != 0;
24643
24644   ;
24645   return 0;
24646 }
24647 _ACEOF
24648 rm -f conftest$ac_exeext
24649 if { (ac_try="$ac_link"
24650 case "(($ac_try" in
24651   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24652   *) ac_try_echo=$ac_try;;
24653 esac
24654 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24655 $as_echo "$ac_try_echo") >&5
24656   (eval "$ac_link") 2>&5
24657   ac_status=$?
24658   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24659   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24660   { (case "(($ac_try" in
24661   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24662   *) ac_try_echo=$ac_try;;
24663 esac
24664 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24665 $as_echo "$ac_try_echo") >&5
24666   (eval "$ac_try") 2>&5
24667   ac_status=$?
24668   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24669   (exit $ac_status); }; }; then
24670   ac_cv_sizeof_void_p=`cat conftest.val`
24671 else
24672   $as_echo "$as_me: program exited with status $ac_status" >&5
24673 $as_echo "$as_me: failed program was:" >&5
24674 sed 's/^/| /' conftest.$ac_ext >&5
24675
24676 ( exit $ac_status )
24677 if test "$ac_cv_type_void_p" = yes; then
24678      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
24679 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24680 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
24681 See \`config.log' for more details." >&5
24682 $as_echo "$as_me: error: cannot compute sizeof (void *)
24683 See \`config.log' for more details." >&2;}
24684    { (exit 77); exit 77; }; }; }
24685    else
24686      ac_cv_sizeof_void_p=0
24687    fi
24688 fi
24689 rm -rf conftest.dSYM
24690 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24691 fi
24692 rm -f conftest.val
24693 fi
24694 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
24695 $as_echo "$ac_cv_sizeof_void_p" >&6; }
24696
24697
24698
24699 cat >>confdefs.h <<_ACEOF
24700 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
24701 _ACEOF
24702
24703
24704 # The cast to long int works around a bug in the HP C Compiler
24705 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24706 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24707 # This bug is HP SR number 8606223364.
24708 { $as_echo "$as_me:$LINENO: checking size of size_t" >&5
24709 $as_echo_n "checking size of size_t... " >&6; }
24710 if test "${ac_cv_sizeof_size_t+set}" = set; then
24711   $as_echo_n "(cached) " >&6
24712 else
24713   if test "$cross_compiling" = yes; then
24714   # Depending upon the size, compute the lo and hi bounds.
24715 cat >conftest.$ac_ext <<_ACEOF
24716 /* confdefs.h.  */
24717 _ACEOF
24718 cat confdefs.h >>conftest.$ac_ext
24719 cat >>conftest.$ac_ext <<_ACEOF
24720 /* end confdefs.h.  */
24721 $ac_includes_default
24722 int
24723 main ()
24724 {
24725 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
24726 test_array [0] = 0
24727
24728   ;
24729   return 0;
24730 }
24731 _ACEOF
24732 rm -f conftest.$ac_objext
24733 if { (ac_try="$ac_compile"
24734 case "(($ac_try" in
24735   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24736   *) ac_try_echo=$ac_try;;
24737 esac
24738 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24739 $as_echo "$ac_try_echo") >&5
24740   (eval "$ac_compile") 2>conftest.er1
24741   ac_status=$?
24742   grep -v '^ *+' conftest.er1 >conftest.err
24743   rm -f conftest.er1
24744   cat conftest.err >&5
24745   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24746   (exit $ac_status); } && {
24747          test -z "$ac_c_werror_flag" ||
24748          test ! -s conftest.err
24749        } && test -s conftest.$ac_objext; then
24750   ac_lo=0 ac_mid=0
24751   while :; do
24752     cat >conftest.$ac_ext <<_ACEOF
24753 /* confdefs.h.  */
24754 _ACEOF
24755 cat confdefs.h >>conftest.$ac_ext
24756 cat >>conftest.$ac_ext <<_ACEOF
24757 /* end confdefs.h.  */
24758 $ac_includes_default
24759 int
24760 main ()
24761 {
24762 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
24763 test_array [0] = 0
24764
24765   ;
24766   return 0;
24767 }
24768 _ACEOF
24769 rm -f conftest.$ac_objext
24770 if { (ac_try="$ac_compile"
24771 case "(($ac_try" in
24772   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24773   *) ac_try_echo=$ac_try;;
24774 esac
24775 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24776 $as_echo "$ac_try_echo") >&5
24777   (eval "$ac_compile") 2>conftest.er1
24778   ac_status=$?
24779   grep -v '^ *+' conftest.er1 >conftest.err
24780   rm -f conftest.er1
24781   cat conftest.err >&5
24782   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24783   (exit $ac_status); } && {
24784          test -z "$ac_c_werror_flag" ||
24785          test ! -s conftest.err
24786        } && test -s conftest.$ac_objext; then
24787   ac_hi=$ac_mid; break
24788 else
24789   $as_echo "$as_me: failed program was:" >&5
24790 sed 's/^/| /' conftest.$ac_ext >&5
24791
24792         ac_lo=`expr $ac_mid + 1`
24793                         if test $ac_lo -le $ac_mid; then
24794                           ac_lo= ac_hi=
24795                           break
24796                         fi
24797                         ac_mid=`expr 2 '*' $ac_mid + 1`
24798 fi
24799
24800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24801   done
24802 else
24803   $as_echo "$as_me: failed program was:" >&5
24804 sed 's/^/| /' conftest.$ac_ext >&5
24805
24806         cat >conftest.$ac_ext <<_ACEOF
24807 /* confdefs.h.  */
24808 _ACEOF
24809 cat confdefs.h >>conftest.$ac_ext
24810 cat >>conftest.$ac_ext <<_ACEOF
24811 /* end confdefs.h.  */
24812 $ac_includes_default
24813 int
24814 main ()
24815 {
24816 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
24817 test_array [0] = 0
24818
24819   ;
24820   return 0;
24821 }
24822 _ACEOF
24823 rm -f conftest.$ac_objext
24824 if { (ac_try="$ac_compile"
24825 case "(($ac_try" in
24826   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24827   *) ac_try_echo=$ac_try;;
24828 esac
24829 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24830 $as_echo "$ac_try_echo") >&5
24831   (eval "$ac_compile") 2>conftest.er1
24832   ac_status=$?
24833   grep -v '^ *+' conftest.er1 >conftest.err
24834   rm -f conftest.er1
24835   cat conftest.err >&5
24836   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24837   (exit $ac_status); } && {
24838          test -z "$ac_c_werror_flag" ||
24839          test ! -s conftest.err
24840        } && test -s conftest.$ac_objext; then
24841   ac_hi=-1 ac_mid=-1
24842   while :; do
24843     cat >conftest.$ac_ext <<_ACEOF
24844 /* confdefs.h.  */
24845 _ACEOF
24846 cat confdefs.h >>conftest.$ac_ext
24847 cat >>conftest.$ac_ext <<_ACEOF
24848 /* end confdefs.h.  */
24849 $ac_includes_default
24850 int
24851 main ()
24852 {
24853 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
24854 test_array [0] = 0
24855
24856   ;
24857   return 0;
24858 }
24859 _ACEOF
24860 rm -f conftest.$ac_objext
24861 if { (ac_try="$ac_compile"
24862 case "(($ac_try" in
24863   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24864   *) ac_try_echo=$ac_try;;
24865 esac
24866 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24867 $as_echo "$ac_try_echo") >&5
24868   (eval "$ac_compile") 2>conftest.er1
24869   ac_status=$?
24870   grep -v '^ *+' conftest.er1 >conftest.err
24871   rm -f conftest.er1
24872   cat conftest.err >&5
24873   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24874   (exit $ac_status); } && {
24875          test -z "$ac_c_werror_flag" ||
24876          test ! -s conftest.err
24877        } && test -s conftest.$ac_objext; then
24878   ac_lo=$ac_mid; break
24879 else
24880   $as_echo "$as_me: failed program was:" >&5
24881 sed 's/^/| /' conftest.$ac_ext >&5
24882
24883         ac_hi=`expr '(' $ac_mid ')' - 1`
24884                         if test $ac_mid -le $ac_hi; then
24885                           ac_lo= ac_hi=
24886                           break
24887                         fi
24888                         ac_mid=`expr 2 '*' $ac_mid`
24889 fi
24890
24891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24892   done
24893 else
24894   $as_echo "$as_me: failed program was:" >&5
24895 sed 's/^/| /' conftest.$ac_ext >&5
24896
24897         ac_lo= ac_hi=
24898 fi
24899
24900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24901 fi
24902
24903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24904 # Binary search between lo and hi bounds.
24905 while test "x$ac_lo" != "x$ac_hi"; do
24906   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24907   cat >conftest.$ac_ext <<_ACEOF
24908 /* confdefs.h.  */
24909 _ACEOF
24910 cat confdefs.h >>conftest.$ac_ext
24911 cat >>conftest.$ac_ext <<_ACEOF
24912 /* end confdefs.h.  */
24913 $ac_includes_default
24914 int
24915 main ()
24916 {
24917 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
24918 test_array [0] = 0
24919
24920   ;
24921   return 0;
24922 }
24923 _ACEOF
24924 rm -f conftest.$ac_objext
24925 if { (ac_try="$ac_compile"
24926 case "(($ac_try" in
24927   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24928   *) ac_try_echo=$ac_try;;
24929 esac
24930 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24931 $as_echo "$ac_try_echo") >&5
24932   (eval "$ac_compile") 2>conftest.er1
24933   ac_status=$?
24934   grep -v '^ *+' conftest.er1 >conftest.err
24935   rm -f conftest.er1
24936   cat conftest.err >&5
24937   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24938   (exit $ac_status); } && {
24939          test -z "$ac_c_werror_flag" ||
24940          test ! -s conftest.err
24941        } && test -s conftest.$ac_objext; then
24942   ac_hi=$ac_mid
24943 else
24944   $as_echo "$as_me: failed program was:" >&5
24945 sed 's/^/| /' conftest.$ac_ext >&5
24946
24947         ac_lo=`expr '(' $ac_mid ')' + 1`
24948 fi
24949
24950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24951 done
24952 case $ac_lo in
24953 ?*) ac_cv_sizeof_size_t=$ac_lo;;
24954 '') if test "$ac_cv_type_size_t" = yes; then
24955      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
24956 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24957 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
24958 See \`config.log' for more details." >&5
24959 $as_echo "$as_me: error: cannot compute sizeof (size_t)
24960 See \`config.log' for more details." >&2;}
24961    { (exit 77); exit 77; }; }; }
24962    else
24963      ac_cv_sizeof_size_t=0
24964    fi ;;
24965 esac
24966 else
24967   cat >conftest.$ac_ext <<_ACEOF
24968 /* confdefs.h.  */
24969 _ACEOF
24970 cat confdefs.h >>conftest.$ac_ext
24971 cat >>conftest.$ac_ext <<_ACEOF
24972 /* end confdefs.h.  */
24973 $ac_includes_default
24974 static long int longval () { return (long int) (sizeof (size_t)); }
24975 static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
24976 #include <stdio.h>
24977 #include <stdlib.h>
24978 int
24979 main ()
24980 {
24981
24982   FILE *f = fopen ("conftest.val", "w");
24983   if (! f)
24984     return 1;
24985   if (((long int) (sizeof (size_t))) < 0)
24986     {
24987       long int i = longval ();
24988       if (i != ((long int) (sizeof (size_t))))
24989         return 1;
24990       fprintf (f, "%ld", i);
24991     }
24992   else
24993     {
24994       unsigned long int i = ulongval ();
24995       if (i != ((long int) (sizeof (size_t))))
24996         return 1;
24997       fprintf (f, "%lu", i);
24998     }
24999   /* Do not output a trailing newline, as this causes \r\n confusion
25000      on some platforms.  */
25001   return ferror (f) || fclose (f) != 0;
25002
25003   ;
25004   return 0;
25005 }
25006 _ACEOF
25007 rm -f conftest$ac_exeext
25008 if { (ac_try="$ac_link"
25009 case "(($ac_try" in
25010   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25011   *) ac_try_echo=$ac_try;;
25012 esac
25013 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25014 $as_echo "$ac_try_echo") >&5
25015   (eval "$ac_link") 2>&5
25016   ac_status=$?
25017   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25018   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25019   { (case "(($ac_try" in
25020   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25021   *) ac_try_echo=$ac_try;;
25022 esac
25023 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25024 $as_echo "$ac_try_echo") >&5
25025   (eval "$ac_try") 2>&5
25026   ac_status=$?
25027   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25028   (exit $ac_status); }; }; then
25029   ac_cv_sizeof_size_t=`cat conftest.val`
25030 else
25031   $as_echo "$as_me: program exited with status $ac_status" >&5
25032 $as_echo "$as_me: failed program was:" >&5
25033 sed 's/^/| /' conftest.$ac_ext >&5
25034
25035 ( exit $ac_status )
25036 if test "$ac_cv_type_size_t" = yes; then
25037      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25038 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25039 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
25040 See \`config.log' for more details." >&5
25041 $as_echo "$as_me: error: cannot compute sizeof (size_t)
25042 See \`config.log' for more details." >&2;}
25043    { (exit 77); exit 77; }; }; }
25044    else
25045      ac_cv_sizeof_size_t=0
25046    fi
25047 fi
25048 rm -rf conftest.dSYM
25049 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25050 fi
25051 rm -f conftest.val
25052 fi
25053 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
25054 $as_echo "$ac_cv_sizeof_size_t" >&6; }
25055
25056
25057
25058 cat >>confdefs.h <<_ACEOF
25059 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
25060 _ACEOF
25061
25062
25063 # The cast to long int works around a bug in the HP C Compiler
25064 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25065 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25066 # This bug is HP SR number 8606223364.
25067 { $as_echo "$as_me:$LINENO: checking size of long" >&5
25068 $as_echo_n "checking size of long... " >&6; }
25069 if test "${ac_cv_sizeof_long+set}" = set; then
25070   $as_echo_n "(cached) " >&6
25071 else
25072   if test "$cross_compiling" = yes; then
25073   # Depending upon the size, compute the lo and hi bounds.
25074 cat >conftest.$ac_ext <<_ACEOF
25075 /* confdefs.h.  */
25076 _ACEOF
25077 cat confdefs.h >>conftest.$ac_ext
25078 cat >>conftest.$ac_ext <<_ACEOF
25079 /* end confdefs.h.  */
25080 $ac_includes_default
25081 int
25082 main ()
25083 {
25084 static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
25085 test_array [0] = 0
25086
25087   ;
25088   return 0;
25089 }
25090 _ACEOF
25091 rm -f conftest.$ac_objext
25092 if { (ac_try="$ac_compile"
25093 case "(($ac_try" in
25094   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25095   *) ac_try_echo=$ac_try;;
25096 esac
25097 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25098 $as_echo "$ac_try_echo") >&5
25099   (eval "$ac_compile") 2>conftest.er1
25100   ac_status=$?
25101   grep -v '^ *+' conftest.er1 >conftest.err
25102   rm -f conftest.er1
25103   cat conftest.err >&5
25104   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25105   (exit $ac_status); } && {
25106          test -z "$ac_c_werror_flag" ||
25107          test ! -s conftest.err
25108        } && test -s conftest.$ac_objext; then
25109   ac_lo=0 ac_mid=0
25110   while :; do
25111     cat >conftest.$ac_ext <<_ACEOF
25112 /* confdefs.h.  */
25113 _ACEOF
25114 cat confdefs.h >>conftest.$ac_ext
25115 cat >>conftest.$ac_ext <<_ACEOF
25116 /* end confdefs.h.  */
25117 $ac_includes_default
25118 int
25119 main ()
25120 {
25121 static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
25122 test_array [0] = 0
25123
25124   ;
25125   return 0;
25126 }
25127 _ACEOF
25128 rm -f conftest.$ac_objext
25129 if { (ac_try="$ac_compile"
25130 case "(($ac_try" in
25131   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25132   *) ac_try_echo=$ac_try;;
25133 esac
25134 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25135 $as_echo "$ac_try_echo") >&5
25136   (eval "$ac_compile") 2>conftest.er1
25137   ac_status=$?
25138   grep -v '^ *+' conftest.er1 >conftest.err
25139   rm -f conftest.er1
25140   cat conftest.err >&5
25141   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25142   (exit $ac_status); } && {
25143          test -z "$ac_c_werror_flag" ||
25144          test ! -s conftest.err
25145        } && test -s conftest.$ac_objext; then
25146   ac_hi=$ac_mid; break
25147 else
25148   $as_echo "$as_me: failed program was:" >&5
25149 sed 's/^/| /' conftest.$ac_ext >&5
25150
25151         ac_lo=`expr $ac_mid + 1`
25152                         if test $ac_lo -le $ac_mid; then
25153                           ac_lo= ac_hi=
25154                           break
25155                         fi
25156                         ac_mid=`expr 2 '*' $ac_mid + 1`
25157 fi
25158
25159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25160   done
25161 else
25162   $as_echo "$as_me: failed program was:" >&5
25163 sed 's/^/| /' conftest.$ac_ext >&5
25164
25165         cat >conftest.$ac_ext <<_ACEOF
25166 /* confdefs.h.  */
25167 _ACEOF
25168 cat confdefs.h >>conftest.$ac_ext
25169 cat >>conftest.$ac_ext <<_ACEOF
25170 /* end confdefs.h.  */
25171 $ac_includes_default
25172 int
25173 main ()
25174 {
25175 static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
25176 test_array [0] = 0
25177
25178   ;
25179   return 0;
25180 }
25181 _ACEOF
25182 rm -f conftest.$ac_objext
25183 if { (ac_try="$ac_compile"
25184 case "(($ac_try" in
25185   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25186   *) ac_try_echo=$ac_try;;
25187 esac
25188 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25189 $as_echo "$ac_try_echo") >&5
25190   (eval "$ac_compile") 2>conftest.er1
25191   ac_status=$?
25192   grep -v '^ *+' conftest.er1 >conftest.err
25193   rm -f conftest.er1
25194   cat conftest.err >&5
25195   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25196   (exit $ac_status); } && {
25197          test -z "$ac_c_werror_flag" ||
25198          test ! -s conftest.err
25199        } && test -s conftest.$ac_objext; then
25200   ac_hi=-1 ac_mid=-1
25201   while :; do
25202     cat >conftest.$ac_ext <<_ACEOF
25203 /* confdefs.h.  */
25204 _ACEOF
25205 cat confdefs.h >>conftest.$ac_ext
25206 cat >>conftest.$ac_ext <<_ACEOF
25207 /* end confdefs.h.  */
25208 $ac_includes_default
25209 int
25210 main ()
25211 {
25212 static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
25213 test_array [0] = 0
25214
25215   ;
25216   return 0;
25217 }
25218 _ACEOF
25219 rm -f conftest.$ac_objext
25220 if { (ac_try="$ac_compile"
25221 case "(($ac_try" in
25222   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25223   *) ac_try_echo=$ac_try;;
25224 esac
25225 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25226 $as_echo "$ac_try_echo") >&5
25227   (eval "$ac_compile") 2>conftest.er1
25228   ac_status=$?
25229   grep -v '^ *+' conftest.er1 >conftest.err
25230   rm -f conftest.er1
25231   cat conftest.err >&5
25232   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25233   (exit $ac_status); } && {
25234          test -z "$ac_c_werror_flag" ||
25235          test ! -s conftest.err
25236        } && test -s conftest.$ac_objext; then
25237   ac_lo=$ac_mid; break
25238 else
25239   $as_echo "$as_me: failed program was:" >&5
25240 sed 's/^/| /' conftest.$ac_ext >&5
25241
25242         ac_hi=`expr '(' $ac_mid ')' - 1`
25243                         if test $ac_mid -le $ac_hi; then
25244                           ac_lo= ac_hi=
25245                           break
25246                         fi
25247                         ac_mid=`expr 2 '*' $ac_mid`
25248 fi
25249
25250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25251   done
25252 else
25253   $as_echo "$as_me: failed program was:" >&5
25254 sed 's/^/| /' conftest.$ac_ext >&5
25255
25256         ac_lo= ac_hi=
25257 fi
25258
25259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25260 fi
25261
25262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25263 # Binary search between lo and hi bounds.
25264 while test "x$ac_lo" != "x$ac_hi"; do
25265   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25266   cat >conftest.$ac_ext <<_ACEOF
25267 /* confdefs.h.  */
25268 _ACEOF
25269 cat confdefs.h >>conftest.$ac_ext
25270 cat >>conftest.$ac_ext <<_ACEOF
25271 /* end confdefs.h.  */
25272 $ac_includes_default
25273 int
25274 main ()
25275 {
25276 static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
25277 test_array [0] = 0
25278
25279   ;
25280   return 0;
25281 }
25282 _ACEOF
25283 rm -f conftest.$ac_objext
25284 if { (ac_try="$ac_compile"
25285 case "(($ac_try" in
25286   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25287   *) ac_try_echo=$ac_try;;
25288 esac
25289 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25290 $as_echo "$ac_try_echo") >&5
25291   (eval "$ac_compile") 2>conftest.er1
25292   ac_status=$?
25293   grep -v '^ *+' conftest.er1 >conftest.err
25294   rm -f conftest.er1
25295   cat conftest.err >&5
25296   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25297   (exit $ac_status); } && {
25298          test -z "$ac_c_werror_flag" ||
25299          test ! -s conftest.err
25300        } && test -s conftest.$ac_objext; then
25301   ac_hi=$ac_mid
25302 else
25303   $as_echo "$as_me: failed program was:" >&5
25304 sed 's/^/| /' conftest.$ac_ext >&5
25305
25306         ac_lo=`expr '(' $ac_mid ')' + 1`
25307 fi
25308
25309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25310 done
25311 case $ac_lo in
25312 ?*) ac_cv_sizeof_long=$ac_lo;;
25313 '') if test "$ac_cv_type_long" = yes; then
25314      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25315 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25316 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
25317 See \`config.log' for more details." >&5
25318 $as_echo "$as_me: error: cannot compute sizeof (long)
25319 See \`config.log' for more details." >&2;}
25320    { (exit 77); exit 77; }; }; }
25321    else
25322      ac_cv_sizeof_long=0
25323    fi ;;
25324 esac
25325 else
25326   cat >conftest.$ac_ext <<_ACEOF
25327 /* confdefs.h.  */
25328 _ACEOF
25329 cat confdefs.h >>conftest.$ac_ext
25330 cat >>conftest.$ac_ext <<_ACEOF
25331 /* end confdefs.h.  */
25332 $ac_includes_default
25333 static long int longval () { return (long int) (sizeof (long)); }
25334 static unsigned long int ulongval () { return (long int) (sizeof (long)); }
25335 #include <stdio.h>
25336 #include <stdlib.h>
25337 int
25338 main ()
25339 {
25340
25341   FILE *f = fopen ("conftest.val", "w");
25342   if (! f)
25343     return 1;
25344   if (((long int) (sizeof (long))) < 0)
25345     {
25346       long int i = longval ();
25347       if (i != ((long int) (sizeof (long))))
25348         return 1;
25349       fprintf (f, "%ld", i);
25350     }
25351   else
25352     {
25353       unsigned long int i = ulongval ();
25354       if (i != ((long int) (sizeof (long))))
25355         return 1;
25356       fprintf (f, "%lu", i);
25357     }
25358   /* Do not output a trailing newline, as this causes \r\n confusion
25359      on some platforms.  */
25360   return ferror (f) || fclose (f) != 0;
25361
25362   ;
25363   return 0;
25364 }
25365 _ACEOF
25366 rm -f conftest$ac_exeext
25367 if { (ac_try="$ac_link"
25368 case "(($ac_try" in
25369   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25370   *) ac_try_echo=$ac_try;;
25371 esac
25372 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25373 $as_echo "$ac_try_echo") >&5
25374   (eval "$ac_link") 2>&5
25375   ac_status=$?
25376   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25377   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25378   { (case "(($ac_try" in
25379   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25380   *) ac_try_echo=$ac_try;;
25381 esac
25382 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25383 $as_echo "$ac_try_echo") >&5
25384   (eval "$ac_try") 2>&5
25385   ac_status=$?
25386   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25387   (exit $ac_status); }; }; then
25388   ac_cv_sizeof_long=`cat conftest.val`
25389 else
25390   $as_echo "$as_me: program exited with status $ac_status" >&5
25391 $as_echo "$as_me: failed program was:" >&5
25392 sed 's/^/| /' conftest.$ac_ext >&5
25393
25394 ( exit $ac_status )
25395 if test "$ac_cv_type_long" = yes; then
25396      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25397 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25398 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
25399 See \`config.log' for more details." >&5
25400 $as_echo "$as_me: error: cannot compute sizeof (long)
25401 See \`config.log' for more details." >&2;}
25402    { (exit 77); exit 77; }; }; }
25403    else
25404      ac_cv_sizeof_long=0
25405    fi
25406 fi
25407 rm -rf conftest.dSYM
25408 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25409 fi
25410 rm -f conftest.val
25411 fi
25412 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
25413 $as_echo "$ac_cv_sizeof_long" >&6; }
25414
25415
25416
25417 cat >>confdefs.h <<_ACEOF
25418 #define SIZEOF_LONG $ac_cv_sizeof_long
25419 _ACEOF
25420
25421
25422
25423 # Decide whether float4 is passed by value: user-selectable, enabled by default
25424 { $as_echo "$as_me:$LINENO: checking whether to build with float4 passed by value" >&5
25425 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
25426
25427
25428 # Check whether --enable-float4-byval was given.
25429 if test "${enable_float4_byval+set}" = set; then
25430   enableval=$enable_float4_byval;
25431   case $enableval in
25432     yes)
25433
25434 cat >>confdefs.h <<\_ACEOF
25435 #define USE_FLOAT4_BYVAL 1
25436 _ACEOF
25437
25438                float4passbyval=true
25439       ;;
25440     no)
25441       float4passbyval=false
25442       ;;
25443     *)
25444       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float4-byval option" >&5
25445 $as_echo "$as_me: error: no argument expected for --enable-float4-byval option" >&2;}
25446    { (exit 1); exit 1; }; }
25447       ;;
25448   esac
25449
25450 else
25451   enable_float4_byval=yes
25452
25453 cat >>confdefs.h <<\_ACEOF
25454 #define USE_FLOAT4_BYVAL 1
25455 _ACEOF
25456
25457                float4passbyval=true
25458 fi
25459
25460
25461 { $as_echo "$as_me:$LINENO: result: $enable_float4_byval" >&5
25462 $as_echo "$enable_float4_byval" >&6; }
25463
25464 cat >>confdefs.h <<_ACEOF
25465 #define FLOAT4PASSBYVAL $float4passbyval
25466 _ACEOF
25467
25468
25469 # Decide whether float8 is passed by value.
25470 # Note: this setting also controls int8 and related types such as timestamp.
25471 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
25472 # If not, trying to select it is an error.
25473 { $as_echo "$as_me:$LINENO: checking whether to build with float8 passed by value" >&5
25474 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
25475 if test $ac_cv_sizeof_void_p -ge 8 ; then
25476
25477
25478 # Check whether --enable-float8-byval was given.
25479 if test "${enable_float8_byval+set}" = set; then
25480   enableval=$enable_float8_byval;
25481   case $enableval in
25482     yes)
25483       :
25484       ;;
25485     no)
25486       :
25487       ;;
25488     *)
25489       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
25490 $as_echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
25491    { (exit 1); exit 1; }; }
25492       ;;
25493   esac
25494
25495 else
25496   enable_float8_byval=yes
25497
25498 fi
25499
25500
25501 else
25502
25503
25504 # Check whether --enable-float8-byval was given.
25505 if test "${enable_float8_byval+set}" = set; then
25506   enableval=$enable_float8_byval;
25507   case $enableval in
25508     yes)
25509       :
25510       ;;
25511     no)
25512       :
25513       ;;
25514     *)
25515       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
25516 $as_echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
25517    { (exit 1); exit 1; }; }
25518       ;;
25519   esac
25520
25521 else
25522   enable_float8_byval=no
25523
25524 fi
25525
25526
25527   if test "$enable_float8_byval" = yes ; then
25528     { { $as_echo "$as_me:$LINENO: error: --enable-float8-byval is not supported on 32-bit platforms." >&5
25529 $as_echo "$as_me: error: --enable-float8-byval is not supported on 32-bit platforms." >&2;}
25530    { (exit 1); exit 1; }; }
25531   fi
25532 fi
25533 if test "$enable_float8_byval" = yes ; then
25534
25535 cat >>confdefs.h <<\_ACEOF
25536 #define USE_FLOAT8_BYVAL 1
25537 _ACEOF
25538
25539   float8passbyval=true
25540 else
25541   float8passbyval=false
25542 fi
25543 { $as_echo "$as_me:$LINENO: result: $enable_float8_byval" >&5
25544 $as_echo "$enable_float8_byval" >&6; }
25545
25546 cat >>confdefs.h <<_ACEOF
25547 #define FLOAT8PASSBYVAL $float8passbyval
25548 _ACEOF
25549
25550
25551 # Determine memory alignment requirements for the basic C data types.
25552
25553 # The cast to long int works around a bug in the HP C Compiler,
25554 # see AC_CHECK_SIZEOF for more information.
25555 { $as_echo "$as_me:$LINENO: checking alignment of short" >&5
25556 $as_echo_n "checking alignment of short... " >&6; }
25557 if test "${ac_cv_alignof_short+set}" = set; then
25558   $as_echo_n "(cached) " >&6
25559 else
25560   if test "$cross_compiling" = yes; then
25561   # Depending upon the size, compute the lo and hi bounds.
25562 cat >conftest.$ac_ext <<_ACEOF
25563 /* confdefs.h.  */
25564 _ACEOF
25565 cat confdefs.h >>conftest.$ac_ext
25566 cat >>conftest.$ac_ext <<_ACEOF
25567 /* end confdefs.h.  */
25568 $ac_includes_default
25569 #ifndef offsetof
25570 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25571 #endif
25572 typedef struct { char x; short y; } ac__type_alignof_;
25573 int
25574 main ()
25575 {
25576 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
25577 test_array [0] = 0
25578
25579   ;
25580   return 0;
25581 }
25582 _ACEOF
25583 rm -f conftest.$ac_objext
25584 if { (ac_try="$ac_compile"
25585 case "(($ac_try" in
25586   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25587   *) ac_try_echo=$ac_try;;
25588 esac
25589 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25590 $as_echo "$ac_try_echo") >&5
25591   (eval "$ac_compile") 2>conftest.er1
25592   ac_status=$?
25593   grep -v '^ *+' conftest.er1 >conftest.err
25594   rm -f conftest.er1
25595   cat conftest.err >&5
25596   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25597   (exit $ac_status); } && {
25598          test -z "$ac_c_werror_flag" ||
25599          test ! -s conftest.err
25600        } && test -s conftest.$ac_objext; then
25601   ac_lo=0 ac_mid=0
25602   while :; do
25603     cat >conftest.$ac_ext <<_ACEOF
25604 /* confdefs.h.  */
25605 _ACEOF
25606 cat confdefs.h >>conftest.$ac_ext
25607 cat >>conftest.$ac_ext <<_ACEOF
25608 /* end confdefs.h.  */
25609 $ac_includes_default
25610 #ifndef offsetof
25611 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25612 #endif
25613 typedef struct { char x; short y; } ac__type_alignof_;
25614 int
25615 main ()
25616 {
25617 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
25618 test_array [0] = 0
25619
25620   ;
25621   return 0;
25622 }
25623 _ACEOF
25624 rm -f conftest.$ac_objext
25625 if { (ac_try="$ac_compile"
25626 case "(($ac_try" in
25627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25628   *) ac_try_echo=$ac_try;;
25629 esac
25630 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25631 $as_echo "$ac_try_echo") >&5
25632   (eval "$ac_compile") 2>conftest.er1
25633   ac_status=$?
25634   grep -v '^ *+' conftest.er1 >conftest.err
25635   rm -f conftest.er1
25636   cat conftest.err >&5
25637   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25638   (exit $ac_status); } && {
25639          test -z "$ac_c_werror_flag" ||
25640          test ! -s conftest.err
25641        } && test -s conftest.$ac_objext; then
25642   ac_hi=$ac_mid; break
25643 else
25644   $as_echo "$as_me: failed program was:" >&5
25645 sed 's/^/| /' conftest.$ac_ext >&5
25646
25647         ac_lo=`expr $ac_mid + 1`
25648                         if test $ac_lo -le $ac_mid; then
25649                           ac_lo= ac_hi=
25650                           break
25651                         fi
25652                         ac_mid=`expr 2 '*' $ac_mid + 1`
25653 fi
25654
25655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25656   done
25657 else
25658   $as_echo "$as_me: failed program was:" >&5
25659 sed 's/^/| /' conftest.$ac_ext >&5
25660
25661         cat >conftest.$ac_ext <<_ACEOF
25662 /* confdefs.h.  */
25663 _ACEOF
25664 cat confdefs.h >>conftest.$ac_ext
25665 cat >>conftest.$ac_ext <<_ACEOF
25666 /* end confdefs.h.  */
25667 $ac_includes_default
25668 #ifndef offsetof
25669 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25670 #endif
25671 typedef struct { char x; short y; } ac__type_alignof_;
25672 int
25673 main ()
25674 {
25675 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
25676 test_array [0] = 0
25677
25678   ;
25679   return 0;
25680 }
25681 _ACEOF
25682 rm -f conftest.$ac_objext
25683 if { (ac_try="$ac_compile"
25684 case "(($ac_try" in
25685   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25686   *) ac_try_echo=$ac_try;;
25687 esac
25688 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25689 $as_echo "$ac_try_echo") >&5
25690   (eval "$ac_compile") 2>conftest.er1
25691   ac_status=$?
25692   grep -v '^ *+' conftest.er1 >conftest.err
25693   rm -f conftest.er1
25694   cat conftest.err >&5
25695   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25696   (exit $ac_status); } && {
25697          test -z "$ac_c_werror_flag" ||
25698          test ! -s conftest.err
25699        } && test -s conftest.$ac_objext; then
25700   ac_hi=-1 ac_mid=-1
25701   while :; do
25702     cat >conftest.$ac_ext <<_ACEOF
25703 /* confdefs.h.  */
25704 _ACEOF
25705 cat confdefs.h >>conftest.$ac_ext
25706 cat >>conftest.$ac_ext <<_ACEOF
25707 /* end confdefs.h.  */
25708 $ac_includes_default
25709 #ifndef offsetof
25710 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25711 #endif
25712 typedef struct { char x; short y; } ac__type_alignof_;
25713 int
25714 main ()
25715 {
25716 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
25717 test_array [0] = 0
25718
25719   ;
25720   return 0;
25721 }
25722 _ACEOF
25723 rm -f conftest.$ac_objext
25724 if { (ac_try="$ac_compile"
25725 case "(($ac_try" in
25726   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25727   *) ac_try_echo=$ac_try;;
25728 esac
25729 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25730 $as_echo "$ac_try_echo") >&5
25731   (eval "$ac_compile") 2>conftest.er1
25732   ac_status=$?
25733   grep -v '^ *+' conftest.er1 >conftest.err
25734   rm -f conftest.er1
25735   cat conftest.err >&5
25736   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25737   (exit $ac_status); } && {
25738          test -z "$ac_c_werror_flag" ||
25739          test ! -s conftest.err
25740        } && test -s conftest.$ac_objext; then
25741   ac_lo=$ac_mid; break
25742 else
25743   $as_echo "$as_me: failed program was:" >&5
25744 sed 's/^/| /' conftest.$ac_ext >&5
25745
25746         ac_hi=`expr '(' $ac_mid ')' - 1`
25747                         if test $ac_mid -le $ac_hi; then
25748                           ac_lo= ac_hi=
25749                           break
25750                         fi
25751                         ac_mid=`expr 2 '*' $ac_mid`
25752 fi
25753
25754 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25755   done
25756 else
25757   $as_echo "$as_me: failed program was:" >&5
25758 sed 's/^/| /' conftest.$ac_ext >&5
25759
25760         ac_lo= ac_hi=
25761 fi
25762
25763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25764 fi
25765
25766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25767 # Binary search between lo and hi bounds.
25768 while test "x$ac_lo" != "x$ac_hi"; do
25769   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25770   cat >conftest.$ac_ext <<_ACEOF
25771 /* confdefs.h.  */
25772 _ACEOF
25773 cat confdefs.h >>conftest.$ac_ext
25774 cat >>conftest.$ac_ext <<_ACEOF
25775 /* end confdefs.h.  */
25776 $ac_includes_default
25777 #ifndef offsetof
25778 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25779 #endif
25780 typedef struct { char x; short y; } ac__type_alignof_;
25781 int
25782 main ()
25783 {
25784 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
25785 test_array [0] = 0
25786
25787   ;
25788   return 0;
25789 }
25790 _ACEOF
25791 rm -f conftest.$ac_objext
25792 if { (ac_try="$ac_compile"
25793 case "(($ac_try" in
25794   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25795   *) ac_try_echo=$ac_try;;
25796 esac
25797 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25798 $as_echo "$ac_try_echo") >&5
25799   (eval "$ac_compile") 2>conftest.er1
25800   ac_status=$?
25801   grep -v '^ *+' conftest.er1 >conftest.err
25802   rm -f conftest.er1
25803   cat conftest.err >&5
25804   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25805   (exit $ac_status); } && {
25806          test -z "$ac_c_werror_flag" ||
25807          test ! -s conftest.err
25808        } && test -s conftest.$ac_objext; then
25809   ac_hi=$ac_mid
25810 else
25811   $as_echo "$as_me: failed program was:" >&5
25812 sed 's/^/| /' conftest.$ac_ext >&5
25813
25814         ac_lo=`expr '(' $ac_mid ')' + 1`
25815 fi
25816
25817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25818 done
25819 case $ac_lo in
25820 ?*) ac_cv_alignof_short=$ac_lo;;
25821 '') if test "$ac_cv_type_short" = yes; then
25822      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25823 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25824 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of short
25825 See \`config.log' for more details." >&5
25826 $as_echo "$as_me: error: cannot compute alignment of short
25827 See \`config.log' for more details." >&2;}
25828    { (exit 77); exit 77; }; }; }
25829    else
25830      ac_cv_alignof_short=0
25831    fi ;;
25832 esac
25833 else
25834   cat >conftest.$ac_ext <<_ACEOF
25835 /* confdefs.h.  */
25836 _ACEOF
25837 cat confdefs.h >>conftest.$ac_ext
25838 cat >>conftest.$ac_ext <<_ACEOF
25839 /* end confdefs.h.  */
25840 $ac_includes_default
25841 #ifndef offsetof
25842 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25843 #endif
25844 typedef struct { char x; short y; } ac__type_alignof_;
25845 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
25846 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
25847 #include <stdio.h>
25848 #include <stdlib.h>
25849 int
25850 main ()
25851 {
25852
25853   FILE *f = fopen ("conftest.val", "w");
25854   if (! f)
25855     return 1;
25856   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
25857     {
25858       long int i = longval ();
25859       if (i != ((long int) offsetof (ac__type_alignof_, y)))
25860         return 1;
25861       fprintf (f, "%ld", i);
25862     }
25863   else
25864     {
25865       unsigned long int i = ulongval ();
25866       if (i != ((long int) offsetof (ac__type_alignof_, y)))
25867         return 1;
25868       fprintf (f, "%lu", i);
25869     }
25870   /* Do not output a trailing newline, as this causes \r\n confusion
25871      on some platforms.  */
25872   return ferror (f) || fclose (f) != 0;
25873
25874   ;
25875   return 0;
25876 }
25877 _ACEOF
25878 rm -f conftest$ac_exeext
25879 if { (ac_try="$ac_link"
25880 case "(($ac_try" in
25881   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25882   *) ac_try_echo=$ac_try;;
25883 esac
25884 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25885 $as_echo "$ac_try_echo") >&5
25886   (eval "$ac_link") 2>&5
25887   ac_status=$?
25888   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25889   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25890   { (case "(($ac_try" in
25891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25892   *) ac_try_echo=$ac_try;;
25893 esac
25894 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25895 $as_echo "$ac_try_echo") >&5
25896   (eval "$ac_try") 2>&5
25897   ac_status=$?
25898   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25899   (exit $ac_status); }; }; then
25900   ac_cv_alignof_short=`cat conftest.val`
25901 else
25902   $as_echo "$as_me: program exited with status $ac_status" >&5
25903 $as_echo "$as_me: failed program was:" >&5
25904 sed 's/^/| /' conftest.$ac_ext >&5
25905
25906 ( exit $ac_status )
25907 if test "$ac_cv_type_short" = yes; then
25908      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25909 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25910 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of short
25911 See \`config.log' for more details." >&5
25912 $as_echo "$as_me: error: cannot compute alignment of short
25913 See \`config.log' for more details." >&2;}
25914    { (exit 77); exit 77; }; }; }
25915    else
25916      ac_cv_alignof_short=0
25917    fi
25918 fi
25919 rm -rf conftest.dSYM
25920 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25921 fi
25922 rm -f conftest.val
25923 fi
25924 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_short" >&5
25925 $as_echo "$ac_cv_alignof_short" >&6; }
25926
25927
25928
25929 cat >>confdefs.h <<_ACEOF
25930 #define ALIGNOF_SHORT $ac_cv_alignof_short
25931 _ACEOF
25932
25933
25934 # The cast to long int works around a bug in the HP C Compiler,
25935 # see AC_CHECK_SIZEOF for more information.
25936 { $as_echo "$as_me:$LINENO: checking alignment of int" >&5
25937 $as_echo_n "checking alignment of int... " >&6; }
25938 if test "${ac_cv_alignof_int+set}" = set; then
25939   $as_echo_n "(cached) " >&6
25940 else
25941   if test "$cross_compiling" = yes; then
25942   # Depending upon the size, compute the lo and hi bounds.
25943 cat >conftest.$ac_ext <<_ACEOF
25944 /* confdefs.h.  */
25945 _ACEOF
25946 cat confdefs.h >>conftest.$ac_ext
25947 cat >>conftest.$ac_ext <<_ACEOF
25948 /* end confdefs.h.  */
25949 $ac_includes_default
25950 #ifndef offsetof
25951 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25952 #endif
25953 typedef struct { char x; int y; } ac__type_alignof_;
25954 int
25955 main ()
25956 {
25957 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
25958 test_array [0] = 0
25959
25960   ;
25961   return 0;
25962 }
25963 _ACEOF
25964 rm -f conftest.$ac_objext
25965 if { (ac_try="$ac_compile"
25966 case "(($ac_try" in
25967   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25968   *) ac_try_echo=$ac_try;;
25969 esac
25970 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25971 $as_echo "$ac_try_echo") >&5
25972   (eval "$ac_compile") 2>conftest.er1
25973   ac_status=$?
25974   grep -v '^ *+' conftest.er1 >conftest.err
25975   rm -f conftest.er1
25976   cat conftest.err >&5
25977   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25978   (exit $ac_status); } && {
25979          test -z "$ac_c_werror_flag" ||
25980          test ! -s conftest.err
25981        } && test -s conftest.$ac_objext; then
25982   ac_lo=0 ac_mid=0
25983   while :; do
25984     cat >conftest.$ac_ext <<_ACEOF
25985 /* confdefs.h.  */
25986 _ACEOF
25987 cat confdefs.h >>conftest.$ac_ext
25988 cat >>conftest.$ac_ext <<_ACEOF
25989 /* end confdefs.h.  */
25990 $ac_includes_default
25991 #ifndef offsetof
25992 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
25993 #endif
25994 typedef struct { char x; int y; } ac__type_alignof_;
25995 int
25996 main ()
25997 {
25998 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
25999 test_array [0] = 0
26000
26001   ;
26002   return 0;
26003 }
26004 _ACEOF
26005 rm -f conftest.$ac_objext
26006 if { (ac_try="$ac_compile"
26007 case "(($ac_try" in
26008   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26009   *) ac_try_echo=$ac_try;;
26010 esac
26011 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26012 $as_echo "$ac_try_echo") >&5
26013   (eval "$ac_compile") 2>conftest.er1
26014   ac_status=$?
26015   grep -v '^ *+' conftest.er1 >conftest.err
26016   rm -f conftest.er1
26017   cat conftest.err >&5
26018   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26019   (exit $ac_status); } && {
26020          test -z "$ac_c_werror_flag" ||
26021          test ! -s conftest.err
26022        } && test -s conftest.$ac_objext; then
26023   ac_hi=$ac_mid; break
26024 else
26025   $as_echo "$as_me: failed program was:" >&5
26026 sed 's/^/| /' conftest.$ac_ext >&5
26027
26028         ac_lo=`expr $ac_mid + 1`
26029                         if test $ac_lo -le $ac_mid; then
26030                           ac_lo= ac_hi=
26031                           break
26032                         fi
26033                         ac_mid=`expr 2 '*' $ac_mid + 1`
26034 fi
26035
26036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26037   done
26038 else
26039   $as_echo "$as_me: failed program was:" >&5
26040 sed 's/^/| /' conftest.$ac_ext >&5
26041
26042         cat >conftest.$ac_ext <<_ACEOF
26043 /* confdefs.h.  */
26044 _ACEOF
26045 cat confdefs.h >>conftest.$ac_ext
26046 cat >>conftest.$ac_ext <<_ACEOF
26047 /* end confdefs.h.  */
26048 $ac_includes_default
26049 #ifndef offsetof
26050 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26051 #endif
26052 typedef struct { char x; int y; } ac__type_alignof_;
26053 int
26054 main ()
26055 {
26056 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
26057 test_array [0] = 0
26058
26059   ;
26060   return 0;
26061 }
26062 _ACEOF
26063 rm -f conftest.$ac_objext
26064 if { (ac_try="$ac_compile"
26065 case "(($ac_try" in
26066   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26067   *) ac_try_echo=$ac_try;;
26068 esac
26069 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26070 $as_echo "$ac_try_echo") >&5
26071   (eval "$ac_compile") 2>conftest.er1
26072   ac_status=$?
26073   grep -v '^ *+' conftest.er1 >conftest.err
26074   rm -f conftest.er1
26075   cat conftest.err >&5
26076   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26077   (exit $ac_status); } && {
26078          test -z "$ac_c_werror_flag" ||
26079          test ! -s conftest.err
26080        } && test -s conftest.$ac_objext; then
26081   ac_hi=-1 ac_mid=-1
26082   while :; do
26083     cat >conftest.$ac_ext <<_ACEOF
26084 /* confdefs.h.  */
26085 _ACEOF
26086 cat confdefs.h >>conftest.$ac_ext
26087 cat >>conftest.$ac_ext <<_ACEOF
26088 /* end confdefs.h.  */
26089 $ac_includes_default
26090 #ifndef offsetof
26091 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26092 #endif
26093 typedef struct { char x; int y; } ac__type_alignof_;
26094 int
26095 main ()
26096 {
26097 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
26098 test_array [0] = 0
26099
26100   ;
26101   return 0;
26102 }
26103 _ACEOF
26104 rm -f conftest.$ac_objext
26105 if { (ac_try="$ac_compile"
26106 case "(($ac_try" in
26107   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26108   *) ac_try_echo=$ac_try;;
26109 esac
26110 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26111 $as_echo "$ac_try_echo") >&5
26112   (eval "$ac_compile") 2>conftest.er1
26113   ac_status=$?
26114   grep -v '^ *+' conftest.er1 >conftest.err
26115   rm -f conftest.er1
26116   cat conftest.err >&5
26117   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26118   (exit $ac_status); } && {
26119          test -z "$ac_c_werror_flag" ||
26120          test ! -s conftest.err
26121        } && test -s conftest.$ac_objext; then
26122   ac_lo=$ac_mid; break
26123 else
26124   $as_echo "$as_me: failed program was:" >&5
26125 sed 's/^/| /' conftest.$ac_ext >&5
26126
26127         ac_hi=`expr '(' $ac_mid ')' - 1`
26128                         if test $ac_mid -le $ac_hi; then
26129                           ac_lo= ac_hi=
26130                           break
26131                         fi
26132                         ac_mid=`expr 2 '*' $ac_mid`
26133 fi
26134
26135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26136   done
26137 else
26138   $as_echo "$as_me: failed program was:" >&5
26139 sed 's/^/| /' conftest.$ac_ext >&5
26140
26141         ac_lo= ac_hi=
26142 fi
26143
26144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26145 fi
26146
26147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26148 # Binary search between lo and hi bounds.
26149 while test "x$ac_lo" != "x$ac_hi"; do
26150   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26151   cat >conftest.$ac_ext <<_ACEOF
26152 /* confdefs.h.  */
26153 _ACEOF
26154 cat confdefs.h >>conftest.$ac_ext
26155 cat >>conftest.$ac_ext <<_ACEOF
26156 /* end confdefs.h.  */
26157 $ac_includes_default
26158 #ifndef offsetof
26159 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26160 #endif
26161 typedef struct { char x; int y; } ac__type_alignof_;
26162 int
26163 main ()
26164 {
26165 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26166 test_array [0] = 0
26167
26168   ;
26169   return 0;
26170 }
26171 _ACEOF
26172 rm -f conftest.$ac_objext
26173 if { (ac_try="$ac_compile"
26174 case "(($ac_try" in
26175   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26176   *) ac_try_echo=$ac_try;;
26177 esac
26178 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26179 $as_echo "$ac_try_echo") >&5
26180   (eval "$ac_compile") 2>conftest.er1
26181   ac_status=$?
26182   grep -v '^ *+' conftest.er1 >conftest.err
26183   rm -f conftest.er1
26184   cat conftest.err >&5
26185   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26186   (exit $ac_status); } && {
26187          test -z "$ac_c_werror_flag" ||
26188          test ! -s conftest.err
26189        } && test -s conftest.$ac_objext; then
26190   ac_hi=$ac_mid
26191 else
26192   $as_echo "$as_me: failed program was:" >&5
26193 sed 's/^/| /' conftest.$ac_ext >&5
26194
26195         ac_lo=`expr '(' $ac_mid ')' + 1`
26196 fi
26197
26198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26199 done
26200 case $ac_lo in
26201 ?*) ac_cv_alignof_int=$ac_lo;;
26202 '') if test "$ac_cv_type_int" = yes; then
26203      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26204 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26205 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of int
26206 See \`config.log' for more details." >&5
26207 $as_echo "$as_me: error: cannot compute alignment of int
26208 See \`config.log' for more details." >&2;}
26209    { (exit 77); exit 77; }; }; }
26210    else
26211      ac_cv_alignof_int=0
26212    fi ;;
26213 esac
26214 else
26215   cat >conftest.$ac_ext <<_ACEOF
26216 /* confdefs.h.  */
26217 _ACEOF
26218 cat confdefs.h >>conftest.$ac_ext
26219 cat >>conftest.$ac_ext <<_ACEOF
26220 /* end confdefs.h.  */
26221 $ac_includes_default
26222 #ifndef offsetof
26223 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26224 #endif
26225 typedef struct { char x; int y; } ac__type_alignof_;
26226 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
26227 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
26228 #include <stdio.h>
26229 #include <stdlib.h>
26230 int
26231 main ()
26232 {
26233
26234   FILE *f = fopen ("conftest.val", "w");
26235   if (! f)
26236     return 1;
26237   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
26238     {
26239       long int i = longval ();
26240       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26241         return 1;
26242       fprintf (f, "%ld", i);
26243     }
26244   else
26245     {
26246       unsigned long int i = ulongval ();
26247       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26248         return 1;
26249       fprintf (f, "%lu", i);
26250     }
26251   /* Do not output a trailing newline, as this causes \r\n confusion
26252      on some platforms.  */
26253   return ferror (f) || fclose (f) != 0;
26254
26255   ;
26256   return 0;
26257 }
26258 _ACEOF
26259 rm -f conftest$ac_exeext
26260 if { (ac_try="$ac_link"
26261 case "(($ac_try" in
26262   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26263   *) ac_try_echo=$ac_try;;
26264 esac
26265 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26266 $as_echo "$ac_try_echo") >&5
26267   (eval "$ac_link") 2>&5
26268   ac_status=$?
26269   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26270   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26271   { (case "(($ac_try" in
26272   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26273   *) ac_try_echo=$ac_try;;
26274 esac
26275 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26276 $as_echo "$ac_try_echo") >&5
26277   (eval "$ac_try") 2>&5
26278   ac_status=$?
26279   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26280   (exit $ac_status); }; }; then
26281   ac_cv_alignof_int=`cat conftest.val`
26282 else
26283   $as_echo "$as_me: program exited with status $ac_status" >&5
26284 $as_echo "$as_me: failed program was:" >&5
26285 sed 's/^/| /' conftest.$ac_ext >&5
26286
26287 ( exit $ac_status )
26288 if test "$ac_cv_type_int" = yes; then
26289      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26290 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26291 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of int
26292 See \`config.log' for more details." >&5
26293 $as_echo "$as_me: error: cannot compute alignment of int
26294 See \`config.log' for more details." >&2;}
26295    { (exit 77); exit 77; }; }; }
26296    else
26297      ac_cv_alignof_int=0
26298    fi
26299 fi
26300 rm -rf conftest.dSYM
26301 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26302 fi
26303 rm -f conftest.val
26304 fi
26305 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_int" >&5
26306 $as_echo "$ac_cv_alignof_int" >&6; }
26307
26308
26309
26310 cat >>confdefs.h <<_ACEOF
26311 #define ALIGNOF_INT $ac_cv_alignof_int
26312 _ACEOF
26313
26314
26315 # The cast to long int works around a bug in the HP C Compiler,
26316 # see AC_CHECK_SIZEOF for more information.
26317 { $as_echo "$as_me:$LINENO: checking alignment of long" >&5
26318 $as_echo_n "checking alignment of long... " >&6; }
26319 if test "${ac_cv_alignof_long+set}" = set; then
26320   $as_echo_n "(cached) " >&6
26321 else
26322   if test "$cross_compiling" = yes; then
26323   # Depending upon the size, compute the lo and hi bounds.
26324 cat >conftest.$ac_ext <<_ACEOF
26325 /* confdefs.h.  */
26326 _ACEOF
26327 cat confdefs.h >>conftest.$ac_ext
26328 cat >>conftest.$ac_ext <<_ACEOF
26329 /* end confdefs.h.  */
26330 $ac_includes_default
26331 #ifndef offsetof
26332 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26333 #endif
26334 typedef struct { char x; long y; } ac__type_alignof_;
26335 int
26336 main ()
26337 {
26338 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
26339 test_array [0] = 0
26340
26341   ;
26342   return 0;
26343 }
26344 _ACEOF
26345 rm -f conftest.$ac_objext
26346 if { (ac_try="$ac_compile"
26347 case "(($ac_try" in
26348   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26349   *) ac_try_echo=$ac_try;;
26350 esac
26351 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26352 $as_echo "$ac_try_echo") >&5
26353   (eval "$ac_compile") 2>conftest.er1
26354   ac_status=$?
26355   grep -v '^ *+' conftest.er1 >conftest.err
26356   rm -f conftest.er1
26357   cat conftest.err >&5
26358   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26359   (exit $ac_status); } && {
26360          test -z "$ac_c_werror_flag" ||
26361          test ! -s conftest.err
26362        } && test -s conftest.$ac_objext; then
26363   ac_lo=0 ac_mid=0
26364   while :; do
26365     cat >conftest.$ac_ext <<_ACEOF
26366 /* confdefs.h.  */
26367 _ACEOF
26368 cat confdefs.h >>conftest.$ac_ext
26369 cat >>conftest.$ac_ext <<_ACEOF
26370 /* end confdefs.h.  */
26371 $ac_includes_default
26372 #ifndef offsetof
26373 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26374 #endif
26375 typedef struct { char x; long y; } ac__type_alignof_;
26376 int
26377 main ()
26378 {
26379 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26380 test_array [0] = 0
26381
26382   ;
26383   return 0;
26384 }
26385 _ACEOF
26386 rm -f conftest.$ac_objext
26387 if { (ac_try="$ac_compile"
26388 case "(($ac_try" in
26389   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26390   *) ac_try_echo=$ac_try;;
26391 esac
26392 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26393 $as_echo "$ac_try_echo") >&5
26394   (eval "$ac_compile") 2>conftest.er1
26395   ac_status=$?
26396   grep -v '^ *+' conftest.er1 >conftest.err
26397   rm -f conftest.er1
26398   cat conftest.err >&5
26399   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26400   (exit $ac_status); } && {
26401          test -z "$ac_c_werror_flag" ||
26402          test ! -s conftest.err
26403        } && test -s conftest.$ac_objext; then
26404   ac_hi=$ac_mid; break
26405 else
26406   $as_echo "$as_me: failed program was:" >&5
26407 sed 's/^/| /' conftest.$ac_ext >&5
26408
26409         ac_lo=`expr $ac_mid + 1`
26410                         if test $ac_lo -le $ac_mid; then
26411                           ac_lo= ac_hi=
26412                           break
26413                         fi
26414                         ac_mid=`expr 2 '*' $ac_mid + 1`
26415 fi
26416
26417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26418   done
26419 else
26420   $as_echo "$as_me: failed program was:" >&5
26421 sed 's/^/| /' conftest.$ac_ext >&5
26422
26423         cat >conftest.$ac_ext <<_ACEOF
26424 /* confdefs.h.  */
26425 _ACEOF
26426 cat confdefs.h >>conftest.$ac_ext
26427 cat >>conftest.$ac_ext <<_ACEOF
26428 /* end confdefs.h.  */
26429 $ac_includes_default
26430 #ifndef offsetof
26431 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26432 #endif
26433 typedef struct { char x; long y; } ac__type_alignof_;
26434 int
26435 main ()
26436 {
26437 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
26438 test_array [0] = 0
26439
26440   ;
26441   return 0;
26442 }
26443 _ACEOF
26444 rm -f conftest.$ac_objext
26445 if { (ac_try="$ac_compile"
26446 case "(($ac_try" in
26447   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26448   *) ac_try_echo=$ac_try;;
26449 esac
26450 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26451 $as_echo "$ac_try_echo") >&5
26452   (eval "$ac_compile") 2>conftest.er1
26453   ac_status=$?
26454   grep -v '^ *+' conftest.er1 >conftest.err
26455   rm -f conftest.er1
26456   cat conftest.err >&5
26457   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26458   (exit $ac_status); } && {
26459          test -z "$ac_c_werror_flag" ||
26460          test ! -s conftest.err
26461        } && test -s conftest.$ac_objext; then
26462   ac_hi=-1 ac_mid=-1
26463   while :; do
26464     cat >conftest.$ac_ext <<_ACEOF
26465 /* confdefs.h.  */
26466 _ACEOF
26467 cat confdefs.h >>conftest.$ac_ext
26468 cat >>conftest.$ac_ext <<_ACEOF
26469 /* end confdefs.h.  */
26470 $ac_includes_default
26471 #ifndef offsetof
26472 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26473 #endif
26474 typedef struct { char x; long y; } ac__type_alignof_;
26475 int
26476 main ()
26477 {
26478 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
26479 test_array [0] = 0
26480
26481   ;
26482   return 0;
26483 }
26484 _ACEOF
26485 rm -f conftest.$ac_objext
26486 if { (ac_try="$ac_compile"
26487 case "(($ac_try" in
26488   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26489   *) ac_try_echo=$ac_try;;
26490 esac
26491 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26492 $as_echo "$ac_try_echo") >&5
26493   (eval "$ac_compile") 2>conftest.er1
26494   ac_status=$?
26495   grep -v '^ *+' conftest.er1 >conftest.err
26496   rm -f conftest.er1
26497   cat conftest.err >&5
26498   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26499   (exit $ac_status); } && {
26500          test -z "$ac_c_werror_flag" ||
26501          test ! -s conftest.err
26502        } && test -s conftest.$ac_objext; then
26503   ac_lo=$ac_mid; break
26504 else
26505   $as_echo "$as_me: failed program was:" >&5
26506 sed 's/^/| /' conftest.$ac_ext >&5
26507
26508         ac_hi=`expr '(' $ac_mid ')' - 1`
26509                         if test $ac_mid -le $ac_hi; then
26510                           ac_lo= ac_hi=
26511                           break
26512                         fi
26513                         ac_mid=`expr 2 '*' $ac_mid`
26514 fi
26515
26516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26517   done
26518 else
26519   $as_echo "$as_me: failed program was:" >&5
26520 sed 's/^/| /' conftest.$ac_ext >&5
26521
26522         ac_lo= ac_hi=
26523 fi
26524
26525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26526 fi
26527
26528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26529 # Binary search between lo and hi bounds.
26530 while test "x$ac_lo" != "x$ac_hi"; do
26531   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26532   cat >conftest.$ac_ext <<_ACEOF
26533 /* confdefs.h.  */
26534 _ACEOF
26535 cat confdefs.h >>conftest.$ac_ext
26536 cat >>conftest.$ac_ext <<_ACEOF
26537 /* end confdefs.h.  */
26538 $ac_includes_default
26539 #ifndef offsetof
26540 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26541 #endif
26542 typedef struct { char x; long y; } ac__type_alignof_;
26543 int
26544 main ()
26545 {
26546 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26547 test_array [0] = 0
26548
26549   ;
26550   return 0;
26551 }
26552 _ACEOF
26553 rm -f conftest.$ac_objext
26554 if { (ac_try="$ac_compile"
26555 case "(($ac_try" in
26556   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26557   *) ac_try_echo=$ac_try;;
26558 esac
26559 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26560 $as_echo "$ac_try_echo") >&5
26561   (eval "$ac_compile") 2>conftest.er1
26562   ac_status=$?
26563   grep -v '^ *+' conftest.er1 >conftest.err
26564   rm -f conftest.er1
26565   cat conftest.err >&5
26566   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26567   (exit $ac_status); } && {
26568          test -z "$ac_c_werror_flag" ||
26569          test ! -s conftest.err
26570        } && test -s conftest.$ac_objext; then
26571   ac_hi=$ac_mid
26572 else
26573   $as_echo "$as_me: failed program was:" >&5
26574 sed 's/^/| /' conftest.$ac_ext >&5
26575
26576         ac_lo=`expr '(' $ac_mid ')' + 1`
26577 fi
26578
26579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26580 done
26581 case $ac_lo in
26582 ?*) ac_cv_alignof_long=$ac_lo;;
26583 '') if test "$ac_cv_type_long" = yes; then
26584      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26585 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26586 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long
26587 See \`config.log' for more details." >&5
26588 $as_echo "$as_me: error: cannot compute alignment of long
26589 See \`config.log' for more details." >&2;}
26590    { (exit 77); exit 77; }; }; }
26591    else
26592      ac_cv_alignof_long=0
26593    fi ;;
26594 esac
26595 else
26596   cat >conftest.$ac_ext <<_ACEOF
26597 /* confdefs.h.  */
26598 _ACEOF
26599 cat confdefs.h >>conftest.$ac_ext
26600 cat >>conftest.$ac_ext <<_ACEOF
26601 /* end confdefs.h.  */
26602 $ac_includes_default
26603 #ifndef offsetof
26604 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26605 #endif
26606 typedef struct { char x; long y; } ac__type_alignof_;
26607 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
26608 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
26609 #include <stdio.h>
26610 #include <stdlib.h>
26611 int
26612 main ()
26613 {
26614
26615   FILE *f = fopen ("conftest.val", "w");
26616   if (! f)
26617     return 1;
26618   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
26619     {
26620       long int i = longval ();
26621       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26622         return 1;
26623       fprintf (f, "%ld", i);
26624     }
26625   else
26626     {
26627       unsigned long int i = ulongval ();
26628       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26629         return 1;
26630       fprintf (f, "%lu", i);
26631     }
26632   /* Do not output a trailing newline, as this causes \r\n confusion
26633      on some platforms.  */
26634   return ferror (f) || fclose (f) != 0;
26635
26636   ;
26637   return 0;
26638 }
26639 _ACEOF
26640 rm -f conftest$ac_exeext
26641 if { (ac_try="$ac_link"
26642 case "(($ac_try" in
26643   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26644   *) ac_try_echo=$ac_try;;
26645 esac
26646 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26647 $as_echo "$ac_try_echo") >&5
26648   (eval "$ac_link") 2>&5
26649   ac_status=$?
26650   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26651   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26652   { (case "(($ac_try" in
26653   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26654   *) ac_try_echo=$ac_try;;
26655 esac
26656 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26657 $as_echo "$ac_try_echo") >&5
26658   (eval "$ac_try") 2>&5
26659   ac_status=$?
26660   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26661   (exit $ac_status); }; }; then
26662   ac_cv_alignof_long=`cat conftest.val`
26663 else
26664   $as_echo "$as_me: program exited with status $ac_status" >&5
26665 $as_echo "$as_me: failed program was:" >&5
26666 sed 's/^/| /' conftest.$ac_ext >&5
26667
26668 ( exit $ac_status )
26669 if test "$ac_cv_type_long" = yes; then
26670      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26671 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26672 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long
26673 See \`config.log' for more details." >&5
26674 $as_echo "$as_me: error: cannot compute alignment of long
26675 See \`config.log' for more details." >&2;}
26676    { (exit 77); exit 77; }; }; }
26677    else
26678      ac_cv_alignof_long=0
26679    fi
26680 fi
26681 rm -rf conftest.dSYM
26682 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26683 fi
26684 rm -f conftest.val
26685 fi
26686 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_long" >&5
26687 $as_echo "$ac_cv_alignof_long" >&6; }
26688
26689
26690
26691 cat >>confdefs.h <<_ACEOF
26692 #define ALIGNOF_LONG $ac_cv_alignof_long
26693 _ACEOF
26694
26695
26696 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
26697   # The cast to long int works around a bug in the HP C Compiler,
26698 # see AC_CHECK_SIZEOF for more information.
26699 { $as_echo "$as_me:$LINENO: checking alignment of long long int" >&5
26700 $as_echo_n "checking alignment of long long int... " >&6; }
26701 if test "${ac_cv_alignof_long_long_int+set}" = set; then
26702   $as_echo_n "(cached) " >&6
26703 else
26704   if test "$cross_compiling" = yes; then
26705   # Depending upon the size, compute the lo and hi bounds.
26706 cat >conftest.$ac_ext <<_ACEOF
26707 /* confdefs.h.  */
26708 _ACEOF
26709 cat confdefs.h >>conftest.$ac_ext
26710 cat >>conftest.$ac_ext <<_ACEOF
26711 /* end confdefs.h.  */
26712 $ac_includes_default
26713 #ifndef offsetof
26714 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26715 #endif
26716 typedef struct { char x; long long int y; } ac__type_alignof_;
26717 int
26718 main ()
26719 {
26720 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
26721 test_array [0] = 0
26722
26723   ;
26724   return 0;
26725 }
26726 _ACEOF
26727 rm -f conftest.$ac_objext
26728 if { (ac_try="$ac_compile"
26729 case "(($ac_try" in
26730   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26731   *) ac_try_echo=$ac_try;;
26732 esac
26733 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26734 $as_echo "$ac_try_echo") >&5
26735   (eval "$ac_compile") 2>conftest.er1
26736   ac_status=$?
26737   grep -v '^ *+' conftest.er1 >conftest.err
26738   rm -f conftest.er1
26739   cat conftest.err >&5
26740   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26741   (exit $ac_status); } && {
26742          test -z "$ac_c_werror_flag" ||
26743          test ! -s conftest.err
26744        } && test -s conftest.$ac_objext; then
26745   ac_lo=0 ac_mid=0
26746   while :; do
26747     cat >conftest.$ac_ext <<_ACEOF
26748 /* confdefs.h.  */
26749 _ACEOF
26750 cat confdefs.h >>conftest.$ac_ext
26751 cat >>conftest.$ac_ext <<_ACEOF
26752 /* end confdefs.h.  */
26753 $ac_includes_default
26754 #ifndef offsetof
26755 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26756 #endif
26757 typedef struct { char x; long long int y; } ac__type_alignof_;
26758 int
26759 main ()
26760 {
26761 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26762 test_array [0] = 0
26763
26764   ;
26765   return 0;
26766 }
26767 _ACEOF
26768 rm -f conftest.$ac_objext
26769 if { (ac_try="$ac_compile"
26770 case "(($ac_try" in
26771   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26772   *) ac_try_echo=$ac_try;;
26773 esac
26774 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26775 $as_echo "$ac_try_echo") >&5
26776   (eval "$ac_compile") 2>conftest.er1
26777   ac_status=$?
26778   grep -v '^ *+' conftest.er1 >conftest.err
26779   rm -f conftest.er1
26780   cat conftest.err >&5
26781   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26782   (exit $ac_status); } && {
26783          test -z "$ac_c_werror_flag" ||
26784          test ! -s conftest.err
26785        } && test -s conftest.$ac_objext; then
26786   ac_hi=$ac_mid; break
26787 else
26788   $as_echo "$as_me: failed program was:" >&5
26789 sed 's/^/| /' conftest.$ac_ext >&5
26790
26791         ac_lo=`expr $ac_mid + 1`
26792                         if test $ac_lo -le $ac_mid; then
26793                           ac_lo= ac_hi=
26794                           break
26795                         fi
26796                         ac_mid=`expr 2 '*' $ac_mid + 1`
26797 fi
26798
26799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26800   done
26801 else
26802   $as_echo "$as_me: failed program was:" >&5
26803 sed 's/^/| /' conftest.$ac_ext >&5
26804
26805         cat >conftest.$ac_ext <<_ACEOF
26806 /* confdefs.h.  */
26807 _ACEOF
26808 cat confdefs.h >>conftest.$ac_ext
26809 cat >>conftest.$ac_ext <<_ACEOF
26810 /* end confdefs.h.  */
26811 $ac_includes_default
26812 #ifndef offsetof
26813 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26814 #endif
26815 typedef struct { char x; long long int y; } ac__type_alignof_;
26816 int
26817 main ()
26818 {
26819 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
26820 test_array [0] = 0
26821
26822   ;
26823   return 0;
26824 }
26825 _ACEOF
26826 rm -f conftest.$ac_objext
26827 if { (ac_try="$ac_compile"
26828 case "(($ac_try" in
26829   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26830   *) ac_try_echo=$ac_try;;
26831 esac
26832 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26833 $as_echo "$ac_try_echo") >&5
26834   (eval "$ac_compile") 2>conftest.er1
26835   ac_status=$?
26836   grep -v '^ *+' conftest.er1 >conftest.err
26837   rm -f conftest.er1
26838   cat conftest.err >&5
26839   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26840   (exit $ac_status); } && {
26841          test -z "$ac_c_werror_flag" ||
26842          test ! -s conftest.err
26843        } && test -s conftest.$ac_objext; then
26844   ac_hi=-1 ac_mid=-1
26845   while :; do
26846     cat >conftest.$ac_ext <<_ACEOF
26847 /* confdefs.h.  */
26848 _ACEOF
26849 cat confdefs.h >>conftest.$ac_ext
26850 cat >>conftest.$ac_ext <<_ACEOF
26851 /* end confdefs.h.  */
26852 $ac_includes_default
26853 #ifndef offsetof
26854 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26855 #endif
26856 typedef struct { char x; long long int y; } ac__type_alignof_;
26857 int
26858 main ()
26859 {
26860 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
26861 test_array [0] = 0
26862
26863   ;
26864   return 0;
26865 }
26866 _ACEOF
26867 rm -f conftest.$ac_objext
26868 if { (ac_try="$ac_compile"
26869 case "(($ac_try" in
26870   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26871   *) ac_try_echo=$ac_try;;
26872 esac
26873 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26874 $as_echo "$ac_try_echo") >&5
26875   (eval "$ac_compile") 2>conftest.er1
26876   ac_status=$?
26877   grep -v '^ *+' conftest.er1 >conftest.err
26878   rm -f conftest.er1
26879   cat conftest.err >&5
26880   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26881   (exit $ac_status); } && {
26882          test -z "$ac_c_werror_flag" ||
26883          test ! -s conftest.err
26884        } && test -s conftest.$ac_objext; then
26885   ac_lo=$ac_mid; break
26886 else
26887   $as_echo "$as_me: failed program was:" >&5
26888 sed 's/^/| /' conftest.$ac_ext >&5
26889
26890         ac_hi=`expr '(' $ac_mid ')' - 1`
26891                         if test $ac_mid -le $ac_hi; then
26892                           ac_lo= ac_hi=
26893                           break
26894                         fi
26895                         ac_mid=`expr 2 '*' $ac_mid`
26896 fi
26897
26898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26899   done
26900 else
26901   $as_echo "$as_me: failed program was:" >&5
26902 sed 's/^/| /' conftest.$ac_ext >&5
26903
26904         ac_lo= ac_hi=
26905 fi
26906
26907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26908 fi
26909
26910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26911 # Binary search between lo and hi bounds.
26912 while test "x$ac_lo" != "x$ac_hi"; do
26913   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26914   cat >conftest.$ac_ext <<_ACEOF
26915 /* confdefs.h.  */
26916 _ACEOF
26917 cat confdefs.h >>conftest.$ac_ext
26918 cat >>conftest.$ac_ext <<_ACEOF
26919 /* end confdefs.h.  */
26920 $ac_includes_default
26921 #ifndef offsetof
26922 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26923 #endif
26924 typedef struct { char x; long long int y; } ac__type_alignof_;
26925 int
26926 main ()
26927 {
26928 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26929 test_array [0] = 0
26930
26931   ;
26932   return 0;
26933 }
26934 _ACEOF
26935 rm -f conftest.$ac_objext
26936 if { (ac_try="$ac_compile"
26937 case "(($ac_try" in
26938   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26939   *) ac_try_echo=$ac_try;;
26940 esac
26941 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26942 $as_echo "$ac_try_echo") >&5
26943   (eval "$ac_compile") 2>conftest.er1
26944   ac_status=$?
26945   grep -v '^ *+' conftest.er1 >conftest.err
26946   rm -f conftest.er1
26947   cat conftest.err >&5
26948   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26949   (exit $ac_status); } && {
26950          test -z "$ac_c_werror_flag" ||
26951          test ! -s conftest.err
26952        } && test -s conftest.$ac_objext; then
26953   ac_hi=$ac_mid
26954 else
26955   $as_echo "$as_me: failed program was:" >&5
26956 sed 's/^/| /' conftest.$ac_ext >&5
26957
26958         ac_lo=`expr '(' $ac_mid ')' + 1`
26959 fi
26960
26961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26962 done
26963 case $ac_lo in
26964 ?*) ac_cv_alignof_long_long_int=$ac_lo;;
26965 '') if test "$ac_cv_type_long_long_int" = yes; then
26966      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26967 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26968 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long long int
26969 See \`config.log' for more details." >&5
26970 $as_echo "$as_me: error: cannot compute alignment of long long int
26971 See \`config.log' for more details." >&2;}
26972    { (exit 77); exit 77; }; }; }
26973    else
26974      ac_cv_alignof_long_long_int=0
26975    fi ;;
26976 esac
26977 else
26978   cat >conftest.$ac_ext <<_ACEOF
26979 /* confdefs.h.  */
26980 _ACEOF
26981 cat confdefs.h >>conftest.$ac_ext
26982 cat >>conftest.$ac_ext <<_ACEOF
26983 /* end confdefs.h.  */
26984 $ac_includes_default
26985 #ifndef offsetof
26986 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26987 #endif
26988 typedef struct { char x; long long int y; } ac__type_alignof_;
26989 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
26990 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
26991 #include <stdio.h>
26992 #include <stdlib.h>
26993 int
26994 main ()
26995 {
26996
26997   FILE *f = fopen ("conftest.val", "w");
26998   if (! f)
26999     return 1;
27000   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
27001     {
27002       long int i = longval ();
27003       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27004         return 1;
27005       fprintf (f, "%ld", i);
27006     }
27007   else
27008     {
27009       unsigned long int i = ulongval ();
27010       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27011         return 1;
27012       fprintf (f, "%lu", i);
27013     }
27014   /* Do not output a trailing newline, as this causes \r\n confusion
27015      on some platforms.  */
27016   return ferror (f) || fclose (f) != 0;
27017
27018   ;
27019   return 0;
27020 }
27021 _ACEOF
27022 rm -f conftest$ac_exeext
27023 if { (ac_try="$ac_link"
27024 case "(($ac_try" in
27025   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27026   *) ac_try_echo=$ac_try;;
27027 esac
27028 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27029 $as_echo "$ac_try_echo") >&5
27030   (eval "$ac_link") 2>&5
27031   ac_status=$?
27032   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27033   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27034   { (case "(($ac_try" in
27035   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27036   *) ac_try_echo=$ac_try;;
27037 esac
27038 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27039 $as_echo "$ac_try_echo") >&5
27040   (eval "$ac_try") 2>&5
27041   ac_status=$?
27042   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27043   (exit $ac_status); }; }; then
27044   ac_cv_alignof_long_long_int=`cat conftest.val`
27045 else
27046   $as_echo "$as_me: program exited with status $ac_status" >&5
27047 $as_echo "$as_me: failed program was:" >&5
27048 sed 's/^/| /' conftest.$ac_ext >&5
27049
27050 ( exit $ac_status )
27051 if test "$ac_cv_type_long_long_int" = yes; then
27052      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27053 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27054 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long long int
27055 See \`config.log' for more details." >&5
27056 $as_echo "$as_me: error: cannot compute alignment of long long int
27057 See \`config.log' for more details." >&2;}
27058    { (exit 77); exit 77; }; }; }
27059    else
27060      ac_cv_alignof_long_long_int=0
27061    fi
27062 fi
27063 rm -rf conftest.dSYM
27064 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27065 fi
27066 rm -f conftest.val
27067 fi
27068 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_long_long_int" >&5
27069 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
27070
27071
27072
27073 cat >>confdefs.h <<_ACEOF
27074 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
27075 _ACEOF
27076
27077
27078 fi
27079 # The cast to long int works around a bug in the HP C Compiler,
27080 # see AC_CHECK_SIZEOF for more information.
27081 { $as_echo "$as_me:$LINENO: checking alignment of double" >&5
27082 $as_echo_n "checking alignment of double... " >&6; }
27083 if test "${ac_cv_alignof_double+set}" = set; then
27084   $as_echo_n "(cached) " >&6
27085 else
27086   if test "$cross_compiling" = yes; then
27087   # Depending upon the size, compute the lo and hi bounds.
27088 cat >conftest.$ac_ext <<_ACEOF
27089 /* confdefs.h.  */
27090 _ACEOF
27091 cat confdefs.h >>conftest.$ac_ext
27092 cat >>conftest.$ac_ext <<_ACEOF
27093 /* end confdefs.h.  */
27094 $ac_includes_default
27095 #ifndef offsetof
27096 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27097 #endif
27098 typedef struct { char x; double y; } ac__type_alignof_;
27099 int
27100 main ()
27101 {
27102 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
27103 test_array [0] = 0
27104
27105   ;
27106   return 0;
27107 }
27108 _ACEOF
27109 rm -f conftest.$ac_objext
27110 if { (ac_try="$ac_compile"
27111 case "(($ac_try" in
27112   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27113   *) ac_try_echo=$ac_try;;
27114 esac
27115 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27116 $as_echo "$ac_try_echo") >&5
27117   (eval "$ac_compile") 2>conftest.er1
27118   ac_status=$?
27119   grep -v '^ *+' conftest.er1 >conftest.err
27120   rm -f conftest.er1
27121   cat conftest.err >&5
27122   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27123   (exit $ac_status); } && {
27124          test -z "$ac_c_werror_flag" ||
27125          test ! -s conftest.err
27126        } && test -s conftest.$ac_objext; then
27127   ac_lo=0 ac_mid=0
27128   while :; do
27129     cat >conftest.$ac_ext <<_ACEOF
27130 /* confdefs.h.  */
27131 _ACEOF
27132 cat confdefs.h >>conftest.$ac_ext
27133 cat >>conftest.$ac_ext <<_ACEOF
27134 /* end confdefs.h.  */
27135 $ac_includes_default
27136 #ifndef offsetof
27137 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27138 #endif
27139 typedef struct { char x; double y; } ac__type_alignof_;
27140 int
27141 main ()
27142 {
27143 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27144 test_array [0] = 0
27145
27146   ;
27147   return 0;
27148 }
27149 _ACEOF
27150 rm -f conftest.$ac_objext
27151 if { (ac_try="$ac_compile"
27152 case "(($ac_try" in
27153   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27154   *) ac_try_echo=$ac_try;;
27155 esac
27156 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27157 $as_echo "$ac_try_echo") >&5
27158   (eval "$ac_compile") 2>conftest.er1
27159   ac_status=$?
27160   grep -v '^ *+' conftest.er1 >conftest.err
27161   rm -f conftest.er1
27162   cat conftest.err >&5
27163   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27164   (exit $ac_status); } && {
27165          test -z "$ac_c_werror_flag" ||
27166          test ! -s conftest.err
27167        } && test -s conftest.$ac_objext; then
27168   ac_hi=$ac_mid; break
27169 else
27170   $as_echo "$as_me: failed program was:" >&5
27171 sed 's/^/| /' conftest.$ac_ext >&5
27172
27173         ac_lo=`expr $ac_mid + 1`
27174                         if test $ac_lo -le $ac_mid; then
27175                           ac_lo= ac_hi=
27176                           break
27177                         fi
27178                         ac_mid=`expr 2 '*' $ac_mid + 1`
27179 fi
27180
27181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27182   done
27183 else
27184   $as_echo "$as_me: failed program was:" >&5
27185 sed 's/^/| /' conftest.$ac_ext >&5
27186
27187         cat >conftest.$ac_ext <<_ACEOF
27188 /* confdefs.h.  */
27189 _ACEOF
27190 cat confdefs.h >>conftest.$ac_ext
27191 cat >>conftest.$ac_ext <<_ACEOF
27192 /* end confdefs.h.  */
27193 $ac_includes_default
27194 #ifndef offsetof
27195 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27196 #endif
27197 typedef struct { char x; double y; } ac__type_alignof_;
27198 int
27199 main ()
27200 {
27201 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
27202 test_array [0] = 0
27203
27204   ;
27205   return 0;
27206 }
27207 _ACEOF
27208 rm -f conftest.$ac_objext
27209 if { (ac_try="$ac_compile"
27210 case "(($ac_try" in
27211   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27212   *) ac_try_echo=$ac_try;;
27213 esac
27214 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27215 $as_echo "$ac_try_echo") >&5
27216   (eval "$ac_compile") 2>conftest.er1
27217   ac_status=$?
27218   grep -v '^ *+' conftest.er1 >conftest.err
27219   rm -f conftest.er1
27220   cat conftest.err >&5
27221   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27222   (exit $ac_status); } && {
27223          test -z "$ac_c_werror_flag" ||
27224          test ! -s conftest.err
27225        } && test -s conftest.$ac_objext; then
27226   ac_hi=-1 ac_mid=-1
27227   while :; do
27228     cat >conftest.$ac_ext <<_ACEOF
27229 /* confdefs.h.  */
27230 _ACEOF
27231 cat confdefs.h >>conftest.$ac_ext
27232 cat >>conftest.$ac_ext <<_ACEOF
27233 /* end confdefs.h.  */
27234 $ac_includes_default
27235 #ifndef offsetof
27236 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27237 #endif
27238 typedef struct { char x; double y; } ac__type_alignof_;
27239 int
27240 main ()
27241 {
27242 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
27243 test_array [0] = 0
27244
27245   ;
27246   return 0;
27247 }
27248 _ACEOF
27249 rm -f conftest.$ac_objext
27250 if { (ac_try="$ac_compile"
27251 case "(($ac_try" in
27252   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27253   *) ac_try_echo=$ac_try;;
27254 esac
27255 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27256 $as_echo "$ac_try_echo") >&5
27257   (eval "$ac_compile") 2>conftest.er1
27258   ac_status=$?
27259   grep -v '^ *+' conftest.er1 >conftest.err
27260   rm -f conftest.er1
27261   cat conftest.err >&5
27262   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27263   (exit $ac_status); } && {
27264          test -z "$ac_c_werror_flag" ||
27265          test ! -s conftest.err
27266        } && test -s conftest.$ac_objext; then
27267   ac_lo=$ac_mid; break
27268 else
27269   $as_echo "$as_me: failed program was:" >&5
27270 sed 's/^/| /' conftest.$ac_ext >&5
27271
27272         ac_hi=`expr '(' $ac_mid ')' - 1`
27273                         if test $ac_mid -le $ac_hi; then
27274                           ac_lo= ac_hi=
27275                           break
27276                         fi
27277                         ac_mid=`expr 2 '*' $ac_mid`
27278 fi
27279
27280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27281   done
27282 else
27283   $as_echo "$as_me: failed program was:" >&5
27284 sed 's/^/| /' conftest.$ac_ext >&5
27285
27286         ac_lo= ac_hi=
27287 fi
27288
27289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27290 fi
27291
27292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27293 # Binary search between lo and hi bounds.
27294 while test "x$ac_lo" != "x$ac_hi"; do
27295   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
27296   cat >conftest.$ac_ext <<_ACEOF
27297 /* confdefs.h.  */
27298 _ACEOF
27299 cat confdefs.h >>conftest.$ac_ext
27300 cat >>conftest.$ac_ext <<_ACEOF
27301 /* end confdefs.h.  */
27302 $ac_includes_default
27303 #ifndef offsetof
27304 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27305 #endif
27306 typedef struct { char x; double y; } ac__type_alignof_;
27307 int
27308 main ()
27309 {
27310 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27311 test_array [0] = 0
27312
27313   ;
27314   return 0;
27315 }
27316 _ACEOF
27317 rm -f conftest.$ac_objext
27318 if { (ac_try="$ac_compile"
27319 case "(($ac_try" in
27320   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27321   *) ac_try_echo=$ac_try;;
27322 esac
27323 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27324 $as_echo "$ac_try_echo") >&5
27325   (eval "$ac_compile") 2>conftest.er1
27326   ac_status=$?
27327   grep -v '^ *+' conftest.er1 >conftest.err
27328   rm -f conftest.er1
27329   cat conftest.err >&5
27330   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27331   (exit $ac_status); } && {
27332          test -z "$ac_c_werror_flag" ||
27333          test ! -s conftest.err
27334        } && test -s conftest.$ac_objext; then
27335   ac_hi=$ac_mid
27336 else
27337   $as_echo "$as_me: failed program was:" >&5
27338 sed 's/^/| /' conftest.$ac_ext >&5
27339
27340         ac_lo=`expr '(' $ac_mid ')' + 1`
27341 fi
27342
27343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27344 done
27345 case $ac_lo in
27346 ?*) ac_cv_alignof_double=$ac_lo;;
27347 '') if test "$ac_cv_type_double" = yes; then
27348      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27349 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27350 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of double
27351 See \`config.log' for more details." >&5
27352 $as_echo "$as_me: error: cannot compute alignment of double
27353 See \`config.log' for more details." >&2;}
27354    { (exit 77); exit 77; }; }; }
27355    else
27356      ac_cv_alignof_double=0
27357    fi ;;
27358 esac
27359 else
27360   cat >conftest.$ac_ext <<_ACEOF
27361 /* confdefs.h.  */
27362 _ACEOF
27363 cat confdefs.h >>conftest.$ac_ext
27364 cat >>conftest.$ac_ext <<_ACEOF
27365 /* end confdefs.h.  */
27366 $ac_includes_default
27367 #ifndef offsetof
27368 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27369 #endif
27370 typedef struct { char x; double y; } ac__type_alignof_;
27371 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
27372 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
27373 #include <stdio.h>
27374 #include <stdlib.h>
27375 int
27376 main ()
27377 {
27378
27379   FILE *f = fopen ("conftest.val", "w");
27380   if (! f)
27381     return 1;
27382   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
27383     {
27384       long int i = longval ();
27385       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27386         return 1;
27387       fprintf (f, "%ld", i);
27388     }
27389   else
27390     {
27391       unsigned long int i = ulongval ();
27392       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27393         return 1;
27394       fprintf (f, "%lu", i);
27395     }
27396   /* Do not output a trailing newline, as this causes \r\n confusion
27397      on some platforms.  */
27398   return ferror (f) || fclose (f) != 0;
27399
27400   ;
27401   return 0;
27402 }
27403 _ACEOF
27404 rm -f conftest$ac_exeext
27405 if { (ac_try="$ac_link"
27406 case "(($ac_try" in
27407   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27408   *) ac_try_echo=$ac_try;;
27409 esac
27410 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27411 $as_echo "$ac_try_echo") >&5
27412   (eval "$ac_link") 2>&5
27413   ac_status=$?
27414   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27415   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27416   { (case "(($ac_try" in
27417   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27418   *) ac_try_echo=$ac_try;;
27419 esac
27420 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27421 $as_echo "$ac_try_echo") >&5
27422   (eval "$ac_try") 2>&5
27423   ac_status=$?
27424   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27425   (exit $ac_status); }; }; then
27426   ac_cv_alignof_double=`cat conftest.val`
27427 else
27428   $as_echo "$as_me: program exited with status $ac_status" >&5
27429 $as_echo "$as_me: failed program was:" >&5
27430 sed 's/^/| /' conftest.$ac_ext >&5
27431
27432 ( exit $ac_status )
27433 if test "$ac_cv_type_double" = yes; then
27434      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27435 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27436 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of double
27437 See \`config.log' for more details." >&5
27438 $as_echo "$as_me: error: cannot compute alignment of double
27439 See \`config.log' for more details." >&2;}
27440    { (exit 77); exit 77; }; }; }
27441    else
27442      ac_cv_alignof_double=0
27443    fi
27444 fi
27445 rm -rf conftest.dSYM
27446 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27447 fi
27448 rm -f conftest.val
27449 fi
27450 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_double" >&5
27451 $as_echo "$ac_cv_alignof_double" >&6; }
27452
27453
27454
27455 cat >>confdefs.h <<_ACEOF
27456 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
27457 _ACEOF
27458
27459
27460
27461 # Compute maximum alignment of any basic type.
27462 # We assume long's alignment is at least as strong as char, short, or int;
27463 # but we must check long long (if it exists) and double.
27464
27465 MAX_ALIGNOF=$ac_cv_alignof_long
27466 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
27467   MAX_ALIGNOF=$ac_cv_alignof_double
27468 fi
27469 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
27470   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
27471 fi
27472
27473 cat >>confdefs.h <<_ACEOF
27474 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
27475 _ACEOF
27476
27477
27478
27479 # Some platforms predefine the types int8, int16, etc.  Only check
27480 # a (hopefully) representative subset.
27481 { $as_echo "$as_me:$LINENO: checking for int8" >&5
27482 $as_echo_n "checking for int8... " >&6; }
27483 if test "${ac_cv_type_int8+set}" = set; then
27484   $as_echo_n "(cached) " >&6
27485 else
27486   ac_cv_type_int8=no
27487 cat >conftest.$ac_ext <<_ACEOF
27488 /* confdefs.h.  */
27489 _ACEOF
27490 cat confdefs.h >>conftest.$ac_ext
27491 cat >>conftest.$ac_ext <<_ACEOF
27492 /* end confdefs.h.  */
27493 #include <stdio.h>
27494 #ifdef HAVE_SUPPORTDEFS_H
27495 #include <SupportDefs.h>
27496 #endif
27497
27498 int
27499 main ()
27500 {
27501 if (sizeof (int8))
27502        return 0;
27503   ;
27504   return 0;
27505 }
27506 _ACEOF
27507 rm -f conftest.$ac_objext
27508 if { (ac_try="$ac_compile"
27509 case "(($ac_try" in
27510   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27511   *) ac_try_echo=$ac_try;;
27512 esac
27513 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27514 $as_echo "$ac_try_echo") >&5
27515   (eval "$ac_compile") 2>conftest.er1
27516   ac_status=$?
27517   grep -v '^ *+' conftest.er1 >conftest.err
27518   rm -f conftest.er1
27519   cat conftest.err >&5
27520   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27521   (exit $ac_status); } && {
27522          test -z "$ac_c_werror_flag" ||
27523          test ! -s conftest.err
27524        } && test -s conftest.$ac_objext; then
27525   cat >conftest.$ac_ext <<_ACEOF
27526 /* confdefs.h.  */
27527 _ACEOF
27528 cat confdefs.h >>conftest.$ac_ext
27529 cat >>conftest.$ac_ext <<_ACEOF
27530 /* end confdefs.h.  */
27531 #include <stdio.h>
27532 #ifdef HAVE_SUPPORTDEFS_H
27533 #include <SupportDefs.h>
27534 #endif
27535
27536 int
27537 main ()
27538 {
27539 if (sizeof ((int8)))
27540           return 0;
27541   ;
27542   return 0;
27543 }
27544 _ACEOF
27545 rm -f conftest.$ac_objext
27546 if { (ac_try="$ac_compile"
27547 case "(($ac_try" in
27548   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27549   *) ac_try_echo=$ac_try;;
27550 esac
27551 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27552 $as_echo "$ac_try_echo") >&5
27553   (eval "$ac_compile") 2>conftest.er1
27554   ac_status=$?
27555   grep -v '^ *+' conftest.er1 >conftest.err
27556   rm -f conftest.er1
27557   cat conftest.err >&5
27558   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27559   (exit $ac_status); } && {
27560          test -z "$ac_c_werror_flag" ||
27561          test ! -s conftest.err
27562        } && test -s conftest.$ac_objext; then
27563   :
27564 else
27565   $as_echo "$as_me: failed program was:" >&5
27566 sed 's/^/| /' conftest.$ac_ext >&5
27567
27568         ac_cv_type_int8=yes
27569 fi
27570
27571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27572 else
27573   $as_echo "$as_me: failed program was:" >&5
27574 sed 's/^/| /' conftest.$ac_ext >&5
27575
27576
27577 fi
27578
27579 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27580 fi
27581 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
27582 $as_echo "$ac_cv_type_int8" >&6; }
27583 if test "x$ac_cv_type_int8" = x""yes; then
27584
27585 cat >>confdefs.h <<_ACEOF
27586 #define HAVE_INT8 1
27587 _ACEOF
27588
27589
27590 fi
27591 { $as_echo "$as_me:$LINENO: checking for uint8" >&5
27592 $as_echo_n "checking for uint8... " >&6; }
27593 if test "${ac_cv_type_uint8+set}" = set; then
27594   $as_echo_n "(cached) " >&6
27595 else
27596   ac_cv_type_uint8=no
27597 cat >conftest.$ac_ext <<_ACEOF
27598 /* confdefs.h.  */
27599 _ACEOF
27600 cat confdefs.h >>conftest.$ac_ext
27601 cat >>conftest.$ac_ext <<_ACEOF
27602 /* end confdefs.h.  */
27603 #include <stdio.h>
27604 #ifdef HAVE_SUPPORTDEFS_H
27605 #include <SupportDefs.h>
27606 #endif
27607
27608 int
27609 main ()
27610 {
27611 if (sizeof (uint8))
27612        return 0;
27613   ;
27614   return 0;
27615 }
27616 _ACEOF
27617 rm -f conftest.$ac_objext
27618 if { (ac_try="$ac_compile"
27619 case "(($ac_try" in
27620   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27621   *) ac_try_echo=$ac_try;;
27622 esac
27623 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27624 $as_echo "$ac_try_echo") >&5
27625   (eval "$ac_compile") 2>conftest.er1
27626   ac_status=$?
27627   grep -v '^ *+' conftest.er1 >conftest.err
27628   rm -f conftest.er1
27629   cat conftest.err >&5
27630   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27631   (exit $ac_status); } && {
27632          test -z "$ac_c_werror_flag" ||
27633          test ! -s conftest.err
27634        } && test -s conftest.$ac_objext; then
27635   cat >conftest.$ac_ext <<_ACEOF
27636 /* confdefs.h.  */
27637 _ACEOF
27638 cat confdefs.h >>conftest.$ac_ext
27639 cat >>conftest.$ac_ext <<_ACEOF
27640 /* end confdefs.h.  */
27641 #include <stdio.h>
27642 #ifdef HAVE_SUPPORTDEFS_H
27643 #include <SupportDefs.h>
27644 #endif
27645
27646 int
27647 main ()
27648 {
27649 if (sizeof ((uint8)))
27650           return 0;
27651   ;
27652   return 0;
27653 }
27654 _ACEOF
27655 rm -f conftest.$ac_objext
27656 if { (ac_try="$ac_compile"
27657 case "(($ac_try" in
27658   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27659   *) ac_try_echo=$ac_try;;
27660 esac
27661 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27662 $as_echo "$ac_try_echo") >&5
27663   (eval "$ac_compile") 2>conftest.er1
27664   ac_status=$?
27665   grep -v '^ *+' conftest.er1 >conftest.err
27666   rm -f conftest.er1
27667   cat conftest.err >&5
27668   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27669   (exit $ac_status); } && {
27670          test -z "$ac_c_werror_flag" ||
27671          test ! -s conftest.err
27672        } && test -s conftest.$ac_objext; then
27673   :
27674 else
27675   $as_echo "$as_me: failed program was:" >&5
27676 sed 's/^/| /' conftest.$ac_ext >&5
27677
27678         ac_cv_type_uint8=yes
27679 fi
27680
27681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27682 else
27683   $as_echo "$as_me: failed program was:" >&5
27684 sed 's/^/| /' conftest.$ac_ext >&5
27685
27686
27687 fi
27688
27689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27690 fi
27691 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
27692 $as_echo "$ac_cv_type_uint8" >&6; }
27693 if test "x$ac_cv_type_uint8" = x""yes; then
27694
27695 cat >>confdefs.h <<_ACEOF
27696 #define HAVE_UINT8 1
27697 _ACEOF
27698
27699
27700 fi
27701 { $as_echo "$as_me:$LINENO: checking for int64" >&5
27702 $as_echo_n "checking for int64... " >&6; }
27703 if test "${ac_cv_type_int64+set}" = set; then
27704   $as_echo_n "(cached) " >&6
27705 else
27706   ac_cv_type_int64=no
27707 cat >conftest.$ac_ext <<_ACEOF
27708 /* confdefs.h.  */
27709 _ACEOF
27710 cat confdefs.h >>conftest.$ac_ext
27711 cat >>conftest.$ac_ext <<_ACEOF
27712 /* end confdefs.h.  */
27713 #include <stdio.h>
27714 #ifdef HAVE_SUPPORTDEFS_H
27715 #include <SupportDefs.h>
27716 #endif
27717
27718 int
27719 main ()
27720 {
27721 if (sizeof (int64))
27722        return 0;
27723   ;
27724   return 0;
27725 }
27726 _ACEOF
27727 rm -f conftest.$ac_objext
27728 if { (ac_try="$ac_compile"
27729 case "(($ac_try" in
27730   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27731   *) ac_try_echo=$ac_try;;
27732 esac
27733 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27734 $as_echo "$ac_try_echo") >&5
27735   (eval "$ac_compile") 2>conftest.er1
27736   ac_status=$?
27737   grep -v '^ *+' conftest.er1 >conftest.err
27738   rm -f conftest.er1
27739   cat conftest.err >&5
27740   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27741   (exit $ac_status); } && {
27742          test -z "$ac_c_werror_flag" ||
27743          test ! -s conftest.err
27744        } && test -s conftest.$ac_objext; then
27745   cat >conftest.$ac_ext <<_ACEOF
27746 /* confdefs.h.  */
27747 _ACEOF
27748 cat confdefs.h >>conftest.$ac_ext
27749 cat >>conftest.$ac_ext <<_ACEOF
27750 /* end confdefs.h.  */
27751 #include <stdio.h>
27752 #ifdef HAVE_SUPPORTDEFS_H
27753 #include <SupportDefs.h>
27754 #endif
27755
27756 int
27757 main ()
27758 {
27759 if (sizeof ((int64)))
27760           return 0;
27761   ;
27762   return 0;
27763 }
27764 _ACEOF
27765 rm -f conftest.$ac_objext
27766 if { (ac_try="$ac_compile"
27767 case "(($ac_try" in
27768   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27769   *) ac_try_echo=$ac_try;;
27770 esac
27771 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27772 $as_echo "$ac_try_echo") >&5
27773   (eval "$ac_compile") 2>conftest.er1
27774   ac_status=$?
27775   grep -v '^ *+' conftest.er1 >conftest.err
27776   rm -f conftest.er1
27777   cat conftest.err >&5
27778   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27779   (exit $ac_status); } && {
27780          test -z "$ac_c_werror_flag" ||
27781          test ! -s conftest.err
27782        } && test -s conftest.$ac_objext; then
27783   :
27784 else
27785   $as_echo "$as_me: failed program was:" >&5
27786 sed 's/^/| /' conftest.$ac_ext >&5
27787
27788         ac_cv_type_int64=yes
27789 fi
27790
27791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27792 else
27793   $as_echo "$as_me: failed program was:" >&5
27794 sed 's/^/| /' conftest.$ac_ext >&5
27795
27796
27797 fi
27798
27799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27800 fi
27801 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
27802 $as_echo "$ac_cv_type_int64" >&6; }
27803 if test "x$ac_cv_type_int64" = x""yes; then
27804
27805 cat >>confdefs.h <<_ACEOF
27806 #define HAVE_INT64 1
27807 _ACEOF
27808
27809
27810 fi
27811 { $as_echo "$as_me:$LINENO: checking for uint64" >&5
27812 $as_echo_n "checking for uint64... " >&6; }
27813 if test "${ac_cv_type_uint64+set}" = set; then
27814   $as_echo_n "(cached) " >&6
27815 else
27816   ac_cv_type_uint64=no
27817 cat >conftest.$ac_ext <<_ACEOF
27818 /* confdefs.h.  */
27819 _ACEOF
27820 cat confdefs.h >>conftest.$ac_ext
27821 cat >>conftest.$ac_ext <<_ACEOF
27822 /* end confdefs.h.  */
27823 #include <stdio.h>
27824 #ifdef HAVE_SUPPORTDEFS_H
27825 #include <SupportDefs.h>
27826 #endif
27827
27828 int
27829 main ()
27830 {
27831 if (sizeof (uint64))
27832        return 0;
27833   ;
27834   return 0;
27835 }
27836 _ACEOF
27837 rm -f conftest.$ac_objext
27838 if { (ac_try="$ac_compile"
27839 case "(($ac_try" in
27840   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27841   *) ac_try_echo=$ac_try;;
27842 esac
27843 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27844 $as_echo "$ac_try_echo") >&5
27845   (eval "$ac_compile") 2>conftest.er1
27846   ac_status=$?
27847   grep -v '^ *+' conftest.er1 >conftest.err
27848   rm -f conftest.er1
27849   cat conftest.err >&5
27850   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27851   (exit $ac_status); } && {
27852          test -z "$ac_c_werror_flag" ||
27853          test ! -s conftest.err
27854        } && test -s conftest.$ac_objext; then
27855   cat >conftest.$ac_ext <<_ACEOF
27856 /* confdefs.h.  */
27857 _ACEOF
27858 cat confdefs.h >>conftest.$ac_ext
27859 cat >>conftest.$ac_ext <<_ACEOF
27860 /* end confdefs.h.  */
27861 #include <stdio.h>
27862 #ifdef HAVE_SUPPORTDEFS_H
27863 #include <SupportDefs.h>
27864 #endif
27865
27866 int
27867 main ()
27868 {
27869 if (sizeof ((uint64)))
27870           return 0;
27871   ;
27872   return 0;
27873 }
27874 _ACEOF
27875 rm -f conftest.$ac_objext
27876 if { (ac_try="$ac_compile"
27877 case "(($ac_try" in
27878   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27879   *) ac_try_echo=$ac_try;;
27880 esac
27881 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27882 $as_echo "$ac_try_echo") >&5
27883   (eval "$ac_compile") 2>conftest.er1
27884   ac_status=$?
27885   grep -v '^ *+' conftest.er1 >conftest.err
27886   rm -f conftest.er1
27887   cat conftest.err >&5
27888   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27889   (exit $ac_status); } && {
27890          test -z "$ac_c_werror_flag" ||
27891          test ! -s conftest.err
27892        } && test -s conftest.$ac_objext; then
27893   :
27894 else
27895   $as_echo "$as_me: failed program was:" >&5
27896 sed 's/^/| /' conftest.$ac_ext >&5
27897
27898         ac_cv_type_uint64=yes
27899 fi
27900
27901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27902 else
27903   $as_echo "$as_me: failed program was:" >&5
27904 sed 's/^/| /' conftest.$ac_ext >&5
27905
27906
27907 fi
27908
27909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27910 fi
27911 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
27912 $as_echo "$ac_cv_type_uint64" >&6; }
27913 if test "x$ac_cv_type_uint64" = x""yes; then
27914
27915 cat >>confdefs.h <<_ACEOF
27916 #define HAVE_UINT64 1
27917 _ACEOF
27918
27919
27920 fi
27921
27922
27923 # We also check for sig_atomic_t, which *should* be defined per ANSI
27924 # C, but is missing on some old platforms.
27925 { $as_echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
27926 $as_echo_n "checking for sig_atomic_t... " >&6; }
27927 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
27928   $as_echo_n "(cached) " >&6
27929 else
27930   ac_cv_type_sig_atomic_t=no
27931 cat >conftest.$ac_ext <<_ACEOF
27932 /* confdefs.h.  */
27933 _ACEOF
27934 cat confdefs.h >>conftest.$ac_ext
27935 cat >>conftest.$ac_ext <<_ACEOF
27936 /* end confdefs.h.  */
27937 #include <signal.h>
27938
27939 int
27940 main ()
27941 {
27942 if (sizeof (sig_atomic_t))
27943        return 0;
27944   ;
27945   return 0;
27946 }
27947 _ACEOF
27948 rm -f conftest.$ac_objext
27949 if { (ac_try="$ac_compile"
27950 case "(($ac_try" in
27951   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27952   *) ac_try_echo=$ac_try;;
27953 esac
27954 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27955 $as_echo "$ac_try_echo") >&5
27956   (eval "$ac_compile") 2>conftest.er1
27957   ac_status=$?
27958   grep -v '^ *+' conftest.er1 >conftest.err
27959   rm -f conftest.er1
27960   cat conftest.err >&5
27961   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27962   (exit $ac_status); } && {
27963          test -z "$ac_c_werror_flag" ||
27964          test ! -s conftest.err
27965        } && test -s conftest.$ac_objext; then
27966   cat >conftest.$ac_ext <<_ACEOF
27967 /* confdefs.h.  */
27968 _ACEOF
27969 cat confdefs.h >>conftest.$ac_ext
27970 cat >>conftest.$ac_ext <<_ACEOF
27971 /* end confdefs.h.  */
27972 #include <signal.h>
27973
27974 int
27975 main ()
27976 {
27977 if (sizeof ((sig_atomic_t)))
27978           return 0;
27979   ;
27980   return 0;
27981 }
27982 _ACEOF
27983 rm -f conftest.$ac_objext
27984 if { (ac_try="$ac_compile"
27985 case "(($ac_try" in
27986   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27987   *) ac_try_echo=$ac_try;;
27988 esac
27989 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27990 $as_echo "$ac_try_echo") >&5
27991   (eval "$ac_compile") 2>conftest.er1
27992   ac_status=$?
27993   grep -v '^ *+' conftest.er1 >conftest.err
27994   rm -f conftest.er1
27995   cat conftest.err >&5
27996   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27997   (exit $ac_status); } && {
27998          test -z "$ac_c_werror_flag" ||
27999          test ! -s conftest.err
28000        } && test -s conftest.$ac_objext; then
28001   :
28002 else
28003   $as_echo "$as_me: failed program was:" >&5
28004 sed 's/^/| /' conftest.$ac_ext >&5
28005
28006         ac_cv_type_sig_atomic_t=yes
28007 fi
28008
28009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28010 else
28011   $as_echo "$as_me: failed program was:" >&5
28012 sed 's/^/| /' conftest.$ac_ext >&5
28013
28014
28015 fi
28016
28017 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28018 fi
28019 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
28020 $as_echo "$ac_cv_type_sig_atomic_t" >&6; }
28021 if test "x$ac_cv_type_sig_atomic_t" = x""yes; then
28022
28023 cat >>confdefs.h <<_ACEOF
28024 #define HAVE_SIG_ATOMIC_T 1
28025 _ACEOF
28026
28027
28028 fi
28029
28030
28031
28032 if test "$PORTNAME" != "win32"
28033 then
28034 { $as_echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
28035 $as_echo_n "checking for POSIX signal interface... " >&6; }
28036 if test "${pgac_cv_func_posix_signals+set}" = set; then
28037   $as_echo_n "(cached) " >&6
28038 else
28039   cat >conftest.$ac_ext <<_ACEOF
28040 /* confdefs.h.  */
28041 _ACEOF
28042 cat confdefs.h >>conftest.$ac_ext
28043 cat >>conftest.$ac_ext <<_ACEOF
28044 /* end confdefs.h.  */
28045 #include <signal.h>
28046
28047 int
28048 main ()
28049 {
28050 struct sigaction act, oact;
28051 sigemptyset(&act.sa_mask);
28052 act.sa_flags = SA_RESTART;
28053 sigaction(0, &act, &oact);
28054   ;
28055   return 0;
28056 }
28057 _ACEOF
28058 rm -f conftest.$ac_objext conftest$ac_exeext
28059 if { (ac_try="$ac_link"
28060 case "(($ac_try" in
28061   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28062   *) ac_try_echo=$ac_try;;
28063 esac
28064 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28065 $as_echo "$ac_try_echo") >&5
28066   (eval "$ac_link") 2>conftest.er1
28067   ac_status=$?
28068   grep -v '^ *+' conftest.er1 >conftest.err
28069   rm -f conftest.er1
28070   cat conftest.err >&5
28071   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28072   (exit $ac_status); } && {
28073          test -z "$ac_c_werror_flag" ||
28074          test ! -s conftest.err
28075        } && test -s conftest$ac_exeext && {
28076          test "$cross_compiling" = yes ||
28077          $as_test_x conftest$ac_exeext
28078        }; then
28079   pgac_cv_func_posix_signals=yes
28080 else
28081   $as_echo "$as_me: failed program was:" >&5
28082 sed 's/^/| /' conftest.$ac_ext >&5
28083
28084         pgac_cv_func_posix_signals=no
28085 fi
28086
28087 rm -rf conftest.dSYM
28088 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28089       conftest$ac_exeext conftest.$ac_ext
28090 fi
28091 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
28092 $as_echo "$pgac_cv_func_posix_signals" >&6; }
28093 if test x"$pgac_cv_func_posix_signals" = xyes ; then
28094
28095 cat >>confdefs.h <<\_ACEOF
28096 #define HAVE_POSIX_SIGNALS /**/
28097 _ACEOF
28098
28099 fi
28100 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
28101
28102 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
28103   { { $as_echo "$as_me:$LINENO: error:
28104 Thread-safety requires POSIX signals, which are not supported by this
28105 operating system;  use --disable-thread-safety to disable thread safety." >&5
28106 $as_echo "$as_me: error:
28107 Thread-safety requires POSIX signals, which are not supported by this
28108 operating system;  use --disable-thread-safety to disable thread safety." >&2;}
28109    { (exit 1); exit 1; }; }
28110 fi
28111 fi
28112
28113 # SunOS doesn't handle negative byte comparisons properly with +/- return
28114 { $as_echo "$as_me:$LINENO: checking for working memcmp" >&5
28115 $as_echo_n "checking for working memcmp... " >&6; }
28116 if test "${ac_cv_func_memcmp_working+set}" = set; then
28117   $as_echo_n "(cached) " >&6
28118 else
28119   if test "$cross_compiling" = yes; then
28120   ac_cv_func_memcmp_working=no
28121 else
28122   cat >conftest.$ac_ext <<_ACEOF
28123 /* confdefs.h.  */
28124 _ACEOF
28125 cat confdefs.h >>conftest.$ac_ext
28126 cat >>conftest.$ac_ext <<_ACEOF
28127 /* end confdefs.h.  */
28128 $ac_includes_default
28129 int
28130 main ()
28131 {
28132
28133   /* Some versions of memcmp are not 8-bit clean.  */
28134   char c0 = '\100', c1 = '\200', c2 = '\201';
28135   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
28136     return 1;
28137
28138   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
28139      or more and with at least one buffer not starting on a 4-byte boundary.
28140      William Lewis provided this test program.   */
28141   {
28142     char foo[21];
28143     char bar[21];
28144     int i;
28145     for (i = 0; i < 4; i++)
28146       {
28147         char *a = foo + i;
28148         char *b = bar + i;
28149         strcpy (a, "--------01111111");
28150         strcpy (b, "--------10000000");
28151         if (memcmp (a, b, 16) >= 0)
28152           return 1;
28153       }
28154     return 0;
28155   }
28156
28157   ;
28158   return 0;
28159 }
28160 _ACEOF
28161 rm -f conftest$ac_exeext
28162 if { (ac_try="$ac_link"
28163 case "(($ac_try" in
28164   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28165   *) ac_try_echo=$ac_try;;
28166 esac
28167 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28168 $as_echo "$ac_try_echo") >&5
28169   (eval "$ac_link") 2>&5
28170   ac_status=$?
28171   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28172   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28173   { (case "(($ac_try" in
28174   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28175   *) ac_try_echo=$ac_try;;
28176 esac
28177 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28178 $as_echo "$ac_try_echo") >&5
28179   (eval "$ac_try") 2>&5
28180   ac_status=$?
28181   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28182   (exit $ac_status); }; }; then
28183   ac_cv_func_memcmp_working=yes
28184 else
28185   $as_echo "$as_me: program exited with status $ac_status" >&5
28186 $as_echo "$as_me: failed program was:" >&5
28187 sed 's/^/| /' conftest.$ac_ext >&5
28188
28189 ( exit $ac_status )
28190 ac_cv_func_memcmp_working=no
28191 fi
28192 rm -rf conftest.dSYM
28193 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28194 fi
28195
28196
28197 fi
28198 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
28199 $as_echo "$ac_cv_func_memcmp_working" >&6; }
28200 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
28201   *" memcmp.$ac_objext "* ) ;;
28202   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
28203  ;;
28204 esac
28205
28206
28207
28208
28209 # Select semaphore implementation type.
28210 if test "$PORTNAME" != "win32"; then
28211   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
28212
28213 cat >>confdefs.h <<\_ACEOF
28214 #define USE_NAMED_POSIX_SEMAPHORES 1
28215 _ACEOF
28216
28217     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
28218   else
28219     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
28220
28221 cat >>confdefs.h <<\_ACEOF
28222 #define USE_UNNAMED_POSIX_SEMAPHORES 1
28223 _ACEOF
28224
28225       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
28226     else
28227
28228 cat >>confdefs.h <<\_ACEOF
28229 #define USE_SYSV_SEMAPHORES 1
28230 _ACEOF
28231
28232       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
28233     fi
28234   fi
28235 else
28236
28237 cat >>confdefs.h <<\_ACEOF
28238 #define USE_WIN32_SEMAPHORES 1
28239 _ACEOF
28240
28241   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
28242 fi
28243
28244
28245 # Select shared-memory implementation type.
28246 if test "$PORTNAME" != "win32"; then
28247
28248 cat >>confdefs.h <<\_ACEOF
28249 #define USE_SYSV_SHARED_MEMORY 1
28250 _ACEOF
28251
28252   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
28253 else
28254
28255 cat >>confdefs.h <<\_ACEOF
28256 #define USE_WIN32_SHARED_MEMORY 1
28257 _ACEOF
28258
28259   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
28260 fi
28261
28262 # Select latch implementation type.
28263 if test "$PORTNAME" != "win32"; then
28264   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
28265 else
28266   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
28267 fi
28268
28269 # If not set in template file, set bytes to use libc memset()
28270 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
28271   MEMSET_LOOP_LIMIT=1024
28272 fi
28273
28274 cat >>confdefs.h <<_ACEOF
28275 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
28276 _ACEOF
28277
28278
28279
28280 if test "$enable_nls" = yes ; then
28281
28282   { $as_echo "$as_me:$LINENO: checking for library containing bind_textdomain_codeset" >&5
28283 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
28284 if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
28285   $as_echo_n "(cached) " >&6
28286 else
28287   ac_func_search_save_LIBS=$LIBS
28288 cat >conftest.$ac_ext <<_ACEOF
28289 /* confdefs.h.  */
28290 _ACEOF
28291 cat confdefs.h >>conftest.$ac_ext
28292 cat >>conftest.$ac_ext <<_ACEOF
28293 /* end confdefs.h.  */
28294
28295 /* Override any GCC internal prototype to avoid an error.
28296    Use char because int might match the return type of a GCC
28297    builtin and then its argument prototype would still apply.  */
28298 #ifdef __cplusplus
28299 extern "C"
28300 #endif
28301 char bind_textdomain_codeset ();
28302 int
28303 main ()
28304 {
28305 return bind_textdomain_codeset ();
28306   ;
28307   return 0;
28308 }
28309 _ACEOF
28310 for ac_lib in '' intl; do
28311   if test -z "$ac_lib"; then
28312     ac_res="none required"
28313   else
28314     ac_res=-l$ac_lib
28315     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28316   fi
28317   rm -f conftest.$ac_objext conftest$ac_exeext
28318 if { (ac_try="$ac_link"
28319 case "(($ac_try" in
28320   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28321   *) ac_try_echo=$ac_try;;
28322 esac
28323 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28324 $as_echo "$ac_try_echo") >&5
28325   (eval "$ac_link") 2>conftest.er1
28326   ac_status=$?
28327   grep -v '^ *+' conftest.er1 >conftest.err
28328   rm -f conftest.er1
28329   cat conftest.err >&5
28330   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28331   (exit $ac_status); } && {
28332          test -z "$ac_c_werror_flag" ||
28333          test ! -s conftest.err
28334        } && test -s conftest$ac_exeext && {
28335          test "$cross_compiling" = yes ||
28336          $as_test_x conftest$ac_exeext
28337        }; then
28338   ac_cv_search_bind_textdomain_codeset=$ac_res
28339 else
28340   $as_echo "$as_me: failed program was:" >&5
28341 sed 's/^/| /' conftest.$ac_ext >&5
28342
28343
28344 fi
28345
28346 rm -rf conftest.dSYM
28347 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28348       conftest$ac_exeext
28349   if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
28350   break
28351 fi
28352 done
28353 if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
28354   :
28355 else
28356   ac_cv_search_bind_textdomain_codeset=no
28357 fi
28358 rm conftest.$ac_ext
28359 LIBS=$ac_func_search_save_LIBS
28360 fi
28361 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_bind_textdomain_codeset" >&5
28362 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
28363 ac_res=$ac_cv_search_bind_textdomain_codeset
28364 if test "$ac_res" != no; then
28365   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28366
28367 else
28368   { { $as_echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
28369 $as_echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
28370    { (exit 1); exit 1; }; }
28371 fi
28372
28373   if test "${ac_cv_header_libintl_h+set}" = set; then
28374   { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
28375 $as_echo_n "checking for libintl.h... " >&6; }
28376 if test "${ac_cv_header_libintl_h+set}" = set; then
28377   $as_echo_n "(cached) " >&6
28378 fi
28379 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
28380 $as_echo "$ac_cv_header_libintl_h" >&6; }
28381 else
28382   # Is the header compilable?
28383 { $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
28384 $as_echo_n "checking libintl.h usability... " >&6; }
28385 cat >conftest.$ac_ext <<_ACEOF
28386 /* confdefs.h.  */
28387 _ACEOF
28388 cat confdefs.h >>conftest.$ac_ext
28389 cat >>conftest.$ac_ext <<_ACEOF
28390 /* end confdefs.h.  */
28391 $ac_includes_default
28392 #include <libintl.h>
28393 _ACEOF
28394 rm -f conftest.$ac_objext
28395 if { (ac_try="$ac_compile"
28396 case "(($ac_try" in
28397   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28398   *) ac_try_echo=$ac_try;;
28399 esac
28400 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28401 $as_echo "$ac_try_echo") >&5
28402   (eval "$ac_compile") 2>conftest.er1
28403   ac_status=$?
28404   grep -v '^ *+' conftest.er1 >conftest.err
28405   rm -f conftest.er1
28406   cat conftest.err >&5
28407   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28408   (exit $ac_status); } && {
28409          test -z "$ac_c_werror_flag" ||
28410          test ! -s conftest.err
28411        } && test -s conftest.$ac_objext; then
28412   ac_header_compiler=yes
28413 else
28414   $as_echo "$as_me: failed program was:" >&5
28415 sed 's/^/| /' conftest.$ac_ext >&5
28416
28417         ac_header_compiler=no
28418 fi
28419
28420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28421 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28422 $as_echo "$ac_header_compiler" >&6; }
28423
28424 # Is the header present?
28425 { $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
28426 $as_echo_n "checking libintl.h presence... " >&6; }
28427 cat >conftest.$ac_ext <<_ACEOF
28428 /* confdefs.h.  */
28429 _ACEOF
28430 cat confdefs.h >>conftest.$ac_ext
28431 cat >>conftest.$ac_ext <<_ACEOF
28432 /* end confdefs.h.  */
28433 #include <libintl.h>
28434 _ACEOF
28435 if { (ac_try="$ac_cpp conftest.$ac_ext"
28436 case "(($ac_try" in
28437   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28438   *) ac_try_echo=$ac_try;;
28439 esac
28440 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28441 $as_echo "$ac_try_echo") >&5
28442   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28443   ac_status=$?
28444   grep -v '^ *+' conftest.er1 >conftest.err
28445   rm -f conftest.er1
28446   cat conftest.err >&5
28447   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28448   (exit $ac_status); } >/dev/null && {
28449          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28450          test ! -s conftest.err
28451        }; then
28452   ac_header_preproc=yes
28453 else
28454   $as_echo "$as_me: failed program was:" >&5
28455 sed 's/^/| /' conftest.$ac_ext >&5
28456
28457   ac_header_preproc=no
28458 fi
28459
28460 rm -f conftest.err conftest.$ac_ext
28461 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28462 $as_echo "$ac_header_preproc" >&6; }
28463
28464 # So?  What about this header?
28465 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
28466   yes:no: )
28467     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
28468 $as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
28469     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
28470 $as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
28471     ac_header_preproc=yes
28472     ;;
28473   no:yes:* )
28474     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
28475 $as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
28476     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
28477 $as_echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
28478     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
28479 $as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
28480     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
28481 $as_echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
28482     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
28483 $as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
28484     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
28485 $as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
28486     ( cat <<\_ASBOX
28487 ## ---------------------------------------- ##
28488 ## Report this to pgsql-bugs@postgresql.org ##
28489 ## ---------------------------------------- ##
28490 _ASBOX
28491      ) | sed "s/^/$as_me: WARNING:     /" >&2
28492     ;;
28493 esac
28494 { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
28495 $as_echo_n "checking for libintl.h... " >&6; }
28496 if test "${ac_cv_header_libintl_h+set}" = set; then
28497   $as_echo_n "(cached) " >&6
28498 else
28499   ac_cv_header_libintl_h=$ac_header_preproc
28500 fi
28501 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
28502 $as_echo "$ac_cv_header_libintl_h" >&6; }
28503
28504 fi
28505 if test "x$ac_cv_header_libintl_h" = x""yes; then
28506   :
28507 else
28508   { { $as_echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
28509 $as_echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
28510    { (exit 1); exit 1; }; }
28511 fi
28512
28513
28514   for ac_prog in msgfmt
28515 do
28516   # Extract the first word of "$ac_prog", so it can be a program name with args.
28517 set dummy $ac_prog; ac_word=$2
28518 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28519 $as_echo_n "checking for $ac_word... " >&6; }
28520 if test "${ac_cv_prog_MSGFMT+set}" = set; then
28521   $as_echo_n "(cached) " >&6
28522 else
28523   if test -n "$MSGFMT"; then
28524   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
28525 else
28526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28527 for as_dir in $PATH
28528 do
28529   IFS=$as_save_IFS
28530   test -z "$as_dir" && as_dir=.
28531   for ac_exec_ext in '' $ac_executable_extensions; do
28532   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28533     ac_cv_prog_MSGFMT="$ac_prog"
28534     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28535     break 2
28536   fi
28537 done
28538 done
28539 IFS=$as_save_IFS
28540
28541 fi
28542 fi
28543 MSGFMT=$ac_cv_prog_MSGFMT
28544 if test -n "$MSGFMT"; then
28545   { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
28546 $as_echo "$MSGFMT" >&6; }
28547 else
28548   { $as_echo "$as_me:$LINENO: result: no" >&5
28549 $as_echo "no" >&6; }
28550 fi
28551
28552
28553   test -n "$MSGFMT" && break
28554 done
28555
28556   if test -z "$MSGFMT"; then
28557     { { $as_echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
28558 $as_echo "$as_me: error: msgfmt is required for NLS" >&2;}
28559    { (exit 1); exit 1; }; }
28560   fi
28561   for ac_prog in msgmerge
28562 do
28563   # Extract the first word of "$ac_prog", so it can be a program name with args.
28564 set dummy $ac_prog; ac_word=$2
28565 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28566 $as_echo_n "checking for $ac_word... " >&6; }
28567 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
28568   $as_echo_n "(cached) " >&6
28569 else
28570   if test -n "$MSGMERGE"; then
28571   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
28572 else
28573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28574 for as_dir in $PATH
28575 do
28576   IFS=$as_save_IFS
28577   test -z "$as_dir" && as_dir=.
28578   for ac_exec_ext in '' $ac_executable_extensions; do
28579   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28580     ac_cv_prog_MSGMERGE="$ac_prog"
28581     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28582     break 2
28583   fi
28584 done
28585 done
28586 IFS=$as_save_IFS
28587
28588 fi
28589 fi
28590 MSGMERGE=$ac_cv_prog_MSGMERGE
28591 if test -n "$MSGMERGE"; then
28592   { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5
28593 $as_echo "$MSGMERGE" >&6; }
28594 else
28595   { $as_echo "$as_me:$LINENO: result: no" >&5
28596 $as_echo "no" >&6; }
28597 fi
28598
28599
28600   test -n "$MSGMERGE" && break
28601 done
28602
28603   for ac_prog in xgettext
28604 do
28605   # Extract the first word of "$ac_prog", so it can be a program name with args.
28606 set dummy $ac_prog; ac_word=$2
28607 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28608 $as_echo_n "checking for $ac_word... " >&6; }
28609 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
28610   $as_echo_n "(cached) " >&6
28611 else
28612   if test -n "$XGETTEXT"; then
28613   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
28614 else
28615 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28616 for as_dir in $PATH
28617 do
28618   IFS=$as_save_IFS
28619   test -z "$as_dir" && as_dir=.
28620   for ac_exec_ext in '' $ac_executable_extensions; do
28621   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28622     ac_cv_prog_XGETTEXT="$ac_prog"
28623     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28624     break 2
28625   fi
28626 done
28627 done
28628 IFS=$as_save_IFS
28629
28630 fi
28631 fi
28632 XGETTEXT=$ac_cv_prog_XGETTEXT
28633 if test -n "$XGETTEXT"; then
28634   { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
28635 $as_echo "$XGETTEXT" >&6; }
28636 else
28637   { $as_echo "$as_me:$LINENO: result: no" >&5
28638 $as_echo "no" >&6; }
28639 fi
28640
28641
28642   test -n "$XGETTEXT" && break
28643 done
28644
28645
28646 fi
28647
28648 # Check for Tcl configuration script tclConfig.sh
28649 if test "$with_tcl" = yes; then
28650     for ac_prog in tclsh tcl tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
28651 do
28652   # Extract the first word of "$ac_prog", so it can be a program name with args.
28653 set dummy $ac_prog; ac_word=$2
28654 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28655 $as_echo_n "checking for $ac_word... " >&6; }
28656 if test "${ac_cv_path_TCLSH+set}" = set; then
28657   $as_echo_n "(cached) " >&6
28658 else
28659   case $TCLSH in
28660   [\\/]* | ?:[\\/]*)
28661   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
28662   ;;
28663   *)
28664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28665 for as_dir in $PATH
28666 do
28667   IFS=$as_save_IFS
28668   test -z "$as_dir" && as_dir=.
28669   for ac_exec_ext in '' $ac_executable_extensions; do
28670   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28671     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
28672     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28673     break 2
28674   fi
28675 done
28676 done
28677 IFS=$as_save_IFS
28678
28679   ;;
28680 esac
28681 fi
28682 TCLSH=$ac_cv_path_TCLSH
28683 if test -n "$TCLSH"; then
28684   { $as_echo "$as_me:$LINENO: result: $TCLSH" >&5
28685 $as_echo "$TCLSH" >&6; }
28686 else
28687   { $as_echo "$as_me:$LINENO: result: no" >&5
28688 $as_echo "no" >&6; }
28689 fi
28690
28691
28692   test -n "$TCLSH" && break
28693 done
28694
28695 if test x"$TCLSH" = x""; then
28696   { { $as_echo "$as_me:$LINENO: error: Tcl shell not found" >&5
28697 $as_echo "$as_me: error: Tcl shell not found" >&2;}
28698    { (exit 1); exit 1; }; }
28699 fi
28700
28701 { $as_echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
28702 $as_echo_n "checking for tclConfig.sh... " >&6; }
28703 # Let user override test
28704 if test -z "$TCL_CONFIG_SH"; then
28705     pgac_test_dirs="$with_tclconfig"
28706
28707     set X $pgac_test_dirs; shift
28708     if test $# -eq 0; then
28709         test -z "$TCLSH" && { { $as_echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
28710 $as_echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
28711    { (exit 1); exit 1; }; }
28712         set X `echo 'puts $auto_path' | $TCLSH`; shift
28713     fi
28714
28715     for pgac_dir do
28716         if test -r "$pgac_dir/tclConfig.sh"; then
28717             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
28718             break
28719         fi
28720     done
28721 fi
28722
28723 if test -z "$TCL_CONFIG_SH"; then
28724     { $as_echo "$as_me:$LINENO: result: no" >&5
28725 $as_echo "no" >&6; }
28726     { { $as_echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
28727 $as_echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
28728    { (exit 1); exit 1; }; }
28729 else
28730     { $as_echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
28731 $as_echo "$TCL_CONFIG_SH" >&6; }
28732 fi
28733
28734
28735
28736     . "$TCL_CONFIG_SH"
28737 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
28738 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
28739 eval TCL_LIBS=\"$TCL_LIBS\"
28740 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
28741 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
28742
28743         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
28744     ac_save_CPPFLAGS=$CPPFLAGS
28745     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
28746     if test "${ac_cv_header_tcl_h+set}" = set; then
28747   { $as_echo "$as_me:$LINENO: checking for tcl.h" >&5
28748 $as_echo_n "checking for tcl.h... " >&6; }
28749 if test "${ac_cv_header_tcl_h+set}" = set; then
28750   $as_echo_n "(cached) " >&6
28751 fi
28752 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
28753 $as_echo "$ac_cv_header_tcl_h" >&6; }
28754 else
28755   # Is the header compilable?
28756 { $as_echo "$as_me:$LINENO: checking tcl.h usability" >&5
28757 $as_echo_n "checking tcl.h usability... " >&6; }
28758 cat >conftest.$ac_ext <<_ACEOF
28759 /* confdefs.h.  */
28760 _ACEOF
28761 cat confdefs.h >>conftest.$ac_ext
28762 cat >>conftest.$ac_ext <<_ACEOF
28763 /* end confdefs.h.  */
28764 $ac_includes_default
28765 #include <tcl.h>
28766 _ACEOF
28767 rm -f conftest.$ac_objext
28768 if { (ac_try="$ac_compile"
28769 case "(($ac_try" in
28770   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28771   *) ac_try_echo=$ac_try;;
28772 esac
28773 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28774 $as_echo "$ac_try_echo") >&5
28775   (eval "$ac_compile") 2>conftest.er1
28776   ac_status=$?
28777   grep -v '^ *+' conftest.er1 >conftest.err
28778   rm -f conftest.er1
28779   cat conftest.err >&5
28780   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28781   (exit $ac_status); } && {
28782          test -z "$ac_c_werror_flag" ||
28783          test ! -s conftest.err
28784        } && test -s conftest.$ac_objext; then
28785   ac_header_compiler=yes
28786 else
28787   $as_echo "$as_me: failed program was:" >&5
28788 sed 's/^/| /' conftest.$ac_ext >&5
28789
28790         ac_header_compiler=no
28791 fi
28792
28793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28794 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28795 $as_echo "$ac_header_compiler" >&6; }
28796
28797 # Is the header present?
28798 { $as_echo "$as_me:$LINENO: checking tcl.h presence" >&5
28799 $as_echo_n "checking tcl.h presence... " >&6; }
28800 cat >conftest.$ac_ext <<_ACEOF
28801 /* confdefs.h.  */
28802 _ACEOF
28803 cat confdefs.h >>conftest.$ac_ext
28804 cat >>conftest.$ac_ext <<_ACEOF
28805 /* end confdefs.h.  */
28806 #include <tcl.h>
28807 _ACEOF
28808 if { (ac_try="$ac_cpp conftest.$ac_ext"
28809 case "(($ac_try" in
28810   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28811   *) ac_try_echo=$ac_try;;
28812 esac
28813 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28814 $as_echo "$ac_try_echo") >&5
28815   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28816   ac_status=$?
28817   grep -v '^ *+' conftest.er1 >conftest.err
28818   rm -f conftest.er1
28819   cat conftest.err >&5
28820   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28821   (exit $ac_status); } >/dev/null && {
28822          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28823          test ! -s conftest.err
28824        }; then
28825   ac_header_preproc=yes
28826 else
28827   $as_echo "$as_me: failed program was:" >&5
28828 sed 's/^/| /' conftest.$ac_ext >&5
28829
28830   ac_header_preproc=no
28831 fi
28832
28833 rm -f conftest.err conftest.$ac_ext
28834 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28835 $as_echo "$ac_header_preproc" >&6; }
28836
28837 # So?  What about this header?
28838 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
28839   yes:no: )
28840     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
28841 $as_echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
28842     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
28843 $as_echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
28844     ac_header_preproc=yes
28845     ;;
28846   no:yes:* )
28847     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
28848 $as_echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
28849     { $as_echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
28850 $as_echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
28851     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
28852 $as_echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
28853     { $as_echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
28854 $as_echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
28855     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
28856 $as_echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
28857     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
28858 $as_echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
28859     ( cat <<\_ASBOX
28860 ## ---------------------------------------- ##
28861 ## Report this to pgsql-bugs@postgresql.org ##
28862 ## ---------------------------------------- ##
28863 _ASBOX
28864      ) | sed "s/^/$as_me: WARNING:     /" >&2
28865     ;;
28866 esac
28867 { $as_echo "$as_me:$LINENO: checking for tcl.h" >&5
28868 $as_echo_n "checking for tcl.h... " >&6; }
28869 if test "${ac_cv_header_tcl_h+set}" = set; then
28870   $as_echo_n "(cached) " >&6
28871 else
28872   ac_cv_header_tcl_h=$ac_header_preproc
28873 fi
28874 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
28875 $as_echo "$ac_cv_header_tcl_h" >&6; }
28876
28877 fi
28878 if test "x$ac_cv_header_tcl_h" = x""yes; then
28879   :
28880 else
28881   { { $as_echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
28882 $as_echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
28883    { (exit 1); exit 1; }; }
28884 fi
28885
28886
28887     CPPFLAGS=$ac_save_CPPFLAGS
28888 fi
28889
28890 # check for <Python.h>
28891 if test "$with_python" = yes; then
28892   ac_save_CPPFLAGS=$CPPFLAGS
28893   CPPFLAGS="$python_includespec $CPPFLAGS"
28894   if test "${ac_cv_header_Python_h+set}" = set; then
28895   { $as_echo "$as_me:$LINENO: checking for Python.h" >&5
28896 $as_echo_n "checking for Python.h... " >&6; }
28897 if test "${ac_cv_header_Python_h+set}" = set; then
28898   $as_echo_n "(cached) " >&6
28899 fi
28900 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5
28901 $as_echo "$ac_cv_header_Python_h" >&6; }
28902 else
28903   # Is the header compilable?
28904 { $as_echo "$as_me:$LINENO: checking Python.h usability" >&5
28905 $as_echo_n "checking Python.h usability... " >&6; }
28906 cat >conftest.$ac_ext <<_ACEOF
28907 /* confdefs.h.  */
28908 _ACEOF
28909 cat confdefs.h >>conftest.$ac_ext
28910 cat >>conftest.$ac_ext <<_ACEOF
28911 /* end confdefs.h.  */
28912 $ac_includes_default
28913 #include <Python.h>
28914 _ACEOF
28915 rm -f conftest.$ac_objext
28916 if { (ac_try="$ac_compile"
28917 case "(($ac_try" in
28918   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28919   *) ac_try_echo=$ac_try;;
28920 esac
28921 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28922 $as_echo "$ac_try_echo") >&5
28923   (eval "$ac_compile") 2>conftest.er1
28924   ac_status=$?
28925   grep -v '^ *+' conftest.er1 >conftest.err
28926   rm -f conftest.er1
28927   cat conftest.err >&5
28928   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28929   (exit $ac_status); } && {
28930          test -z "$ac_c_werror_flag" ||
28931          test ! -s conftest.err
28932        } && test -s conftest.$ac_objext; then
28933   ac_header_compiler=yes
28934 else
28935   $as_echo "$as_me: failed program was:" >&5
28936 sed 's/^/| /' conftest.$ac_ext >&5
28937
28938         ac_header_compiler=no
28939 fi
28940
28941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28942 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28943 $as_echo "$ac_header_compiler" >&6; }
28944
28945 # Is the header present?
28946 { $as_echo "$as_me:$LINENO: checking Python.h presence" >&5
28947 $as_echo_n "checking Python.h presence... " >&6; }
28948 cat >conftest.$ac_ext <<_ACEOF
28949 /* confdefs.h.  */
28950 _ACEOF
28951 cat confdefs.h >>conftest.$ac_ext
28952 cat >>conftest.$ac_ext <<_ACEOF
28953 /* end confdefs.h.  */
28954 #include <Python.h>
28955 _ACEOF
28956 if { (ac_try="$ac_cpp conftest.$ac_ext"
28957 case "(($ac_try" in
28958   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28959   *) ac_try_echo=$ac_try;;
28960 esac
28961 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28962 $as_echo "$ac_try_echo") >&5
28963   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28964   ac_status=$?
28965   grep -v '^ *+' conftest.er1 >conftest.err
28966   rm -f conftest.er1
28967   cat conftest.err >&5
28968   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28969   (exit $ac_status); } >/dev/null && {
28970          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28971          test ! -s conftest.err
28972        }; then
28973   ac_header_preproc=yes
28974 else
28975   $as_echo "$as_me: failed program was:" >&5
28976 sed 's/^/| /' conftest.$ac_ext >&5
28977
28978   ac_header_preproc=no
28979 fi
28980
28981 rm -f conftest.err conftest.$ac_ext
28982 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28983 $as_echo "$ac_header_preproc" >&6; }
28984
28985 # So?  What about this header?
28986 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
28987   yes:no: )
28988     { $as_echo "$as_me:$LINENO: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&5
28989 $as_echo "$as_me: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
28990     { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the compiler's result" >&5
28991 $as_echo "$as_me: WARNING: Python.h: proceeding with the compiler's result" >&2;}
28992     ac_header_preproc=yes
28993     ;;
28994   no:yes:* )
28995     { $as_echo "$as_me:$LINENO: WARNING: Python.h: present but cannot be compiled" >&5
28996 $as_echo "$as_me: WARNING: Python.h: present but cannot be compiled" >&2;}
28997     { $as_echo "$as_me:$LINENO: WARNING: Python.h:     check for missing prerequisite headers?" >&5
28998 $as_echo "$as_me: WARNING: Python.h:     check for missing prerequisite headers?" >&2;}
28999     { $as_echo "$as_me:$LINENO: WARNING: Python.h: see the Autoconf documentation" >&5
29000 $as_echo "$as_me: WARNING: Python.h: see the Autoconf documentation" >&2;}
29001     { $as_echo "$as_me:$LINENO: WARNING: Python.h:     section \"Present But Cannot Be Compiled\"" >&5
29002 $as_echo "$as_me: WARNING: Python.h:     section \"Present But Cannot Be Compiled\"" >&2;}
29003     { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the preprocessor's result" >&5
29004 $as_echo "$as_me: WARNING: Python.h: proceeding with the preprocessor's result" >&2;}
29005     { $as_echo "$as_me:$LINENO: WARNING: Python.h: in the future, the compiler will take precedence" >&5
29006 $as_echo "$as_me: WARNING: Python.h: in the future, the compiler will take precedence" >&2;}
29007     ( cat <<\_ASBOX
29008 ## ---------------------------------------- ##
29009 ## Report this to pgsql-bugs@postgresql.org ##
29010 ## ---------------------------------------- ##
29011 _ASBOX
29012      ) | sed "s/^/$as_me: WARNING:     /" >&2
29013     ;;
29014 esac
29015 { $as_echo "$as_me:$LINENO: checking for Python.h" >&5
29016 $as_echo_n "checking for Python.h... " >&6; }
29017 if test "${ac_cv_header_Python_h+set}" = set; then
29018   $as_echo_n "(cached) " >&6
29019 else
29020   ac_cv_header_Python_h=$ac_header_preproc
29021 fi
29022 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5
29023 $as_echo "$ac_cv_header_Python_h" >&6; }
29024
29025 fi
29026 if test "x$ac_cv_header_Python_h" = x""yes; then
29027   :
29028 else
29029   { { $as_echo "$as_me:$LINENO: error: header file <Python.h> is required for Python" >&5
29030 $as_echo "$as_me: error: header file <Python.h> is required for Python" >&2;}
29031    { (exit 1); exit 1; }; }
29032 fi
29033
29034
29035   CPPFLAGS=$ac_save_CPPFLAGS
29036 fi
29037
29038 #
29039 # Check for DocBook and tools
29040 #
29041 for ac_prog in onsgmls nsgmls
29042 do
29043   # Extract the first word of "$ac_prog", so it can be a program name with args.
29044 set dummy $ac_prog; ac_word=$2
29045 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29046 $as_echo_n "checking for $ac_word... " >&6; }
29047 if test "${ac_cv_prog_NSGMLS+set}" = set; then
29048   $as_echo_n "(cached) " >&6
29049 else
29050   if test -n "$NSGMLS"; then
29051   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
29052 else
29053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29054 for as_dir in $PATH
29055 do
29056   IFS=$as_save_IFS
29057   test -z "$as_dir" && as_dir=.
29058   for ac_exec_ext in '' $ac_executable_extensions; do
29059   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29060     ac_cv_prog_NSGMLS="$ac_prog"
29061     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29062     break 2
29063   fi
29064 done
29065 done
29066 IFS=$as_save_IFS
29067
29068 fi
29069 fi
29070 NSGMLS=$ac_cv_prog_NSGMLS
29071 if test -n "$NSGMLS"; then
29072   { $as_echo "$as_me:$LINENO: result: $NSGMLS" >&5
29073 $as_echo "$NSGMLS" >&6; }
29074 else
29075   { $as_echo "$as_me:$LINENO: result: no" >&5
29076 $as_echo "no" >&6; }
29077 fi
29078
29079
29080   test -n "$NSGMLS" && break
29081 done
29082
29083 for ac_prog in openjade jade
29084 do
29085   # Extract the first word of "$ac_prog", so it can be a program name with args.
29086 set dummy $ac_prog; ac_word=$2
29087 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29088 $as_echo_n "checking for $ac_word... " >&6; }
29089 if test "${ac_cv_prog_JADE+set}" = set; then
29090   $as_echo_n "(cached) " >&6
29091 else
29092   if test -n "$JADE"; then
29093   ac_cv_prog_JADE="$JADE" # Let the user override the test.
29094 else
29095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29096 for as_dir in $PATH
29097 do
29098   IFS=$as_save_IFS
29099   test -z "$as_dir" && as_dir=.
29100   for ac_exec_ext in '' $ac_executable_extensions; do
29101   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29102     ac_cv_prog_JADE="$ac_prog"
29103     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29104     break 2
29105   fi
29106 done
29107 done
29108 IFS=$as_save_IFS
29109
29110 fi
29111 fi
29112 JADE=$ac_cv_prog_JADE
29113 if test -n "$JADE"; then
29114   { $as_echo "$as_me:$LINENO: result: $JADE" >&5
29115 $as_echo "$JADE" >&6; }
29116 else
29117   { $as_echo "$as_me:$LINENO: result: no" >&5
29118 $as_echo "no" >&6; }
29119 fi
29120
29121
29122   test -n "$JADE" && break
29123 done
29124
29125
29126 { $as_echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
29127 $as_echo_n "checking for DocBook V4.2... " >&6; }
29128 if test "${pgac_cv_check_docbook+set}" = set; then
29129   $as_echo_n "(cached) " >&6
29130 else
29131   cat >conftest.sgml <<EOF
29132 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
29133 <book>
29134  <title>test</title>
29135  <chapter>
29136   <title>random</title>
29137    <sect1>
29138     <title>testsect</title>
29139     <para>text</para>
29140   </sect1>
29141  </chapter>
29142 </book>
29143 EOF
29144
29145 pgac_cv_check_docbook=no
29146
29147 if test -n "$NSGMLS"; then
29148   $NSGMLS -s conftest.sgml 1>&5 2>&1
29149   if test $? -eq 0; then
29150     pgac_cv_check_docbook=yes
29151   fi
29152 fi
29153 rm -f conftest.sgml
29154 fi
29155 { $as_echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
29156 $as_echo "$pgac_cv_check_docbook" >&6; }
29157
29158 have_docbook=$pgac_cv_check_docbook
29159
29160
29161 { $as_echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
29162 $as_echo_n "checking for DocBook stylesheets... " >&6; }
29163 if test "${pgac_cv_path_stylesheets+set}" = set; then
29164   $as_echo_n "(cached) " >&6
29165 else
29166   if test -n "$DOCBOOKSTYLE"; then
29167   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
29168 else
29169   for pgac_prefix in /usr /usr/local /opt /sw; do
29170     for pgac_infix in share lib; do
29171       for pgac_postfix in \
29172         sgml/stylesheets/nwalsh-modular \
29173         sgml/stylesheets/docbook \
29174         sgml/stylesheets/dsssl/docbook \
29175         sgml/docbook-dsssl \
29176         sgml/docbook/dsssl/modular \
29177         sgml/docbook/stylesheet/dsssl/modular \
29178         sgml/docbook/dsssl-stylesheets \
29179         sgml/dsssl/docbook-dsssl-nwalsh
29180       do
29181         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
29182         if test -r "$pgac_candidate/html/docbook.dsl" \
29183            && test -r "$pgac_candidate/print/docbook.dsl"
29184         then
29185           pgac_cv_path_stylesheets=$pgac_candidate
29186           break 3
29187         fi
29188       done
29189     done
29190   done
29191 fi
29192 fi
29193
29194 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
29195
29196 if test -n "$DOCBOOKSTYLE"; then
29197   { $as_echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
29198 $as_echo "$DOCBOOKSTYLE" >&6; }
29199 else
29200   { $as_echo "$as_me:$LINENO: result: no" >&5
29201 $as_echo "no" >&6; }
29202 fi
29203 if test -n "$DOCBOOKSTYLE"; then
29204   for ac_prog in collateindex.pl
29205 do
29206   # Extract the first word of "$ac_prog", so it can be a program name with args.
29207 set dummy $ac_prog; ac_word=$2
29208 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29209 $as_echo_n "checking for $ac_word... " >&6; }
29210 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
29211   $as_echo_n "(cached) " >&6
29212 else
29213   case $COLLATEINDEX in
29214   [\\/]* | ?:[\\/]*)
29215   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
29216   ;;
29217   *)
29218   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29219 for as_dir in $DOCBOOKSTYLE/bin $PATH
29220 do
29221   IFS=$as_save_IFS
29222   test -z "$as_dir" && as_dir=.
29223   for ac_exec_ext in '' $ac_executable_extensions; do
29224   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29225     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
29226     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29227     break 2
29228   fi
29229 done
29230 done
29231 IFS=$as_save_IFS
29232
29233   ;;
29234 esac
29235 fi
29236 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
29237 if test -n "$COLLATEINDEX"; then
29238   { $as_echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
29239 $as_echo "$COLLATEINDEX" >&6; }
29240 else
29241   { $as_echo "$as_me:$LINENO: result: no" >&5
29242 $as_echo "no" >&6; }
29243 fi
29244
29245
29246   test -n "$COLLATEINDEX" && break
29247 done
29248
29249 else
29250   for ac_prog in collateindex.pl
29251 do
29252   # Extract the first word of "$ac_prog", so it can be a program name with args.
29253 set dummy $ac_prog; ac_word=$2
29254 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29255 $as_echo_n "checking for $ac_word... " >&6; }
29256 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
29257   $as_echo_n "(cached) " >&6
29258 else
29259   case $COLLATEINDEX in
29260   [\\/]* | ?:[\\/]*)
29261   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
29262   ;;
29263   *)
29264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29265 for as_dir in $PATH
29266 do
29267   IFS=$as_save_IFS
29268   test -z "$as_dir" && as_dir=.
29269   for ac_exec_ext in '' $ac_executable_extensions; do
29270   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29271     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
29272     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29273     break 2
29274   fi
29275 done
29276 done
29277 IFS=$as_save_IFS
29278
29279   ;;
29280 esac
29281 fi
29282 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
29283 if test -n "$COLLATEINDEX"; then
29284   { $as_echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
29285 $as_echo "$COLLATEINDEX" >&6; }
29286 else
29287   { $as_echo "$as_me:$LINENO: result: no" >&5
29288 $as_echo "no" >&6; }
29289 fi
29290
29291
29292   test -n "$COLLATEINDEX" && break
29293 done
29294
29295 fi
29296 for ac_prog in xsltproc
29297 do
29298   # Extract the first word of "$ac_prog", so it can be a program name with args.
29299 set dummy $ac_prog; ac_word=$2
29300 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29301 $as_echo_n "checking for $ac_word... " >&6; }
29302 if test "${ac_cv_prog_XSLTPROC+set}" = set; then
29303   $as_echo_n "(cached) " >&6
29304 else
29305   if test -n "$XSLTPROC"; then
29306   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
29307 else
29308 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29309 for as_dir in $PATH
29310 do
29311   IFS=$as_save_IFS
29312   test -z "$as_dir" && as_dir=.
29313   for ac_exec_ext in '' $ac_executable_extensions; do
29314   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29315     ac_cv_prog_XSLTPROC="$ac_prog"
29316     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29317     break 2
29318   fi
29319 done
29320 done
29321 IFS=$as_save_IFS
29322
29323 fi
29324 fi
29325 XSLTPROC=$ac_cv_prog_XSLTPROC
29326 if test -n "$XSLTPROC"; then
29327   { $as_echo "$as_me:$LINENO: result: $XSLTPROC" >&5
29328 $as_echo "$XSLTPROC" >&6; }
29329 else
29330   { $as_echo "$as_me:$LINENO: result: no" >&5
29331 $as_echo "no" >&6; }
29332 fi
29333
29334
29335   test -n "$XSLTPROC" && break
29336 done
29337
29338 for ac_prog in osx sgml2xml sx
29339 do
29340   # Extract the first word of "$ac_prog", so it can be a program name with args.
29341 set dummy $ac_prog; ac_word=$2
29342 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29343 $as_echo_n "checking for $ac_word... " >&6; }
29344 if test "${ac_cv_prog_OSX+set}" = set; then
29345   $as_echo_n "(cached) " >&6
29346 else
29347   if test -n "$OSX"; then
29348   ac_cv_prog_OSX="$OSX" # Let the user override the test.
29349 else
29350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29351 for as_dir in $PATH
29352 do
29353   IFS=$as_save_IFS
29354   test -z "$as_dir" && as_dir=.
29355   for ac_exec_ext in '' $ac_executable_extensions; do
29356   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29357     ac_cv_prog_OSX="$ac_prog"
29358     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29359     break 2
29360   fi
29361 done
29362 done
29363 IFS=$as_save_IFS
29364
29365 fi
29366 fi
29367 OSX=$ac_cv_prog_OSX
29368 if test -n "$OSX"; then
29369   { $as_echo "$as_me:$LINENO: result: $OSX" >&5
29370 $as_echo "$OSX" >&6; }
29371 else
29372   { $as_echo "$as_me:$LINENO: result: no" >&5
29373 $as_echo "no" >&6; }
29374 fi
29375
29376
29377   test -n "$OSX" && break
29378 done
29379
29380
29381 # Thread testing
29382
29383 # We have to run the thread test near the end so we have all our symbols
29384 # defined.  Cross compiling throws a warning.
29385 #
29386 if test "$enable_thread_safety" = yes; then
29387 if test "$PORTNAME" != "win32"
29388 then
29389 { $as_echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
29390 $as_echo_n "checking thread safety of required library functions... " >&6; }
29391
29392 _CFLAGS="$CFLAGS"
29393 _LIBS="$LIBS"
29394 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
29395 LIBS="$LIBS $PTHREAD_LIBS"
29396 if test "$cross_compiling" = yes; then
29397   { $as_echo "$as_me:$LINENO: result: maybe" >&5
29398 $as_echo "maybe" >&6; }
29399   { $as_echo "$as_me:$LINENO: WARNING:
29400 *** Skipping thread test program because of cross-compile build.
29401 *** Run the program in src/test/thread on the target machine.
29402 " >&5
29403 $as_echo "$as_me: WARNING:
29404 *** Skipping thread test program because of cross-compile build.
29405 *** Run the program in src/test/thread on the target machine.
29406 " >&2;}
29407 else
29408   cat >conftest.$ac_ext <<_ACEOF
29409 /* confdefs.h.  */
29410 _ACEOF
29411 cat confdefs.h >>conftest.$ac_ext
29412 cat >>conftest.$ac_ext <<_ACEOF
29413 /* end confdefs.h.  */
29414 #include "$srcdir/src/test/thread/thread_test.c"
29415 _ACEOF
29416 rm -f conftest$ac_exeext
29417 if { (ac_try="$ac_link"
29418 case "(($ac_try" in
29419   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29420   *) ac_try_echo=$ac_try;;
29421 esac
29422 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29423 $as_echo "$ac_try_echo") >&5
29424   (eval "$ac_link") 2>&5
29425   ac_status=$?
29426   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29427   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
29428   { (case "(($ac_try" in
29429   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29430   *) ac_try_echo=$ac_try;;
29431 esac
29432 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29433 $as_echo "$ac_try_echo") >&5
29434   (eval "$ac_try") 2>&5
29435   ac_status=$?
29436   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29437   (exit $ac_status); }; }; then
29438   { $as_echo "$as_me:$LINENO: result: yes" >&5
29439 $as_echo "yes" >&6; }
29440 else
29441   $as_echo "$as_me: program exited with status $ac_status" >&5
29442 $as_echo "$as_me: failed program was:" >&5
29443 sed 's/^/| /' conftest.$ac_ext >&5
29444
29445 ( exit $ac_status )
29446 { $as_echo "$as_me:$LINENO: result: no" >&5
29447 $as_echo "no" >&6; }
29448   { { $as_echo "$as_me:$LINENO: error: thread test program failed
29449 This platform is not thread-safe.  Check the file 'config.log' or compile
29450 and run src/test/thread/thread_test for the exact reason.
29451 Use --disable-thread-safety to disable thread safety." >&5
29452 $as_echo "$as_me: error: thread test program failed
29453 This platform is not thread-safe.  Check the file 'config.log' or compile
29454 and run src/test/thread/thread_test for the exact reason.
29455 Use --disable-thread-safety to disable thread safety." >&2;}
29456    { (exit 1); exit 1; }; }
29457 fi
29458 rm -rf conftest.dSYM
29459 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
29460 fi
29461
29462
29463 CFLAGS="$_CFLAGS"
29464 LIBS="$_LIBS"
29465 else
29466 { $as_echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
29467 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
29468 fi
29469 fi
29470
29471 # If compiler will take -Wl,--as-needed (or various platform-specific
29472 # spellings thereof) then add that to LDFLAGS.  This is much easier than
29473 # trying to filter LIBS to the minimum for each executable.
29474 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
29475 # libreadline; therefore we postpone testing it until we know what library
29476 # dependencies readline has.  The test code will try to link with $LIBS.
29477 if test "$with_readline" = yes; then
29478   link_test_func=readline
29479 else
29480   link_test_func=exit
29481 fi
29482
29483 if test "$PORTNAME" = "darwin"; then
29484   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
29485 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
29486 if test "${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+set}" = set; then
29487   $as_echo_n "(cached) " >&6
29488 else
29489   pgac_save_LDFLAGS=$LDFLAGS
29490 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
29491 if test "$cross_compiling" = yes; then
29492   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
29493 else
29494   cat >conftest.$ac_ext <<_ACEOF
29495 /* confdefs.h.  */
29496 _ACEOF
29497 cat confdefs.h >>conftest.$ac_ext
29498 cat >>conftest.$ac_ext <<_ACEOF
29499 /* end confdefs.h.  */
29500 extern void $link_test_func (); void (*fptr) () = $link_test_func;
29501 int
29502 main ()
29503 {
29504
29505   ;
29506   return 0;
29507 }
29508 _ACEOF
29509 rm -f conftest$ac_exeext
29510 if { (ac_try="$ac_link"
29511 case "(($ac_try" in
29512   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29513   *) ac_try_echo=$ac_try;;
29514 esac
29515 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29516 $as_echo "$ac_try_echo") >&5
29517   (eval "$ac_link") 2>&5
29518   ac_status=$?
29519   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29520   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
29521   { (case "(($ac_try" in
29522   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29523   *) ac_try_echo=$ac_try;;
29524 esac
29525 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29526 $as_echo "$ac_try_echo") >&5
29527   (eval "$ac_try") 2>&5
29528   ac_status=$?
29529   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29530   (exit $ac_status); }; }; then
29531   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
29532 else
29533   $as_echo "$as_me: program exited with status $ac_status" >&5
29534 $as_echo "$as_me: failed program was:" >&5
29535 sed 's/^/| /' conftest.$ac_ext >&5
29536
29537 ( exit $ac_status )
29538 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
29539 fi
29540 rm -rf conftest.dSYM
29541 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
29542 fi
29543
29544
29545 LDFLAGS="$pgac_save_LDFLAGS"
29546 fi
29547 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
29548 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
29549 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
29550   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
29551 fi
29552
29553 elif test "$PORTNAME" = "openbsd"; then
29554   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,-Bdynamic" >&5
29555 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
29556 if test "${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+set}" = set; then
29557   $as_echo_n "(cached) " >&6
29558 else
29559   pgac_save_LDFLAGS=$LDFLAGS
29560 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
29561 if test "$cross_compiling" = yes; then
29562   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
29563 else
29564   cat >conftest.$ac_ext <<_ACEOF
29565 /* confdefs.h.  */
29566 _ACEOF
29567 cat confdefs.h >>conftest.$ac_ext
29568 cat >>conftest.$ac_ext <<_ACEOF
29569 /* end confdefs.h.  */
29570 extern void $link_test_func (); void (*fptr) () = $link_test_func;
29571 int
29572 main ()
29573 {
29574
29575   ;
29576   return 0;
29577 }
29578 _ACEOF
29579 rm -f conftest$ac_exeext
29580 if { (ac_try="$ac_link"
29581 case "(($ac_try" in
29582   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29583   *) ac_try_echo=$ac_try;;
29584 esac
29585 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29586 $as_echo "$ac_try_echo") >&5
29587   (eval "$ac_link") 2>&5
29588   ac_status=$?
29589   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29590   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
29591   { (case "(($ac_try" in
29592   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29593   *) ac_try_echo=$ac_try;;
29594 esac
29595 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29596 $as_echo "$ac_try_echo") >&5
29597   (eval "$ac_try") 2>&5
29598   ac_status=$?
29599   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29600   (exit $ac_status); }; }; then
29601   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
29602 else
29603   $as_echo "$as_me: program exited with status $ac_status" >&5
29604 $as_echo "$as_me: failed program was:" >&5
29605 sed 's/^/| /' conftest.$ac_ext >&5
29606
29607 ( exit $ac_status )
29608 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
29609 fi
29610 rm -rf conftest.dSYM
29611 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
29612 fi
29613
29614
29615 LDFLAGS="$pgac_save_LDFLAGS"
29616 fi
29617 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
29618 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
29619 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
29620   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
29621 fi
29622
29623 else
29624   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,--as-needed" >&5
29625 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
29626 if test "${pgac_cv_prog_cc_ldflags__Wl___as_needed+set}" = set; then
29627   $as_echo_n "(cached) " >&6
29628 else
29629   pgac_save_LDFLAGS=$LDFLAGS
29630 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
29631 if test "$cross_compiling" = yes; then
29632   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
29633 else
29634   cat >conftest.$ac_ext <<_ACEOF
29635 /* confdefs.h.  */
29636 _ACEOF
29637 cat confdefs.h >>conftest.$ac_ext
29638 cat >>conftest.$ac_ext <<_ACEOF
29639 /* end confdefs.h.  */
29640 extern void $link_test_func (); void (*fptr) () = $link_test_func;
29641 int
29642 main ()
29643 {
29644
29645   ;
29646   return 0;
29647 }
29648 _ACEOF
29649 rm -f conftest$ac_exeext
29650 if { (ac_try="$ac_link"
29651 case "(($ac_try" in
29652   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29653   *) ac_try_echo=$ac_try;;
29654 esac
29655 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29656 $as_echo "$ac_try_echo") >&5
29657   (eval "$ac_link") 2>&5
29658   ac_status=$?
29659   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29660   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
29661   { (case "(($ac_try" in
29662   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29663   *) ac_try_echo=$ac_try;;
29664 esac
29665 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29666 $as_echo "$ac_try_echo") >&5
29667   (eval "$ac_try") 2>&5
29668   ac_status=$?
29669   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29670   (exit $ac_status); }; }; then
29671   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
29672 else
29673   $as_echo "$as_me: program exited with status $ac_status" >&5
29674 $as_echo "$as_me: failed program was:" >&5
29675 sed 's/^/| /' conftest.$ac_ext >&5
29676
29677 ( exit $ac_status )
29678 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
29679 fi
29680 rm -rf conftest.dSYM
29681 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
29682 fi
29683
29684
29685 LDFLAGS="$pgac_save_LDFLAGS"
29686 fi
29687 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
29688 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
29689 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
29690   LDFLAGS="$LDFLAGS -Wl,--as-needed"
29691 fi
29692
29693 fi
29694
29695
29696 # Begin output steps
29697
29698 { $as_echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
29699 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
29700 { $as_echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
29701 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
29702 { $as_echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
29703 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
29704
29705 # Create compiler version string
29706 if test x"$GCC" = x"yes" ; then
29707   cc_string=`${CC} --version | sed q`
29708   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
29709 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
29710   cc_string=`${CC} -V 2>&1 | sed q`
29711 else
29712   cc_string=$CC
29713 fi
29714
29715
29716 cat >>confdefs.h <<_ACEOF
29717 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
29718 _ACEOF
29719
29720
29721 # Supply a numeric version string for use by 3rd party add-ons
29722 # awk -F is a regex on some platforms, and not on others, so make "." a tab
29723 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
29724 tr '.' '        ' |
29725 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
29726
29727 cat >>confdefs.h <<_ACEOF
29728 #define PG_VERSION_NUM $PG_VERSION_NUM
29729 _ACEOF
29730
29731
29732
29733 # prepare build tree if outside source tree
29734 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
29735 # Note 2: /bin/pwd might be better than shell's built-in at getting
29736 #         a symlink-free name.
29737 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
29738   vpath_build=no
29739 else
29740   vpath_build=yes
29741   if test "$no_create" != yes; then
29742     $as_echo_n "preparing build tree... " >&6
29743     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
29744     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
29745       || { { $as_echo "$as_me:$LINENO: error: failed" >&5
29746 $as_echo "$as_me: error: failed" >&2;}
29747    { (exit 1); exit 1; }; }
29748     { $as_echo "$as_me:$LINENO: result: done" >&5
29749 $as_echo "done" >&6; }
29750   fi
29751 fi
29752
29753
29754
29755 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
29756
29757
29758 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}"
29759
29760
29761 if test "$PORTNAME" = "win32"; then
29762 ac_config_commands="$ac_config_commands check_win32_symlinks"
29763
29764 fi
29765
29766 ac_config_headers="$ac_config_headers src/include/pg_config.h"
29767
29768
29769 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
29770
29771
29772 cat >confcache <<\_ACEOF
29773 # This file is a shell script that caches the results of configure
29774 # tests run on this system so they can be shared between configure
29775 # scripts and configure runs, see configure's option --config-cache.
29776 # It is not useful on other systems.  If it contains results you don't
29777 # want to keep, you may remove or edit it.
29778 #
29779 # config.status only pays attention to the cache file if you give it
29780 # the --recheck option to rerun configure.
29781 #
29782 # `ac_cv_env_foo' variables (set or unset) will be overridden when
29783 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29784 # following values.
29785
29786 _ACEOF
29787
29788 # The following way of writing the cache mishandles newlines in values,
29789 # but we know of no workaround that is simple, portable, and efficient.
29790 # So, we kill variables containing newlines.
29791 # Ultrix sh set writes to stderr and can't be redirected directly,
29792 # and sets the high bit in the cache file unless we assign to the vars.
29793 (
29794   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
29795     eval ac_val=\$$ac_var
29796     case $ac_val in #(
29797     *${as_nl}*)
29798       case $ac_var in #(
29799       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
29800 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
29801       esac
29802       case $ac_var in #(
29803       _ | IFS | as_nl) ;; #(
29804       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
29805       *) $as_unset $ac_var ;;
29806       esac ;;
29807     esac
29808   done
29809
29810   (set) 2>&1 |
29811     case $as_nl`(ac_space=' '; set) 2>&1` in #(
29812     *${as_nl}ac_space=\ *)
29813       # `set' does not quote correctly, so add quotes (double-quote
29814       # substitution turns \\\\ into \\, and sed turns \\ into \).
29815       sed -n \
29816         "s/'/'\\\\''/g;
29817           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29818       ;; #(
29819     *)
29820       # `set' quotes correctly as required by POSIX, so do not add quotes.
29821       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
29822       ;;
29823     esac |
29824     sort
29825 ) |
29826   sed '
29827      /^ac_cv_env_/b end
29828      t clear
29829      :clear
29830      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29831      t end
29832      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29833      :end' >>confcache
29834 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
29835   if test -w "$cache_file"; then
29836     test "x$cache_file" != "x/dev/null" &&
29837       { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
29838 $as_echo "$as_me: updating cache $cache_file" >&6;}
29839     cat confcache >$cache_file
29840   else
29841     { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
29842 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
29843   fi
29844 fi
29845 rm -f confcache
29846
29847 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29848 # Let make expand exec_prefix.
29849 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29850
29851 DEFS=-DHAVE_CONFIG_H
29852
29853 ac_libobjs=
29854 ac_ltlibobjs=
29855 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
29856   # 1. Remove the extension, and $U if already installed.
29857   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
29858   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
29859   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
29860   #    will be set to the directory where LIBOBJS objects are built.
29861   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
29862   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
29863 done
29864 LIBOBJS=$ac_libobjs
29865
29866 LTLIBOBJS=$ac_ltlibobjs
29867
29868
29869
29870
29871 : ${CONFIG_STATUS=./config.status}
29872 ac_write_fail=0
29873 ac_clean_files_save=$ac_clean_files
29874 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29875 { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
29876 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29877 cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29878 #! $SHELL
29879 # Generated by $as_me.
29880 # Run this file to recreate the current configuration.
29881 # Compiler output produced by configure, useful for debugging
29882 # configure, is in config.log if it exists.
29883
29884 debug=false
29885 ac_cs_recheck=false
29886 ac_cs_silent=false
29887 SHELL=\${CONFIG_SHELL-$SHELL}
29888 _ACEOF
29889
29890 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29891 ## --------------------- ##
29892 ## M4sh Initialization.  ##
29893 ## --------------------- ##
29894
29895 # Be more Bourne compatible
29896 DUALCASE=1; export DUALCASE # for MKS sh
29897 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29898   emulate sh
29899   NULLCMD=:
29900   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29901   # is contrary to our usage.  Disable this feature.
29902   alias -g '${1+"$@"}'='"$@"'
29903   setopt NO_GLOB_SUBST
29904 else
29905   case `(set -o) 2>/dev/null` in
29906   *posix*) set -o posix ;;
29907 esac
29908
29909 fi
29910
29911
29912
29913
29914 # PATH needs CR
29915 # Avoid depending upon Character Ranges.
29916 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29917 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29918 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29919 as_cr_digits='0123456789'
29920 as_cr_alnum=$as_cr_Letters$as_cr_digits
29921
29922 as_nl='
29923 '
29924 export as_nl
29925 # Printing a long string crashes Solaris 7 /usr/bin/printf.
29926 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29927 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29928 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29929 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29930   as_echo='printf %s\n'
29931   as_echo_n='printf %s'
29932 else
29933   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29934     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29935     as_echo_n='/usr/ucb/echo -n'
29936   else
29937     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29938     as_echo_n_body='eval
29939       arg=$1;
29940       case $arg in
29941       *"$as_nl"*)
29942         expr "X$arg" : "X\\(.*\\)$as_nl";
29943         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29944       esac;
29945       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29946     '
29947     export as_echo_n_body
29948     as_echo_n='sh -c $as_echo_n_body as_echo'
29949   fi
29950   export as_echo_body
29951   as_echo='sh -c $as_echo_body as_echo'
29952 fi
29953
29954 # The user is always right.
29955 if test "${PATH_SEPARATOR+set}" != set; then
29956   PATH_SEPARATOR=:
29957   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29958     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29959       PATH_SEPARATOR=';'
29960   }
29961 fi
29962
29963 # Support unset when possible.
29964 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
29965   as_unset=unset
29966 else
29967   as_unset=false
29968 fi
29969
29970
29971 # IFS
29972 # We need space, tab and new line, in precisely that order.  Quoting is
29973 # there to prevent editors from complaining about space-tab.
29974 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
29975 # splitting by setting IFS to empty value.)
29976 IFS=" ""        $as_nl"
29977
29978 # Find who we are.  Look in the path if we contain no directory separator.
29979 case $0 in
29980   *[\\/]* ) as_myself=$0 ;;
29981   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29982 for as_dir in $PATH
29983 do
29984   IFS=$as_save_IFS
29985   test -z "$as_dir" && as_dir=.
29986   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29987 done
29988 IFS=$as_save_IFS
29989
29990      ;;
29991 esac
29992 # We did not find ourselves, most probably we were run as `sh COMMAND'
29993 # in which case we are not to be found in the path.
29994 if test "x$as_myself" = x; then
29995   as_myself=$0
29996 fi
29997 if test ! -f "$as_myself"; then
29998   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29999   { (exit 1); exit 1; }
30000 fi
30001
30002 # Work around bugs in pre-3.0 UWIN ksh.
30003 for as_var in ENV MAIL MAILPATH
30004 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
30005 done
30006 PS1='$ '
30007 PS2='> '
30008 PS4='+ '
30009
30010 # NLS nuisances.
30011 LC_ALL=C
30012 export LC_ALL
30013 LANGUAGE=C
30014 export LANGUAGE
30015
30016 # Required to use basename.
30017 if expr a : '\(a\)' >/dev/null 2>&1 &&
30018    test "X`expr 00001 : '.*\(...\)'`" = X001; then
30019   as_expr=expr
30020 else
30021   as_expr=false
30022 fi
30023
30024 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
30025   as_basename=basename
30026 else
30027   as_basename=false
30028 fi
30029
30030
30031 # Name of the executable.
30032 as_me=`$as_basename -- "$0" ||
30033 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30034          X"$0" : 'X\(//\)$' \| \
30035          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
30036 $as_echo X/"$0" |
30037     sed '/^.*\/\([^/][^/]*\)\/*$/{
30038             s//\1/
30039             q
30040           }
30041           /^X\/\(\/\/\)$/{
30042             s//\1/
30043             q
30044           }
30045           /^X\/\(\/\).*/{
30046             s//\1/
30047             q
30048           }
30049           s/.*/./; q'`
30050
30051 # CDPATH.
30052 $as_unset CDPATH
30053
30054
30055
30056   as_lineno_1=$LINENO
30057   as_lineno_2=$LINENO
30058   test "x$as_lineno_1" != "x$as_lineno_2" &&
30059   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
30060
30061   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
30062   # uniformly replaced by the line number.  The first 'sed' inserts a
30063   # line-number line after each line using $LINENO; the second 'sed'
30064   # does the real work.  The second script uses 'N' to pair each
30065   # line-number line with the line containing $LINENO, and appends
30066   # trailing '-' during substitution so that $LINENO is not a special
30067   # case at line end.
30068   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
30069   # scripts with optimization help from Paolo Bonzini.  Blame Lee
30070   # E. McMahon (1931-1989) for sed's syntax.  :-)
30071   sed -n '
30072     p
30073     /[$]LINENO/=
30074   ' <$as_myself |
30075     sed '
30076       s/[$]LINENO.*/&-/
30077       t lineno
30078       b
30079       :lineno
30080       N
30081       :loop
30082       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
30083       t loop
30084       s/-\n.*//
30085     ' >$as_me.lineno &&
30086   chmod +x "$as_me.lineno" ||
30087     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
30088    { (exit 1); exit 1; }; }
30089
30090   # Don't try to exec as it changes $[0], causing all sort of problems
30091   # (the dirname of $[0] is not the place where we might find the
30092   # original and so on.  Autoconf is especially sensitive to this).
30093   . "./$as_me.lineno"
30094   # Exit status is that of the last command.
30095   exit
30096 }
30097
30098
30099 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
30100   as_dirname=dirname
30101 else
30102   as_dirname=false
30103 fi
30104
30105 ECHO_C= ECHO_N= ECHO_T=
30106 case `echo -n x` in
30107 -n*)
30108   case `echo 'x\c'` in
30109   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
30110   *)   ECHO_C='\c';;
30111   esac;;
30112 *)
30113   ECHO_N='-n';;
30114 esac
30115 if expr a : '\(a\)' >/dev/null 2>&1 &&
30116    test "X`expr 00001 : '.*\(...\)'`" = X001; then
30117   as_expr=expr
30118 else
30119   as_expr=false
30120 fi
30121
30122 rm -f conf$$ conf$$.exe conf$$.file
30123 if test -d conf$$.dir; then
30124   rm -f conf$$.dir/conf$$.file
30125 else
30126   rm -f conf$$.dir
30127   mkdir conf$$.dir 2>/dev/null
30128 fi
30129 if (echo >conf$$.file) 2>/dev/null; then
30130   if ln -s conf$$.file conf$$ 2>/dev/null; then
30131     as_ln_s='ln -s'
30132     # ... but there are two gotchas:
30133     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
30134     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
30135     # In both cases, we have to default to `cp -p'.
30136     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
30137       as_ln_s='cp -p'
30138   elif ln conf$$.file conf$$ 2>/dev/null; then
30139     as_ln_s=ln
30140   else
30141     as_ln_s='cp -p'
30142   fi
30143 else
30144   as_ln_s='cp -p'
30145 fi
30146 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
30147 rmdir conf$$.dir 2>/dev/null
30148
30149 if mkdir -p . 2>/dev/null; then
30150   as_mkdir_p=:
30151 else
30152   test -d ./-p && rmdir ./-p
30153   as_mkdir_p=false
30154 fi
30155
30156 if test -x / >/dev/null 2>&1; then
30157   as_test_x='test -x'
30158 else
30159   if ls -dL / >/dev/null 2>&1; then
30160     as_ls_L_option=L
30161   else
30162     as_ls_L_option=
30163   fi
30164   as_test_x='
30165     eval sh -c '\''
30166       if test -d "$1"; then
30167         test -d "$1/.";
30168       else
30169         case $1 in
30170         -*)set "./$1";;
30171         esac;
30172         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
30173         ???[sx]*):;;*)false;;esac;fi
30174     '\'' sh
30175   '
30176 fi
30177 as_executable_p=$as_test_x
30178
30179 # Sed expression to map a string onto a valid CPP name.
30180 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
30181
30182 # Sed expression to map a string onto a valid variable name.
30183 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
30184
30185
30186 exec 6>&1
30187
30188 # Save the log message, to keep $[0] and so on meaningful, and to
30189 # report actual input values of CONFIG_FILES etc. instead of their
30190 # values after options handling.
30191 ac_log="
30192 This file was extended by PostgreSQL $as_me 9.1beta1, which was
30193 generated by GNU Autoconf 2.63.  Invocation command line was
30194
30195   CONFIG_FILES    = $CONFIG_FILES
30196   CONFIG_HEADERS  = $CONFIG_HEADERS
30197   CONFIG_LINKS    = $CONFIG_LINKS
30198   CONFIG_COMMANDS = $CONFIG_COMMANDS
30199   $ $0 $@
30200
30201 on `(hostname || uname -n) 2>/dev/null | sed 1q`
30202 "
30203
30204 _ACEOF
30205
30206 case $ac_config_files in *"
30207 "*) set x $ac_config_files; shift; ac_config_files=$*;;
30208 esac
30209
30210 case $ac_config_headers in *"
30211 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
30212 esac
30213
30214
30215 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30216 # Files that config.status was made for.
30217 config_files="$ac_config_files"
30218 config_headers="$ac_config_headers"
30219 config_links="$ac_config_links"
30220 config_commands="$ac_config_commands"
30221
30222 _ACEOF
30223
30224 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30225 ac_cs_usage="\
30226 \`$as_me' instantiates files from templates according to the
30227 current configuration.
30228
30229 Usage: $0 [OPTION]... [FILE]...
30230
30231   -h, --help       print this help, then exit
30232   -V, --version    print version number and configuration settings, then exit
30233   -q, --quiet, --silent
30234                    do not print progress messages
30235   -d, --debug      don't remove temporary files
30236       --recheck    update $as_me by reconfiguring in the same conditions
30237       --file=FILE[:TEMPLATE]
30238                    instantiate the configuration file FILE
30239       --header=FILE[:TEMPLATE]
30240                    instantiate the configuration header FILE
30241
30242 Configuration files:
30243 $config_files
30244
30245 Configuration headers:
30246 $config_headers
30247
30248 Configuration links:
30249 $config_links
30250
30251 Configuration commands:
30252 $config_commands
30253
30254 Report bugs to <bug-autoconf@gnu.org>."
30255
30256 _ACEOF
30257 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30258 ac_cs_version="\\
30259 PostgreSQL config.status 9.1beta1
30260 configured by $0, generated by GNU Autoconf 2.63,
30261   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
30262
30263 Copyright (C) 2008 Free Software Foundation, Inc.
30264 This config.status script is free software; the Free Software Foundation
30265 gives unlimited permission to copy, distribute and modify it."
30266
30267 ac_pwd='$ac_pwd'
30268 srcdir='$srcdir'
30269 MKDIR_P='$MKDIR_P'
30270 AWK='$AWK'
30271 test -n "\$AWK" || AWK=awk
30272 _ACEOF
30273
30274 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30275 # The default lists apply if the user does not specify any file.
30276 ac_need_defaults=:
30277 while test $# != 0
30278 do
30279   case $1 in
30280   --*=*)
30281     ac_option=`expr "X$1" : 'X\([^=]*\)='`
30282     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
30283     ac_shift=:
30284     ;;
30285   *)
30286     ac_option=$1
30287     ac_optarg=$2
30288     ac_shift=shift
30289     ;;
30290   esac
30291
30292   case $ac_option in
30293   # Handling of the options.
30294   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
30295     ac_cs_recheck=: ;;
30296   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
30297     $as_echo "$ac_cs_version"; exit ;;
30298   --debug | --debu | --deb | --de | --d | -d )
30299     debug=: ;;
30300   --file | --fil | --fi | --f )
30301     $ac_shift
30302     case $ac_optarg in
30303     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30304     esac
30305     CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
30306     ac_need_defaults=false;;
30307   --header | --heade | --head | --hea )
30308     $ac_shift
30309     case $ac_optarg in
30310     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30311     esac
30312     CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
30313     ac_need_defaults=false;;
30314   --he | --h)
30315     # Conflict between --help and --header
30316     { $as_echo "$as_me: error: ambiguous option: $1
30317 Try \`$0 --help' for more information." >&2
30318    { (exit 1); exit 1; }; };;
30319   --help | --hel | -h )
30320     $as_echo "$ac_cs_usage"; exit ;;
30321   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
30322   | -silent | --silent | --silen | --sile | --sil | --si | --s)
30323     ac_cs_silent=: ;;
30324
30325   # This is an error.
30326   -*) { $as_echo "$as_me: error: unrecognized option: $1
30327 Try \`$0 --help' for more information." >&2
30328    { (exit 1); exit 1; }; } ;;
30329
30330   *) ac_config_targets="$ac_config_targets $1"
30331      ac_need_defaults=false ;;
30332
30333   esac
30334   shift
30335 done
30336
30337 ac_configure_extra_args=
30338
30339 if $ac_cs_silent; then
30340   exec 6>/dev/null
30341   ac_configure_extra_args="$ac_configure_extra_args --silent"
30342 fi
30343
30344 _ACEOF
30345 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30346 if \$ac_cs_recheck; then
30347   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
30348   shift
30349   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
30350   CONFIG_SHELL='$SHELL'
30351   export CONFIG_SHELL
30352   exec "\$@"
30353 fi
30354
30355 _ACEOF
30356 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30357 exec 5>>config.log
30358 {
30359   echo
30360   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
30361 ## Running $as_me. ##
30362 _ASBOX
30363   $as_echo "$ac_log"
30364 } >&5
30365
30366 _ACEOF
30367 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30368 _ACEOF
30369
30370 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30371
30372 # Handling of arguments.
30373 for ac_config_target in $ac_config_targets
30374 do
30375   case $ac_config_target in
30376     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
30377     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
30378     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
30379     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
30380     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
30381     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
30382     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
30383     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
30384     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
30385     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
30386     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
30387     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
30388     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
30389
30390   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
30391 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
30392    { (exit 1); exit 1; }; };;
30393   esac
30394 done
30395
30396
30397 # If the user did not use the arguments to specify the items to instantiate,
30398 # then the envvar interface is used.  Set only those that are not.
30399 # We use the long form for the default assignment because of an extremely
30400 # bizarre bug on SunOS 4.1.3.
30401 if $ac_need_defaults; then
30402   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
30403   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
30404   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
30405   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
30406 fi
30407
30408 # Have a temporary directory for convenience.  Make it in the build tree
30409 # simply because there is no reason against having it here, and in addition,
30410 # creating and moving files from /tmp can sometimes cause problems.
30411 # Hook for its removal unless debugging.
30412 # Note that there is a small window in which the directory will not be cleaned:
30413 # after its creation but before its name has been assigned to `$tmp'.
30414 $debug ||
30415 {
30416   tmp=
30417   trap 'exit_status=$?
30418   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
30419 ' 0
30420   trap '{ (exit 1); exit 1; }' 1 2 13 15
30421 }
30422 # Create a (secure) tmp directory for tmp files.
30423
30424 {
30425   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
30426   test -n "$tmp" && test -d "$tmp"
30427 }  ||
30428 {
30429   tmp=./conf$$-$RANDOM
30430   (umask 077 && mkdir "$tmp")
30431 } ||
30432 {
30433    $as_echo "$as_me: cannot create a temporary directory in ." >&2
30434    { (exit 1); exit 1; }
30435 }
30436
30437 # Set up the scripts for CONFIG_FILES section.
30438 # No need to generate them if there are no CONFIG_FILES.
30439 # This happens for instance with `./config.status config.h'.
30440 if test -n "$CONFIG_FILES"; then
30441
30442
30443 ac_cr='\r'
30444 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
30445 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
30446   ac_cs_awk_cr='\\r'
30447 else
30448   ac_cs_awk_cr=$ac_cr
30449 fi
30450
30451 echo 'BEGIN {' >"$tmp/subs1.awk" &&
30452 _ACEOF
30453
30454
30455 {
30456   echo "cat >conf$$subs.awk <<_ACEOF" &&
30457   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
30458   echo "_ACEOF"
30459 } >conf$$subs.sh ||
30460   { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
30461 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
30462    { (exit 1); exit 1; }; }
30463 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
30464 ac_delim='%!_!# '
30465 for ac_last_try in false false false false false :; do
30466   . ./conf$$subs.sh ||
30467     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
30468 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
30469    { (exit 1); exit 1; }; }
30470
30471   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
30472   if test $ac_delim_n = $ac_delim_num; then
30473     break
30474   elif $ac_last_try; then
30475     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
30476 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
30477    { (exit 1); exit 1; }; }
30478   else
30479     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30480   fi
30481 done
30482 rm -f conf$$subs.sh
30483
30484 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30485 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
30486 _ACEOF
30487 sed -n '
30488 h
30489 s/^/S["/; s/!.*/"]=/
30490 p
30491 g
30492 s/^[^!]*!//
30493 :repl
30494 t repl
30495 s/'"$ac_delim"'$//
30496 t delim
30497 :nl
30498 h
30499 s/\(.\{148\}\).*/\1/
30500 t more1
30501 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
30502 p
30503 n
30504 b repl
30505 :more1
30506 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
30507 p
30508 g
30509 s/.\{148\}//
30510 t nl
30511 :delim
30512 h
30513 s/\(.\{148\}\).*/\1/
30514 t more2
30515 s/["\\]/\\&/g; s/^/"/; s/$/"/
30516 p
30517 b
30518 :more2
30519 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
30520 p
30521 g
30522 s/.\{148\}//
30523 t delim
30524 ' <conf$$subs.awk | sed '
30525 /^[^""]/{
30526   N
30527   s/\n//
30528 }
30529 ' >>$CONFIG_STATUS || ac_write_fail=1
30530 rm -f conf$$subs.awk
30531 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30532 _ACAWK
30533 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
30534   for (key in S) S_is_set[key] = 1
30535   FS = "\a"
30536
30537 }
30538 {
30539   line = $ 0
30540   nfields = split(line, field, "@")
30541   substed = 0
30542   len = length(field[1])
30543   for (i = 2; i < nfields; i++) {
30544     key = field[i]
30545     keylen = length(key)
30546     if (S_is_set[key]) {
30547       value = S[key]
30548       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
30549       len += length(value) + length(field[++i])
30550       substed = 1
30551     } else
30552       len += 1 + keylen
30553   }
30554
30555   print line
30556 }
30557
30558 _ACAWK
30559 _ACEOF
30560 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30561 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
30562   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
30563 else
30564   cat
30565 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
30566   || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
30567 $as_echo "$as_me: error: could not setup config files machinery" >&2;}
30568    { (exit 1); exit 1; }; }
30569 _ACEOF
30570
30571 # VPATH may cause trouble with some makes, so we remove $(srcdir),
30572 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
30573 # trailing colons and then remove the whole line if VPATH becomes empty
30574 # (actually we leave an empty line to preserve line numbers).
30575 if test "x$srcdir" = x.; then
30576   ac_vpsub='/^[  ]*VPATH[        ]*=/{
30577 s/:*\$(srcdir):*/:/
30578 s/:*\${srcdir}:*/:/
30579 s/:*@srcdir@:*/:/
30580 s/^\([^=]*=[     ]*\):*/\1/
30581 s/:*$//
30582 s/^[^=]*=[       ]*$//
30583 }'
30584 fi
30585
30586 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30587 fi # test -n "$CONFIG_FILES"
30588
30589 # Set up the scripts for CONFIG_HEADERS section.
30590 # No need to generate them if there are no CONFIG_HEADERS.
30591 # This happens for instance with `./config.status Makefile'.
30592 if test -n "$CONFIG_HEADERS"; then
30593 cat >"$tmp/defines.awk" <<\_ACAWK ||
30594 BEGIN {
30595 _ACEOF
30596
30597 # Transform confdefs.h into an awk script `defines.awk', embedded as
30598 # here-document in config.status, that substitutes the proper values into
30599 # config.h.in to produce config.h.
30600
30601 # Create a delimiter string that does not exist in confdefs.h, to ease
30602 # handling of long lines.
30603 ac_delim='%!_!# '
30604 for ac_last_try in false false :; do
30605   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
30606   if test -z "$ac_t"; then
30607     break
30608   elif $ac_last_try; then
30609     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
30610 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
30611    { (exit 1); exit 1; }; }
30612   else
30613     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30614   fi
30615 done
30616
30617 # For the awk script, D is an array of macro values keyed by name,
30618 # likewise P contains macro parameters if any.  Preserve backslash
30619 # newline sequences.
30620
30621 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
30622 sed -n '
30623 s/.\{148\}/&'"$ac_delim"'/g
30624 t rset
30625 :rset
30626 s/^[     ]*#[    ]*define[       ][      ]*/ /
30627 t def
30628 d
30629 :def
30630 s/\\$//
30631 t bsnl
30632 s/["\\]/\\&/g
30633 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
30634 D["\1"]=" \3"/p
30635 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
30636 d
30637 :bsnl
30638 s/["\\]/\\&/g
30639 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
30640 D["\1"]=" \3\\\\\\n"\\/p
30641 t cont
30642 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
30643 t cont
30644 d
30645 :cont
30646 n
30647 s/.\{148\}/&'"$ac_delim"'/g
30648 t clear
30649 :clear
30650 s/\\$//
30651 t bsnlc
30652 s/["\\]/\\&/g; s/^/"/; s/$/"/p
30653 d
30654 :bsnlc
30655 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
30656 b cont
30657 ' <confdefs.h | sed '
30658 s/'"$ac_delim"'/"\\\
30659 "/g' >>$CONFIG_STATUS || ac_write_fail=1
30660
30661 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30662   for (key in D) D_is_set[key] = 1
30663   FS = "\a"
30664 }
30665 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
30666   line = \$ 0
30667   split(line, arg, " ")
30668   if (arg[1] == "#") {
30669     defundef = arg[2]
30670     mac1 = arg[3]
30671   } else {
30672     defundef = substr(arg[1], 2)
30673     mac1 = arg[2]
30674   }
30675   split(mac1, mac2, "(") #)
30676   macro = mac2[1]
30677   prefix = substr(line, 1, index(line, defundef) - 1)
30678   if (D_is_set[macro]) {
30679     # Preserve the white space surrounding the "#".
30680     print prefix "define", macro P[macro] D[macro]
30681     next
30682   } else {
30683     # Replace #undef with comments.  This is necessary, for example,
30684     # in the case of _POSIX_SOURCE, which is predefined and required
30685     # on some systems where configure will not decide to define it.
30686     if (defundef == "undef") {
30687       print "/*", prefix defundef, macro, "*/"
30688       next
30689     }
30690   }
30691 }
30692 { print }
30693 _ACAWK
30694 _ACEOF
30695 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30696   { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
30697 $as_echo "$as_me: error: could not setup config headers machinery" >&2;}
30698    { (exit 1); exit 1; }; }
30699 fi # test -n "$CONFIG_HEADERS"
30700
30701
30702 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
30703 shift
30704 for ac_tag
30705 do
30706   case $ac_tag in
30707   :[FHLC]) ac_mode=$ac_tag; continue;;
30708   esac
30709   case $ac_mode$ac_tag in
30710   :[FHL]*:*);;
30711   :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
30712 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
30713    { (exit 1); exit 1; }; };;
30714   :[FH]-) ac_tag=-:-;;
30715   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30716   esac
30717   ac_save_IFS=$IFS
30718   IFS=:
30719   set x $ac_tag
30720   IFS=$ac_save_IFS
30721   shift
30722   ac_file=$1
30723   shift
30724
30725   case $ac_mode in
30726   :L) ac_source=$1;;
30727   :[FH])
30728     ac_file_inputs=
30729     for ac_f
30730     do
30731       case $ac_f in
30732       -) ac_f="$tmp/stdin";;
30733       *) # Look for the file first in the build tree, then in the source tree
30734          # (if the path is not absolute).  The absolute path cannot be DOS-style,
30735          # because $ac_f cannot contain `:'.
30736          test -f "$ac_f" ||
30737            case $ac_f in
30738            [\\/$]*) false;;
30739            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30740            esac ||
30741            { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
30742 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
30743    { (exit 1); exit 1; }; };;
30744       esac
30745       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30746       ac_file_inputs="$ac_file_inputs '$ac_f'"
30747     done
30748
30749     # Let's still pretend it is `configure' which instantiates (i.e., don't
30750     # use $as_me), people would be surprised to read:
30751     #    /* config.h.  Generated by config.status.  */
30752     configure_input='Generated from '`
30753           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30754         `' by configure.'
30755     if test x"$ac_file" != x-; then
30756       configure_input="$ac_file.  $configure_input"
30757       { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
30758 $as_echo "$as_me: creating $ac_file" >&6;}
30759     fi
30760     # Neutralize special characters interpreted by sed in replacement strings.
30761     case $configure_input in #(
30762     *\&* | *\|* | *\\* )
30763        ac_sed_conf_input=`$as_echo "$configure_input" |
30764        sed 's/[\\\\&|]/\\\\&/g'`;; #(
30765     *) ac_sed_conf_input=$configure_input;;
30766     esac
30767
30768     case $ac_tag in
30769     *:-:* | *:-) cat >"$tmp/stdin" \
30770       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
30771 $as_echo "$as_me: error: could not create $ac_file" >&2;}
30772    { (exit 1); exit 1; }; } ;;
30773     esac
30774     ;;
30775   esac
30776
30777   ac_dir=`$as_dirname -- "$ac_file" ||
30778 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30779          X"$ac_file" : 'X\(//\)[^/]' \| \
30780          X"$ac_file" : 'X\(//\)$' \| \
30781          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30782 $as_echo X"$ac_file" |
30783     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30784             s//\1/
30785             q
30786           }
30787           /^X\(\/\/\)[^/].*/{
30788             s//\1/
30789             q
30790           }
30791           /^X\(\/\/\)$/{
30792             s//\1/
30793             q
30794           }
30795           /^X\(\/\).*/{
30796             s//\1/
30797             q
30798           }
30799           s/.*/./; q'`
30800   { as_dir="$ac_dir"
30801   case $as_dir in #(
30802   -*) as_dir=./$as_dir;;
30803   esac
30804   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
30805     as_dirs=
30806     while :; do
30807       case $as_dir in #(
30808       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
30809       *) as_qdir=$as_dir;;
30810       esac
30811       as_dirs="'$as_qdir' $as_dirs"
30812       as_dir=`$as_dirname -- "$as_dir" ||
30813 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30814          X"$as_dir" : 'X\(//\)[^/]' \| \
30815          X"$as_dir" : 'X\(//\)$' \| \
30816          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
30817 $as_echo X"$as_dir" |
30818     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30819             s//\1/
30820             q
30821           }
30822           /^X\(\/\/\)[^/].*/{
30823             s//\1/
30824             q
30825           }
30826           /^X\(\/\/\)$/{
30827             s//\1/
30828             q
30829           }
30830           /^X\(\/\).*/{
30831             s//\1/
30832             q
30833           }
30834           s/.*/./; q'`
30835       test -d "$as_dir" && break
30836     done
30837     test -z "$as_dirs" || eval "mkdir $as_dirs"
30838   } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
30839 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
30840    { (exit 1); exit 1; }; }; }
30841   ac_builddir=.
30842
30843 case "$ac_dir" in
30844 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30845 *)
30846   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30847   # A ".." for each directory in $ac_dir_suffix.
30848   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30849   case $ac_top_builddir_sub in
30850   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30851   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30852   esac ;;
30853 esac
30854 ac_abs_top_builddir=$ac_pwd
30855 ac_abs_builddir=$ac_pwd$ac_dir_suffix
30856 # for backward compatibility:
30857 ac_top_builddir=$ac_top_build_prefix
30858
30859 case $srcdir in
30860   .)  # We are building in place.
30861     ac_srcdir=.
30862     ac_top_srcdir=$ac_top_builddir_sub
30863     ac_abs_top_srcdir=$ac_pwd ;;
30864   [\\/]* | ?:[\\/]* )  # Absolute name.
30865     ac_srcdir=$srcdir$ac_dir_suffix;
30866     ac_top_srcdir=$srcdir
30867     ac_abs_top_srcdir=$srcdir ;;
30868   *) # Relative name.
30869     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30870     ac_top_srcdir=$ac_top_build_prefix$srcdir
30871     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30872 esac
30873 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30874
30875
30876   case $ac_mode in
30877   :F)
30878   #
30879   # CONFIG_FILE
30880   #
30881
30882   ac_MKDIR_P=$MKDIR_P
30883   case $MKDIR_P in
30884   [\\/$]* | ?:[\\/]* ) ;;
30885   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30886   esac
30887 _ACEOF
30888
30889 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30890 # If the template does not know about datarootdir, expand it.
30891 # FIXME: This hack should be removed a few years after 2.60.
30892 ac_datarootdir_hack=; ac_datarootdir_seen=
30893
30894 ac_sed_dataroot='
30895 /datarootdir/ {
30896   p
30897   q
30898 }
30899 /@datadir@/p
30900 /@docdir@/p
30901 /@infodir@/p
30902 /@localedir@/p
30903 /@mandir@/p
30904 '
30905 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30906 *datarootdir*) ac_datarootdir_seen=yes;;
30907 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30908   { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30909 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30910 _ACEOF
30911 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30912   ac_datarootdir_hack='
30913   s&@datadir@&$datadir&g
30914   s&@docdir@&$docdir&g
30915   s&@infodir@&$infodir&g
30916   s&@localedir@&$localedir&g
30917   s&@mandir@&$mandir&g
30918     s&\\\${datarootdir}&$datarootdir&g' ;;
30919 esac
30920 _ACEOF
30921
30922 # Neutralize VPATH when `$srcdir' = `.'.
30923 # Shell code in configure.ac might set extrasub.
30924 # FIXME: do we really want to maintain this feature?
30925 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30926 ac_sed_extra="$ac_vpsub
30927 $extrasub
30928 _ACEOF
30929 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30930 :t
30931 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30932 s|@configure_input@|$ac_sed_conf_input|;t t
30933 s&@top_builddir@&$ac_top_builddir_sub&;t t
30934 s&@top_build_prefix@&$ac_top_build_prefix&;t t
30935 s&@srcdir@&$ac_srcdir&;t t
30936 s&@abs_srcdir@&$ac_abs_srcdir&;t t
30937 s&@top_srcdir@&$ac_top_srcdir&;t t
30938 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30939 s&@builddir@&$ac_builddir&;t t
30940 s&@abs_builddir@&$ac_abs_builddir&;t t
30941 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30942 s&@MKDIR_P@&$ac_MKDIR_P&;t t
30943 $ac_datarootdir_hack
30944 "
30945 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
30946   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
30947 $as_echo "$as_me: error: could not create $ac_file" >&2;}
30948    { (exit 1); exit 1; }; }
30949
30950 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
30951   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
30952   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
30953   { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30954 which seems to be undefined.  Please make sure it is defined." >&5
30955 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
30956 which seems to be undefined.  Please make sure it is defined." >&2;}
30957
30958   rm -f "$tmp/stdin"
30959   case $ac_file in
30960   -) cat "$tmp/out" && rm -f "$tmp/out";;
30961   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
30962   esac \
30963   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
30964 $as_echo "$as_me: error: could not create $ac_file" >&2;}
30965    { (exit 1); exit 1; }; }
30966  ;;
30967   :H)
30968   #
30969   # CONFIG_HEADER
30970   #
30971   if test x"$ac_file" != x-; then
30972     {
30973       $as_echo "/* $configure_input  */" \
30974       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
30975     } >"$tmp/config.h" \
30976       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
30977 $as_echo "$as_me: error: could not create $ac_file" >&2;}
30978    { (exit 1); exit 1; }; }
30979     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
30980       { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
30981 $as_echo "$as_me: $ac_file is unchanged" >&6;}
30982     else
30983       rm -f "$ac_file"
30984       mv "$tmp/config.h" "$ac_file" \
30985         || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
30986 $as_echo "$as_me: error: could not create $ac_file" >&2;}
30987    { (exit 1); exit 1; }; }
30988     fi
30989   else
30990     $as_echo "/* $configure_input  */" \
30991       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
30992       || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
30993 $as_echo "$as_me: error: could not create -" >&2;}
30994    { (exit 1); exit 1; }; }
30995   fi
30996  ;;
30997   :L)
30998   #
30999   # CONFIG_LINK
31000   #
31001
31002   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
31003     :
31004   else
31005     # Prefer the file from the source tree if names are identical.
31006     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
31007       ac_source=$srcdir/$ac_source
31008     fi
31009
31010     { $as_echo "$as_me:$LINENO: linking $ac_source to $ac_file" >&5
31011 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
31012
31013     if test ! -r "$ac_source"; then
31014       { { $as_echo "$as_me:$LINENO: error: $ac_source: file not found" >&5
31015 $as_echo "$as_me: error: $ac_source: file not found" >&2;}
31016    { (exit 1); exit 1; }; }
31017     fi
31018     rm -f "$ac_file"
31019
31020     # Try a relative symlink, then a hard link, then a copy.
31021     case $srcdir in
31022     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
31023         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
31024     esac
31025     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
31026       ln "$ac_source" "$ac_file" 2>/dev/null ||
31027       cp -p "$ac_source" "$ac_file" ||
31028       { { $as_echo "$as_me:$LINENO: error: cannot link or copy $ac_source to $ac_file" >&5
31029 $as_echo "$as_me: error: cannot link or copy $ac_source to $ac_file" >&2;}
31030    { (exit 1); exit 1; }; }
31031   fi
31032  ;;
31033   :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
31034 $as_echo "$as_me: executing $ac_file commands" >&6;}
31035  ;;
31036   esac
31037
31038
31039   case $ac_file$ac_mode in
31040     "check_win32_symlinks":C)
31041 # Links sometimes fail undetected on Mingw -
31042 # so here we detect it and warn the user
31043 for FILE in $CONFIG_LINKS
31044  do
31045         # test -e works for symlinks in the MinGW console
31046         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
31047 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
31048  done
31049  ;;
31050     "src/include/pg_config.h":H)
31051 # Update timestamp for pg_config.h (see Makefile.global)
31052 echo >src/include/stamp-h
31053  ;;
31054     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
31055
31056   esac
31057 done # for ac_tag
31058
31059
31060 { (exit 0); exit 0; }
31061 _ACEOF
31062 chmod +x $CONFIG_STATUS
31063 ac_clean_files=$ac_clean_files_save
31064
31065 test $ac_write_fail = 0 ||
31066   { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
31067 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
31068    { (exit 1); exit 1; }; }
31069
31070
31071 # configure is writing to config.log, and then calls config.status.
31072 # config.status does its own redirection, appending to config.log.
31073 # Unfortunately, on DOS this fails, as config.log is still kept open
31074 # by configure, so config.status won't be able to write to it; its
31075 # output is simply discarded.  So we exec the FD to /dev/null,
31076 # effectively closing config.log, so it can be properly (re)opened and
31077 # appended to by config.status.  When coming back to configure, we
31078 # need to make the FD available again.
31079 if test "$no_create" != yes; then
31080   ac_cs_success=:
31081   ac_config_status_args=
31082   test "$silent" = yes &&
31083     ac_config_status_args="$ac_config_status_args --quiet"
31084   exec 5>/dev/null
31085   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
31086   exec 5>>config.log
31087   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31088   # would make configure fail if this is the last instruction.
31089   $ac_cs_success || { (exit 1); exit 1; }
31090 fi
31091 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
31092   { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
31093 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
31094 fi
31095