]> granicus.if.org Git - postgresql/blob - configure
REASSIGN OWNED: handle shared objects, too
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.63 for PostgreSQL 9.3devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
8 # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 #
12 # Copyright (c) 1996-2013, PostgreSQL Global Development Group
13 ## --------------------- ##
14 ## M4sh Initialization.  ##
15 ## --------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20   emulate sh
21   NULLCMD=:
22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23   # is contrary to our usage.  Disable this feature.
24   alias -g '${1+"$@"}'='"$@"'
25   setopt NO_GLOB_SUBST
26 else
27   case `(set -o) 2>/dev/null` in
28   *posix*) set -o posix ;;
29 esac
30
31 fi
32
33
34
35
36 # PATH needs CR
37 # Avoid depending upon Character Ranges.
38 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
39 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
40 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
41 as_cr_digits='0123456789'
42 as_cr_alnum=$as_cr_Letters$as_cr_digits
43
44 as_nl='
45 '
46 export as_nl
47 # Printing a long string crashes Solaris 7 /usr/bin/printf.
48 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
49 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
50 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52   as_echo='printf %s\n'
53   as_echo_n='printf %s'
54 else
55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57     as_echo_n='/usr/ucb/echo -n'
58   else
59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60     as_echo_n_body='eval
61       arg=$1;
62       case $arg in
63       *"$as_nl"*)
64         expr "X$arg" : "X\\(.*\\)$as_nl";
65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66       esac;
67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78   PATH_SEPARATOR=:
79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81       PATH_SEPARATOR=';'
82   }
83 fi
84
85 # Support unset when possible.
86 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
87   as_unset=unset
88 else
89   as_unset=false
90 fi
91
92
93 # IFS
94 # We need space, tab and new line, in precisely that order.  Quoting is
95 # there to prevent editors from complaining about space-tab.
96 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
97 # splitting by setting IFS to empty value.)
98 IFS=" ""        $as_nl"
99
100 # Find who we are.  Look in the path if we contain no directory separator.
101 case $0 in
102   *[\\/]* ) as_myself=$0 ;;
103   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
104 for as_dir in $PATH
105 do
106   IFS=$as_save_IFS
107   test -z "$as_dir" && as_dir=.
108   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
109 done
110 IFS=$as_save_IFS
111
112      ;;
113 esac
114 # We did not find ourselves, most probably we were run as `sh COMMAND'
115 # in which case we are not to be found in the path.
116 if test "x$as_myself" = x; then
117   as_myself=$0
118 fi
119 if test ! -f "$as_myself"; then
120   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
121   { (exit 1); exit 1; }
122 fi
123
124 # Work around bugs in pre-3.0 UWIN ksh.
125 for as_var in ENV MAIL MAILPATH
126 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
127 done
128 PS1='$ '
129 PS2='> '
130 PS4='+ '
131
132 # NLS nuisances.
133 LC_ALL=C
134 export LC_ALL
135 LANGUAGE=C
136 export LANGUAGE
137
138 # Required to use basename.
139 if expr a : '\(a\)' >/dev/null 2>&1 &&
140    test "X`expr 00001 : '.*\(...\)'`" = X001; then
141   as_expr=expr
142 else
143   as_expr=false
144 fi
145
146 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
147   as_basename=basename
148 else
149   as_basename=false
150 fi
151
152
153 # Name of the executable.
154 as_me=`$as_basename -- "$0" ||
155 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
156          X"$0" : 'X\(//\)$' \| \
157          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
158 $as_echo X/"$0" |
159     sed '/^.*\/\([^/][^/]*\)\/*$/{
160             s//\1/
161             q
162           }
163           /^X\/\(\/\/\)$/{
164             s//\1/
165             q
166           }
167           /^X\/\(\/\).*/{
168             s//\1/
169             q
170           }
171           s/.*/./; q'`
172
173 # CDPATH.
174 $as_unset CDPATH
175
176
177 if test "x$CONFIG_SHELL" = x; then
178   if (eval ":") 2>/dev/null; then
179   as_have_required=yes
180 else
181   as_have_required=no
182 fi
183
184   if test $as_have_required = yes &&     (eval ":
185 (as_func_return () {
186   (exit \$1)
187 }
188 as_func_success () {
189   as_func_return 0
190 }
191 as_func_failure () {
192   as_func_return 1
193 }
194 as_func_ret_success () {
195   return 0
196 }
197 as_func_ret_failure () {
198   return 1
199 }
200
201 exitcode=0
202 if as_func_success; then
203   :
204 else
205   exitcode=1
206   echo as_func_success failed.
207 fi
208
209 if as_func_failure; then
210   exitcode=1
211   echo as_func_failure succeeded.
212 fi
213
214 if as_func_ret_success; then
215   :
216 else
217   exitcode=1
218   echo as_func_ret_success failed.
219 fi
220
221 if as_func_ret_failure; then
222   exitcode=1
223   echo as_func_ret_failure succeeded.
224 fi
225
226 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
227   :
228 else
229   exitcode=1
230   echo positional parameters were not saved.
231 fi
232
233 test \$exitcode = 0) || { (exit 1); exit 1; }
234
235 (
236   as_lineno_1=\$LINENO
237   as_lineno_2=\$LINENO
238   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
239   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
240 ") 2> /dev/null; then
241   :
242 else
243   as_candidate_shells=
244     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
245 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
246 do
247   IFS=$as_save_IFS
248   test -z "$as_dir" && as_dir=.
249   case $as_dir in
250          /*)
251            for as_base in sh bash ksh sh5; do
252              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
253            done;;
254        esac
255 done
256 IFS=$as_save_IFS
257
258
259       for as_shell in $as_candidate_shells $SHELL; do
260          # Try only shells that exist, to save several forks.
261          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
262                 { ("$as_shell") 2> /dev/null <<\_ASEOF
263 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
264   emulate sh
265   NULLCMD=:
266   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
267   # is contrary to our usage.  Disable this feature.
268   alias -g '${1+"$@"}'='"$@"'
269   setopt NO_GLOB_SUBST
270 else
271   case `(set -o) 2>/dev/null` in
272   *posix*) set -o posix ;;
273 esac
274
275 fi
276
277
278 :
279 _ASEOF
280 }; then
281   CONFIG_SHELL=$as_shell
282                as_have_required=yes
283                if { "$as_shell" 2> /dev/null <<\_ASEOF
284 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
285   emulate sh
286   NULLCMD=:
287   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
288   # is contrary to our usage.  Disable this feature.
289   alias -g '${1+"$@"}'='"$@"'
290   setopt NO_GLOB_SUBST
291 else
292   case `(set -o) 2>/dev/null` in
293   *posix*) set -o posix ;;
294 esac
295
296 fi
297
298
299 :
300 (as_func_return () {
301   (exit $1)
302 }
303 as_func_success () {
304   as_func_return 0
305 }
306 as_func_failure () {
307   as_func_return 1
308 }
309 as_func_ret_success () {
310   return 0
311 }
312 as_func_ret_failure () {
313   return 1
314 }
315
316 exitcode=0
317 if as_func_success; then
318   :
319 else
320   exitcode=1
321   echo as_func_success failed.
322 fi
323
324 if as_func_failure; then
325   exitcode=1
326   echo as_func_failure succeeded.
327 fi
328
329 if as_func_ret_success; then
330   :
331 else
332   exitcode=1
333   echo as_func_ret_success failed.
334 fi
335
336 if as_func_ret_failure; then
337   exitcode=1
338   echo as_func_ret_failure succeeded.
339 fi
340
341 if ( set x; as_func_ret_success y && test x = "$1" ); then
342   :
343 else
344   exitcode=1
345   echo positional parameters were not saved.
346 fi
347
348 test $exitcode = 0) || { (exit 1); exit 1; }
349
350 (
351   as_lineno_1=$LINENO
352   as_lineno_2=$LINENO
353   test "x$as_lineno_1" != "x$as_lineno_2" &&
354   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
355
356 _ASEOF
357 }; then
358   break
359 fi
360
361 fi
362
363       done
364
365       if test "x$CONFIG_SHELL" != x; then
366   for as_var in BASH_ENV ENV
367         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
368         done
369         export CONFIG_SHELL
370         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
371 fi
372
373
374     if test $as_have_required = no; then
375   echo This script requires a shell more modern than all the
376       echo shells that I found on your system.  Please install a
377       echo modern shell, or manually run the script under such a
378       echo shell if you do have one.
379       { (exit 1); exit 1; }
380 fi
381
382
383 fi
384
385 fi
386
387
388
389 (eval "as_func_return () {
390   (exit \$1)
391 }
392 as_func_success () {
393   as_func_return 0
394 }
395 as_func_failure () {
396   as_func_return 1
397 }
398 as_func_ret_success () {
399   return 0
400 }
401 as_func_ret_failure () {
402   return 1
403 }
404
405 exitcode=0
406 if as_func_success; then
407   :
408 else
409   exitcode=1
410   echo as_func_success failed.
411 fi
412
413 if as_func_failure; then
414   exitcode=1
415   echo as_func_failure succeeded.
416 fi
417
418 if as_func_ret_success; then
419   :
420 else
421   exitcode=1
422   echo as_func_ret_success failed.
423 fi
424
425 if as_func_ret_failure; then
426   exitcode=1
427   echo as_func_ret_failure succeeded.
428 fi
429
430 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
431   :
432 else
433   exitcode=1
434   echo positional parameters were not saved.
435 fi
436
437 test \$exitcode = 0") || {
438   echo No shell found that supports shell functions.
439   echo Please tell bug-autoconf@gnu.org about your system,
440   echo including any error possibly output before this message.
441   echo This can help us improve future autoconf versions.
442   echo Configuration will now proceed without shell functions.
443 }
444
445
446
447   as_lineno_1=$LINENO
448   as_lineno_2=$LINENO
449   test "x$as_lineno_1" != "x$as_lineno_2" &&
450   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
451
452   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
453   # uniformly replaced by the line number.  The first 'sed' inserts a
454   # line-number line after each line using $LINENO; the second 'sed'
455   # does the real work.  The second script uses 'N' to pair each
456   # line-number line with the line containing $LINENO, and appends
457   # trailing '-' during substitution so that $LINENO is not a special
458   # case at line end.
459   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
460   # scripts with optimization help from Paolo Bonzini.  Blame Lee
461   # E. McMahon (1931-1989) for sed's syntax.  :-)
462   sed -n '
463     p
464     /[$]LINENO/=
465   ' <$as_myself |
466     sed '
467       s/[$]LINENO.*/&-/
468       t lineno
469       b
470       :lineno
471       N
472       :loop
473       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
474       t loop
475       s/-\n.*//
476     ' >$as_me.lineno &&
477   chmod +x "$as_me.lineno" ||
478     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
479    { (exit 1); exit 1; }; }
480
481   # Don't try to exec as it changes $[0], causing all sort of problems
482   # (the dirname of $[0] is not the place where we might find the
483   # original and so on.  Autoconf is especially sensitive to this).
484   . "./$as_me.lineno"
485   # Exit status is that of the last command.
486   exit
487 }
488
489
490 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
491   as_dirname=dirname
492 else
493   as_dirname=false
494 fi
495
496 ECHO_C= ECHO_N= ECHO_T=
497 case `echo -n x` in
498 -n*)
499   case `echo 'x\c'` in
500   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
501   *)   ECHO_C='\c';;
502   esac;;
503 *)
504   ECHO_N='-n';;
505 esac
506 if expr a : '\(a\)' >/dev/null 2>&1 &&
507    test "X`expr 00001 : '.*\(...\)'`" = X001; then
508   as_expr=expr
509 else
510   as_expr=false
511 fi
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515   rm -f conf$$.dir/conf$$.file
516 else
517   rm -f conf$$.dir
518   mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521   if ln -s conf$$.file conf$$ 2>/dev/null; then
522     as_ln_s='ln -s'
523     # ... but there are two gotchas:
524     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526     # In both cases, we have to default to `cp -p'.
527     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528       as_ln_s='cp -p'
529   elif ln conf$$.file conf$$ 2>/dev/null; then
530     as_ln_s=ln
531   else
532     as_ln_s='cp -p'
533   fi
534 else
535   as_ln_s='cp -p'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541   as_mkdir_p=:
542 else
543   test -d ./-p && rmdir ./-p
544   as_mkdir_p=false
545 fi
546
547 if test -x / >/dev/null 2>&1; then
548   as_test_x='test -x'
549 else
550   if ls -dL / >/dev/null 2>&1; then
551     as_ls_L_option=L
552   else
553     as_ls_L_option=
554   fi
555   as_test_x='
556     eval sh -c '\''
557       if test -d "$1"; then
558         test -d "$1/.";
559       else
560         case $1 in
561         -*)set "./$1";;
562         esac;
563         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
564         ???[sx]*):;;*)false;;esac;fi
565     '\'' sh
566   '
567 fi
568 as_executable_p=$as_test_x
569
570 # Sed expression to map a string onto a valid CPP name.
571 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
572
573 # Sed expression to map a string onto a valid variable name.
574 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
575
576
577
578 exec 7<&0 </dev/null 6>&1
579
580 # Name of the host.
581 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
582 # so uname gets run too.
583 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
584
585 #
586 # Initializations.
587 #
588 ac_default_prefix=/usr/local
589 ac_clean_files=
590 ac_config_libobj_dir=.
591 LIBOBJS=
592 cross_compiling=no
593 subdirs=
594 MFLAGS=
595 MAKEFLAGS=
596 SHELL=${CONFIG_SHELL-/bin/sh}
597
598 # Identity of this package.
599 PACKAGE_NAME='PostgreSQL'
600 PACKAGE_TARNAME='postgresql'
601 PACKAGE_VERSION='9.3devel'
602 PACKAGE_STRING='PostgreSQL 9.3devel'
603 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
604
605 ac_unique_file="src/backend/access/common/heaptuple.c"
606 ac_default_prefix=/usr/local/pgsql
607 # Factoring default headers for most tests.
608 ac_includes_default="\
609 #include <stdio.h>
610 #ifdef HAVE_SYS_TYPES_H
611 # include <sys/types.h>
612 #endif
613 #ifdef HAVE_SYS_STAT_H
614 # include <sys/stat.h>
615 #endif
616 #ifdef STDC_HEADERS
617 # include <stdlib.h>
618 # include <stddef.h>
619 #else
620 # ifdef HAVE_STDLIB_H
621 #  include <stdlib.h>
622 # endif
623 #endif
624 #ifdef HAVE_STRING_H
625 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
626 #  include <memory.h>
627 # endif
628 # include <string.h>
629 #endif
630 #ifdef HAVE_STRINGS_H
631 # include <strings.h>
632 #endif
633 #ifdef HAVE_INTTYPES_H
634 # include <inttypes.h>
635 #endif
636 #ifdef HAVE_STDINT_H
637 # include <stdint.h>
638 #endif
639 #ifdef HAVE_UNISTD_H
640 # include <unistd.h>
641 #endif"
642
643 ac_subst_vars='LTLIBOBJS
644 vpath_build
645 OSX
646 XSLTPROC
647 COLLATEINDEX
648 DOCBOOKSTYLE
649 have_docbook
650 JADE
651 NSGMLS
652 TCL_SHLIB_LD_LIBS
653 TCL_SHARED_BUILD
654 TCL_LIB_SPEC
655 TCL_LIBS
656 TCL_LIB_FILE
657 TCL_INCLUDE_SPEC
658 TCL_CONFIG_SH
659 TCLSH
660 XGETTEXT
661 MSGMERGE
662 MSGFMT
663 HAVE_POSIX_SIGNALS
664 LDAP_LIBS_BE
665 LDAP_LIBS_FE
666 PTHREAD_CFLAGS
667 PTHREAD_LIBS
668 PTHREAD_CC
669 acx_pthread_config
670 have_win32_dbghelp
671 HAVE_IPV6
672 LIBOBJS
673 OSSP_UUID_LIBS
674 ZIC
675 python_enable_shared
676 python_additional_libs
677 python_libspec
678 python_libdir
679 python_includespec
680 python_version
681 python_majorversion
682 PYTHON
683 perl_embed_ldflags
684 perl_useshrplib
685 perl_privlibexp
686 perl_archlibexp
687 PERL
688 FLEXFLAGS
689 FLEX
690 BISONFLAGS
691 BISON
692 MKDIR_P
693 AWK
694 LN_S
695 TAR
696 install_bin
697 INSTALL_DATA
698 INSTALL_SCRIPT
699 INSTALL_PROGRAM
700 WINDRES
701 DLLWRAP
702 DLLTOOL
703 AR
704 STRIP_SHARED_LIB
705 STRIP_STATIC_LIB
706 STRIP
707 RANLIB
708 ld_R_works
709 with_gnu_ld
710 LD
711 LDFLAGS_SL
712 LDFLAGS_EX
713 ELF_SYS
714 EGREP
715 GREP
716 with_zlib
717 with_system_tzdata
718 with_libxslt
719 with_libxml
720 XML2_CONFIG
721 with_ossp_uuid
722 with_selinux
723 with_openssl
724 krb_srvtab
725 with_python
726 with_perl
727 with_tcl
728 enable_thread_safety
729 INCLUDES
730 autodepend
731 TAS
732 GCC
733 CPP
734 SUN_STUDIO_CC
735 OBJEXT
736 EXEEXT
737 ac_ct_CC
738 CPPFLAGS
739 LDFLAGS
740 CFLAGS
741 CC
742 enable_dtrace
743 DTRACEFLAGS
744 DTRACE
745 enable_coverage
746 GENHTML
747 LCOV
748 GCOV
749 enable_debug
750 enable_rpath
751 default_port
752 WANTED_LANGUAGES
753 enable_nls
754 PORTNAME
755 host_os
756 host_vendor
757 host_cpu
758 host
759 build_os
760 build_vendor
761 build_cpu
762 build
763 PG_MAJORVERSION
764 configure_args
765 target_alias
766 host_alias
767 build_alias
768 LIBS
769 ECHO_T
770 ECHO_N
771 ECHO_C
772 DEFS
773 mandir
774 localedir
775 libdir
776 psdir
777 pdfdir
778 dvidir
779 htmldir
780 infodir
781 docdir
782 oldincludedir
783 includedir
784 localstatedir
785 sharedstatedir
786 sysconfdir
787 datadir
788 datarootdir
789 libexecdir
790 sbindir
791 bindir
792 program_transform_name
793 prefix
794 exec_prefix
795 PACKAGE_BUGREPORT
796 PACKAGE_STRING
797 PACKAGE_VERSION
798 PACKAGE_TARNAME
799 PACKAGE_NAME
800 PATH_SEPARATOR
801 SHELL'
802 ac_subst_files=''
803 ac_user_opts='
804 enable_option_checking
805 with_template
806 with_includes
807 with_libraries
808 with_libs
809 enable_integer_datetimes
810 enable_nls
811 with_pgport
812 enable_rpath
813 enable_spinlocks
814 enable_debug
815 enable_profiling
816 enable_coverage
817 enable_dtrace
818 with_blocksize
819 with_segsize
820 with_wal_blocksize
821 with_wal_segsize
822 with_CC
823 enable_depend
824 enable_cassert
825 enable_thread_safety
826 with_tcl
827 with_tclconfig
828 with_perl
829 with_python
830 with_gssapi
831 with_krb5
832 with_krb_srvnam
833 with_pam
834 with_ldap
835 with_bonjour
836 with_openssl
837 with_selinux
838 with_readline
839 with_libedit_preferred
840 with_ossp_uuid
841 with_libxml
842 with_libxslt
843 with_system_tzdata
844 with_zlib
845 with_gnu_ld
846 enable_largefile
847 enable_float4_byval
848 enable_float8_byval
849 '
850       ac_precious_vars='build_alias
851 host_alias
852 target_alias
853 CC
854 CFLAGS
855 LDFLAGS
856 LIBS
857 CPPFLAGS
858 CPP
859 LDFLAGS_EX
860 LDFLAGS_SL
861 DOCBOOKSTYLE'
862
863
864 # Initialize some variables set by options.
865 ac_init_help=
866 ac_init_version=false
867 ac_unrecognized_opts=
868 ac_unrecognized_sep=
869 # The variables have the same names as the options, with
870 # dashes changed to underlines.
871 cache_file=/dev/null
872 exec_prefix=NONE
873 no_create=
874 no_recursion=
875 prefix=NONE
876 program_prefix=NONE
877 program_suffix=NONE
878 program_transform_name=s,x,x,
879 silent=
880 site=
881 srcdir=
882 verbose=
883 x_includes=NONE
884 x_libraries=NONE
885
886 # Installation directory options.
887 # These are left unexpanded so users can "make install exec_prefix=/foo"
888 # and all the variables that are supposed to be based on exec_prefix
889 # by default will actually change.
890 # Use braces instead of parens because sh, perl, etc. also accept them.
891 # (The list follows the same order as the GNU Coding Standards.)
892 bindir='${exec_prefix}/bin'
893 sbindir='${exec_prefix}/sbin'
894 libexecdir='${exec_prefix}/libexec'
895 datarootdir='${prefix}/share'
896 datadir='${datarootdir}'
897 sysconfdir='${prefix}/etc'
898 sharedstatedir='${prefix}/com'
899 localstatedir='${prefix}/var'
900 includedir='${prefix}/include'
901 oldincludedir='/usr/include'
902 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
903 infodir='${datarootdir}/info'
904 htmldir='${docdir}'
905 dvidir='${docdir}'
906 pdfdir='${docdir}'
907 psdir='${docdir}'
908 libdir='${exec_prefix}/lib'
909 localedir='${datarootdir}/locale'
910 mandir='${datarootdir}/man'
911
912 ac_prev=
913 ac_dashdash=
914 for ac_option
915 do
916   # If the previous option needs an argument, assign it.
917   if test -n "$ac_prev"; then
918     eval $ac_prev=\$ac_option
919     ac_prev=
920     continue
921   fi
922
923   case $ac_option in
924   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
925   *)    ac_optarg=yes ;;
926   esac
927
928   # Accept the important Cygnus configure options, so we can diagnose typos.
929
930   case $ac_dashdash$ac_option in
931   --)
932     ac_dashdash=yes ;;
933
934   -bindir | --bindir | --bindi | --bind | --bin | --bi)
935     ac_prev=bindir ;;
936   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
937     bindir=$ac_optarg ;;
938
939   -build | --build | --buil | --bui | --bu)
940     ac_prev=build_alias ;;
941   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
942     build_alias=$ac_optarg ;;
943
944   -cache-file | --cache-file | --cache-fil | --cache-fi \
945   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
946     ac_prev=cache_file ;;
947   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
948   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
949     cache_file=$ac_optarg ;;
950
951   --config-cache | -C)
952     cache_file=config.cache ;;
953
954   -datadir | --datadir | --datadi | --datad)
955     ac_prev=datadir ;;
956   -datadir=* | --datadir=* | --datadi=* | --datad=*)
957     datadir=$ac_optarg ;;
958
959   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
960   | --dataroo | --dataro | --datar)
961     ac_prev=datarootdir ;;
962   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
963   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
964     datarootdir=$ac_optarg ;;
965
966   -disable-* | --disable-*)
967     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
968     # Reject names that are not valid shell variable names.
969     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
970       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
971    { (exit 1); exit 1; }; }
972     ac_useropt_orig=$ac_useropt
973     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
974     case $ac_user_opts in
975       *"
976 "enable_$ac_useropt"
977 "*) ;;
978       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
979          ac_unrecognized_sep=', ';;
980     esac
981     eval enable_$ac_useropt=no ;;
982
983   -docdir | --docdir | --docdi | --doc | --do)
984     ac_prev=docdir ;;
985   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
986     docdir=$ac_optarg ;;
987
988   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
989     ac_prev=dvidir ;;
990   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
991     dvidir=$ac_optarg ;;
992
993   -enable-* | --enable-*)
994     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
995     # Reject names that are not valid shell variable names.
996     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
997       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
998    { (exit 1); exit 1; }; }
999     ac_useropt_orig=$ac_useropt
1000     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1001     case $ac_user_opts in
1002       *"
1003 "enable_$ac_useropt"
1004 "*) ;;
1005       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1006          ac_unrecognized_sep=', ';;
1007     esac
1008     eval enable_$ac_useropt=\$ac_optarg ;;
1009
1010   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1011   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1012   | --exec | --exe | --ex)
1013     ac_prev=exec_prefix ;;
1014   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1015   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1016   | --exec=* | --exe=* | --ex=*)
1017     exec_prefix=$ac_optarg ;;
1018
1019   -gas | --gas | --ga | --g)
1020     # Obsolete; use --with-gas.
1021     with_gas=yes ;;
1022
1023   -help | --help | --hel | --he | -h)
1024     ac_init_help=long ;;
1025   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1026     ac_init_help=recursive ;;
1027   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1028     ac_init_help=short ;;
1029
1030   -host | --host | --hos | --ho)
1031     ac_prev=host_alias ;;
1032   -host=* | --host=* | --hos=* | --ho=*)
1033     host_alias=$ac_optarg ;;
1034
1035   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1036     ac_prev=htmldir ;;
1037   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1038   | --ht=*)
1039     htmldir=$ac_optarg ;;
1040
1041   -includedir | --includedir | --includedi | --included | --include \
1042   | --includ | --inclu | --incl | --inc)
1043     ac_prev=includedir ;;
1044   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1045   | --includ=* | --inclu=* | --incl=* | --inc=*)
1046     includedir=$ac_optarg ;;
1047
1048   -infodir | --infodir | --infodi | --infod | --info | --inf)
1049     ac_prev=infodir ;;
1050   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1051     infodir=$ac_optarg ;;
1052
1053   -libdir | --libdir | --libdi | --libd)
1054     ac_prev=libdir ;;
1055   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1056     libdir=$ac_optarg ;;
1057
1058   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1059   | --libexe | --libex | --libe)
1060     ac_prev=libexecdir ;;
1061   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1062   | --libexe=* | --libex=* | --libe=*)
1063     libexecdir=$ac_optarg ;;
1064
1065   -localedir | --localedir | --localedi | --localed | --locale)
1066     ac_prev=localedir ;;
1067   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1068     localedir=$ac_optarg ;;
1069
1070   -localstatedir | --localstatedir | --localstatedi | --localstated \
1071   | --localstate | --localstat | --localsta | --localst | --locals)
1072     ac_prev=localstatedir ;;
1073   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1074   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1075     localstatedir=$ac_optarg ;;
1076
1077   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1078     ac_prev=mandir ;;
1079   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1080     mandir=$ac_optarg ;;
1081
1082   -nfp | --nfp | --nf)
1083     # Obsolete; use --without-fp.
1084     with_fp=no ;;
1085
1086   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1087   | --no-cr | --no-c | -n)
1088     no_create=yes ;;
1089
1090   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1091   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1092     no_recursion=yes ;;
1093
1094   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1095   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1096   | --oldin | --oldi | --old | --ol | --o)
1097     ac_prev=oldincludedir ;;
1098   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1099   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1100   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1101     oldincludedir=$ac_optarg ;;
1102
1103   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1104     ac_prev=prefix ;;
1105   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1106     prefix=$ac_optarg ;;
1107
1108   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1109   | --program-pre | --program-pr | --program-p)
1110     ac_prev=program_prefix ;;
1111   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1112   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1113     program_prefix=$ac_optarg ;;
1114
1115   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1116   | --program-suf | --program-su | --program-s)
1117     ac_prev=program_suffix ;;
1118   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1119   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1120     program_suffix=$ac_optarg ;;
1121
1122   -program-transform-name | --program-transform-name \
1123   | --program-transform-nam | --program-transform-na \
1124   | --program-transform-n | --program-transform- \
1125   | --program-transform | --program-transfor \
1126   | --program-transfo | --program-transf \
1127   | --program-trans | --program-tran \
1128   | --progr-tra | --program-tr | --program-t)
1129     ac_prev=program_transform_name ;;
1130   -program-transform-name=* | --program-transform-name=* \
1131   | --program-transform-nam=* | --program-transform-na=* \
1132   | --program-transform-n=* | --program-transform-=* \
1133   | --program-transform=* | --program-transfor=* \
1134   | --program-transfo=* | --program-transf=* \
1135   | --program-trans=* | --program-tran=* \
1136   | --progr-tra=* | --program-tr=* | --program-t=*)
1137     program_transform_name=$ac_optarg ;;
1138
1139   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1140     ac_prev=pdfdir ;;
1141   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1142     pdfdir=$ac_optarg ;;
1143
1144   -psdir | --psdir | --psdi | --psd | --ps)
1145     ac_prev=psdir ;;
1146   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1147     psdir=$ac_optarg ;;
1148
1149   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1150   | -silent | --silent | --silen | --sile | --sil)
1151     silent=yes ;;
1152
1153   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1154     ac_prev=sbindir ;;
1155   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1156   | --sbi=* | --sb=*)
1157     sbindir=$ac_optarg ;;
1158
1159   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1160   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1161   | --sharedst | --shareds | --shared | --share | --shar \
1162   | --sha | --sh)
1163     ac_prev=sharedstatedir ;;
1164   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1165   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1166   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1167   | --sha=* | --sh=*)
1168     sharedstatedir=$ac_optarg ;;
1169
1170   -site | --site | --sit)
1171     ac_prev=site ;;
1172   -site=* | --site=* | --sit=*)
1173     site=$ac_optarg ;;
1174
1175   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1176     ac_prev=srcdir ;;
1177   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1178     srcdir=$ac_optarg ;;
1179
1180   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1181   | --syscon | --sysco | --sysc | --sys | --sy)
1182     ac_prev=sysconfdir ;;
1183   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1184   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1185     sysconfdir=$ac_optarg ;;
1186
1187   -target | --target | --targe | --targ | --tar | --ta | --t)
1188     ac_prev=target_alias ;;
1189   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1190     target_alias=$ac_optarg ;;
1191
1192   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1193     verbose=yes ;;
1194
1195   -version | --version | --versio | --versi | --vers | -V)
1196     ac_init_version=: ;;
1197
1198   -with-* | --with-*)
1199     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1200     # Reject names that are not valid shell variable names.
1201     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1202       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1203    { (exit 1); exit 1; }; }
1204     ac_useropt_orig=$ac_useropt
1205     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1206     case $ac_user_opts in
1207       *"
1208 "with_$ac_useropt"
1209 "*) ;;
1210       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1211          ac_unrecognized_sep=', ';;
1212     esac
1213     eval with_$ac_useropt=\$ac_optarg ;;
1214
1215   -without-* | --without-*)
1216     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1217     # Reject names that are not valid shell variable names.
1218     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1219       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1220    { (exit 1); exit 1; }; }
1221     ac_useropt_orig=$ac_useropt
1222     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1223     case $ac_user_opts in
1224       *"
1225 "with_$ac_useropt"
1226 "*) ;;
1227       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1228          ac_unrecognized_sep=', ';;
1229     esac
1230     eval with_$ac_useropt=no ;;
1231
1232   --x)
1233     # Obsolete; use --with-x.
1234     with_x=yes ;;
1235
1236   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1237   | --x-incl | --x-inc | --x-in | --x-i)
1238     ac_prev=x_includes ;;
1239   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1240   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1241     x_includes=$ac_optarg ;;
1242
1243   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1244   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1245     ac_prev=x_libraries ;;
1246   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1247   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1248     x_libraries=$ac_optarg ;;
1249
1250   -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1251 Try \`$0 --help' for more information." >&2
1252    { (exit 1); exit 1; }; }
1253     ;;
1254
1255   *=*)
1256     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1257     # Reject names that are not valid shell variable names.
1258     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1259       { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1260    { (exit 1); exit 1; }; }
1261     eval $ac_envvar=\$ac_optarg
1262     export $ac_envvar ;;
1263
1264   *)
1265     # FIXME: should be removed in autoconf 3.0.
1266     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1267     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1268       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1269     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1270     ;;
1271
1272   esac
1273 done
1274
1275 if test -n "$ac_prev"; then
1276   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1277   { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1278    { (exit 1); exit 1; }; }
1279 fi
1280
1281 if test -n "$ac_unrecognized_opts"; then
1282   case $enable_option_checking in
1283     no) ;;
1284     fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1285    { (exit 1); exit 1; }; } ;;
1286     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1287   esac
1288 fi
1289
1290 # Check all directory arguments for consistency.
1291 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1292                 datadir sysconfdir sharedstatedir localstatedir includedir \
1293                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1294                 libdir localedir mandir
1295 do
1296   eval ac_val=\$$ac_var
1297   # Remove trailing slashes.
1298   case $ac_val in
1299     */ )
1300       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1301       eval $ac_var=\$ac_val;;
1302   esac
1303   # Be sure to have absolute directory names.
1304   case $ac_val in
1305     [\\/$]* | ?:[\\/]* )  continue;;
1306     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1307   esac
1308   { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1309    { (exit 1); exit 1; }; }
1310 done
1311
1312 # There might be people who depend on the old broken behavior: `$host'
1313 # used to hold the argument of --host etc.
1314 # FIXME: To remove some day.
1315 build=$build_alias
1316 host=$host_alias
1317 target=$target_alias
1318
1319 # FIXME: To remove some day.
1320 if test "x$host_alias" != x; then
1321   if test "x$build_alias" = x; then
1322     cross_compiling=maybe
1323     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1324     If a cross compiler is detected then cross compile mode will be used." >&2
1325   elif test "x$build_alias" != "x$host_alias"; then
1326     cross_compiling=yes
1327   fi
1328 fi
1329
1330 ac_tool_prefix=
1331 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1332
1333 test "$silent" = yes && exec 6>/dev/null
1334
1335
1336 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1337 ac_ls_di=`ls -di .` &&
1338 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1339   { $as_echo "$as_me: error: working directory cannot be determined" >&2
1340    { (exit 1); exit 1; }; }
1341 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1342   { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1343    { (exit 1); exit 1; }; }
1344
1345
1346 # Find the source files, if location was not specified.
1347 if test -z "$srcdir"; then
1348   ac_srcdir_defaulted=yes
1349   # Try the directory containing this script, then the parent directory.
1350   ac_confdir=`$as_dirname -- "$as_myself" ||
1351 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1352          X"$as_myself" : 'X\(//\)[^/]' \| \
1353          X"$as_myself" : 'X\(//\)$' \| \
1354          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1355 $as_echo X"$as_myself" |
1356     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1357             s//\1/
1358             q
1359           }
1360           /^X\(\/\/\)[^/].*/{
1361             s//\1/
1362             q
1363           }
1364           /^X\(\/\/\)$/{
1365             s//\1/
1366             q
1367           }
1368           /^X\(\/\).*/{
1369             s//\1/
1370             q
1371           }
1372           s/.*/./; q'`
1373   srcdir=$ac_confdir
1374   if test ! -r "$srcdir/$ac_unique_file"; then
1375     srcdir=..
1376   fi
1377 else
1378   ac_srcdir_defaulted=no
1379 fi
1380 if test ! -r "$srcdir/$ac_unique_file"; then
1381   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1382   { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1383    { (exit 1); exit 1; }; }
1384 fi
1385 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1386 ac_abs_confdir=`(
1387         cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1388    { (exit 1); exit 1; }; }
1389         pwd)`
1390 # When building in place, set srcdir=.
1391 if test "$ac_abs_confdir" = "$ac_pwd"; then
1392   srcdir=.
1393 fi
1394 # Remove unnecessary trailing slashes from srcdir.
1395 # Double slashes in file names in object file debugging info
1396 # mess up M-x gdb in Emacs.
1397 case $srcdir in
1398 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1399 esac
1400 for ac_var in $ac_precious_vars; do
1401   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1402   eval ac_env_${ac_var}_value=\$${ac_var}
1403   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1404   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1405 done
1406
1407 #
1408 # Report the --help message.
1409 #
1410 if test "$ac_init_help" = "long"; then
1411   # Omit some internal or obsolete options to make the list less imposing.
1412   # This message is too long to be a string in the A/UX 3.1 sh.
1413   cat <<_ACEOF
1414 \`configure' configures PostgreSQL 9.3devel to adapt to many kinds of systems.
1415
1416 Usage: $0 [OPTION]... [VAR=VALUE]...
1417
1418 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1419 VAR=VALUE.  See below for descriptions of some of the useful variables.
1420
1421 Defaults for the options are specified in brackets.
1422
1423 Configuration:
1424   -h, --help              display this help and exit
1425       --help=short        display options specific to this package
1426       --help=recursive    display the short help of all the included packages
1427   -V, --version           display version information and exit
1428   -q, --quiet, --silent   do not print \`checking...' messages
1429       --cache-file=FILE   cache test results in FILE [disabled]
1430   -C, --config-cache      alias for \`--cache-file=config.cache'
1431   -n, --no-create         do not create output files
1432       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1433
1434 Installation directories:
1435   --prefix=PREFIX         install architecture-independent files in PREFIX
1436                           [$ac_default_prefix]
1437   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1438                           [PREFIX]
1439
1440 By default, \`make install' will install all the files in
1441 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1442 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1443 for instance \`--prefix=\$HOME'.
1444
1445 For better control, use the options below.
1446
1447 Fine tuning of the installation directories:
1448   --bindir=DIR            user executables [EPREFIX/bin]
1449   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1450   --libexecdir=DIR        program executables [EPREFIX/libexec]
1451   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1452   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1453   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1454   --libdir=DIR            object code libraries [EPREFIX/lib]
1455   --includedir=DIR        C header files [PREFIX/include]
1456   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1457   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1458   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1459   --infodir=DIR           info documentation [DATAROOTDIR/info]
1460   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1461   --mandir=DIR            man documentation [DATAROOTDIR/man]
1462   --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1463   --htmldir=DIR           html documentation [DOCDIR]
1464   --dvidir=DIR            dvi documentation [DOCDIR]
1465   --pdfdir=DIR            pdf documentation [DOCDIR]
1466   --psdir=DIR             ps documentation [DOCDIR]
1467 _ACEOF
1468
1469   cat <<\_ACEOF
1470
1471 System types:
1472   --build=BUILD     configure for building on BUILD [guessed]
1473   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1474 _ACEOF
1475 fi
1476
1477 if test -n "$ac_init_help"; then
1478   case $ac_init_help in
1479      short | recursive ) echo "Configuration of PostgreSQL 9.3devel:";;
1480    esac
1481   cat <<\_ACEOF
1482
1483 Optional Features:
1484   --disable-option-checking  ignore unrecognized --enable/--with options
1485   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1486   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1487   --disable-integer-datetimes
1488                           disable 64-bit integer date/time support
1489   --enable-nls[=LANGUAGES]
1490                           enable Native Language Support
1491   --disable-rpath         do not embed shared library search path in
1492                           executables
1493   --disable-spinlocks     do not use spinlocks
1494   --enable-debug          build with debugging symbols (-g)
1495   --enable-profiling      build with profiling enabled
1496   --enable-coverage       build with coverage testing instrumentation
1497   --enable-dtrace         build with DTrace support
1498   --enable-depend         turn on automatic dependency tracking
1499   --enable-cassert        enable assertion checks (for debugging)
1500   --disable-thread-safety disable thread-safety in client libraries
1501   --disable-largefile     omit support for large files
1502   --disable-float4-byval  disable float4 passed by value
1503   --disable-float8-byval  disable float8 passed by value
1504
1505 Optional Packages:
1506   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1507   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1508   --with-template=NAME    override operating system template
1509   --with-includes=DIRS    look for additional header files in DIRS
1510   --with-libraries=DIRS   look for additional libraries in DIRS
1511   --with-libs=DIRS        alternative spelling of --with-libraries
1512   --with-pgport=PORTNUM   set default port number [5432]
1513   --with-blocksize=BLOCKSIZE
1514                           set table block size in kB [8]
1515   --with-segsize=SEGSIZE  set table segment size in GB [1]
1516   --with-wal-blocksize=BLOCKSIZE
1517                           set WAL block size in kB [8]
1518   --with-wal-segsize=SEGSIZE
1519                           set WAL segment size in MB [16]
1520   --with-CC=CMD           set compiler (deprecated)
1521   --with-tcl              build Tcl modules (PL/Tcl)
1522   --with-tclconfig=DIR    tclConfig.sh is in DIR
1523   --with-perl             build Perl modules (PL/Perl)
1524   --with-python           build Python modules (PL/Python)
1525   --with-gssapi           build with GSSAPI support
1526   --with-krb5             build with Kerberos 5 support
1527   --with-krb-srvnam=NAME  default service principal name in Kerberos
1528                           [postgres]
1529   --with-pam              build with PAM support
1530   --with-ldap             build with LDAP support
1531   --with-bonjour          build with Bonjour support
1532   --with-openssl          build with OpenSSL support
1533   --with-selinux          build with SELinux support
1534   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1535   --with-libedit-preferred
1536                           prefer BSD Libedit over GNU Readline
1537   --with-ossp-uuid        build contrib/uuid-ossp, requires OSSP UUID library
1538   --with-libxml           build with XML support
1539   --with-libxslt          use XSLT support when building contrib/xml2
1540   --with-system-tzdata=DIR
1541                           use system time zone data in DIR
1542   --without-zlib          do not use Zlib
1543   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1544
1545 Some influential environment variables:
1546   CC          C compiler command
1547   CFLAGS      C compiler flags
1548   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1549               nonstandard directory <lib dir>
1550   LIBS        libraries to pass to the linker, e.g. -l<library>
1551   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1552               you have headers in a nonstandard directory <include dir>
1553   CPP         C preprocessor
1554   LDFLAGS_EX  extra linker flags for linking executables only
1555   LDFLAGS_SL  extra linker flags for linking shared libraries only
1556   DOCBOOKSTYLE
1557               location of DocBook stylesheets
1558
1559 Use these variables to override the choices made by `configure' or to help
1560 it to find libraries and programs with nonstandard names/locations.
1561
1562 Report bugs to <pgsql-bugs@postgresql.org>.
1563 _ACEOF
1564 ac_status=$?
1565 fi
1566
1567 if test "$ac_init_help" = "recursive"; then
1568   # If there are subdirs, report their specific --help.
1569   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1570     test -d "$ac_dir" ||
1571       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1572       continue
1573     ac_builddir=.
1574
1575 case "$ac_dir" in
1576 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1577 *)
1578   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1579   # A ".." for each directory in $ac_dir_suffix.
1580   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1581   case $ac_top_builddir_sub in
1582   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1583   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1584   esac ;;
1585 esac
1586 ac_abs_top_builddir=$ac_pwd
1587 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1588 # for backward compatibility:
1589 ac_top_builddir=$ac_top_build_prefix
1590
1591 case $srcdir in
1592   .)  # We are building in place.
1593     ac_srcdir=.
1594     ac_top_srcdir=$ac_top_builddir_sub
1595     ac_abs_top_srcdir=$ac_pwd ;;
1596   [\\/]* | ?:[\\/]* )  # Absolute name.
1597     ac_srcdir=$srcdir$ac_dir_suffix;
1598     ac_top_srcdir=$srcdir
1599     ac_abs_top_srcdir=$srcdir ;;
1600   *) # Relative name.
1601     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1602     ac_top_srcdir=$ac_top_build_prefix$srcdir
1603     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1604 esac
1605 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1606
1607     cd "$ac_dir" || { ac_status=$?; continue; }
1608     # Check for guested configure.
1609     if test -f "$ac_srcdir/configure.gnu"; then
1610       echo &&
1611       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1612     elif test -f "$ac_srcdir/configure"; then
1613       echo &&
1614       $SHELL "$ac_srcdir/configure" --help=recursive
1615     else
1616       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1617     fi || ac_status=$?
1618     cd "$ac_pwd" || { ac_status=$?; break; }
1619   done
1620 fi
1621
1622 test -n "$ac_init_help" && exit $ac_status
1623 if $ac_init_version; then
1624   cat <<\_ACEOF
1625 PostgreSQL configure 9.3devel
1626 generated by GNU Autoconf 2.63
1627
1628 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1629 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1630 This configure script is free software; the Free Software Foundation
1631 gives unlimited permission to copy, distribute and modify it.
1632
1633 Copyright (c) 1996-2013, PostgreSQL Global Development Group
1634 _ACEOF
1635   exit
1636 fi
1637 cat >config.log <<_ACEOF
1638 This file contains any messages produced by compilers while
1639 running configure, to aid debugging if configure makes a mistake.
1640
1641 It was created by PostgreSQL $as_me 9.3devel, which was
1642 generated by GNU Autoconf 2.63.  Invocation command line was
1643
1644   $ $0 $@
1645
1646 _ACEOF
1647 exec 5>>config.log
1648 {
1649 cat <<_ASUNAME
1650 ## --------- ##
1651 ## Platform. ##
1652 ## --------- ##
1653
1654 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1655 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1656 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1657 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1658 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1659
1660 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1661 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1662
1663 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1664 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1665 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1666 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1667 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1668 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1669 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1670
1671 _ASUNAME
1672
1673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1674 for as_dir in $PATH
1675 do
1676   IFS=$as_save_IFS
1677   test -z "$as_dir" && as_dir=.
1678   $as_echo "PATH: $as_dir"
1679 done
1680 IFS=$as_save_IFS
1681
1682 } >&5
1683
1684 cat >&5 <<_ACEOF
1685
1686
1687 ## ----------- ##
1688 ## Core tests. ##
1689 ## ----------- ##
1690
1691 _ACEOF
1692
1693
1694 # Keep a trace of the command line.
1695 # Strip out --no-create and --no-recursion so they do not pile up.
1696 # Strip out --silent because we don't want to record it for future runs.
1697 # Also quote any args containing shell meta-characters.
1698 # Make two passes to allow for proper duplicate-argument suppression.
1699 ac_configure_args=
1700 ac_configure_args0=
1701 ac_configure_args1=
1702 ac_must_keep_next=false
1703 for ac_pass in 1 2
1704 do
1705   for ac_arg
1706   do
1707     case $ac_arg in
1708     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1709     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1710     | -silent | --silent | --silen | --sile | --sil)
1711       continue ;;
1712     *\'*)
1713       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1714     esac
1715     case $ac_pass in
1716     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1717     2)
1718       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1719       if test $ac_must_keep_next = true; then
1720         ac_must_keep_next=false # Got value, back to normal.
1721       else
1722         case $ac_arg in
1723           *=* | --config-cache | -C | -disable-* | --disable-* \
1724           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1725           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1726           | -with-* | --with-* | -without-* | --without-* | --x)
1727             case "$ac_configure_args0 " in
1728               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1729             esac
1730             ;;
1731           -* ) ac_must_keep_next=true ;;
1732         esac
1733       fi
1734       ac_configure_args="$ac_configure_args '$ac_arg'"
1735       ;;
1736     esac
1737   done
1738 done
1739 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1740 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1741
1742 # When interrupted or exit'd, cleanup temporary files, and complete
1743 # config.log.  We remove comments because anyway the quotes in there
1744 # would cause problems or look ugly.
1745 # WARNING: Use '\'' to represent an apostrophe within the trap.
1746 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1747 trap 'exit_status=$?
1748   # Save into config.log some information that might help in debugging.
1749   {
1750     echo
1751
1752     cat <<\_ASBOX
1753 ## ---------------- ##
1754 ## Cache variables. ##
1755 ## ---------------- ##
1756 _ASBOX
1757     echo
1758     # The following way of writing the cache mishandles newlines in values,
1759 (
1760   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1761     eval ac_val=\$$ac_var
1762     case $ac_val in #(
1763     *${as_nl}*)
1764       case $ac_var in #(
1765       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1766 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1767       esac
1768       case $ac_var in #(
1769       _ | IFS | as_nl) ;; #(
1770       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1771       *) $as_unset $ac_var ;;
1772       esac ;;
1773     esac
1774   done
1775   (set) 2>&1 |
1776     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1777     *${as_nl}ac_space=\ *)
1778       sed -n \
1779         "s/'\''/'\''\\\\'\'''\''/g;
1780           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1781       ;; #(
1782     *)
1783       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1784       ;;
1785     esac |
1786     sort
1787 )
1788     echo
1789
1790     cat <<\_ASBOX
1791 ## ----------------- ##
1792 ## Output variables. ##
1793 ## ----------------- ##
1794 _ASBOX
1795     echo
1796     for ac_var in $ac_subst_vars
1797     do
1798       eval ac_val=\$$ac_var
1799       case $ac_val in
1800       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1801       esac
1802       $as_echo "$ac_var='\''$ac_val'\''"
1803     done | sort
1804     echo
1805
1806     if test -n "$ac_subst_files"; then
1807       cat <<\_ASBOX
1808 ## ------------------- ##
1809 ## File substitutions. ##
1810 ## ------------------- ##
1811 _ASBOX
1812       echo
1813       for ac_var in $ac_subst_files
1814       do
1815         eval ac_val=\$$ac_var
1816         case $ac_val in
1817         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1818         esac
1819         $as_echo "$ac_var='\''$ac_val'\''"
1820       done | sort
1821       echo
1822     fi
1823
1824     if test -s confdefs.h; then
1825       cat <<\_ASBOX
1826 ## ----------- ##
1827 ## confdefs.h. ##
1828 ## ----------- ##
1829 _ASBOX
1830       echo
1831       cat confdefs.h
1832       echo
1833     fi
1834     test "$ac_signal" != 0 &&
1835       $as_echo "$as_me: caught signal $ac_signal"
1836     $as_echo "$as_me: exit $exit_status"
1837   } >&5
1838   rm -f core *.core core.conftest.* &&
1839     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1840     exit $exit_status
1841 ' 0
1842 for ac_signal in 1 2 13 15; do
1843   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1844 done
1845 ac_signal=0
1846
1847 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1848 rm -f -r conftest* confdefs.h
1849
1850 # Predefined preprocessor variables.
1851
1852 cat >>confdefs.h <<_ACEOF
1853 #define PACKAGE_NAME "$PACKAGE_NAME"
1854 _ACEOF
1855
1856
1857 cat >>confdefs.h <<_ACEOF
1858 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1859 _ACEOF
1860
1861
1862 cat >>confdefs.h <<_ACEOF
1863 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1864 _ACEOF
1865
1866
1867 cat >>confdefs.h <<_ACEOF
1868 #define PACKAGE_STRING "$PACKAGE_STRING"
1869 _ACEOF
1870
1871
1872 cat >>confdefs.h <<_ACEOF
1873 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1874 _ACEOF
1875
1876
1877 # Let the site file select an alternate cache file if it wants to.
1878 # Prefer an explicitly selected file to automatically selected ones.
1879 ac_site_file1=NONE
1880 ac_site_file2=NONE
1881 if test -n "$CONFIG_SITE"; then
1882   ac_site_file1=$CONFIG_SITE
1883 elif test "x$prefix" != xNONE; then
1884   ac_site_file1=$prefix/share/config.site
1885   ac_site_file2=$prefix/etc/config.site
1886 else
1887   ac_site_file1=$ac_default_prefix/share/config.site
1888   ac_site_file2=$ac_default_prefix/etc/config.site
1889 fi
1890 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1891 do
1892   test "x$ac_site_file" = xNONE && continue
1893   if test -r "$ac_site_file"; then
1894     { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1895 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1896     sed 's/^/| /' "$ac_site_file" >&5
1897     . "$ac_site_file"
1898   fi
1899 done
1900
1901 if test -r "$cache_file"; then
1902   # Some versions of bash will fail to source /dev/null (special
1903   # files actually), so we avoid doing that.
1904   if test -f "$cache_file"; then
1905     { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1906 $as_echo "$as_me: loading cache $cache_file" >&6;}
1907     case $cache_file in
1908       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1909       *)                      . "./$cache_file";;
1910     esac
1911   fi
1912 else
1913   { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1914 $as_echo "$as_me: creating cache $cache_file" >&6;}
1915   >$cache_file
1916 fi
1917
1918 # Check that the precious variables saved in the cache have kept the same
1919 # value.
1920 ac_cache_corrupted=false
1921 for ac_var in $ac_precious_vars; do
1922   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1923   eval ac_new_set=\$ac_env_${ac_var}_set
1924   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1925   eval ac_new_val=\$ac_env_${ac_var}_value
1926   case $ac_old_set,$ac_new_set in
1927     set,)
1928       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1929 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1930       ac_cache_corrupted=: ;;
1931     ,set)
1932       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1933 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1934       ac_cache_corrupted=: ;;
1935     ,);;
1936     *)
1937       if test "x$ac_old_val" != "x$ac_new_val"; then
1938         # differences in whitespace do not lead to failure.
1939         ac_old_val_w=`echo x $ac_old_val`
1940         ac_new_val_w=`echo x $ac_new_val`
1941         if test "$ac_old_val_w" != "$ac_new_val_w"; then
1942           { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1943 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1944           ac_cache_corrupted=:
1945         else
1946           { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1947 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1948           eval $ac_var=\$ac_old_val
1949         fi
1950         { $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
1951 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1952         { $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
1953 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1954       fi;;
1955   esac
1956   # Pass precious variables to config.status.
1957   if test "$ac_new_set" = set; then
1958     case $ac_new_val in
1959     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1960     *) ac_arg=$ac_var=$ac_new_val ;;
1961     esac
1962     case " $ac_configure_args " in
1963       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1964       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1965     esac
1966   fi
1967 done
1968 if $ac_cache_corrupted; then
1969   { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1970 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1971   { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1972 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1973   { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1974 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1975    { (exit 1); exit 1; }; }
1976 fi
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002 ac_ext=c
2003 ac_cpp='$CPP $CPPFLAGS'
2004 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2005 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2006 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2007
2008
2009
2010
2011
2012
2013 ac_aux_dir=
2014 for ac_dir in config "$srcdir"/config; do
2015   if test -f "$ac_dir/install-sh"; then
2016     ac_aux_dir=$ac_dir
2017     ac_install_sh="$ac_aux_dir/install-sh -c"
2018     break
2019   elif test -f "$ac_dir/install.sh"; then
2020     ac_aux_dir=$ac_dir
2021     ac_install_sh="$ac_aux_dir/install.sh -c"
2022     break
2023   elif test -f "$ac_dir/shtool"; then
2024     ac_aux_dir=$ac_dir
2025     ac_install_sh="$ac_aux_dir/shtool install -c"
2026     break
2027   fi
2028 done
2029 if test -z "$ac_aux_dir"; then
2030   { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
2031 $as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
2032    { (exit 1); exit 1; }; }
2033 fi
2034
2035 # These three variables are undocumented and unsupported,
2036 # and are intended to be withdrawn in a future Autoconf release.
2037 # They can cause serious problems if a builder's source tree is in a directory
2038 # whose full name contains unusual characters.
2039 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2040 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2041 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2042
2043
2044
2045 configure_args=$ac_configure_args
2046
2047
2048
2049 cat >>confdefs.h <<_ACEOF
2050 #define PG_VERSION "$PACKAGE_VERSION"
2051 _ACEOF
2052
2053 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2054
2055
2056 cat >>confdefs.h <<_ACEOF
2057 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2058 _ACEOF
2059
2060
2061 # Make sure we can run config.sub.
2062 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2063   { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2064 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2065    { (exit 1); exit 1; }; }
2066
2067 { $as_echo "$as_me:$LINENO: checking build system type" >&5
2068 $as_echo_n "checking build system type... " >&6; }
2069 if test "${ac_cv_build+set}" = set; then
2070   $as_echo_n "(cached) " >&6
2071 else
2072   ac_build_alias=$build_alias
2073 test "x$ac_build_alias" = x &&
2074   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2075 test "x$ac_build_alias" = x &&
2076   { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2077 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2078    { (exit 1); exit 1; }; }
2079 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2080   { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2081 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2082    { (exit 1); exit 1; }; }
2083
2084 fi
2085 { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2086 $as_echo "$ac_cv_build" >&6; }
2087 case $ac_cv_build in
2088 *-*-*) ;;
2089 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2090 $as_echo "$as_me: error: invalid value of canonical build" >&2;}
2091    { (exit 1); exit 1; }; };;
2092 esac
2093 build=$ac_cv_build
2094 ac_save_IFS=$IFS; IFS='-'
2095 set x $ac_cv_build
2096 shift
2097 build_cpu=$1
2098 build_vendor=$2
2099 shift; shift
2100 # Remember, the first character of IFS is used to create $*,
2101 # except with old shells:
2102 build_os=$*
2103 IFS=$ac_save_IFS
2104 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2105
2106
2107 { $as_echo "$as_me:$LINENO: checking host system type" >&5
2108 $as_echo_n "checking host system type... " >&6; }
2109 if test "${ac_cv_host+set}" = set; then
2110   $as_echo_n "(cached) " >&6
2111 else
2112   if test "x$host_alias" = x; then
2113   ac_cv_host=$ac_cv_build
2114 else
2115   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2116     { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2117 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2118    { (exit 1); exit 1; }; }
2119 fi
2120
2121 fi
2122 { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2123 $as_echo "$ac_cv_host" >&6; }
2124 case $ac_cv_host in
2125 *-*-*) ;;
2126 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2127 $as_echo "$as_me: error: invalid value of canonical host" >&2;}
2128    { (exit 1); exit 1; }; };;
2129 esac
2130 host=$ac_cv_host
2131 ac_save_IFS=$IFS; IFS='-'
2132 set x $ac_cv_host
2133 shift
2134 host_cpu=$1
2135 host_vendor=$2
2136 shift; shift
2137 # Remember, the first character of IFS is used to create $*,
2138 # except with old shells:
2139 host_os=$*
2140 IFS=$ac_save_IFS
2141 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2142
2143
2144
2145 template=
2146 { $as_echo "$as_me:$LINENO: checking which template to use" >&5
2147 $as_echo_n "checking which template to use... " >&6; }
2148
2149
2150
2151
2152 # Check whether --with-template was given.
2153 if test "${with_template+set}" = set; then
2154   withval=$with_template;
2155   case $withval in
2156     yes)
2157       { { $as_echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
2158 $as_echo "$as_me: error: argument required for --with-template option" >&2;}
2159    { (exit 1); exit 1; }; }
2160       ;;
2161     no)
2162       { { $as_echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
2163 $as_echo "$as_me: error: argument required for --with-template option" >&2;}
2164    { (exit 1); exit 1; }; }
2165       ;;
2166     *)
2167
2168   case $withval in
2169     list)   echo; ls "$srcdir/src/template"; exit;;
2170     *)      if test -f "$srcdir/src/template/$with_template" ; then
2171               template=$withval
2172             else
2173               { { $as_echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
2174 $as_echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
2175    { (exit 1); exit 1; }; }
2176             fi;;
2177   esac
2178
2179       ;;
2180   esac
2181
2182 else
2183
2184 # --with-template not given
2185
2186 case $host_os in
2187      aix*) template=aix ;;
2188   cygwin*) template=cygwin ;;
2189   darwin*) template=darwin ;;
2190 dragonfly*) template=netbsd ;;
2191  freebsd*) template=freebsd ;;
2192     hpux*) template=hpux ;;
2193     irix*) template=irix ;;
2194  linux*|gnu*|k*bsd*-gnu)
2195            template=linux ;;
2196    mingw*) template=win32 ;;
2197   netbsd*) template=netbsd ;;
2198  openbsd*) template=openbsd ;;
2199      osf*) template=osf ;;
2200      sco*) template=sco ;;
2201  solaris*) template=solaris ;;
2202    sysv5*) template=unixware ;;
2203 esac
2204
2205   if test x"$template" = x"" ; then
2206     { { $as_echo "$as_me:$LINENO: error:
2207 *******************************************************************
2208 PostgreSQL has apparently not been ported to your platform yet.
2209 To try a manual configuration, look into the src/template directory
2210 for a similar platform and use the '--with-template=' option.
2211
2212 Please also contact <pgsql-bugs@postgresql.org> to see about
2213 rectifying this.  Include the above 'checking host system type...'
2214 line.
2215 *******************************************************************
2216 " >&5
2217 $as_echo "$as_me: error:
2218 *******************************************************************
2219 PostgreSQL has apparently not been ported to your platform yet.
2220 To try a manual configuration, look into the src/template directory
2221 for a similar platform and use the '--with-template=' option.
2222
2223 Please also contact <pgsql-bugs@postgresql.org> to see about
2224 rectifying this.  Include the above 'checking host system type...'
2225 line.
2226 *******************************************************************
2227 " >&2;}
2228    { (exit 1); exit 1; }; }
2229   fi
2230
2231
2232 fi
2233
2234
2235
2236 { $as_echo "$as_me:$LINENO: result: $template" >&5
2237 $as_echo "$template" >&6; }
2238
2239 PORTNAME=$template
2240
2241
2242 # Initialize default assumption that we do not need separate assembly code
2243 # for TAS (test-and-set).  This can be overridden by the template file
2244 # when it's executed.
2245 need_tas=no
2246 tas_file=dummy.s
2247
2248
2249
2250 ##
2251 ## Command line options
2252 ##
2253
2254 #
2255 # Add non-standard directories to the include path
2256 #
2257
2258
2259
2260 # Check whether --with-includes was given.
2261 if test "${with_includes+set}" = set; then
2262   withval=$with_includes;
2263   case $withval in
2264     yes)
2265       { { $as_echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2266 $as_echo "$as_me: error: argument required for --with-includes option" >&2;}
2267    { (exit 1); exit 1; }; }
2268       ;;
2269     no)
2270       { { $as_echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2271 $as_echo "$as_me: error: argument required for --with-includes option" >&2;}
2272    { (exit 1); exit 1; }; }
2273       ;;
2274     *)
2275
2276       ;;
2277   esac
2278
2279 fi
2280
2281
2282
2283
2284 #
2285 # Add non-standard directories to the library search path
2286 #
2287
2288
2289
2290 # Check whether --with-libraries was given.
2291 if test "${with_libraries+set}" = set; then
2292   withval=$with_libraries;
2293   case $withval in
2294     yes)
2295       { { $as_echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2296 $as_echo "$as_me: error: argument required for --with-libraries option" >&2;}
2297    { (exit 1); exit 1; }; }
2298       ;;
2299     no)
2300       { { $as_echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2301 $as_echo "$as_me: error: argument required for --with-libraries option" >&2;}
2302    { (exit 1); exit 1; }; }
2303       ;;
2304     *)
2305       LIBRARY_DIRS=$withval
2306       ;;
2307   esac
2308
2309 fi
2310
2311
2312
2313
2314
2315
2316 # Check whether --with-libs was given.
2317 if test "${with_libs+set}" = set; then
2318   withval=$with_libs;
2319   case $withval in
2320     yes)
2321       { { $as_echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2322 $as_echo "$as_me: error: argument required for --with-libs option" >&2;}
2323    { (exit 1); exit 1; }; }
2324       ;;
2325     no)
2326       { { $as_echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2327 $as_echo "$as_me: error: argument required for --with-libs option" >&2;}
2328    { (exit 1); exit 1; }; }
2329       ;;
2330     *)
2331       LIBRARY_DIRS=$withval
2332       ;;
2333   esac
2334
2335 fi
2336
2337
2338
2339
2340 #
2341 # 64-bit integer date/time storage: enabled by default.
2342 #
2343 { $as_echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
2344 $as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2345
2346
2347 # Check whether --enable-integer-datetimes was given.
2348 if test "${enable_integer_datetimes+set}" = set; then
2349   enableval=$enable_integer_datetimes;
2350   case $enableval in
2351     yes)
2352
2353 cat >>confdefs.h <<\_ACEOF
2354 #define USE_INTEGER_DATETIMES 1
2355 _ACEOF
2356
2357       ;;
2358     no)
2359       :
2360       ;;
2361     *)
2362       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
2363 $as_echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
2364    { (exit 1); exit 1; }; }
2365       ;;
2366   esac
2367
2368 else
2369   enable_integer_datetimes=yes
2370
2371 cat >>confdefs.h <<\_ACEOF
2372 #define USE_INTEGER_DATETIMES 1
2373 _ACEOF
2374
2375 fi
2376
2377
2378 { $as_echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
2379 $as_echo "$enable_integer_datetimes" >&6; }
2380
2381
2382 #
2383 # NLS
2384 #
2385 { $as_echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
2386 $as_echo_n "checking whether NLS is wanted... " >&6; }
2387
2388
2389 # Check whether --enable-nls was given.
2390 if test "${enable_nls+set}" = set; then
2391   enableval=$enable_nls;
2392   case $enableval in
2393     yes)
2394       :
2395       ;;
2396     no)
2397       :
2398       ;;
2399     *)
2400       enable_nls=yes
2401 WANTED_LANGUAGES=$enableval
2402       ;;
2403   esac
2404
2405 else
2406   enable_nls=no
2407 fi
2408
2409
2410
2411 if test "$enable_nls" = yes; then
2412
2413 cat >>confdefs.h <<\_ACEOF
2414 #define ENABLE_NLS 1
2415 _ACEOF
2416
2417 fi
2418
2419 { $as_echo "$as_me:$LINENO: result: $enable_nls" >&5
2420 $as_echo "$enable_nls" >&6; }
2421
2422
2423
2424 #
2425 # Default port number (--with-pgport), default 5432
2426 #
2427 { $as_echo "$as_me:$LINENO: checking for default port number" >&5
2428 $as_echo_n "checking for default port number... " >&6; }
2429
2430
2431
2432 # Check whether --with-pgport was given.
2433 if test "${with_pgport+set}" = set; then
2434   withval=$with_pgport;
2435   case $withval in
2436     yes)
2437       { { $as_echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2438 $as_echo "$as_me: error: argument required for --with-pgport option" >&2;}
2439    { (exit 1); exit 1; }; }
2440       ;;
2441     no)
2442       { { $as_echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2443 $as_echo "$as_me: error: argument required for --with-pgport option" >&2;}
2444    { (exit 1); exit 1; }; }
2445       ;;
2446     *)
2447       default_port=$withval
2448       ;;
2449   esac
2450
2451 else
2452   default_port=5432
2453 fi
2454
2455
2456 { $as_echo "$as_me:$LINENO: result: $default_port" >&5
2457 $as_echo "$default_port" >&6; }
2458 # Need both of these because some places want an integer and some a string
2459
2460 cat >>confdefs.h <<_ACEOF
2461 #define DEF_PGPORT ${default_port}
2462 _ACEOF
2463
2464
2465 cat >>confdefs.h <<_ACEOF
2466 #define DEF_PGPORT_STR "${default_port}"
2467 _ACEOF
2468
2469
2470
2471 #
2472 # '-rpath'-like feature can be disabled
2473 #
2474
2475
2476 # Check whether --enable-rpath was given.
2477 if test "${enable_rpath+set}" = set; then
2478   enableval=$enable_rpath;
2479   case $enableval in
2480     yes)
2481       :
2482       ;;
2483     no)
2484       :
2485       ;;
2486     *)
2487       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
2488 $as_echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
2489    { (exit 1); exit 1; }; }
2490       ;;
2491   esac
2492
2493 else
2494   enable_rpath=yes
2495
2496 fi
2497
2498
2499
2500
2501 #
2502 # Spinlocks
2503 #
2504
2505
2506 # Check whether --enable-spinlocks was given.
2507 if test "${enable_spinlocks+set}" = set; then
2508   enableval=$enable_spinlocks;
2509   case $enableval in
2510     yes)
2511       :
2512       ;;
2513     no)
2514       :
2515       ;;
2516     *)
2517       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
2518 $as_echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
2519    { (exit 1); exit 1; }; }
2520       ;;
2521   esac
2522
2523 else
2524   enable_spinlocks=yes
2525
2526 fi
2527
2528
2529
2530 #
2531 # --enable-debug adds -g to compiler flags
2532 #
2533
2534
2535 # Check whether --enable-debug was given.
2536 if test "${enable_debug+set}" = set; then
2537   enableval=$enable_debug;
2538   case $enableval in
2539     yes)
2540       :
2541       ;;
2542     no)
2543       :
2544       ;;
2545     *)
2546       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
2547 $as_echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
2548    { (exit 1); exit 1; }; }
2549       ;;
2550   esac
2551
2552 else
2553   enable_debug=no
2554
2555 fi
2556
2557
2558
2559
2560 #
2561 # --enable-profiling enables gcc profiling
2562 #
2563
2564
2565 # Check whether --enable-profiling was given.
2566 if test "${enable_profiling+set}" = set; then
2567   enableval=$enable_profiling;
2568   case $enableval in
2569     yes)
2570       :
2571       ;;
2572     no)
2573       :
2574       ;;
2575     *)
2576       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-profiling option" >&5
2577 $as_echo "$as_me: error: no argument expected for --enable-profiling option" >&2;}
2578    { (exit 1); exit 1; }; }
2579       ;;
2580   esac
2581
2582 else
2583   enable_profiling=no
2584
2585 fi
2586
2587
2588
2589 #
2590 # --enable-coverage enables generation of code coverage metrics with gcov
2591 #
2592
2593
2594 # Check whether --enable-coverage was given.
2595 if test "${enable_coverage+set}" = set; then
2596   enableval=$enable_coverage;
2597   case $enableval in
2598     yes)
2599       for ac_prog in gcov
2600 do
2601   # Extract the first word of "$ac_prog", so it can be a program name with args.
2602 set dummy $ac_prog; ac_word=$2
2603 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2604 $as_echo_n "checking for $ac_word... " >&6; }
2605 if test "${ac_cv_prog_GCOV+set}" = set; then
2606   $as_echo_n "(cached) " >&6
2607 else
2608   if test -n "$GCOV"; then
2609   ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
2610 else
2611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2612 for as_dir in $PATH
2613 do
2614   IFS=$as_save_IFS
2615   test -z "$as_dir" && as_dir=.
2616   for ac_exec_ext in '' $ac_executable_extensions; do
2617   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2618     ac_cv_prog_GCOV="$ac_prog"
2619     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2620     break 2
2621   fi
2622 done
2623 done
2624 IFS=$as_save_IFS
2625
2626 fi
2627 fi
2628 GCOV=$ac_cv_prog_GCOV
2629 if test -n "$GCOV"; then
2630   { $as_echo "$as_me:$LINENO: result: $GCOV" >&5
2631 $as_echo "$GCOV" >&6; }
2632 else
2633   { $as_echo "$as_me:$LINENO: result: no" >&5
2634 $as_echo "no" >&6; }
2635 fi
2636
2637
2638   test -n "$GCOV" && break
2639 done
2640
2641 if test -z "$GCOV"; then
2642   { { $as_echo "$as_me:$LINENO: error: gcov not found" >&5
2643 $as_echo "$as_me: error: gcov not found" >&2;}
2644    { (exit 1); exit 1; }; }
2645 fi
2646 for ac_prog in lcov
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_LCOV+set}" = set; then
2653   $as_echo_n "(cached) " >&6
2654 else
2655   if test -n "$LCOV"; then
2656   ac_cv_prog_LCOV="$LCOV" # 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_LCOV="$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 LCOV=$ac_cv_prog_LCOV
2676 if test -n "$LCOV"; then
2677   { $as_echo "$as_me:$LINENO: result: $LCOV" >&5
2678 $as_echo "$LCOV" >&6; }
2679 else
2680   { $as_echo "$as_me:$LINENO: result: no" >&5
2681 $as_echo "no" >&6; }
2682 fi
2683
2684
2685   test -n "$LCOV" && break
2686 done
2687
2688 if test -z "$LCOV"; then
2689   { { $as_echo "$as_me:$LINENO: error: lcov not found" >&5
2690 $as_echo "$as_me: error: lcov not found" >&2;}
2691    { (exit 1); exit 1; }; }
2692 fi
2693 for ac_prog in genhtml
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_GENHTML+set}" = set; then
2700   $as_echo_n "(cached) " >&6
2701 else
2702   if test -n "$GENHTML"; then
2703   ac_cv_prog_GENHTML="$GENHTML" # 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_GENHTML="$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 GENHTML=$ac_cv_prog_GENHTML
2723 if test -n "$GENHTML"; then
2724   { $as_echo "$as_me:$LINENO: result: $GENHTML" >&5
2725 $as_echo "$GENHTML" >&6; }
2726 else
2727   { $as_echo "$as_me:$LINENO: result: no" >&5
2728 $as_echo "no" >&6; }
2729 fi
2730
2731
2732   test -n "$GENHTML" && break
2733 done
2734
2735 if test -z "$GENHTML"; then
2736   { { $as_echo "$as_me:$LINENO: error: genhtml not found" >&5
2737 $as_echo "$as_me: error: genhtml not found" >&2;}
2738    { (exit 1); exit 1; }; }
2739 fi
2740       ;;
2741     no)
2742       :
2743       ;;
2744     *)
2745       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-coverage option" >&5
2746 $as_echo "$as_me: error: no argument expected for --enable-coverage option" >&2;}
2747    { (exit 1); exit 1; }; }
2748       ;;
2749   esac
2750
2751 else
2752   enable_coverage=no
2753
2754 fi
2755
2756
2757
2758
2759 #
2760 # DTrace
2761 #
2762
2763
2764 # Check whether --enable-dtrace was given.
2765 if test "${enable_dtrace+set}" = set; then
2766   enableval=$enable_dtrace;
2767   case $enableval in
2768     yes)
2769       for ac_prog in dtrace
2770 do
2771   # Extract the first word of "$ac_prog", so it can be a program name with args.
2772 set dummy $ac_prog; ac_word=$2
2773 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2774 $as_echo_n "checking for $ac_word... " >&6; }
2775 if test "${ac_cv_prog_DTRACE+set}" = set; then
2776   $as_echo_n "(cached) " >&6
2777 else
2778   if test -n "$DTRACE"; then
2779   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
2780 else
2781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782 for as_dir in $PATH
2783 do
2784   IFS=$as_save_IFS
2785   test -z "$as_dir" && as_dir=.
2786   for ac_exec_ext in '' $ac_executable_extensions; do
2787   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2788     ac_cv_prog_DTRACE="$ac_prog"
2789     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2790     break 2
2791   fi
2792 done
2793 done
2794 IFS=$as_save_IFS
2795
2796 fi
2797 fi
2798 DTRACE=$ac_cv_prog_DTRACE
2799 if test -n "$DTRACE"; then
2800   { $as_echo "$as_me:$LINENO: result: $DTRACE" >&5
2801 $as_echo "$DTRACE" >&6; }
2802 else
2803   { $as_echo "$as_me:$LINENO: result: no" >&5
2804 $as_echo "no" >&6; }
2805 fi
2806
2807
2808   test -n "$DTRACE" && break
2809 done
2810
2811 if test -z "$DTRACE"; then
2812   { { $as_echo "$as_me:$LINENO: error: dtrace not found" >&5
2813 $as_echo "$as_me: error: dtrace not found" >&2;}
2814    { (exit 1); exit 1; }; }
2815 fi
2816
2817       ;;
2818     no)
2819       :
2820       ;;
2821     *)
2822       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2823 $as_echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2824    { (exit 1); exit 1; }; }
2825       ;;
2826   esac
2827
2828 else
2829   enable_dtrace=no
2830
2831 fi
2832
2833
2834
2835
2836 #
2837 # Block size
2838 #
2839 { $as_echo "$as_me:$LINENO: checking for block size" >&5
2840 $as_echo_n "checking for block size... " >&6; }
2841
2842
2843
2844 # Check whether --with-blocksize was given.
2845 if test "${with_blocksize+set}" = set; then
2846   withval=$with_blocksize;
2847   case $withval in
2848     yes)
2849       { { $as_echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
2850 $as_echo "$as_me: error: argument required for --with-blocksize option" >&2;}
2851    { (exit 1); exit 1; }; }
2852       ;;
2853     no)
2854       { { $as_echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
2855 $as_echo "$as_me: error: argument required for --with-blocksize option" >&2;}
2856    { (exit 1); exit 1; }; }
2857       ;;
2858     *)
2859       blocksize=$withval
2860       ;;
2861   esac
2862
2863 else
2864   blocksize=8
2865 fi
2866
2867
2868 case ${blocksize} in
2869   1) BLCKSZ=1024;;
2870   2) BLCKSZ=2048;;
2871   4) BLCKSZ=4096;;
2872   8) BLCKSZ=8192;;
2873  16) BLCKSZ=16384;;
2874  32) BLCKSZ=32768;;
2875   *) { { $as_echo "$as_me:$LINENO: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&5
2876 $as_echo "$as_me: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&2;}
2877    { (exit 1); exit 1; }; }
2878 esac
2879 { $as_echo "$as_me:$LINENO: result: ${blocksize}kB" >&5
2880 $as_echo "${blocksize}kB" >&6; }
2881
2882
2883 cat >>confdefs.h <<_ACEOF
2884 #define BLCKSZ ${BLCKSZ}
2885 _ACEOF
2886
2887
2888 #
2889 # Relation segment size
2890 #
2891 { $as_echo "$as_me:$LINENO: checking for segment size" >&5
2892 $as_echo_n "checking for segment size... " >&6; }
2893
2894
2895
2896 # Check whether --with-segsize was given.
2897 if test "${with_segsize+set}" = set; then
2898   withval=$with_segsize;
2899   case $withval in
2900     yes)
2901       { { $as_echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
2902 $as_echo "$as_me: error: argument required for --with-segsize option" >&2;}
2903    { (exit 1); exit 1; }; }
2904       ;;
2905     no)
2906       { { $as_echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
2907 $as_echo "$as_me: error: argument required for --with-segsize option" >&2;}
2908    { (exit 1); exit 1; }; }
2909       ;;
2910     *)
2911       segsize=$withval
2912       ;;
2913   esac
2914
2915 else
2916   segsize=1
2917 fi
2918
2919
2920 # this expression is set up to avoid unnecessary integer overflow
2921 # blocksize is already guaranteed to be a factor of 1024
2922 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
2923 test $? -eq 0 || exit 1
2924 { $as_echo "$as_me:$LINENO: result: ${segsize}GB" >&5
2925 $as_echo "${segsize}GB" >&6; }
2926
2927
2928 cat >>confdefs.h <<_ACEOF
2929 #define RELSEG_SIZE ${RELSEG_SIZE}
2930 _ACEOF
2931
2932
2933 #
2934 # WAL block size
2935 #
2936 { $as_echo "$as_me:$LINENO: checking for WAL block size" >&5
2937 $as_echo_n "checking for WAL block size... " >&6; }
2938
2939
2940
2941 # Check whether --with-wal-blocksize was given.
2942 if test "${with_wal_blocksize+set}" = set; then
2943   withval=$with_wal_blocksize;
2944   case $withval in
2945     yes)
2946       { { $as_echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
2947 $as_echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
2948    { (exit 1); exit 1; }; }
2949       ;;
2950     no)
2951       { { $as_echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
2952 $as_echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
2953    { (exit 1); exit 1; }; }
2954       ;;
2955     *)
2956       wal_blocksize=$withval
2957       ;;
2958   esac
2959
2960 else
2961   wal_blocksize=8
2962 fi
2963
2964
2965 case ${wal_blocksize} in
2966   1) XLOG_BLCKSZ=1024;;
2967   2) XLOG_BLCKSZ=2048;;
2968   4) XLOG_BLCKSZ=4096;;
2969   8) XLOG_BLCKSZ=8192;;
2970  16) XLOG_BLCKSZ=16384;;
2971  32) XLOG_BLCKSZ=32768;;
2972  64) XLOG_BLCKSZ=65536;;
2973   *) { { $as_echo "$as_me:$LINENO: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&5
2974 $as_echo "$as_me: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&2;}
2975    { (exit 1); exit 1; }; }
2976 esac
2977 { $as_echo "$as_me:$LINENO: result: ${wal_blocksize}kB" >&5
2978 $as_echo "${wal_blocksize}kB" >&6; }
2979
2980
2981 cat >>confdefs.h <<_ACEOF
2982 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
2983 _ACEOF
2984
2985
2986 #
2987 # WAL segment size
2988 #
2989 { $as_echo "$as_me:$LINENO: checking for WAL segment size" >&5
2990 $as_echo_n "checking for WAL segment size... " >&6; }
2991
2992
2993
2994 # Check whether --with-wal-segsize was given.
2995 if test "${with_wal_segsize+set}" = set; then
2996   withval=$with_wal_segsize;
2997   case $withval in
2998     yes)
2999       { { $as_echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
3000 $as_echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
3001    { (exit 1); exit 1; }; }
3002       ;;
3003     no)
3004       { { $as_echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
3005 $as_echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
3006    { (exit 1); exit 1; }; }
3007       ;;
3008     *)
3009       wal_segsize=$withval
3010       ;;
3011   esac
3012
3013 else
3014   wal_segsize=16
3015 fi
3016
3017
3018 case ${wal_segsize} in
3019   1) ;;
3020   2) ;;
3021   4) ;;
3022   8) ;;
3023  16) ;;
3024  32) ;;
3025  64) ;;
3026   *) { { $as_echo "$as_me:$LINENO: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&5
3027 $as_echo "$as_me: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&2;}
3028    { (exit 1); exit 1; }; }
3029 esac
3030 { $as_echo "$as_me:$LINENO: result: ${wal_segsize}MB" >&5
3031 $as_echo "${wal_segsize}MB" >&6; }
3032
3033
3034 cat >>confdefs.h <<_ACEOF
3035 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3036 _ACEOF
3037
3038
3039 #
3040 # C compiler
3041 #
3042
3043 # For historical reasons you can also use --with-CC to specify the C compiler
3044 # to use, although the standard way to do this is to set the CC environment
3045 # variable.
3046
3047
3048
3049 # Check whether --with-CC was given.
3050 if test "${with_CC+set}" = set; then
3051   withval=$with_CC;
3052   case $withval in
3053     yes)
3054       { { $as_echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
3055 $as_echo "$as_me: error: argument required for --with-CC option" >&2;}
3056    { (exit 1); exit 1; }; }
3057       ;;
3058     no)
3059       { { $as_echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
3060 $as_echo "$as_me: error: argument required for --with-CC option" >&2;}
3061    { (exit 1); exit 1; }; }
3062       ;;
3063     *)
3064       CC=$with_CC
3065       ;;
3066   esac
3067
3068 fi
3069
3070
3071
3072 case $template in
3073   aix) pgac_cc_list="gcc xlc";;
3074  irix) pgac_cc_list="cc";; # no gcc
3075     *) pgac_cc_list="gcc cc";;
3076 esac
3077
3078 ac_ext=c
3079 ac_cpp='$CPP $CPPFLAGS'
3080 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3081 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3082 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3083 if test -n "$ac_tool_prefix"; then
3084   for ac_prog in $pgac_cc_list
3085   do
3086     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3087 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3088 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3089 $as_echo_n "checking for $ac_word... " >&6; }
3090 if test "${ac_cv_prog_CC+set}" = set; then
3091   $as_echo_n "(cached) " >&6
3092 else
3093   if test -n "$CC"; then
3094   ac_cv_prog_CC="$CC" # Let the user override the test.
3095 else
3096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3097 for as_dir in $PATH
3098 do
3099   IFS=$as_save_IFS
3100   test -z "$as_dir" && as_dir=.
3101   for ac_exec_ext in '' $ac_executable_extensions; do
3102   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3103     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3104     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3105     break 2
3106   fi
3107 done
3108 done
3109 IFS=$as_save_IFS
3110
3111 fi
3112 fi
3113 CC=$ac_cv_prog_CC
3114 if test -n "$CC"; then
3115   { $as_echo "$as_me:$LINENO: result: $CC" >&5
3116 $as_echo "$CC" >&6; }
3117 else
3118   { $as_echo "$as_me:$LINENO: result: no" >&5
3119 $as_echo "no" >&6; }
3120 fi
3121
3122
3123     test -n "$CC" && break
3124   done
3125 fi
3126 if test -z "$CC"; then
3127   ac_ct_CC=$CC
3128   for ac_prog in $pgac_cc_list
3129 do
3130   # Extract the first word of "$ac_prog", so it can be a program name with args.
3131 set dummy $ac_prog; ac_word=$2
3132 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3133 $as_echo_n "checking for $ac_word... " >&6; }
3134 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3135   $as_echo_n "(cached) " >&6
3136 else
3137   if test -n "$ac_ct_CC"; then
3138   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3139 else
3140 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3141 for as_dir in $PATH
3142 do
3143   IFS=$as_save_IFS
3144   test -z "$as_dir" && as_dir=.
3145   for ac_exec_ext in '' $ac_executable_extensions; do
3146   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3147     ac_cv_prog_ac_ct_CC="$ac_prog"
3148     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3149     break 2
3150   fi
3151 done
3152 done
3153 IFS=$as_save_IFS
3154
3155 fi
3156 fi
3157 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3158 if test -n "$ac_ct_CC"; then
3159   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3160 $as_echo "$ac_ct_CC" >&6; }
3161 else
3162   { $as_echo "$as_me:$LINENO: result: no" >&5
3163 $as_echo "no" >&6; }
3164 fi
3165
3166
3167   test -n "$ac_ct_CC" && break
3168 done
3169
3170   if test "x$ac_ct_CC" = x; then
3171     CC=""
3172   else
3173     case $cross_compiling:$ac_tool_warned in
3174 yes:)
3175 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
3176 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3177 ac_tool_warned=yes ;;
3178 esac
3179     CC=$ac_ct_CC
3180   fi
3181 fi
3182
3183
3184 test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3185 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3186 { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3187 See \`config.log' for more details." >&5
3188 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH
3189 See \`config.log' for more details." >&2;}
3190    { (exit 1); exit 1; }; }; }
3191
3192 # Provide some information about the compiler.
3193 $as_echo "$as_me:$LINENO: checking for C compiler version" >&5
3194 set X $ac_compile
3195 ac_compiler=$2
3196 { (ac_try="$ac_compiler --version >&5"
3197 case "(($ac_try" in
3198   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3199   *) ac_try_echo=$ac_try;;
3200 esac
3201 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3202 $as_echo "$ac_try_echo") >&5
3203   (eval "$ac_compiler --version >&5") 2>&5
3204   ac_status=$?
3205   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3206   (exit $ac_status); }
3207 { (ac_try="$ac_compiler -v >&5"
3208 case "(($ac_try" in
3209   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3210   *) ac_try_echo=$ac_try;;
3211 esac
3212 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3213 $as_echo "$ac_try_echo") >&5
3214   (eval "$ac_compiler -v >&5") 2>&5
3215   ac_status=$?
3216   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3217   (exit $ac_status); }
3218 { (ac_try="$ac_compiler -V >&5"
3219 case "(($ac_try" in
3220   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3221   *) ac_try_echo=$ac_try;;
3222 esac
3223 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3224 $as_echo "$ac_try_echo") >&5
3225   (eval "$ac_compiler -V >&5") 2>&5
3226   ac_status=$?
3227   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3228   (exit $ac_status); }
3229
3230 cat >conftest.$ac_ext <<_ACEOF
3231 /* confdefs.h.  */
3232 _ACEOF
3233 cat confdefs.h >>conftest.$ac_ext
3234 cat >>conftest.$ac_ext <<_ACEOF
3235 /* end confdefs.h.  */
3236
3237 int
3238 main ()
3239 {
3240
3241   ;
3242   return 0;
3243 }
3244 _ACEOF
3245 ac_clean_files_save=$ac_clean_files
3246 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3247 # Try to create an executable without -o first, disregard a.out.
3248 # It will help us diagnose broken compilers, and finding out an intuition
3249 # of exeext.
3250 { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3251 $as_echo_n "checking for C compiler default output file name... " >&6; }
3252 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3253
3254 # The possible output files:
3255 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3256
3257 ac_rmfiles=
3258 for ac_file in $ac_files
3259 do
3260   case $ac_file in
3261     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3262     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3263   esac
3264 done
3265 rm -f $ac_rmfiles
3266
3267 if { (ac_try="$ac_link_default"
3268 case "(($ac_try" in
3269   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3270   *) ac_try_echo=$ac_try;;
3271 esac
3272 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3273 $as_echo "$ac_try_echo") >&5
3274   (eval "$ac_link_default") 2>&5
3275   ac_status=$?
3276   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3277   (exit $ac_status); }; then
3278   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3279 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3280 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3281 # so that the user can short-circuit this test for compilers unknown to
3282 # Autoconf.
3283 for ac_file in $ac_files ''
3284 do
3285   test -f "$ac_file" || continue
3286   case $ac_file in
3287     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3288         ;;
3289     [ab].out )
3290         # We found the default executable, but exeext='' is most
3291         # certainly right.
3292         break;;
3293     *.* )
3294         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3295         then :; else
3296            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3297         fi
3298         # We set ac_cv_exeext here because the later test for it is not
3299         # safe: cross compilers may not add the suffix if given an `-o'
3300         # argument, so we may need to know it at that point already.
3301         # Even if this section looks crufty: it has the advantage of
3302         # actually working.
3303         break;;
3304     * )
3305         break;;
3306   esac
3307 done
3308 test "$ac_cv_exeext" = no && ac_cv_exeext=
3309
3310 else
3311   ac_file=''
3312 fi
3313
3314 { $as_echo "$as_me:$LINENO: result: $ac_file" >&5
3315 $as_echo "$ac_file" >&6; }
3316 if test -z "$ac_file"; then
3317   $as_echo "$as_me: failed program was:" >&5
3318 sed 's/^/| /' conftest.$ac_ext >&5
3319
3320 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3321 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3322 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
3323 See \`config.log' for more details." >&5
3324 $as_echo "$as_me: error: C compiler cannot create executables
3325 See \`config.log' for more details." >&2;}
3326    { (exit 77); exit 77; }; }; }
3327 fi
3328
3329 ac_exeext=$ac_cv_exeext
3330
3331 # Check that the compiler produces executables we can run.  If not, either
3332 # the compiler is broken, or we cross compile.
3333 { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3334 $as_echo_n "checking whether the C compiler works... " >&6; }
3335 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3336 # If not cross compiling, check that we can run a simple program.
3337 if test "$cross_compiling" != yes; then
3338   if { ac_try='./$ac_file'
3339   { (case "(($ac_try" in
3340   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3341   *) ac_try_echo=$ac_try;;
3342 esac
3343 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3344 $as_echo "$ac_try_echo") >&5
3345   (eval "$ac_try") 2>&5
3346   ac_status=$?
3347   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3348   (exit $ac_status); }; }; then
3349     cross_compiling=no
3350   else
3351     if test "$cross_compiling" = maybe; then
3352         cross_compiling=yes
3353     else
3354         { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3355 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3356 { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
3357 If you meant to cross compile, use \`--host'.
3358 See \`config.log' for more details." >&5
3359 $as_echo "$as_me: error: cannot run C compiled programs.
3360 If you meant to cross compile, use \`--host'.
3361 See \`config.log' for more details." >&2;}
3362    { (exit 1); exit 1; }; }; }
3363     fi
3364   fi
3365 fi
3366 { $as_echo "$as_me:$LINENO: result: yes" >&5
3367 $as_echo "yes" >&6; }
3368
3369 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3370 ac_clean_files=$ac_clean_files_save
3371 # Check that the compiler produces executables we can run.  If not, either
3372 # the compiler is broken, or we cross compile.
3373 { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3374 $as_echo_n "checking whether we are cross compiling... " >&6; }
3375 { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
3376 $as_echo "$cross_compiling" >&6; }
3377
3378 { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
3379 $as_echo_n "checking for suffix of executables... " >&6; }
3380 if { (ac_try="$ac_link"
3381 case "(($ac_try" in
3382   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3383   *) ac_try_echo=$ac_try;;
3384 esac
3385 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3386 $as_echo "$ac_try_echo") >&5
3387   (eval "$ac_link") 2>&5
3388   ac_status=$?
3389   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3390   (exit $ac_status); }; then
3391   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3392 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3393 # work properly (i.e., refer to `conftest.exe'), while it won't with
3394 # `rm'.
3395 for ac_file in conftest.exe conftest conftest.*; do
3396   test -f "$ac_file" || continue
3397   case $ac_file in
3398     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3399     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3400           break;;
3401     * ) break;;
3402   esac
3403 done
3404 else
3405   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3406 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3407 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3408 See \`config.log' for more details." >&5
3409 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3410 See \`config.log' for more details." >&2;}
3411    { (exit 1); exit 1; }; }; }
3412 fi
3413
3414 rm -f conftest$ac_cv_exeext
3415 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3416 $as_echo "$ac_cv_exeext" >&6; }
3417
3418 rm -f conftest.$ac_ext
3419 EXEEXT=$ac_cv_exeext
3420 ac_exeext=$EXEEXT
3421 { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
3422 $as_echo_n "checking for suffix of object files... " >&6; }
3423 if test "${ac_cv_objext+set}" = set; then
3424   $as_echo_n "(cached) " >&6
3425 else
3426   cat >conftest.$ac_ext <<_ACEOF
3427 /* confdefs.h.  */
3428 _ACEOF
3429 cat confdefs.h >>conftest.$ac_ext
3430 cat >>conftest.$ac_ext <<_ACEOF
3431 /* end confdefs.h.  */
3432
3433 int
3434 main ()
3435 {
3436
3437   ;
3438   return 0;
3439 }
3440 _ACEOF
3441 rm -f conftest.o conftest.obj
3442 if { (ac_try="$ac_compile"
3443 case "(($ac_try" in
3444   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3445   *) ac_try_echo=$ac_try;;
3446 esac
3447 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3448 $as_echo "$ac_try_echo") >&5
3449   (eval "$ac_compile") 2>&5
3450   ac_status=$?
3451   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3452   (exit $ac_status); }; then
3453   for ac_file in conftest.o conftest.obj conftest.*; do
3454   test -f "$ac_file" || continue;
3455   case $ac_file in
3456     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3457     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3458        break;;
3459   esac
3460 done
3461 else
3462   $as_echo "$as_me: failed program was:" >&5
3463 sed 's/^/| /' conftest.$ac_ext >&5
3464
3465 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3466 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3467 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3468 See \`config.log' for more details." >&5
3469 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
3470 See \`config.log' for more details." >&2;}
3471    { (exit 1); exit 1; }; }; }
3472 fi
3473
3474 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3475 fi
3476 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3477 $as_echo "$ac_cv_objext" >&6; }
3478 OBJEXT=$ac_cv_objext
3479 ac_objext=$OBJEXT
3480 { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3481 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3482 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3483   $as_echo_n "(cached) " >&6
3484 else
3485   cat >conftest.$ac_ext <<_ACEOF
3486 /* confdefs.h.  */
3487 _ACEOF
3488 cat confdefs.h >>conftest.$ac_ext
3489 cat >>conftest.$ac_ext <<_ACEOF
3490 /* end confdefs.h.  */
3491
3492 int
3493 main ()
3494 {
3495 #ifndef __GNUC__
3496        choke me
3497 #endif
3498
3499   ;
3500   return 0;
3501 }
3502 _ACEOF
3503 rm -f conftest.$ac_objext
3504 if { (ac_try="$ac_compile"
3505 case "(($ac_try" in
3506   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3507   *) ac_try_echo=$ac_try;;
3508 esac
3509 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3510 $as_echo "$ac_try_echo") >&5
3511   (eval "$ac_compile") 2>conftest.er1
3512   ac_status=$?
3513   grep -v '^ *+' conftest.er1 >conftest.err
3514   rm -f conftest.er1
3515   cat conftest.err >&5
3516   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3517   (exit $ac_status); } && {
3518          test -z "$ac_c_werror_flag" ||
3519          test ! -s conftest.err
3520        } && test -s conftest.$ac_objext; then
3521   ac_compiler_gnu=yes
3522 else
3523   $as_echo "$as_me: failed program was:" >&5
3524 sed 's/^/| /' conftest.$ac_ext >&5
3525
3526         ac_compiler_gnu=no
3527 fi
3528
3529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3530 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3531
3532 fi
3533 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3534 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3535 if test $ac_compiler_gnu = yes; then
3536   GCC=yes
3537 else
3538   GCC=
3539 fi
3540 ac_test_CFLAGS=${CFLAGS+set}
3541 ac_save_CFLAGS=$CFLAGS
3542 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3543 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3544 if test "${ac_cv_prog_cc_g+set}" = set; then
3545   $as_echo_n "(cached) " >&6
3546 else
3547   ac_save_c_werror_flag=$ac_c_werror_flag
3548    ac_c_werror_flag=yes
3549    ac_cv_prog_cc_g=no
3550    CFLAGS="-g"
3551    cat >conftest.$ac_ext <<_ACEOF
3552 /* confdefs.h.  */
3553 _ACEOF
3554 cat confdefs.h >>conftest.$ac_ext
3555 cat >>conftest.$ac_ext <<_ACEOF
3556 /* end confdefs.h.  */
3557
3558 int
3559 main ()
3560 {
3561
3562   ;
3563   return 0;
3564 }
3565 _ACEOF
3566 rm -f conftest.$ac_objext
3567 if { (ac_try="$ac_compile"
3568 case "(($ac_try" in
3569   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3570   *) ac_try_echo=$ac_try;;
3571 esac
3572 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3573 $as_echo "$ac_try_echo") >&5
3574   (eval "$ac_compile") 2>conftest.er1
3575   ac_status=$?
3576   grep -v '^ *+' conftest.er1 >conftest.err
3577   rm -f conftest.er1
3578   cat conftest.err >&5
3579   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3580   (exit $ac_status); } && {
3581          test -z "$ac_c_werror_flag" ||
3582          test ! -s conftest.err
3583        } && test -s conftest.$ac_objext; then
3584   ac_cv_prog_cc_g=yes
3585 else
3586   $as_echo "$as_me: failed program was:" >&5
3587 sed 's/^/| /' conftest.$ac_ext >&5
3588
3589         CFLAGS=""
3590       cat >conftest.$ac_ext <<_ACEOF
3591 /* confdefs.h.  */
3592 _ACEOF
3593 cat confdefs.h >>conftest.$ac_ext
3594 cat >>conftest.$ac_ext <<_ACEOF
3595 /* end confdefs.h.  */
3596
3597 int
3598 main ()
3599 {
3600
3601   ;
3602   return 0;
3603 }
3604 _ACEOF
3605 rm -f conftest.$ac_objext
3606 if { (ac_try="$ac_compile"
3607 case "(($ac_try" in
3608   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3609   *) ac_try_echo=$ac_try;;
3610 esac
3611 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3612 $as_echo "$ac_try_echo") >&5
3613   (eval "$ac_compile") 2>conftest.er1
3614   ac_status=$?
3615   grep -v '^ *+' conftest.er1 >conftest.err
3616   rm -f conftest.er1
3617   cat conftest.err >&5
3618   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3619   (exit $ac_status); } && {
3620          test -z "$ac_c_werror_flag" ||
3621          test ! -s conftest.err
3622        } && test -s conftest.$ac_objext; then
3623   :
3624 else
3625   $as_echo "$as_me: failed program was:" >&5
3626 sed 's/^/| /' conftest.$ac_ext >&5
3627
3628         ac_c_werror_flag=$ac_save_c_werror_flag
3629          CFLAGS="-g"
3630          cat >conftest.$ac_ext <<_ACEOF
3631 /* confdefs.h.  */
3632 _ACEOF
3633 cat confdefs.h >>conftest.$ac_ext
3634 cat >>conftest.$ac_ext <<_ACEOF
3635 /* end confdefs.h.  */
3636
3637 int
3638 main ()
3639 {
3640
3641   ;
3642   return 0;
3643 }
3644 _ACEOF
3645 rm -f conftest.$ac_objext
3646 if { (ac_try="$ac_compile"
3647 case "(($ac_try" in
3648   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3649   *) ac_try_echo=$ac_try;;
3650 esac
3651 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3652 $as_echo "$ac_try_echo") >&5
3653   (eval "$ac_compile") 2>conftest.er1
3654   ac_status=$?
3655   grep -v '^ *+' conftest.er1 >conftest.err
3656   rm -f conftest.er1
3657   cat conftest.err >&5
3658   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3659   (exit $ac_status); } && {
3660          test -z "$ac_c_werror_flag" ||
3661          test ! -s conftest.err
3662        } && test -s conftest.$ac_objext; then
3663   ac_cv_prog_cc_g=yes
3664 else
3665   $as_echo "$as_me: failed program was:" >&5
3666 sed 's/^/| /' conftest.$ac_ext >&5
3667
3668
3669 fi
3670
3671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3672 fi
3673
3674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3675 fi
3676
3677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3678    ac_c_werror_flag=$ac_save_c_werror_flag
3679 fi
3680 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3681 $as_echo "$ac_cv_prog_cc_g" >&6; }
3682 if test "$ac_test_CFLAGS" = set; then
3683   CFLAGS=$ac_save_CFLAGS
3684 elif test $ac_cv_prog_cc_g = yes; then
3685   if test "$GCC" = yes; then
3686     CFLAGS="-g -O2"
3687   else
3688     CFLAGS="-g"
3689   fi
3690 else
3691   if test "$GCC" = yes; then
3692     CFLAGS="-O2"
3693   else
3694     CFLAGS=
3695   fi
3696 fi
3697 { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3698 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3699 if test "${ac_cv_prog_cc_c89+set}" = set; then
3700   $as_echo_n "(cached) " >&6
3701 else
3702   ac_cv_prog_cc_c89=no
3703 ac_save_CC=$CC
3704 cat >conftest.$ac_ext <<_ACEOF
3705 /* confdefs.h.  */
3706 _ACEOF
3707 cat confdefs.h >>conftest.$ac_ext
3708 cat >>conftest.$ac_ext <<_ACEOF
3709 /* end confdefs.h.  */
3710 #include <stdarg.h>
3711 #include <stdio.h>
3712 #include <sys/types.h>
3713 #include <sys/stat.h>
3714 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3715 struct buf { int x; };
3716 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3717 static char *e (p, i)
3718      char **p;
3719      int i;
3720 {
3721   return p[i];
3722 }
3723 static char *f (char * (*g) (char **, int), char **p, ...)
3724 {
3725   char *s;
3726   va_list v;
3727   va_start (v,p);
3728   s = g (p, va_arg (v,int));
3729   va_end (v);
3730   return s;
3731 }
3732
3733 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3734    function prototypes and stuff, but not '\xHH' hex character constants.
3735    These don't provoke an error unfortunately, instead are silently treated
3736    as 'x'.  The following induces an error, until -std is added to get
3737    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3738    array size at least.  It's necessary to write '\x00'==0 to get something
3739    that's true only with -std.  */
3740 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3741
3742 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3743    inside strings and character constants.  */
3744 #define FOO(x) 'x'
3745 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3746
3747 int test (int i, double x);
3748 struct s1 {int (*f) (int a);};
3749 struct s2 {int (*f) (double a);};
3750 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3751 int argc;
3752 char **argv;
3753 int
3754 main ()
3755 {
3756 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3757   ;
3758   return 0;
3759 }
3760 _ACEOF
3761 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3762         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3763 do
3764   CC="$ac_save_CC $ac_arg"
3765   rm -f conftest.$ac_objext
3766 if { (ac_try="$ac_compile"
3767 case "(($ac_try" in
3768   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3769   *) ac_try_echo=$ac_try;;
3770 esac
3771 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3772 $as_echo "$ac_try_echo") >&5
3773   (eval "$ac_compile") 2>conftest.er1
3774   ac_status=$?
3775   grep -v '^ *+' conftest.er1 >conftest.err
3776   rm -f conftest.er1
3777   cat conftest.err >&5
3778   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3779   (exit $ac_status); } && {
3780          test -z "$ac_c_werror_flag" ||
3781          test ! -s conftest.err
3782        } && test -s conftest.$ac_objext; then
3783   ac_cv_prog_cc_c89=$ac_arg
3784 else
3785   $as_echo "$as_me: failed program was:" >&5
3786 sed 's/^/| /' conftest.$ac_ext >&5
3787
3788
3789 fi
3790
3791 rm -f core conftest.err conftest.$ac_objext
3792   test "x$ac_cv_prog_cc_c89" != "xno" && break
3793 done
3794 rm -f conftest.$ac_ext
3795 CC=$ac_save_CC
3796
3797 fi
3798 # AC_CACHE_VAL
3799 case "x$ac_cv_prog_cc_c89" in
3800   x)
3801     { $as_echo "$as_me:$LINENO: result: none needed" >&5
3802 $as_echo "none needed" >&6; } ;;
3803   xno)
3804     { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3805 $as_echo "unsupported" >&6; } ;;
3806   *)
3807     CC="$CC $ac_cv_prog_cc_c89"
3808     { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3809 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3810 esac
3811
3812
3813 ac_ext=c
3814 ac_cpp='$CPP $CPPFLAGS'
3815 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3816 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3817 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3818
3819
3820 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
3821 # but has idiosyncrasies of its own.  We assume icc will define
3822 # __INTEL_COMPILER regardless of CFLAGS.
3823
3824 cat >conftest.$ac_ext <<_ACEOF
3825 /* confdefs.h.  */
3826 _ACEOF
3827 cat confdefs.h >>conftest.$ac_ext
3828 cat >>conftest.$ac_ext <<_ACEOF
3829 /* end confdefs.h.  */
3830
3831 int
3832 main ()
3833 {
3834 #ifndef __INTEL_COMPILER
3835 choke me
3836 #endif
3837   ;
3838   return 0;
3839 }
3840 _ACEOF
3841 rm -f conftest.$ac_objext
3842 if { (ac_try="$ac_compile"
3843 case "(($ac_try" in
3844   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3845   *) ac_try_echo=$ac_try;;
3846 esac
3847 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3848 $as_echo "$ac_try_echo") >&5
3849   (eval "$ac_compile") 2>conftest.er1
3850   ac_status=$?
3851   grep -v '^ *+' conftest.er1 >conftest.err
3852   rm -f conftest.er1
3853   cat conftest.err >&5
3854   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3855   (exit $ac_status); } && {
3856          test -z "$ac_c_werror_flag" ||
3857          test ! -s conftest.err
3858        } && test -s conftest.$ac_objext; then
3859   ICC=yes
3860 else
3861   $as_echo "$as_me: failed program was:" >&5
3862 sed 's/^/| /' conftest.$ac_ext >&5
3863
3864         ICC=no
3865 fi
3866
3867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3868
3869 # Check if it's Sun Studio compiler. We assume that
3870 # __SUNPRO_C will be defined for Sun Studio compilers
3871 cat >conftest.$ac_ext <<_ACEOF
3872 /* confdefs.h.  */
3873 _ACEOF
3874 cat confdefs.h >>conftest.$ac_ext
3875 cat >>conftest.$ac_ext <<_ACEOF
3876 /* end confdefs.h.  */
3877
3878 int
3879 main ()
3880 {
3881 #ifndef __SUNPRO_C
3882 choke me
3883 #endif
3884   ;
3885   return 0;
3886 }
3887 _ACEOF
3888 rm -f conftest.$ac_objext
3889 if { (ac_try="$ac_compile"
3890 case "(($ac_try" in
3891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3892   *) ac_try_echo=$ac_try;;
3893 esac
3894 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3895 $as_echo "$ac_try_echo") >&5
3896   (eval "$ac_compile") 2>conftest.er1
3897   ac_status=$?
3898   grep -v '^ *+' conftest.er1 >conftest.err
3899   rm -f conftest.er1
3900   cat conftest.err >&5
3901   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3902   (exit $ac_status); } && {
3903          test -z "$ac_c_werror_flag" ||
3904          test ! -s conftest.err
3905        } && test -s conftest.$ac_objext; then
3906   SUN_STUDIO_CC=yes
3907 else
3908   $as_echo "$as_me: failed program was:" >&5
3909 sed 's/^/| /' conftest.$ac_ext >&5
3910
3911         SUN_STUDIO_CC=no
3912 fi
3913
3914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3915
3916
3917
3918 unset CFLAGS
3919
3920 #
3921 # Read the template
3922 #
3923 . "$srcdir/src/template/$template" || exit
3924
3925 # CFLAGS are selected so:
3926 # If the user specifies something in the environment, that is used.
3927 # else:  If the template file set something, that is used.
3928 # else:  If coverage was enabled, don't set anything.
3929 # else:  If the compiler is GCC, then we use -O2.
3930 # else:  If the compiler is something else, then we use -O, unless debugging.
3931
3932 if test "$ac_env_CFLAGS_set" = set; then
3933   CFLAGS=$ac_env_CFLAGS_value
3934 elif test "${CFLAGS+set}" = set; then
3935   : # (keep what template set)
3936 elif test "$enable_coverage" = yes; then
3937   : # no optimization by default
3938 elif test "$GCC" = yes; then
3939   CFLAGS="-O2"
3940 else
3941   # if the user selected debug mode, don't use -O
3942   if test "$enable_debug" != yes; then
3943     CFLAGS="-O"
3944   fi
3945 fi
3946
3947 # Some versions of GCC support some additional useful warning flags.
3948 # Check whether they are supported, and add them to CFLAGS if so.
3949 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
3950 # but has its own.  Also check other compiler-specific flags here.
3951
3952 if test "$GCC" = yes -a "$ICC" = no; then
3953   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
3954   # These work in some but not all gcc versions
3955   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wdeclaration-after-statement" >&5
3956 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
3957 if test "${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+set}" = set; then
3958   $as_echo_n "(cached) " >&6
3959 else
3960   pgac_save_CFLAGS=$CFLAGS
3961 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
3962 ac_save_c_werror_flag=$ac_c_werror_flag
3963 ac_c_werror_flag=yes
3964 cat >conftest.$ac_ext <<_ACEOF
3965 /* confdefs.h.  */
3966 _ACEOF
3967 cat confdefs.h >>conftest.$ac_ext
3968 cat >>conftest.$ac_ext <<_ACEOF
3969 /* end confdefs.h.  */
3970
3971 int
3972 main ()
3973 {
3974
3975   ;
3976   return 0;
3977 }
3978 _ACEOF
3979 rm -f conftest.$ac_objext
3980 if { (ac_try="$ac_compile"
3981 case "(($ac_try" in
3982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3983   *) ac_try_echo=$ac_try;;
3984 esac
3985 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3986 $as_echo "$ac_try_echo") >&5
3987   (eval "$ac_compile") 2>conftest.er1
3988   ac_status=$?
3989   grep -v '^ *+' conftest.er1 >conftest.err
3990   rm -f conftest.er1
3991   cat conftest.err >&5
3992   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3993   (exit $ac_status); } && {
3994          test -z "$ac_c_werror_flag" ||
3995          test ! -s conftest.err
3996        } && test -s conftest.$ac_objext; then
3997   pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
3998 else
3999   $as_echo "$as_me: failed program was:" >&5
4000 sed 's/^/| /' conftest.$ac_ext >&5
4001
4002         pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4003 fi
4004
4005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4006 ac_c_werror_flag=$ac_save_c_werror_flag
4007 CFLAGS="$pgac_save_CFLAGS"
4008 fi
4009 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4010 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4011 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4012   CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4013 fi
4014
4015   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wendif-labels" >&5
4016 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4017 if test "${pgac_cv_prog_cc_cflags__Wendif_labels+set}" = set; then
4018   $as_echo_n "(cached) " >&6
4019 else
4020   pgac_save_CFLAGS=$CFLAGS
4021 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4022 ac_save_c_werror_flag=$ac_c_werror_flag
4023 ac_c_werror_flag=yes
4024 cat >conftest.$ac_ext <<_ACEOF
4025 /* confdefs.h.  */
4026 _ACEOF
4027 cat confdefs.h >>conftest.$ac_ext
4028 cat >>conftest.$ac_ext <<_ACEOF
4029 /* end confdefs.h.  */
4030
4031 int
4032 main ()
4033 {
4034
4035   ;
4036   return 0;
4037 }
4038 _ACEOF
4039 rm -f conftest.$ac_objext
4040 if { (ac_try="$ac_compile"
4041 case "(($ac_try" in
4042   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4043   *) ac_try_echo=$ac_try;;
4044 esac
4045 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4046 $as_echo "$ac_try_echo") >&5
4047   (eval "$ac_compile") 2>conftest.er1
4048   ac_status=$?
4049   grep -v '^ *+' conftest.er1 >conftest.err
4050   rm -f conftest.er1
4051   cat conftest.err >&5
4052   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4053   (exit $ac_status); } && {
4054          test -z "$ac_c_werror_flag" ||
4055          test ! -s conftest.err
4056        } && test -s conftest.$ac_objext; then
4057   pgac_cv_prog_cc_cflags__Wendif_labels=yes
4058 else
4059   $as_echo "$as_me: failed program was:" >&5
4060 sed 's/^/| /' conftest.$ac_ext >&5
4061
4062         pgac_cv_prog_cc_cflags__Wendif_labels=no
4063 fi
4064
4065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4066 ac_c_werror_flag=$ac_save_c_werror_flag
4067 CFLAGS="$pgac_save_CFLAGS"
4068 fi
4069 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4070 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4071 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4072   CFLAGS="$CFLAGS -Wendif-labels"
4073 fi
4074
4075   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wmissing-format-attribute" >&5
4076 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4077 if test "${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+set}" = set; then
4078   $as_echo_n "(cached) " >&6
4079 else
4080   pgac_save_CFLAGS=$CFLAGS
4081 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4082 ac_save_c_werror_flag=$ac_c_werror_flag
4083 ac_c_werror_flag=yes
4084 cat >conftest.$ac_ext <<_ACEOF
4085 /* confdefs.h.  */
4086 _ACEOF
4087 cat confdefs.h >>conftest.$ac_ext
4088 cat >>conftest.$ac_ext <<_ACEOF
4089 /* end confdefs.h.  */
4090
4091 int
4092 main ()
4093 {
4094
4095   ;
4096   return 0;
4097 }
4098 _ACEOF
4099 rm -f conftest.$ac_objext
4100 if { (ac_try="$ac_compile"
4101 case "(($ac_try" in
4102   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4103   *) ac_try_echo=$ac_try;;
4104 esac
4105 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4106 $as_echo "$ac_try_echo") >&5
4107   (eval "$ac_compile") 2>conftest.er1
4108   ac_status=$?
4109   grep -v '^ *+' conftest.er1 >conftest.err
4110   rm -f conftest.er1
4111   cat conftest.err >&5
4112   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4113   (exit $ac_status); } && {
4114          test -z "$ac_c_werror_flag" ||
4115          test ! -s conftest.err
4116        } && test -s conftest.$ac_objext; then
4117   pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4118 else
4119   $as_echo "$as_me: failed program was:" >&5
4120 sed 's/^/| /' conftest.$ac_ext >&5
4121
4122         pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4123 fi
4124
4125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4126 ac_c_werror_flag=$ac_save_c_werror_flag
4127 CFLAGS="$pgac_save_CFLAGS"
4128 fi
4129 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4130 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4131 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4132   CFLAGS="$CFLAGS -Wmissing-format-attribute"
4133 fi
4134
4135   # This was included in -Wall/-Wformat in older GCC versions
4136   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wformat-security" >&5
4137 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4138 if test "${pgac_cv_prog_cc_cflags__Wformat_security+set}" = set; then
4139   $as_echo_n "(cached) " >&6
4140 else
4141   pgac_save_CFLAGS=$CFLAGS
4142 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4143 ac_save_c_werror_flag=$ac_c_werror_flag
4144 ac_c_werror_flag=yes
4145 cat >conftest.$ac_ext <<_ACEOF
4146 /* confdefs.h.  */
4147 _ACEOF
4148 cat confdefs.h >>conftest.$ac_ext
4149 cat >>conftest.$ac_ext <<_ACEOF
4150 /* end confdefs.h.  */
4151
4152 int
4153 main ()
4154 {
4155
4156   ;
4157   return 0;
4158 }
4159 _ACEOF
4160 rm -f conftest.$ac_objext
4161 if { (ac_try="$ac_compile"
4162 case "(($ac_try" in
4163   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4164   *) ac_try_echo=$ac_try;;
4165 esac
4166 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4167 $as_echo "$ac_try_echo") >&5
4168   (eval "$ac_compile") 2>conftest.er1
4169   ac_status=$?
4170   grep -v '^ *+' conftest.er1 >conftest.err
4171   rm -f conftest.er1
4172   cat conftest.err >&5
4173   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4174   (exit $ac_status); } && {
4175          test -z "$ac_c_werror_flag" ||
4176          test ! -s conftest.err
4177        } && test -s conftest.$ac_objext; then
4178   pgac_cv_prog_cc_cflags__Wformat_security=yes
4179 else
4180   $as_echo "$as_me: failed program was:" >&5
4181 sed 's/^/| /' conftest.$ac_ext >&5
4182
4183         pgac_cv_prog_cc_cflags__Wformat_security=no
4184 fi
4185
4186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4187 ac_c_werror_flag=$ac_save_c_werror_flag
4188 CFLAGS="$pgac_save_CFLAGS"
4189 fi
4190 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4191 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4192 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4193   CFLAGS="$CFLAGS -Wformat-security"
4194 fi
4195
4196   # Disable strict-aliasing rules; needed for gcc 3.3+
4197   { $as_echo "$as_me:$LINENO: checking whether $CC supports -fno-strict-aliasing" >&5
4198 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4199 if test "${pgac_cv_prog_cc_cflags__fno_strict_aliasing+set}" = set; then
4200   $as_echo_n "(cached) " >&6
4201 else
4202   pgac_save_CFLAGS=$CFLAGS
4203 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4204 ac_save_c_werror_flag=$ac_c_werror_flag
4205 ac_c_werror_flag=yes
4206 cat >conftest.$ac_ext <<_ACEOF
4207 /* confdefs.h.  */
4208 _ACEOF
4209 cat confdefs.h >>conftest.$ac_ext
4210 cat >>conftest.$ac_ext <<_ACEOF
4211 /* end confdefs.h.  */
4212
4213 int
4214 main ()
4215 {
4216
4217   ;
4218   return 0;
4219 }
4220 _ACEOF
4221 rm -f conftest.$ac_objext
4222 if { (ac_try="$ac_compile"
4223 case "(($ac_try" in
4224   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4225   *) ac_try_echo=$ac_try;;
4226 esac
4227 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4228 $as_echo "$ac_try_echo") >&5
4229   (eval "$ac_compile") 2>conftest.er1
4230   ac_status=$?
4231   grep -v '^ *+' conftest.er1 >conftest.err
4232   rm -f conftest.er1
4233   cat conftest.err >&5
4234   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4235   (exit $ac_status); } && {
4236          test -z "$ac_c_werror_flag" ||
4237          test ! -s conftest.err
4238        } && test -s conftest.$ac_objext; then
4239   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4240 else
4241   $as_echo "$as_me: failed program was:" >&5
4242 sed 's/^/| /' conftest.$ac_ext >&5
4243
4244         pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4245 fi
4246
4247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4248 ac_c_werror_flag=$ac_save_c_werror_flag
4249 CFLAGS="$pgac_save_CFLAGS"
4250 fi
4251 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4252 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4253 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4254   CFLAGS="$CFLAGS -fno-strict-aliasing"
4255 fi
4256
4257   # Disable optimizations that assume no overflow; needed for gcc 4.3+
4258   { $as_echo "$as_me:$LINENO: checking whether $CC supports -fwrapv" >&5
4259 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4260 if test "${pgac_cv_prog_cc_cflags__fwrapv+set}" = set; then
4261   $as_echo_n "(cached) " >&6
4262 else
4263   pgac_save_CFLAGS=$CFLAGS
4264 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4265 ac_save_c_werror_flag=$ac_c_werror_flag
4266 ac_c_werror_flag=yes
4267 cat >conftest.$ac_ext <<_ACEOF
4268 /* confdefs.h.  */
4269 _ACEOF
4270 cat confdefs.h >>conftest.$ac_ext
4271 cat >>conftest.$ac_ext <<_ACEOF
4272 /* end confdefs.h.  */
4273
4274 int
4275 main ()
4276 {
4277
4278   ;
4279   return 0;
4280 }
4281 _ACEOF
4282 rm -f conftest.$ac_objext
4283 if { (ac_try="$ac_compile"
4284 case "(($ac_try" in
4285   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4286   *) ac_try_echo=$ac_try;;
4287 esac
4288 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4289 $as_echo "$ac_try_echo") >&5
4290   (eval "$ac_compile") 2>conftest.er1
4291   ac_status=$?
4292   grep -v '^ *+' conftest.er1 >conftest.err
4293   rm -f conftest.er1
4294   cat conftest.err >&5
4295   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4296   (exit $ac_status); } && {
4297          test -z "$ac_c_werror_flag" ||
4298          test ! -s conftest.err
4299        } && test -s conftest.$ac_objext; then
4300   pgac_cv_prog_cc_cflags__fwrapv=yes
4301 else
4302   $as_echo "$as_me: failed program was:" >&5
4303 sed 's/^/| /' conftest.$ac_ext >&5
4304
4305         pgac_cv_prog_cc_cflags__fwrapv=no
4306 fi
4307
4308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4309 ac_c_werror_flag=$ac_save_c_werror_flag
4310 CFLAGS="$pgac_save_CFLAGS"
4311 fi
4312 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4313 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4314 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4315   CFLAGS="$CFLAGS -fwrapv"
4316 fi
4317
4318   # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4319   { $as_echo "$as_me:$LINENO: checking whether $CC supports -fexcess-precision=standard" >&5
4320 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4321 if test "${pgac_cv_prog_cc_cflags__fexcess_precision_standard+set}" = set; then
4322   $as_echo_n "(cached) " >&6
4323 else
4324   pgac_save_CFLAGS=$CFLAGS
4325 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4326 ac_save_c_werror_flag=$ac_c_werror_flag
4327 ac_c_werror_flag=yes
4328 cat >conftest.$ac_ext <<_ACEOF
4329 /* confdefs.h.  */
4330 _ACEOF
4331 cat confdefs.h >>conftest.$ac_ext
4332 cat >>conftest.$ac_ext <<_ACEOF
4333 /* end confdefs.h.  */
4334
4335 int
4336 main ()
4337 {
4338
4339   ;
4340   return 0;
4341 }
4342 _ACEOF
4343 rm -f conftest.$ac_objext
4344 if { (ac_try="$ac_compile"
4345 case "(($ac_try" in
4346   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4347   *) ac_try_echo=$ac_try;;
4348 esac
4349 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4350 $as_echo "$ac_try_echo") >&5
4351   (eval "$ac_compile") 2>conftest.er1
4352   ac_status=$?
4353   grep -v '^ *+' conftest.er1 >conftest.err
4354   rm -f conftest.er1
4355   cat conftest.err >&5
4356   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4357   (exit $ac_status); } && {
4358          test -z "$ac_c_werror_flag" ||
4359          test ! -s conftest.err
4360        } && test -s conftest.$ac_objext; then
4361   pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4362 else
4363   $as_echo "$as_me: failed program was:" >&5
4364 sed 's/^/| /' conftest.$ac_ext >&5
4365
4366         pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4367 fi
4368
4369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4370 ac_c_werror_flag=$ac_save_c_werror_flag
4371 CFLAGS="$pgac_save_CFLAGS"
4372 fi
4373 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4374 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4375 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4376   CFLAGS="$CFLAGS -fexcess-precision=standard"
4377 fi
4378
4379 elif test "$ICC" = yes; then
4380   # Intel's compiler has a bug/misoptimization in checking for
4381   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4382   { $as_echo "$as_me:$LINENO: checking whether $CC supports -mp1" >&5
4383 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4384 if test "${pgac_cv_prog_cc_cflags__mp1+set}" = set; then
4385   $as_echo_n "(cached) " >&6
4386 else
4387   pgac_save_CFLAGS=$CFLAGS
4388 CFLAGS="$pgac_save_CFLAGS -mp1"
4389 ac_save_c_werror_flag=$ac_c_werror_flag
4390 ac_c_werror_flag=yes
4391 cat >conftest.$ac_ext <<_ACEOF
4392 /* confdefs.h.  */
4393 _ACEOF
4394 cat confdefs.h >>conftest.$ac_ext
4395 cat >>conftest.$ac_ext <<_ACEOF
4396 /* end confdefs.h.  */
4397
4398 int
4399 main ()
4400 {
4401
4402   ;
4403   return 0;
4404 }
4405 _ACEOF
4406 rm -f conftest.$ac_objext
4407 if { (ac_try="$ac_compile"
4408 case "(($ac_try" in
4409   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4410   *) ac_try_echo=$ac_try;;
4411 esac
4412 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4413 $as_echo "$ac_try_echo") >&5
4414   (eval "$ac_compile") 2>conftest.er1
4415   ac_status=$?
4416   grep -v '^ *+' conftest.er1 >conftest.err
4417   rm -f conftest.er1
4418   cat conftest.err >&5
4419   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4420   (exit $ac_status); } && {
4421          test -z "$ac_c_werror_flag" ||
4422          test ! -s conftest.err
4423        } && test -s conftest.$ac_objext; then
4424   pgac_cv_prog_cc_cflags__mp1=yes
4425 else
4426   $as_echo "$as_me: failed program was:" >&5
4427 sed 's/^/| /' conftest.$ac_ext >&5
4428
4429         pgac_cv_prog_cc_cflags__mp1=no
4430 fi
4431
4432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4433 ac_c_werror_flag=$ac_save_c_werror_flag
4434 CFLAGS="$pgac_save_CFLAGS"
4435 fi
4436 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4437 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4438 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4439   CFLAGS="$CFLAGS -mp1"
4440 fi
4441
4442   # Make sure strict aliasing is off (though this is said to be the default)
4443   { $as_echo "$as_me:$LINENO: checking whether $CC supports -fno-strict-aliasing" >&5
4444 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4445 if test "${pgac_cv_prog_cc_cflags__fno_strict_aliasing+set}" = set; then
4446   $as_echo_n "(cached) " >&6
4447 else
4448   pgac_save_CFLAGS=$CFLAGS
4449 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4450 ac_save_c_werror_flag=$ac_c_werror_flag
4451 ac_c_werror_flag=yes
4452 cat >conftest.$ac_ext <<_ACEOF
4453 /* confdefs.h.  */
4454 _ACEOF
4455 cat confdefs.h >>conftest.$ac_ext
4456 cat >>conftest.$ac_ext <<_ACEOF
4457 /* end confdefs.h.  */
4458
4459 int
4460 main ()
4461 {
4462
4463   ;
4464   return 0;
4465 }
4466 _ACEOF
4467 rm -f conftest.$ac_objext
4468 if { (ac_try="$ac_compile"
4469 case "(($ac_try" in
4470   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4471   *) ac_try_echo=$ac_try;;
4472 esac
4473 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4474 $as_echo "$ac_try_echo") >&5
4475   (eval "$ac_compile") 2>conftest.er1
4476   ac_status=$?
4477   grep -v '^ *+' conftest.er1 >conftest.err
4478   rm -f conftest.er1
4479   cat conftest.err >&5
4480   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4481   (exit $ac_status); } && {
4482          test -z "$ac_c_werror_flag" ||
4483          test ! -s conftest.err
4484        } && test -s conftest.$ac_objext; then
4485   pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4486 else
4487   $as_echo "$as_me: failed program was:" >&5
4488 sed 's/^/| /' conftest.$ac_ext >&5
4489
4490         pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4491 fi
4492
4493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4494 ac_c_werror_flag=$ac_save_c_werror_flag
4495 CFLAGS="$pgac_save_CFLAGS"
4496 fi
4497 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4498 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4499 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4500   CFLAGS="$CFLAGS -fno-strict-aliasing"
4501 fi
4502
4503 elif test "$PORTNAME" = "aix"; then
4504   # AIX's xlc has to have strict aliasing turned off too
4505   { $as_echo "$as_me:$LINENO: checking whether $CC supports -qnoansialias" >&5
4506 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4507 if test "${pgac_cv_prog_cc_cflags__qnoansialias+set}" = set; then
4508   $as_echo_n "(cached) " >&6
4509 else
4510   pgac_save_CFLAGS=$CFLAGS
4511 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4512 ac_save_c_werror_flag=$ac_c_werror_flag
4513 ac_c_werror_flag=yes
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
4525   ;
4526   return 0;
4527 }
4528 _ACEOF
4529 rm -f conftest.$ac_objext
4530 if { (ac_try="$ac_compile"
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_compile") 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_objext; then
4547   pgac_cv_prog_cc_cflags__qnoansialias=yes
4548 else
4549   $as_echo "$as_me: failed program was:" >&5
4550 sed 's/^/| /' conftest.$ac_ext >&5
4551
4552         pgac_cv_prog_cc_cflags__qnoansialias=no
4553 fi
4554
4555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4556 ac_c_werror_flag=$ac_save_c_werror_flag
4557 CFLAGS="$pgac_save_CFLAGS"
4558 fi
4559 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4560 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4561 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4562   CFLAGS="$CFLAGS -qnoansialias"
4563 fi
4564
4565 elif test "$PORTNAME" = "hpux"; then
4566   # On some versions of HP-UX, libm functions do not set errno by default.
4567   # Fix that by using +Olibmerrno if the compiler recognizes it.
4568   { $as_echo "$as_me:$LINENO: checking whether $CC supports +Olibmerrno" >&5
4569 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4570 if test "${pgac_cv_prog_cc_cflags_pOlibmerrno+set}" = set; then
4571   $as_echo_n "(cached) " >&6
4572 else
4573   pgac_save_CFLAGS=$CFLAGS
4574 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4575 ac_save_c_werror_flag=$ac_c_werror_flag
4576 ac_c_werror_flag=yes
4577 cat >conftest.$ac_ext <<_ACEOF
4578 /* confdefs.h.  */
4579 _ACEOF
4580 cat confdefs.h >>conftest.$ac_ext
4581 cat >>conftest.$ac_ext <<_ACEOF
4582 /* end confdefs.h.  */
4583
4584 int
4585 main ()
4586 {
4587
4588   ;
4589   return 0;
4590 }
4591 _ACEOF
4592 rm -f conftest.$ac_objext
4593 if { (ac_try="$ac_compile"
4594 case "(($ac_try" in
4595   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4596   *) ac_try_echo=$ac_try;;
4597 esac
4598 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4599 $as_echo "$ac_try_echo") >&5
4600   (eval "$ac_compile") 2>conftest.er1
4601   ac_status=$?
4602   grep -v '^ *+' conftest.er1 >conftest.err
4603   rm -f conftest.er1
4604   cat conftest.err >&5
4605   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4606   (exit $ac_status); } && {
4607          test -z "$ac_c_werror_flag" ||
4608          test ! -s conftest.err
4609        } && test -s conftest.$ac_objext; then
4610   pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4611 else
4612   $as_echo "$as_me: failed program was:" >&5
4613 sed 's/^/| /' conftest.$ac_ext >&5
4614
4615         pgac_cv_prog_cc_cflags_pOlibmerrno=no
4616 fi
4617
4618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4619 ac_c_werror_flag=$ac_save_c_werror_flag
4620 CFLAGS="$pgac_save_CFLAGS"
4621 fi
4622 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4623 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
4624 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
4625   CFLAGS="$CFLAGS +Olibmerrno"
4626 fi
4627
4628 fi
4629
4630 # supply -g if --enable-debug
4631 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
4632   CFLAGS="$CFLAGS -g"
4633 fi
4634
4635 # enable code coverage if --enable-coverage
4636 if test "$enable_coverage" = yes; then
4637   if test "$GCC" = yes; then
4638     CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
4639   else
4640     { { $as_echo "$as_me:$LINENO: error: --enable-coverage is supported only when using GCC" >&5
4641 $as_echo "$as_me: error: --enable-coverage is supported only when using GCC" >&2;}
4642    { (exit 1); exit 1; }; }
4643   fi
4644 fi
4645
4646 # enable profiling if --enable-profiling
4647 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
4648   if test "$GCC" = yes; then
4649
4650 cat >>confdefs.h <<\_ACEOF
4651 #define PROFILE_PID_DIR 1
4652 _ACEOF
4653
4654     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
4655   else
4656     { { $as_echo "$as_me:$LINENO: error: --enable-profiling is supported only when using GCC" >&5
4657 $as_echo "$as_me: error: --enable-profiling is supported only when using GCC" >&2;}
4658    { (exit 1); exit 1; }; }
4659   fi
4660 fi
4661
4662 # We already have this in Makefile.win32, but configure needs it too
4663 if test "$PORTNAME" = "win32"; then
4664   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
4665 fi
4666
4667 # Check if the compiler still works with the template settings
4668 { $as_echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
4669 $as_echo_n "checking whether the C compiler still works... " >&6; }
4670 cat >conftest.$ac_ext <<_ACEOF
4671 /* confdefs.h.  */
4672 _ACEOF
4673 cat confdefs.h >>conftest.$ac_ext
4674 cat >>conftest.$ac_ext <<_ACEOF
4675 /* end confdefs.h.  */
4676
4677 int
4678 main ()
4679 {
4680 return 0;
4681   ;
4682   return 0;
4683 }
4684 _ACEOF
4685 rm -f conftest.$ac_objext conftest$ac_exeext
4686 if { (ac_try="$ac_link"
4687 case "(($ac_try" in
4688   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4689   *) ac_try_echo=$ac_try;;
4690 esac
4691 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4692 $as_echo "$ac_try_echo") >&5
4693   (eval "$ac_link") 2>conftest.er1
4694   ac_status=$?
4695   grep -v '^ *+' conftest.er1 >conftest.err
4696   rm -f conftest.er1
4697   cat conftest.err >&5
4698   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4699   (exit $ac_status); } && {
4700          test -z "$ac_c_werror_flag" ||
4701          test ! -s conftest.err
4702        } && test -s conftest$ac_exeext && {
4703          test "$cross_compiling" = yes ||
4704          $as_test_x conftest$ac_exeext
4705        }; then
4706   { $as_echo "$as_me:$LINENO: result: yes" >&5
4707 $as_echo "yes" >&6; }
4708 else
4709   $as_echo "$as_me: failed program was:" >&5
4710 sed 's/^/| /' conftest.$ac_ext >&5
4711
4712         { $as_echo "$as_me:$LINENO: result: no" >&5
4713 $as_echo "no" >&6; }
4714    { { $as_echo "$as_me:$LINENO: error: cannot proceed" >&5
4715 $as_echo "$as_me: error: cannot proceed" >&2;}
4716    { (exit 1); exit 1; }; }
4717 fi
4718
4719 rm -rf conftest.dSYM
4720 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4721       conftest$ac_exeext conftest.$ac_ext
4722
4723 # Defend against gcc -ffast-math
4724 if test "$GCC" = yes; then
4725 cat >conftest.$ac_ext <<_ACEOF
4726 /* confdefs.h.  */
4727 _ACEOF
4728 cat confdefs.h >>conftest.$ac_ext
4729 cat >>conftest.$ac_ext <<_ACEOF
4730 /* end confdefs.h.  */
4731
4732 int
4733 main ()
4734 {
4735 #ifdef __FAST_MATH__
4736 choke me
4737 #endif
4738   ;
4739   return 0;
4740 }
4741 _ACEOF
4742 rm -f conftest.$ac_objext
4743 if { (ac_try="$ac_compile"
4744 case "(($ac_try" in
4745   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4746   *) ac_try_echo=$ac_try;;
4747 esac
4748 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4749 $as_echo "$ac_try_echo") >&5
4750   (eval "$ac_compile") 2>conftest.er1
4751   ac_status=$?
4752   grep -v '^ *+' conftest.er1 >conftest.err
4753   rm -f conftest.er1
4754   cat conftest.err >&5
4755   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4756   (exit $ac_status); } && {
4757          test -z "$ac_c_werror_flag" ||
4758          test ! -s conftest.err
4759        } && test -s conftest.$ac_objext; then
4760   :
4761 else
4762   $as_echo "$as_me: failed program was:" >&5
4763 sed 's/^/| /' conftest.$ac_ext >&5
4764
4765         { { $as_echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
4766 $as_echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
4767    { (exit 1); exit 1; }; }
4768 fi
4769
4770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4771 fi
4772
4773 ac_ext=c
4774 ac_cpp='$CPP $CPPFLAGS'
4775 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4776 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4777 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4778 { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4779 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4780 # On Suns, sometimes $CPP names a directory.
4781 if test -n "$CPP" && test -d "$CPP"; then
4782   CPP=
4783 fi
4784 if test -z "$CPP"; then
4785   if test "${ac_cv_prog_CPP+set}" = set; then
4786   $as_echo_n "(cached) " >&6
4787 else
4788       # Double quotes because CPP needs to be expanded
4789     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4790     do
4791       ac_preproc_ok=false
4792 for ac_c_preproc_warn_flag in '' yes
4793 do
4794   # Use a header file that comes with gcc, so configuring glibc
4795   # with a fresh cross-compiler works.
4796   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4797   # <limits.h> exists even on freestanding compilers.
4798   # On the NeXT, cc -E runs the code through the compiler's parser,
4799   # not just through cpp. "Syntax error" is here to catch this case.
4800   cat >conftest.$ac_ext <<_ACEOF
4801 /* confdefs.h.  */
4802 _ACEOF
4803 cat confdefs.h >>conftest.$ac_ext
4804 cat >>conftest.$ac_ext <<_ACEOF
4805 /* end confdefs.h.  */
4806 #ifdef __STDC__
4807 # include <limits.h>
4808 #else
4809 # include <assert.h>
4810 #endif
4811                      Syntax error
4812 _ACEOF
4813 if { (ac_try="$ac_cpp conftest.$ac_ext"
4814 case "(($ac_try" in
4815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4816   *) ac_try_echo=$ac_try;;
4817 esac
4818 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4819 $as_echo "$ac_try_echo") >&5
4820   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4821   ac_status=$?
4822   grep -v '^ *+' conftest.er1 >conftest.err
4823   rm -f conftest.er1
4824   cat conftest.err >&5
4825   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4826   (exit $ac_status); } >/dev/null && {
4827          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4828          test ! -s conftest.err
4829        }; then
4830   :
4831 else
4832   $as_echo "$as_me: failed program was:" >&5
4833 sed 's/^/| /' conftest.$ac_ext >&5
4834
4835   # Broken: fails on valid input.
4836 continue
4837 fi
4838
4839 rm -f conftest.err conftest.$ac_ext
4840
4841   # OK, works on sane cases.  Now check whether nonexistent headers
4842   # can be detected and how.
4843   cat >conftest.$ac_ext <<_ACEOF
4844 /* confdefs.h.  */
4845 _ACEOF
4846 cat confdefs.h >>conftest.$ac_ext
4847 cat >>conftest.$ac_ext <<_ACEOF
4848 /* end confdefs.h.  */
4849 #include <ac_nonexistent.h>
4850 _ACEOF
4851 if { (ac_try="$ac_cpp conftest.$ac_ext"
4852 case "(($ac_try" in
4853   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4854   *) ac_try_echo=$ac_try;;
4855 esac
4856 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4857 $as_echo "$ac_try_echo") >&5
4858   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4859   ac_status=$?
4860   grep -v '^ *+' conftest.er1 >conftest.err
4861   rm -f conftest.er1
4862   cat conftest.err >&5
4863   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4864   (exit $ac_status); } >/dev/null && {
4865          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4866          test ! -s conftest.err
4867        }; then
4868   # Broken: success on invalid input.
4869 continue
4870 else
4871   $as_echo "$as_me: failed program was:" >&5
4872 sed 's/^/| /' conftest.$ac_ext >&5
4873
4874   # Passes both tests.
4875 ac_preproc_ok=:
4876 break
4877 fi
4878
4879 rm -f conftest.err conftest.$ac_ext
4880
4881 done
4882 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4883 rm -f conftest.err conftest.$ac_ext
4884 if $ac_preproc_ok; then
4885   break
4886 fi
4887
4888     done
4889     ac_cv_prog_CPP=$CPP
4890
4891 fi
4892   CPP=$ac_cv_prog_CPP
4893 else
4894   ac_cv_prog_CPP=$CPP
4895 fi
4896 { $as_echo "$as_me:$LINENO: result: $CPP" >&5
4897 $as_echo "$CPP" >&6; }
4898 ac_preproc_ok=false
4899 for ac_c_preproc_warn_flag in '' yes
4900 do
4901   # Use a header file that comes with gcc, so configuring glibc
4902   # with a fresh cross-compiler works.
4903   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4904   # <limits.h> exists even on freestanding compilers.
4905   # On the NeXT, cc -E runs the code through the compiler's parser,
4906   # not just through cpp. "Syntax error" is here to catch this case.
4907   cat >conftest.$ac_ext <<_ACEOF
4908 /* confdefs.h.  */
4909 _ACEOF
4910 cat confdefs.h >>conftest.$ac_ext
4911 cat >>conftest.$ac_ext <<_ACEOF
4912 /* end confdefs.h.  */
4913 #ifdef __STDC__
4914 # include <limits.h>
4915 #else
4916 # include <assert.h>
4917 #endif
4918                      Syntax error
4919 _ACEOF
4920 if { (ac_try="$ac_cpp conftest.$ac_ext"
4921 case "(($ac_try" in
4922   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4923   *) ac_try_echo=$ac_try;;
4924 esac
4925 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4926 $as_echo "$ac_try_echo") >&5
4927   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4928   ac_status=$?
4929   grep -v '^ *+' conftest.er1 >conftest.err
4930   rm -f conftest.er1
4931   cat conftest.err >&5
4932   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4933   (exit $ac_status); } >/dev/null && {
4934          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4935          test ! -s conftest.err
4936        }; then
4937   :
4938 else
4939   $as_echo "$as_me: failed program was:" >&5
4940 sed 's/^/| /' conftest.$ac_ext >&5
4941
4942   # Broken: fails on valid input.
4943 continue
4944 fi
4945
4946 rm -f conftest.err conftest.$ac_ext
4947
4948   # OK, works on sane cases.  Now check whether nonexistent headers
4949   # can be detected and how.
4950   cat >conftest.$ac_ext <<_ACEOF
4951 /* confdefs.h.  */
4952 _ACEOF
4953 cat confdefs.h >>conftest.$ac_ext
4954 cat >>conftest.$ac_ext <<_ACEOF
4955 /* end confdefs.h.  */
4956 #include <ac_nonexistent.h>
4957 _ACEOF
4958 if { (ac_try="$ac_cpp conftest.$ac_ext"
4959 case "(($ac_try" in
4960   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4961   *) ac_try_echo=$ac_try;;
4962 esac
4963 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4964 $as_echo "$ac_try_echo") >&5
4965   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4966   ac_status=$?
4967   grep -v '^ *+' conftest.er1 >conftest.err
4968   rm -f conftest.er1
4969   cat conftest.err >&5
4970   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4971   (exit $ac_status); } >/dev/null && {
4972          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4973          test ! -s conftest.err
4974        }; then
4975   # Broken: success on invalid input.
4976 continue
4977 else
4978   $as_echo "$as_me: failed program was:" >&5
4979 sed 's/^/| /' conftest.$ac_ext >&5
4980
4981   # Passes both tests.
4982 ac_preproc_ok=:
4983 break
4984 fi
4985
4986 rm -f conftest.err conftest.$ac_ext
4987
4988 done
4989 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4990 rm -f conftest.err conftest.$ac_ext
4991 if $ac_preproc_ok; then
4992   :
4993 else
4994   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
4995 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4996 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4997 See \`config.log' for more details." >&5
4998 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4999 See \`config.log' for more details." >&2;}
5000    { (exit 1); exit 1; }; }; }
5001 fi
5002
5003 ac_ext=c
5004 ac_cpp='$CPP $CPPFLAGS'
5005 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5006 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5007 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5008
5009
5010
5011
5012 #
5013 # Set up TAS assembly code if needed; the template file has now had its
5014 # chance to request this.
5015 #
5016 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5017
5018
5019 if test "$need_tas" = yes ; then
5020   TAS=tas.o
5021 else
5022   TAS=""
5023 fi
5024
5025
5026
5027 #
5028 # Automatic dependency tracking
5029 #
5030
5031
5032 # Check whether --enable-depend was given.
5033 if test "${enable_depend+set}" = set; then
5034   enableval=$enable_depend;
5035   case $enableval in
5036     yes)
5037       autodepend=yes
5038       ;;
5039     no)
5040       :
5041       ;;
5042     *)
5043       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
5044 $as_echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
5045    { (exit 1); exit 1; }; }
5046       ;;
5047   esac
5048
5049 else
5050   enable_depend=no
5051
5052 fi
5053
5054
5055
5056
5057
5058 #
5059 # Enable assert checks
5060 #
5061
5062
5063 # Check whether --enable-cassert was given.
5064 if test "${enable_cassert+set}" = set; then
5065   enableval=$enable_cassert;
5066   case $enableval in
5067     yes)
5068
5069 cat >>confdefs.h <<\_ACEOF
5070 #define USE_ASSERT_CHECKING 1
5071 _ACEOF
5072
5073       ;;
5074     no)
5075       :
5076       ;;
5077     *)
5078       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
5079 $as_echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
5080    { (exit 1); exit 1; }; }
5081       ;;
5082   esac
5083
5084 else
5085   enable_cassert=no
5086
5087 fi
5088
5089
5090
5091
5092 #
5093 # Include directories
5094 #
5095 ac_save_IFS=$IFS
5096 IFS="${IFS}${PATH_SEPARATOR}"
5097 # SRCH_INC comes from the template file
5098 for dir in $with_includes $SRCH_INC; do
5099   if test -d "$dir"; then
5100     INCLUDES="$INCLUDES -I$dir"
5101   else
5102     { $as_echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
5103 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5104   fi
5105 done
5106 IFS=$ac_save_IFS
5107
5108
5109
5110 #
5111 # Library directories
5112 #
5113 ac_save_IFS=$IFS
5114 IFS="${IFS}${PATH_SEPARATOR}"
5115 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5116 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5117   if test -d "$dir"; then
5118     LIBDIRS="$LIBDIRS -L$dir"
5119   else
5120     { $as_echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
5121 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5122   fi
5123 done
5124 IFS=$ac_save_IFS
5125
5126 #
5127 # Enable thread-safe client libraries
5128 #
5129 { $as_echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
5130 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5131
5132
5133 # Check whether --enable-thread-safety was given.
5134 if test "${enable_thread_safety+set}" = set; then
5135   enableval=$enable_thread_safety;
5136   case $enableval in
5137     yes)
5138       :
5139       ;;
5140     no)
5141       :
5142       ;;
5143     *)
5144       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
5145 $as_echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
5146    { (exit 1); exit 1; }; }
5147       ;;
5148   esac
5149
5150 else
5151   enable_thread_safety=yes
5152
5153 fi
5154
5155
5156 if test "$enable_thread_safety" = yes; then
5157
5158 cat >>confdefs.h <<\_ACEOF
5159 #define ENABLE_THREAD_SAFETY 1
5160 _ACEOF
5161
5162 fi
5163 { $as_echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
5164 $as_echo "$enable_thread_safety" >&6; }
5165
5166
5167 #
5168 # Optionally build Tcl modules (PL/Tcl)
5169 #
5170 { $as_echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
5171 $as_echo_n "checking whether to build with Tcl... " >&6; }
5172
5173
5174
5175 # Check whether --with-tcl was given.
5176 if test "${with_tcl+set}" = set; then
5177   withval=$with_tcl;
5178   case $withval in
5179     yes)
5180       :
5181       ;;
5182     no)
5183       :
5184       ;;
5185     *)
5186       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
5187 $as_echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
5188    { (exit 1); exit 1; }; }
5189       ;;
5190   esac
5191
5192 else
5193   with_tcl=no
5194
5195 fi
5196
5197
5198 { $as_echo "$as_me:$LINENO: result: $with_tcl" >&5
5199 $as_echo "$with_tcl" >&6; }
5200
5201
5202 # We see if the path to the Tcl/Tk configuration scripts is specified.
5203 # This will override the use of tclsh to find the paths to search.
5204
5205
5206
5207
5208 # Check whether --with-tclconfig was given.
5209 if test "${with_tclconfig+set}" = set; then
5210   withval=$with_tclconfig;
5211   case $withval in
5212     yes)
5213       { { $as_echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
5214 $as_echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
5215    { (exit 1); exit 1; }; }
5216       ;;
5217     no)
5218       { { $as_echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
5219 $as_echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
5220    { (exit 1); exit 1; }; }
5221       ;;
5222     *)
5223
5224       ;;
5225   esac
5226
5227 fi
5228
5229
5230
5231 #
5232 # Optionally build Perl modules (PL/Perl)
5233 #
5234 { $as_echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
5235 $as_echo_n "checking whether to build Perl modules... " >&6; }
5236
5237
5238
5239 # Check whether --with-perl was given.
5240 if test "${with_perl+set}" = set; then
5241   withval=$with_perl;
5242   case $withval in
5243     yes)
5244       :
5245       ;;
5246     no)
5247       :
5248       ;;
5249     *)
5250       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
5251 $as_echo "$as_me: error: no argument expected for --with-perl option" >&2;}
5252    { (exit 1); exit 1; }; }
5253       ;;
5254   esac
5255
5256 else
5257   with_perl=no
5258
5259 fi
5260
5261
5262 { $as_echo "$as_me:$LINENO: result: $with_perl" >&5
5263 $as_echo "$with_perl" >&6; }
5264
5265
5266 #
5267 # Optionally build Python modules (PL/Python)
5268 #
5269 { $as_echo "$as_me:$LINENO: checking whether to build Python modules" >&5
5270 $as_echo_n "checking whether to build Python modules... " >&6; }
5271
5272
5273
5274 # Check whether --with-python was given.
5275 if test "${with_python+set}" = set; then
5276   withval=$with_python;
5277   case $withval in
5278     yes)
5279       :
5280       ;;
5281     no)
5282       :
5283       ;;
5284     *)
5285       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
5286 $as_echo "$as_me: error: no argument expected for --with-python option" >&2;}
5287    { (exit 1); exit 1; }; }
5288       ;;
5289   esac
5290
5291 else
5292   with_python=no
5293
5294 fi
5295
5296
5297 { $as_echo "$as_me:$LINENO: result: $with_python" >&5
5298 $as_echo "$with_python" >&6; }
5299
5300
5301 #
5302 # GSSAPI
5303 #
5304 { $as_echo "$as_me:$LINENO: checking whether to build with GSSAPI support" >&5
5305 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5306
5307
5308
5309 # Check whether --with-gssapi was given.
5310 if test "${with_gssapi+set}" = set; then
5311   withval=$with_gssapi;
5312   case $withval in
5313     yes)
5314
5315
5316 cat >>confdefs.h <<\_ACEOF
5317 #define ENABLE_GSS 1
5318 _ACEOF
5319
5320   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5321
5322       ;;
5323     no)
5324       :
5325       ;;
5326     *)
5327       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-gssapi option" >&5
5328 $as_echo "$as_me: error: no argument expected for --with-gssapi option" >&2;}
5329    { (exit 1); exit 1; }; }
5330       ;;
5331   esac
5332
5333 else
5334   with_gssapi=no
5335
5336 fi
5337
5338
5339 { $as_echo "$as_me:$LINENO: result: $with_gssapi" >&5
5340 $as_echo "$with_gssapi" >&6; }
5341
5342 #
5343 # Kerberos 5
5344 #
5345 { $as_echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
5346 $as_echo_n "checking whether to build with Kerberos 5 support... " >&6; }
5347
5348
5349
5350 # Check whether --with-krb5 was given.
5351 if test "${with_krb5+set}" = set; then
5352   withval=$with_krb5;
5353   case $withval in
5354     yes)
5355
5356
5357 cat >>confdefs.h <<\_ACEOF
5358 #define KRB5 1
5359 _ACEOF
5360
5361   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5362
5363       ;;
5364     no)
5365       :
5366       ;;
5367     *)
5368       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
5369 $as_echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
5370    { (exit 1); exit 1; }; }
5371       ;;
5372   esac
5373
5374 else
5375   with_krb5=no
5376
5377 fi
5378
5379
5380 { $as_echo "$as_me:$LINENO: result: $with_krb5" >&5
5381 $as_echo "$with_krb5" >&6; }
5382
5383
5384
5385
5386
5387 #
5388 # Kerberos configuration parameters
5389 #
5390
5391
5392
5393 # Check whether --with-krb-srvnam was given.
5394 if test "${with_krb_srvnam+set}" = set; then
5395   withval=$with_krb_srvnam;
5396   case $withval in
5397     yes)
5398       { { $as_echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
5399 $as_echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
5400    { (exit 1); exit 1; }; }
5401       ;;
5402     no)
5403       { { $as_echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
5404 $as_echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
5405    { (exit 1); exit 1; }; }
5406       ;;
5407     *)
5408
5409       ;;
5410   esac
5411
5412 else
5413   with_krb_srvnam="postgres"
5414 fi
5415
5416
5417
5418 cat >>confdefs.h <<_ACEOF
5419 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5420 _ACEOF
5421
5422
5423
5424 #
5425 # PAM
5426 #
5427 { $as_echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
5428 $as_echo_n "checking whether to build with PAM support... " >&6; }
5429
5430
5431
5432 # Check whether --with-pam was given.
5433 if test "${with_pam+set}" = set; then
5434   withval=$with_pam;
5435   case $withval in
5436     yes)
5437
5438 cat >>confdefs.h <<\_ACEOF
5439 #define USE_PAM 1
5440 _ACEOF
5441
5442       ;;
5443     no)
5444       :
5445       ;;
5446     *)
5447       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
5448 $as_echo "$as_me: error: no argument expected for --with-pam option" >&2;}
5449    { (exit 1); exit 1; }; }
5450       ;;
5451   esac
5452
5453 else
5454   with_pam=no
5455
5456 fi
5457
5458
5459 { $as_echo "$as_me:$LINENO: result: $with_pam" >&5
5460 $as_echo "$with_pam" >&6; }
5461
5462
5463 #
5464 # LDAP
5465 #
5466 { $as_echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
5467 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5468
5469
5470
5471 # Check whether --with-ldap was given.
5472 if test "${with_ldap+set}" = set; then
5473   withval=$with_ldap;
5474   case $withval in
5475     yes)
5476
5477 cat >>confdefs.h <<\_ACEOF
5478 #define USE_LDAP 1
5479 _ACEOF
5480
5481       ;;
5482     no)
5483       :
5484       ;;
5485     *)
5486       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
5487 $as_echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
5488    { (exit 1); exit 1; }; }
5489       ;;
5490   esac
5491
5492 else
5493   with_ldap=no
5494
5495 fi
5496
5497
5498 { $as_echo "$as_me:$LINENO: result: $with_ldap" >&5
5499 $as_echo "$with_ldap" >&6; }
5500
5501
5502 #
5503 # Bonjour
5504 #
5505 { $as_echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
5506 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5507
5508
5509
5510 # Check whether --with-bonjour was given.
5511 if test "${with_bonjour+set}" = set; then
5512   withval=$with_bonjour;
5513   case $withval in
5514     yes)
5515
5516 cat >>confdefs.h <<\_ACEOF
5517 #define USE_BONJOUR 1
5518 _ACEOF
5519
5520       ;;
5521     no)
5522       :
5523       ;;
5524     *)
5525       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
5526 $as_echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
5527    { (exit 1); exit 1; }; }
5528       ;;
5529   esac
5530
5531 else
5532   with_bonjour=no
5533
5534 fi
5535
5536
5537 { $as_echo "$as_me:$LINENO: result: $with_bonjour" >&5
5538 $as_echo "$with_bonjour" >&6; }
5539
5540
5541 #
5542 # OpenSSL
5543 #
5544 { $as_echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
5545 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5546
5547
5548
5549 # Check whether --with-openssl was given.
5550 if test "${with_openssl+set}" = set; then
5551   withval=$with_openssl;
5552   case $withval in
5553     yes)
5554
5555 cat >>confdefs.h <<\_ACEOF
5556 #define USE_SSL 1
5557 _ACEOF
5558
5559       ;;
5560     no)
5561       :
5562       ;;
5563     *)
5564       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
5565 $as_echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
5566    { (exit 1); exit 1; }; }
5567       ;;
5568   esac
5569
5570 else
5571   with_openssl=no
5572
5573 fi
5574
5575
5576 { $as_echo "$as_me:$LINENO: result: $with_openssl" >&5
5577 $as_echo "$with_openssl" >&6; }
5578
5579
5580 #
5581 # SELinux
5582 #
5583 { $as_echo "$as_me:$LINENO: checking whether to build with SELinux support" >&5
5584 $as_echo_n "checking whether to build with SELinux support... " >&6; }
5585
5586
5587
5588 # Check whether --with-selinux was given.
5589 if test "${with_selinux+set}" = set; then
5590   withval=$with_selinux;
5591   case $withval in
5592     yes)
5593       :
5594       ;;
5595     no)
5596       :
5597       ;;
5598     *)
5599       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-selinux option" >&5
5600 $as_echo "$as_me: error: no argument expected for --with-selinux option" >&2;}
5601    { (exit 1); exit 1; }; }
5602       ;;
5603   esac
5604
5605 else
5606   with_selinux=no
5607
5608 fi
5609
5610
5611
5612 { $as_echo "$as_me:$LINENO: result: $with_selinux" >&5
5613 $as_echo "$with_selinux" >&6; }
5614
5615 #
5616 # Readline
5617 #
5618
5619
5620
5621 # Check whether --with-readline was given.
5622 if test "${with_readline+set}" = set; then
5623   withval=$with_readline;
5624   case $withval in
5625     yes)
5626       :
5627       ;;
5628     no)
5629       :
5630       ;;
5631     *)
5632       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
5633 $as_echo "$as_me: error: no argument expected for --with-readline option" >&2;}
5634    { (exit 1); exit 1; }; }
5635       ;;
5636   esac
5637
5638 else
5639   with_readline=yes
5640
5641 fi
5642
5643
5644 # readline on MinGW has problems with backslashes in psql and other bugs.
5645 # This is particularly a problem with non-US code pages.
5646 # Therefore disable its use until we understand the cause. 2004-07-20
5647 if test "$PORTNAME" = "win32"; then
5648   if test "$with_readline" = yes; then
5649     { $as_echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5650 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5651     with_readline=no
5652   fi
5653 fi
5654
5655
5656 #
5657 # Prefer libedit
5658 #
5659
5660
5661
5662 # Check whether --with-libedit-preferred was given.
5663 if test "${with_libedit_preferred+set}" = set; then
5664   withval=$with_libedit_preferred;
5665   case $withval in
5666     yes)
5667       :
5668       ;;
5669     no)
5670       :
5671       ;;
5672     *)
5673       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
5674 $as_echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
5675    { (exit 1); exit 1; }; }
5676       ;;
5677   esac
5678
5679 else
5680   with_libedit_preferred=no
5681
5682 fi
5683
5684
5685
5686
5687 #
5688 # OSSP UUID library
5689 #
5690
5691
5692
5693 # Check whether --with-ossp-uuid was given.
5694 if test "${with_ossp_uuid+set}" = set; then
5695   withval=$with_ossp_uuid;
5696   case $withval in
5697     yes)
5698       :
5699       ;;
5700     no)
5701       :
5702       ;;
5703     *)
5704       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-ossp-uuid option" >&5
5705 $as_echo "$as_me: error: no argument expected for --with-ossp-uuid option" >&2;}
5706    { (exit 1); exit 1; }; }
5707       ;;
5708   esac
5709
5710 else
5711   with_ossp_uuid=no
5712
5713 fi
5714
5715
5716
5717
5718
5719 #
5720 # XML
5721 #
5722
5723
5724
5725 # Check whether --with-libxml was given.
5726 if test "${with_libxml+set}" = set; then
5727   withval=$with_libxml;
5728   case $withval in
5729     yes)
5730
5731 cat >>confdefs.h <<\_ACEOF
5732 #define USE_LIBXML 1
5733 _ACEOF
5734
5735       ;;
5736     no)
5737       :
5738       ;;
5739     *)
5740       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-libxml option" >&5
5741 $as_echo "$as_me: error: no argument expected for --with-libxml option" >&2;}
5742    { (exit 1); exit 1; }; }
5743       ;;
5744   esac
5745
5746 else
5747   with_libxml=no
5748
5749 fi
5750
5751
5752
5753 if test "$with_libxml" = yes ; then
5754   for ac_prog in xml2-config
5755 do
5756   # Extract the first word of "$ac_prog", so it can be a program name with args.
5757 set dummy $ac_prog; ac_word=$2
5758 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5759 $as_echo_n "checking for $ac_word... " >&6; }
5760 if test "${ac_cv_prog_XML2_CONFIG+set}" = set; then
5761   $as_echo_n "(cached) " >&6
5762 else
5763   if test -n "$XML2_CONFIG"; then
5764   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
5765 else
5766 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5767 for as_dir in $PATH
5768 do
5769   IFS=$as_save_IFS
5770   test -z "$as_dir" && as_dir=.
5771   for ac_exec_ext in '' $ac_executable_extensions; do
5772   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5773     ac_cv_prog_XML2_CONFIG="$ac_prog"
5774     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5775     break 2
5776   fi
5777 done
5778 done
5779 IFS=$as_save_IFS
5780
5781 fi
5782 fi
5783 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
5784 if test -n "$XML2_CONFIG"; then
5785   { $as_echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5
5786 $as_echo "$XML2_CONFIG" >&6; }
5787 else
5788   { $as_echo "$as_me:$LINENO: result: no" >&5
5789 $as_echo "no" >&6; }
5790 fi
5791
5792
5793   test -n "$XML2_CONFIG" && break
5794 done
5795
5796   if test -n "$XML2_CONFIG"; then
5797     for pgac_option in `$XML2_CONFIG --cflags`; do
5798       case $pgac_option in
5799         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
5800       esac
5801     done
5802     for pgac_option in `$XML2_CONFIG --libs`; do
5803       case $pgac_option in
5804         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5805       esac
5806     done
5807   fi
5808 fi
5809
5810
5811
5812 #
5813 # XSLT
5814 #
5815
5816
5817
5818 # Check whether --with-libxslt was given.
5819 if test "${with_libxslt+set}" = set; then
5820   withval=$with_libxslt;
5821   case $withval in
5822     yes)
5823
5824 cat >>confdefs.h <<\_ACEOF
5825 #define USE_LIBXSLT 1
5826 _ACEOF
5827
5828       ;;
5829     no)
5830       :
5831       ;;
5832     *)
5833       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-libxslt option" >&5
5834 $as_echo "$as_me: error: no argument expected for --with-libxslt option" >&2;}
5835    { (exit 1); exit 1; }; }
5836       ;;
5837   esac
5838
5839 else
5840   with_libxslt=no
5841
5842 fi
5843
5844
5845
5846
5847
5848
5849 #
5850 # tzdata
5851 #
5852
5853
5854
5855 # Check whether --with-system-tzdata was given.
5856 if test "${with_system_tzdata+set}" = set; then
5857   withval=$with_system_tzdata;
5858   case $withval in
5859     yes)
5860       { { $as_echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
5861 $as_echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
5862    { (exit 1); exit 1; }; }
5863       ;;
5864     no)
5865       { { $as_echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
5866 $as_echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
5867    { (exit 1); exit 1; }; }
5868       ;;
5869     *)
5870
5871       ;;
5872   esac
5873
5874 fi
5875
5876
5877
5878
5879 #
5880 # Zlib
5881 #
5882
5883
5884
5885 # Check whether --with-zlib was given.
5886 if test "${with_zlib+set}" = set; then
5887   withval=$with_zlib;
5888   case $withval in
5889     yes)
5890       :
5891       ;;
5892     no)
5893       :
5894       ;;
5895     *)
5896       { { $as_echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
5897 $as_echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
5898    { (exit 1); exit 1; }; }
5899       ;;
5900   esac
5901
5902 else
5903   with_zlib=yes
5904
5905 fi
5906
5907
5908
5909
5910 #
5911 # Elf
5912 #
5913
5914 # Assume system is ELF if it predefines __ELF__ as 1,
5915 # otherwise believe host_os based default.
5916 case $host_os in
5917     freebsd1*|freebsd2*) elf=no;;
5918     freebsd3*|freebsd4*) elf=yes;;
5919 esac
5920
5921
5922 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
5923 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5924 if test "${ac_cv_path_GREP+set}" = set; then
5925   $as_echo_n "(cached) " >&6
5926 else
5927   if test -z "$GREP"; then
5928   ac_path_GREP_found=false
5929   # Loop through the user's path and test for each of PROGNAME-LIST
5930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5931 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5932 do
5933   IFS=$as_save_IFS
5934   test -z "$as_dir" && as_dir=.
5935   for ac_prog in grep ggrep; do
5936     for ac_exec_ext in '' $ac_executable_extensions; do
5937       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5938       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5939 # Check for GNU ac_path_GREP and select it if it is found.
5940   # Check for GNU $ac_path_GREP
5941 case `"$ac_path_GREP" --version 2>&1` in
5942 *GNU*)
5943   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5944 *)
5945   ac_count=0
5946   $as_echo_n 0123456789 >"conftest.in"
5947   while :
5948   do
5949     cat "conftest.in" "conftest.in" >"conftest.tmp"
5950     mv "conftest.tmp" "conftest.in"
5951     cp "conftest.in" "conftest.nl"
5952     $as_echo 'GREP' >> "conftest.nl"
5953     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5954     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5955     ac_count=`expr $ac_count + 1`
5956     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5957       # Best one so far, save it but keep looking for a better one
5958       ac_cv_path_GREP="$ac_path_GREP"
5959       ac_path_GREP_max=$ac_count
5960     fi
5961     # 10*(2^10) chars as input seems more than enough
5962     test $ac_count -gt 10 && break
5963   done
5964   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5965 esac
5966
5967       $ac_path_GREP_found && break 3
5968     done
5969   done
5970 done
5971 IFS=$as_save_IFS
5972   if test -z "$ac_cv_path_GREP"; then
5973     { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5974 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5975    { (exit 1); exit 1; }; }
5976   fi
5977 else
5978   ac_cv_path_GREP=$GREP
5979 fi
5980
5981 fi
5982 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
5983 $as_echo "$ac_cv_path_GREP" >&6; }
5984  GREP="$ac_cv_path_GREP"
5985
5986
5987 { $as_echo "$as_me:$LINENO: checking for egrep" >&5
5988 $as_echo_n "checking for egrep... " >&6; }
5989 if test "${ac_cv_path_EGREP+set}" = set; then
5990   $as_echo_n "(cached) " >&6
5991 else
5992   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5993    then ac_cv_path_EGREP="$GREP -E"
5994    else
5995      if test -z "$EGREP"; then
5996   ac_path_EGREP_found=false
5997   # Loop through the user's path and test for each of PROGNAME-LIST
5998   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5999 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6000 do
6001   IFS=$as_save_IFS
6002   test -z "$as_dir" && as_dir=.
6003   for ac_prog in egrep; do
6004     for ac_exec_ext in '' $ac_executable_extensions; do
6005       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6006       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6007 # Check for GNU ac_path_EGREP and select it if it is found.
6008   # Check for GNU $ac_path_EGREP
6009 case `"$ac_path_EGREP" --version 2>&1` in
6010 *GNU*)
6011   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6012 *)
6013   ac_count=0
6014   $as_echo_n 0123456789 >"conftest.in"
6015   while :
6016   do
6017     cat "conftest.in" "conftest.in" >"conftest.tmp"
6018     mv "conftest.tmp" "conftest.in"
6019     cp "conftest.in" "conftest.nl"
6020     $as_echo 'EGREP' >> "conftest.nl"
6021     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6022     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6023     ac_count=`expr $ac_count + 1`
6024     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6025       # Best one so far, save it but keep looking for a better one
6026       ac_cv_path_EGREP="$ac_path_EGREP"
6027       ac_path_EGREP_max=$ac_count
6028     fi
6029     # 10*(2^10) chars as input seems more than enough
6030     test $ac_count -gt 10 && break
6031   done
6032   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6033 esac
6034
6035       $ac_path_EGREP_found && break 3
6036     done
6037   done
6038 done
6039 IFS=$as_save_IFS
6040   if test -z "$ac_cv_path_EGREP"; then
6041     { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
6042 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
6043    { (exit 1); exit 1; }; }
6044   fi
6045 else
6046   ac_cv_path_EGREP=$EGREP
6047 fi
6048
6049    fi
6050 fi
6051 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
6052 $as_echo "$ac_cv_path_EGREP" >&6; }
6053  EGREP="$ac_cv_path_EGREP"
6054
6055
6056 cat >conftest.$ac_ext <<_ACEOF
6057 /* confdefs.h.  */
6058 _ACEOF
6059 cat confdefs.h >>conftest.$ac_ext
6060 cat >>conftest.$ac_ext <<_ACEOF
6061 /* end confdefs.h.  */
6062 #if __ELF__
6063   yes
6064 #endif
6065
6066 _ACEOF
6067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6068   $EGREP "yes" >/dev/null 2>&1; then
6069   ELF_SYS=true
6070 else
6071   if test "X$elf" = "Xyes" ; then
6072   ELF_SYS=true
6073 else
6074   ELF_SYS=
6075 fi
6076 fi
6077 rm -f conftest*
6078
6079
6080
6081 #
6082 # Assignments
6083 #
6084
6085 CPPFLAGS="$CPPFLAGS $INCLUDES"
6086 LDFLAGS="$LDFLAGS $LIBDIRS"
6087
6088
6089
6090
6091
6092 # Check whether --with-gnu-ld was given.
6093 if test "${with_gnu_ld+set}" = set; then
6094   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6095 else
6096   with_gnu_ld=no
6097 fi
6098
6099 ac_prog=ld
6100 if test "$GCC" = yes; then
6101   # Check if gcc -print-prog-name=ld gives a path.
6102   { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5
6103 $as_echo_n "checking for ld used by GCC... " >&6; }
6104   case $host in
6105   *-*-mingw*)
6106     # gcc leaves a trailing carriage return which upsets mingw
6107     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6108   *)
6109     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6110   esac
6111   case "$ac_prog" in
6112     # Accept absolute paths.
6113     [\\/]* | [A-Za-z]:[\\/]*)
6114       re_direlt='/[^/][^/]*/\.\./'
6115       # Canonicalize the path of ld
6116       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6117       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6118         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6119       done
6120       test -z "$LD" && LD="$ac_prog"
6121       ;;
6122   "")
6123     # If it fails, then pretend we aren't using GCC.
6124     ac_prog=ld
6125     ;;
6126   *)
6127     # If it is relative, then search for the first ld in PATH.
6128     with_gnu_ld=unknown
6129     ;;
6130   esac
6131 elif test "$with_gnu_ld" = yes; then
6132   { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
6133 $as_echo_n "checking for GNU ld... " >&6; }
6134 else
6135   { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
6136 $as_echo_n "checking for non-GNU ld... " >&6; }
6137 fi
6138 if test "${ac_cv_path_LD+set}" = set; then
6139   $as_echo_n "(cached) " >&6
6140 else
6141   if test -z "$LD"; then
6142   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6143   for ac_dir in $PATH; do
6144     test -z "$ac_dir" && ac_dir=.
6145     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6146       ac_cv_path_LD="$ac_dir/$ac_prog"
6147       # Check to see if the program is GNU ld.  I'd rather use --version,
6148       # but apparently some GNU ld's only accept -v.
6149       # Break only if it was the GNU/non-GNU ld that we prefer.
6150       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6151         test "$with_gnu_ld" != no && break
6152       else
6153         test "$with_gnu_ld" != yes && break
6154       fi
6155     fi
6156   done
6157   IFS="$ac_save_ifs"
6158 else
6159   ac_cv_path_LD="$LD" # Let the user override the test with a path.
6160 fi
6161 fi
6162
6163 LD="$ac_cv_path_LD"
6164 if test -n "$LD"; then
6165   { $as_echo "$as_me:$LINENO: result: $LD" >&5
6166 $as_echo "$LD" >&6; }
6167 else
6168   { $as_echo "$as_me:$LINENO: result: no" >&5
6169 $as_echo "no" >&6; }
6170 fi
6171 test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
6172 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
6173    { (exit 1); exit 1; }; }
6174 { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
6175 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6176 if test "${ac_cv_prog_gnu_ld+set}" = set; then
6177   $as_echo_n "(cached) " >&6
6178 else
6179   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6180 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6181   ac_cv_prog_gnu_ld=yes
6182 else
6183   ac_cv_prog_gnu_ld=no
6184 fi
6185 fi
6186 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
6187 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6188 with_gnu_ld=$ac_cv_prog_gnu_ld
6189
6190
6191
6192
6193 case $host_os in sysv5*)
6194   { $as_echo "$as_me:$LINENO: checking whether ld -R works" >&5
6195 $as_echo_n "checking whether ld -R works... " >&6; }
6196 if test "${pgac_cv_prog_ld_R+set}" = set; then
6197   $as_echo_n "(cached) " >&6
6198 else
6199
6200     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6201     cat >conftest.$ac_ext <<_ACEOF
6202 /* confdefs.h.  */
6203 _ACEOF
6204 cat confdefs.h >>conftest.$ac_ext
6205 cat >>conftest.$ac_ext <<_ACEOF
6206 /* end confdefs.h.  */
6207
6208 int
6209 main ()
6210 {
6211
6212   ;
6213   return 0;
6214 }
6215 _ACEOF
6216 rm -f conftest.$ac_objext conftest$ac_exeext
6217 if { (ac_try="$ac_link"
6218 case "(($ac_try" in
6219   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6220   *) ac_try_echo=$ac_try;;
6221 esac
6222 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6223 $as_echo "$ac_try_echo") >&5
6224   (eval "$ac_link") 2>conftest.er1
6225   ac_status=$?
6226   grep -v '^ *+' conftest.er1 >conftest.err
6227   rm -f conftest.er1
6228   cat conftest.err >&5
6229   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6230   (exit $ac_status); } && {
6231          test -z "$ac_c_werror_flag" ||
6232          test ! -s conftest.err
6233        } && test -s conftest$ac_exeext && {
6234          test "$cross_compiling" = yes ||
6235          $as_test_x conftest$ac_exeext
6236        }; then
6237   pgac_cv_prog_ld_R=yes
6238 else
6239   $as_echo "$as_me: failed program was:" >&5
6240 sed 's/^/| /' conftest.$ac_ext >&5
6241
6242         pgac_cv_prog_ld_R=no
6243 fi
6244
6245 rm -rf conftest.dSYM
6246 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6247       conftest$ac_exeext conftest.$ac_ext
6248     LDFLAGS=$pgac_save_LDFLAGS
6249
6250 fi
6251 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
6252 $as_echo "$pgac_cv_prog_ld_R" >&6; }
6253   ld_R_works=$pgac_cv_prog_ld_R
6254
6255 esac
6256 if test -n "$ac_tool_prefix"; then
6257   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6258 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6259 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6260 $as_echo_n "checking for $ac_word... " >&6; }
6261 if test "${ac_cv_prog_RANLIB+set}" = set; then
6262   $as_echo_n "(cached) " >&6
6263 else
6264   if test -n "$RANLIB"; then
6265   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6266 else
6267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6268 for as_dir in $PATH
6269 do
6270   IFS=$as_save_IFS
6271   test -z "$as_dir" && as_dir=.
6272   for ac_exec_ext in '' $ac_executable_extensions; do
6273   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6274     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6275     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6276     break 2
6277   fi
6278 done
6279 done
6280 IFS=$as_save_IFS
6281
6282 fi
6283 fi
6284 RANLIB=$ac_cv_prog_RANLIB
6285 if test -n "$RANLIB"; then
6286   { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
6287 $as_echo "$RANLIB" >&6; }
6288 else
6289   { $as_echo "$as_me:$LINENO: result: no" >&5
6290 $as_echo "no" >&6; }
6291 fi
6292
6293
6294 fi
6295 if test -z "$ac_cv_prog_RANLIB"; then
6296   ac_ct_RANLIB=$RANLIB
6297   # Extract the first word of "ranlib", so it can be a program name with args.
6298 set dummy ranlib; ac_word=$2
6299 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6300 $as_echo_n "checking for $ac_word... " >&6; }
6301 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6302   $as_echo_n "(cached) " >&6
6303 else
6304   if test -n "$ac_ct_RANLIB"; then
6305   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6306 else
6307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6308 for as_dir in $PATH
6309 do
6310   IFS=$as_save_IFS
6311   test -z "$as_dir" && as_dir=.
6312   for ac_exec_ext in '' $ac_executable_extensions; do
6313   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6314     ac_cv_prog_ac_ct_RANLIB="ranlib"
6315     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6316     break 2
6317   fi
6318 done
6319 done
6320 IFS=$as_save_IFS
6321
6322 fi
6323 fi
6324 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6325 if test -n "$ac_ct_RANLIB"; then
6326   { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6327 $as_echo "$ac_ct_RANLIB" >&6; }
6328 else
6329   { $as_echo "$as_me:$LINENO: result: no" >&5
6330 $as_echo "no" >&6; }
6331 fi
6332
6333   if test "x$ac_ct_RANLIB" = x; then
6334     RANLIB=":"
6335   else
6336     case $cross_compiling:$ac_tool_warned in
6337 yes:)
6338 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6339 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6340 ac_tool_warned=yes ;;
6341 esac
6342     RANLIB=$ac_ct_RANLIB
6343   fi
6344 else
6345   RANLIB="$ac_cv_prog_RANLIB"
6346 fi
6347
6348
6349   if test -n "$ac_tool_prefix"; then
6350   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6351 set dummy ${ac_tool_prefix}strip; ac_word=$2
6352 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6353 $as_echo_n "checking for $ac_word... " >&6; }
6354 if test "${ac_cv_prog_STRIP+set}" = set; then
6355   $as_echo_n "(cached) " >&6
6356 else
6357   if test -n "$STRIP"; then
6358   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6359 else
6360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6361 for as_dir in $PATH
6362 do
6363   IFS=$as_save_IFS
6364   test -z "$as_dir" && as_dir=.
6365   for ac_exec_ext in '' $ac_executable_extensions; do
6366   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6367     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6368     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6369     break 2
6370   fi
6371 done
6372 done
6373 IFS=$as_save_IFS
6374
6375 fi
6376 fi
6377 STRIP=$ac_cv_prog_STRIP
6378 if test -n "$STRIP"; then
6379   { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
6380 $as_echo "$STRIP" >&6; }
6381 else
6382   { $as_echo "$as_me:$LINENO: result: no" >&5
6383 $as_echo "no" >&6; }
6384 fi
6385
6386
6387 fi
6388 if test -z "$ac_cv_prog_STRIP"; then
6389   ac_ct_STRIP=$STRIP
6390   # Extract the first word of "strip", so it can be a program name with args.
6391 set dummy strip; ac_word=$2
6392 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6393 $as_echo_n "checking for $ac_word... " >&6; }
6394 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6395   $as_echo_n "(cached) " >&6
6396 else
6397   if test -n "$ac_ct_STRIP"; then
6398   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6399 else
6400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6401 for as_dir in $PATH
6402 do
6403   IFS=$as_save_IFS
6404   test -z "$as_dir" && as_dir=.
6405   for ac_exec_ext in '' $ac_executable_extensions; do
6406   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6407     ac_cv_prog_ac_ct_STRIP="strip"
6408     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6409     break 2
6410   fi
6411 done
6412 done
6413 IFS=$as_save_IFS
6414
6415 fi
6416 fi
6417 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6418 if test -n "$ac_ct_STRIP"; then
6419   { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6420 $as_echo "$ac_ct_STRIP" >&6; }
6421 else
6422   { $as_echo "$as_me:$LINENO: result: no" >&5
6423 $as_echo "no" >&6; }
6424 fi
6425
6426   if test "x$ac_ct_STRIP" = x; then
6427     STRIP=":"
6428   else
6429     case $cross_compiling:$ac_tool_warned in
6430 yes:)
6431 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6432 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6433 ac_tool_warned=yes ;;
6434 esac
6435     STRIP=$ac_ct_STRIP
6436   fi
6437 else
6438   STRIP="$ac_cv_prog_STRIP"
6439 fi
6440
6441
6442   { $as_echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
6443 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6444   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6445     STRIP_STATIC_LIB="$STRIP -x"
6446     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6447     { $as_echo "$as_me:$LINENO: result: yes" >&5
6448 $as_echo "yes" >&6; }
6449   else
6450     case $host_os in
6451       darwin*)
6452         STRIP="$STRIP -x"
6453         STRIP_STATIC_LIB=$STRIP
6454         STRIP_SHARED_LIB=$STRIP
6455         { $as_echo "$as_me:$LINENO: result: yes" >&5
6456 $as_echo "yes" >&6; }
6457         ;;
6458       *)
6459         STRIP_STATIC_LIB=:
6460         STRIP_SHARED_LIB=:
6461         { $as_echo "$as_me:$LINENO: result: no" >&5
6462 $as_echo "no" >&6; }
6463         ;;
6464     esac
6465   fi
6466
6467
6468
6469 if test -n "$ac_tool_prefix"; then
6470   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6471 set dummy ${ac_tool_prefix}ar; ac_word=$2
6472 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6473 $as_echo_n "checking for $ac_word... " >&6; }
6474 if test "${ac_cv_prog_AR+set}" = set; then
6475   $as_echo_n "(cached) " >&6
6476 else
6477   if test -n "$AR"; then
6478   ac_cv_prog_AR="$AR" # Let the user override the test.
6479 else
6480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6481 for as_dir in $PATH
6482 do
6483   IFS=$as_save_IFS
6484   test -z "$as_dir" && as_dir=.
6485   for ac_exec_ext in '' $ac_executable_extensions; do
6486   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6487     ac_cv_prog_AR="${ac_tool_prefix}ar"
6488     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6489     break 2
6490   fi
6491 done
6492 done
6493 IFS=$as_save_IFS
6494
6495 fi
6496 fi
6497 AR=$ac_cv_prog_AR
6498 if test -n "$AR"; then
6499   { $as_echo "$as_me:$LINENO: result: $AR" >&5
6500 $as_echo "$AR" >&6; }
6501 else
6502   { $as_echo "$as_me:$LINENO: result: no" >&5
6503 $as_echo "no" >&6; }
6504 fi
6505
6506
6507 fi
6508 if test -z "$ac_cv_prog_AR"; then
6509   ac_ct_AR=$AR
6510   # Extract the first word of "ar", so it can be a program name with args.
6511 set dummy ar; ac_word=$2
6512 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6513 $as_echo_n "checking for $ac_word... " >&6; }
6514 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
6515   $as_echo_n "(cached) " >&6
6516 else
6517   if test -n "$ac_ct_AR"; then
6518   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6519 else
6520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6521 for as_dir in $PATH
6522 do
6523   IFS=$as_save_IFS
6524   test -z "$as_dir" && as_dir=.
6525   for ac_exec_ext in '' $ac_executable_extensions; do
6526   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6527     ac_cv_prog_ac_ct_AR="ar"
6528     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6529     break 2
6530   fi
6531 done
6532 done
6533 IFS=$as_save_IFS
6534
6535 fi
6536 fi
6537 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6538 if test -n "$ac_ct_AR"; then
6539   { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
6540 $as_echo "$ac_ct_AR" >&6; }
6541 else
6542   { $as_echo "$as_me:$LINENO: result: no" >&5
6543 $as_echo "no" >&6; }
6544 fi
6545
6546   if test "x$ac_ct_AR" = x; then
6547     AR="ar"
6548   else
6549     case $cross_compiling:$ac_tool_warned in
6550 yes:)
6551 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6552 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6553 ac_tool_warned=yes ;;
6554 esac
6555     AR=$ac_ct_AR
6556   fi
6557 else
6558   AR="$ac_cv_prog_AR"
6559 fi
6560
6561 if test "$PORTNAME" = "win32"; then
6562   if test -n "$ac_tool_prefix"; then
6563   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6564 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6565 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6566 $as_echo_n "checking for $ac_word... " >&6; }
6567 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
6568   $as_echo_n "(cached) " >&6
6569 else
6570   if test -n "$DLLTOOL"; then
6571   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6572 else
6573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6574 for as_dir in $PATH
6575 do
6576   IFS=$as_save_IFS
6577   test -z "$as_dir" && as_dir=.
6578   for ac_exec_ext in '' $ac_executable_extensions; do
6579   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6580     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6581     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6582     break 2
6583   fi
6584 done
6585 done
6586 IFS=$as_save_IFS
6587
6588 fi
6589 fi
6590 DLLTOOL=$ac_cv_prog_DLLTOOL
6591 if test -n "$DLLTOOL"; then
6592   { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5
6593 $as_echo "$DLLTOOL" >&6; }
6594 else
6595   { $as_echo "$as_me:$LINENO: result: no" >&5
6596 $as_echo "no" >&6; }
6597 fi
6598
6599
6600 fi
6601 if test -z "$ac_cv_prog_DLLTOOL"; then
6602   ac_ct_DLLTOOL=$DLLTOOL
6603   # Extract the first word of "dlltool", so it can be a program name with args.
6604 set dummy dlltool; ac_word=$2
6605 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6606 $as_echo_n "checking for $ac_word... " >&6; }
6607 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
6608   $as_echo_n "(cached) " >&6
6609 else
6610   if test -n "$ac_ct_DLLTOOL"; then
6611   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6612 else
6613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6614 for as_dir in $PATH
6615 do
6616   IFS=$as_save_IFS
6617   test -z "$as_dir" && as_dir=.
6618   for ac_exec_ext in '' $ac_executable_extensions; do
6619   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6620     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6621     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6622     break 2
6623   fi
6624 done
6625 done
6626 IFS=$as_save_IFS
6627
6628 fi
6629 fi
6630 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6631 if test -n "$ac_ct_DLLTOOL"; then
6632   { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
6633 $as_echo "$ac_ct_DLLTOOL" >&6; }
6634 else
6635   { $as_echo "$as_me:$LINENO: result: no" >&5
6636 $as_echo "no" >&6; }
6637 fi
6638
6639   if test "x$ac_ct_DLLTOOL" = x; then
6640     DLLTOOL="dlltool"
6641   else
6642     case $cross_compiling:$ac_tool_warned in
6643 yes:)
6644 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6645 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6646 ac_tool_warned=yes ;;
6647 esac
6648     DLLTOOL=$ac_ct_DLLTOOL
6649   fi
6650 else
6651   DLLTOOL="$ac_cv_prog_DLLTOOL"
6652 fi
6653
6654   if test -n "$ac_tool_prefix"; then
6655   # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6656 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6657 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6658 $as_echo_n "checking for $ac_word... " >&6; }
6659 if test "${ac_cv_prog_DLLWRAP+set}" = set; then
6660   $as_echo_n "(cached) " >&6
6661 else
6662   if test -n "$DLLWRAP"; then
6663   ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6664 else
6665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6666 for as_dir in $PATH
6667 do
6668   IFS=$as_save_IFS
6669   test -z "$as_dir" && as_dir=.
6670   for ac_exec_ext in '' $ac_executable_extensions; do
6671   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6672     ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6673     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6674     break 2
6675   fi
6676 done
6677 done
6678 IFS=$as_save_IFS
6679
6680 fi
6681 fi
6682 DLLWRAP=$ac_cv_prog_DLLWRAP
6683 if test -n "$DLLWRAP"; then
6684   { $as_echo "$as_me:$LINENO: result: $DLLWRAP" >&5
6685 $as_echo "$DLLWRAP" >&6; }
6686 else
6687   { $as_echo "$as_me:$LINENO: result: no" >&5
6688 $as_echo "no" >&6; }
6689 fi
6690
6691
6692 fi
6693 if test -z "$ac_cv_prog_DLLWRAP"; then
6694   ac_ct_DLLWRAP=$DLLWRAP
6695   # Extract the first word of "dllwrap", so it can be a program name with args.
6696 set dummy dllwrap; ac_word=$2
6697 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6698 $as_echo_n "checking for $ac_word... " >&6; }
6699 if test "${ac_cv_prog_ac_ct_DLLWRAP+set}" = set; then
6700   $as_echo_n "(cached) " >&6
6701 else
6702   if test -n "$ac_ct_DLLWRAP"; then
6703   ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6704 else
6705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6706 for as_dir in $PATH
6707 do
6708   IFS=$as_save_IFS
6709   test -z "$as_dir" && as_dir=.
6710   for ac_exec_ext in '' $ac_executable_extensions; do
6711   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6712     ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6713     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6714     break 2
6715   fi
6716 done
6717 done
6718 IFS=$as_save_IFS
6719
6720 fi
6721 fi
6722 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
6723 if test -n "$ac_ct_DLLWRAP"; then
6724   { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLWRAP" >&5
6725 $as_echo "$ac_ct_DLLWRAP" >&6; }
6726 else
6727   { $as_echo "$as_me:$LINENO: result: no" >&5
6728 $as_echo "no" >&6; }
6729 fi
6730
6731   if test "x$ac_ct_DLLWRAP" = x; then
6732     DLLWRAP="dllwrap"
6733   else
6734     case $cross_compiling:$ac_tool_warned in
6735 yes:)
6736 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6737 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6738 ac_tool_warned=yes ;;
6739 esac
6740     DLLWRAP=$ac_ct_DLLWRAP
6741   fi
6742 else
6743   DLLWRAP="$ac_cv_prog_DLLWRAP"
6744 fi
6745
6746   if test -n "$ac_tool_prefix"; then
6747   # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6748 set dummy ${ac_tool_prefix}windres; ac_word=$2
6749 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6750 $as_echo_n "checking for $ac_word... " >&6; }
6751 if test "${ac_cv_prog_WINDRES+set}" = set; then
6752   $as_echo_n "(cached) " >&6
6753 else
6754   if test -n "$WINDRES"; then
6755   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
6756 else
6757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6758 for as_dir in $PATH
6759 do
6760   IFS=$as_save_IFS
6761   test -z "$as_dir" && as_dir=.
6762   for ac_exec_ext in '' $ac_executable_extensions; do
6763   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6764     ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
6765     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6766     break 2
6767   fi
6768 done
6769 done
6770 IFS=$as_save_IFS
6771
6772 fi
6773 fi
6774 WINDRES=$ac_cv_prog_WINDRES
6775 if test -n "$WINDRES"; then
6776   { $as_echo "$as_me:$LINENO: result: $WINDRES" >&5
6777 $as_echo "$WINDRES" >&6; }
6778 else
6779   { $as_echo "$as_me:$LINENO: result: no" >&5
6780 $as_echo "no" >&6; }
6781 fi
6782
6783
6784 fi
6785 if test -z "$ac_cv_prog_WINDRES"; then
6786   ac_ct_WINDRES=$WINDRES
6787   # Extract the first word of "windres", so it can be a program name with args.
6788 set dummy windres; ac_word=$2
6789 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6790 $as_echo_n "checking for $ac_word... " >&6; }
6791 if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
6792   $as_echo_n "(cached) " >&6
6793 else
6794   if test -n "$ac_ct_WINDRES"; then
6795   ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
6796 else
6797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6798 for as_dir in $PATH
6799 do
6800   IFS=$as_save_IFS
6801   test -z "$as_dir" && as_dir=.
6802   for ac_exec_ext in '' $ac_executable_extensions; do
6803   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6804     ac_cv_prog_ac_ct_WINDRES="windres"
6805     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6806     break 2
6807   fi
6808 done
6809 done
6810 IFS=$as_save_IFS
6811
6812 fi
6813 fi
6814 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
6815 if test -n "$ac_ct_WINDRES"; then
6816   { $as_echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
6817 $as_echo "$ac_ct_WINDRES" >&6; }
6818 else
6819   { $as_echo "$as_me:$LINENO: result: no" >&5
6820 $as_echo "no" >&6; }
6821 fi
6822
6823   if test "x$ac_ct_WINDRES" = x; then
6824     WINDRES="windres"
6825   else
6826     case $cross_compiling:$ac_tool_warned in
6827 yes:)
6828 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
6829 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6830 ac_tool_warned=yes ;;
6831 esac
6832     WINDRES=$ac_ct_WINDRES
6833   fi
6834 else
6835   WINDRES="$ac_cv_prog_WINDRES"
6836 fi
6837
6838 fi
6839
6840 # Find a good install program.  We prefer a C program (faster),
6841 # so one script is as good as another.  But avoid the broken or
6842 # incompatible versions:
6843 # SysV /etc/install, /usr/sbin/install
6844 # SunOS /usr/etc/install
6845 # IRIX /sbin/install
6846 # AIX /bin/install
6847 # AmigaOS /C/install, which installs bootblocks on floppy discs
6848 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6849 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6850 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6851 # OS/2's system install, which has a completely different semantic
6852 # ./install, which can be erroneously created by make from ./install.sh.
6853 # Reject install programs that cannot install multiple files.
6854 { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
6855 $as_echo_n "checking for a BSD-compatible install... " >&6; }
6856 if test -z "$INSTALL"; then
6857 if test "${ac_cv_path_install+set}" = set; then
6858   $as_echo_n "(cached) " >&6
6859 else
6860   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6861 for as_dir in $PATH
6862 do
6863   IFS=$as_save_IFS
6864   test -z "$as_dir" && as_dir=.
6865   # Account for people who put trailing slashes in PATH elements.
6866 case $as_dir/ in
6867   ./ | .// | /cC/* | \
6868   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6869   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
6870   /usr/ucb/* ) ;;
6871   *)
6872     # OSF1 and SCO ODT 3.0 have their own names for install.
6873     # Don't use installbsd from OSF since it installs stuff as root
6874     # by default.
6875     for ac_prog in ginstall scoinst install; do
6876       for ac_exec_ext in '' $ac_executable_extensions; do
6877         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
6878           if test $ac_prog = install &&
6879             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6880             # AIX install.  It has an incompatible calling convention.
6881             :
6882           elif test $ac_prog = install &&
6883             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6884             # program-specific install script used by HP pwplus--don't use.
6885             :
6886           else
6887             rm -rf conftest.one conftest.two conftest.dir
6888             echo one > conftest.one
6889             echo two > conftest.two
6890             mkdir conftest.dir
6891             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6892               test -s conftest.one && test -s conftest.two &&
6893               test -s conftest.dir/conftest.one &&
6894               test -s conftest.dir/conftest.two
6895             then
6896               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6897               break 3
6898             fi
6899           fi
6900         fi
6901       done
6902     done
6903     ;;
6904 esac
6905
6906 done
6907 IFS=$as_save_IFS
6908
6909 rm -rf conftest.one conftest.two conftest.dir
6910
6911 fi
6912   if test "${ac_cv_path_install+set}" = set; then
6913     INSTALL=$ac_cv_path_install
6914   else
6915     # As a last resort, use the slow shell script.  Don't cache a
6916     # value for INSTALL within a source directory, because that will
6917     # break other packages using the cache if that directory is
6918     # removed, or if the value is a relative name.
6919     INSTALL=$ac_install_sh
6920   fi
6921 fi
6922 { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
6923 $as_echo "$INSTALL" >&6; }
6924
6925 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6926 # It thinks the first close brace ends the variable substitution.
6927 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6928
6929 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6930
6931 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6932
6933 # When Autoconf chooses install-sh as install program it tries to generate
6934 # a relative path to it in each makefile where it subsitutes it. This clashes
6935 # with our Makefile.global concept. This workaround helps.
6936 case $INSTALL in
6937   *install-sh*) install_bin='';;
6938   *) install_bin=$INSTALL;;
6939 esac
6940
6941
6942 # Extract the first word of "tar", so it can be a program name with args.
6943 set dummy tar; ac_word=$2
6944 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6945 $as_echo_n "checking for $ac_word... " >&6; }
6946 if test "${ac_cv_path_TAR+set}" = set; then
6947   $as_echo_n "(cached) " >&6
6948 else
6949   case $TAR in
6950   [\\/]* | ?:[\\/]*)
6951   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
6952   ;;
6953   *)
6954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6955 for as_dir in $PATH
6956 do
6957   IFS=$as_save_IFS
6958   test -z "$as_dir" && as_dir=.
6959   for ac_exec_ext in '' $ac_executable_extensions; do
6960   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6961     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
6962     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6963     break 2
6964   fi
6965 done
6966 done
6967 IFS=$as_save_IFS
6968
6969   ;;
6970 esac
6971 fi
6972 TAR=$ac_cv_path_TAR
6973 if test -n "$TAR"; then
6974   { $as_echo "$as_me:$LINENO: result: $TAR" >&5
6975 $as_echo "$TAR" >&6; }
6976 else
6977   { $as_echo "$as_me:$LINENO: result: no" >&5
6978 $as_echo "no" >&6; }
6979 fi
6980
6981
6982 { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
6983 $as_echo_n "checking whether ln -s works... " >&6; }
6984 LN_S=$as_ln_s
6985 if test "$LN_S" = "ln -s"; then
6986   { $as_echo "$as_me:$LINENO: result: yes" >&5
6987 $as_echo "yes" >&6; }
6988 else
6989   { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
6990 $as_echo "no, using $LN_S" >&6; }
6991 fi
6992
6993 for ac_prog in gawk mawk nawk awk
6994 do
6995   # Extract the first word of "$ac_prog", so it can be a program name with args.
6996 set dummy $ac_prog; ac_word=$2
6997 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6998 $as_echo_n "checking for $ac_word... " >&6; }
6999 if test "${ac_cv_prog_AWK+set}" = set; then
7000   $as_echo_n "(cached) " >&6
7001 else
7002   if test -n "$AWK"; then
7003   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7004 else
7005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7006 for as_dir in $PATH
7007 do
7008   IFS=$as_save_IFS
7009   test -z "$as_dir" && as_dir=.
7010   for ac_exec_ext in '' $ac_executable_extensions; do
7011   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7012     ac_cv_prog_AWK="$ac_prog"
7013     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7014     break 2
7015   fi
7016 done
7017 done
7018 IFS=$as_save_IFS
7019
7020 fi
7021 fi
7022 AWK=$ac_cv_prog_AWK
7023 if test -n "$AWK"; then
7024   { $as_echo "$as_me:$LINENO: result: $AWK" >&5
7025 $as_echo "$AWK" >&6; }
7026 else
7027   { $as_echo "$as_me:$LINENO: result: no" >&5
7028 $as_echo "no" >&6; }
7029 fi
7030
7031
7032   test -n "$AWK" && break
7033 done
7034
7035 { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
7036 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7037 if test -z "$MKDIR_P"; then
7038   if test "${ac_cv_path_mkdir+set}" = set; then
7039   $as_echo_n "(cached) " >&6
7040 else
7041   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7042 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7043 do
7044   IFS=$as_save_IFS
7045   test -z "$as_dir" && as_dir=.
7046   for ac_prog in mkdir gmkdir; do
7047          for ac_exec_ext in '' $ac_executable_extensions; do
7048            { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
7049            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7050              'mkdir (GNU coreutils) '* | \
7051              'mkdir (coreutils) '* | \
7052              'mkdir (fileutils) '4.1*)
7053                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7054                break 3;;
7055            esac
7056          done
7057        done
7058 done
7059 IFS=$as_save_IFS
7060
7061 fi
7062
7063   if test "${ac_cv_path_mkdir+set}" = set; then
7064     MKDIR_P="$ac_cv_path_mkdir -p"
7065   else
7066     # As a last resort, use the slow shell script.  Don't cache a
7067     # value for MKDIR_P within a source directory, because that will
7068     # break other packages using the cache if that directory is
7069     # removed, or if the value is a relative name.
7070     test -d ./--version && rmdir ./--version
7071     MKDIR_P="$ac_install_sh -d"
7072   fi
7073 fi
7074 { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
7075 $as_echo "$MKDIR_P" >&6; }
7076
7077 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7078 # a relative path to it in each makefile where it subsitutes it. This clashes
7079 # with our Makefile.global concept. This workaround helps.
7080 case $MKDIR_P in
7081   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7082 esac
7083
7084 # Let the user override the search
7085 if test -z "$BISON"; then
7086   for ac_prog in bison
7087 do
7088   # Extract the first word of "$ac_prog", so it can be a program name with args.
7089 set dummy $ac_prog; ac_word=$2
7090 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7091 $as_echo_n "checking for $ac_word... " >&6; }
7092 if test "${ac_cv_path_BISON+set}" = set; then
7093   $as_echo_n "(cached) " >&6
7094 else
7095   case $BISON in
7096   [\\/]* | ?:[\\/]*)
7097   ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7098   ;;
7099   *)
7100   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7101 for as_dir in $PATH
7102 do
7103   IFS=$as_save_IFS
7104   test -z "$as_dir" && as_dir=.
7105   for ac_exec_ext in '' $ac_executable_extensions; do
7106   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7107     ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7108     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7109     break 2
7110   fi
7111 done
7112 done
7113 IFS=$as_save_IFS
7114
7115   ;;
7116 esac
7117 fi
7118 BISON=$ac_cv_path_BISON
7119 if test -n "$BISON"; then
7120   { $as_echo "$as_me:$LINENO: result: $BISON" >&5
7121 $as_echo "$BISON" >&6; }
7122 else
7123   { $as_echo "$as_me:$LINENO: result: no" >&5
7124 $as_echo "no" >&6; }
7125 fi
7126
7127
7128   test -n "$BISON" && break
7129 done
7130
7131 fi
7132
7133 if test "$BISON"; then
7134   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7135   { $as_echo "$as_me:$LINENO: using $pgac_bison_version" >&5
7136 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7137   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7138   then
7139     { $as_echo "$as_me:$LINENO: WARNING:
7140 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7141 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7142 $as_echo "$as_me: WARNING:
7143 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7144 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7145     BISON=""
7146   fi
7147 fi
7148
7149 if test -z "$BISON"; then
7150   { $as_echo "$as_me:$LINENO: WARNING:
7151 *** Without Bison you will not be able to build PostgreSQL from Git nor
7152 *** change any of the parser definition files.  You can obtain Bison from
7153 *** a GNU mirror site.  (If you are using the official distribution of
7154 *** PostgreSQL then you do not need to worry about this, because the Bison
7155 *** output is pre-generated.)" >&5
7156 $as_echo "$as_me: WARNING:
7157 *** Without Bison you will not be able to build PostgreSQL from Git nor
7158 *** change any of the parser definition files.  You can obtain Bison from
7159 *** a GNU mirror site.  (If you are using the official distribution of
7160 *** PostgreSQL then you do not need to worry about this, because the Bison
7161 *** output is pre-generated.)" >&2;}
7162 fi
7163 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7164
7165
7166 { $as_echo "$as_me:$LINENO: checking for flex" >&5
7167 $as_echo_n "checking for flex... " >&6; }
7168 if test "${pgac_cv_path_flex+set}" = set; then
7169   $as_echo_n "(cached) " >&6
7170 else
7171   # Let the user override the test
7172 if test -n "$FLEX"; then
7173   pgac_cv_path_flex=$FLEX
7174 else
7175   pgac_save_IFS=$IFS
7176   IFS=$PATH_SEPARATOR
7177   for pgac_dir in $PATH; do
7178     IFS=$pgac_save_IFS
7179     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7180       pgac_dir=`pwd`
7181     fi
7182     for pgac_prog in flex lex; do
7183       pgac_candidate="$pgac_dir/$pgac_prog"
7184       if test -f "$pgac_candidate" \
7185         && $pgac_candidate --version </dev/null >/dev/null 2>&1
7186       then
7187         echo '%%'  > conftest.l
7188         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7189           pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7190           if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 = 2 && $2 = 5 && $3 >= 31) exit 0; else exit 1;}'
7191           then
7192             pgac_cv_path_flex=$pgac_candidate
7193             break 2
7194           else
7195             { $as_echo "$as_me:$LINENO: WARNING:
7196 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7197 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7198 $as_echo "$as_me: WARNING:
7199 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7200 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7201           fi
7202         fi
7203       fi
7204     done
7205   done
7206   rm -f conftest.l lex.yy.c
7207   : ${pgac_cv_path_flex=no}
7208 fi
7209
7210 fi
7211 { $as_echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
7212 $as_echo "$pgac_cv_path_flex" >&6; }
7213 if test x"$pgac_cv_path_flex" = x"no"; then
7214   { $as_echo "$as_me:$LINENO: WARNING:
7215 *** Without Flex you will not be able to build PostgreSQL from Git nor
7216 *** change any of the scanner definition files.  You can obtain Flex from
7217 *** a GNU mirror site.  (If you are using the official distribution of
7218 *** PostgreSQL then you do not need to worry about this because the Flex
7219 *** output is pre-generated.)" >&5
7220 $as_echo "$as_me: WARNING:
7221 *** Without Flex you will not be able to build PostgreSQL from Git nor
7222 *** change any of the scanner definition files.  You can obtain Flex from
7223 *** a GNU mirror site.  (If you are using the official distribution of
7224 *** PostgreSQL then you do not need to worry about this because the Flex
7225 *** output is pre-generated.)" >&2;}
7226
7227   FLEX=
7228 else
7229   FLEX=$pgac_cv_path_flex
7230   pgac_flex_version=`$FLEX --version 2>/dev/null`
7231   { $as_echo "$as_me:$LINENO: using $pgac_flex_version" >&5
7232 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7233 fi
7234
7235
7236
7237
7238
7239 # Let the user override the search
7240 if test -z "$PERL"; then
7241   # Extract the first word of "perl", so it can be a program name with args.
7242 set dummy perl; ac_word=$2
7243 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7244 $as_echo_n "checking for $ac_word... " >&6; }
7245 if test "${ac_cv_path_PERL+set}" = set; then
7246   $as_echo_n "(cached) " >&6
7247 else
7248   case $PERL in
7249   [\\/]* | ?:[\\/]*)
7250   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7251   ;;
7252   *)
7253   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7254 for as_dir in $PATH
7255 do
7256   IFS=$as_save_IFS
7257   test -z "$as_dir" && as_dir=.
7258   for ac_exec_ext in '' $ac_executable_extensions; do
7259   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7260     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7261     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7262     break 2
7263   fi
7264 done
7265 done
7266 IFS=$as_save_IFS
7267
7268   ;;
7269 esac
7270 fi
7271 PERL=$ac_cv_path_PERL
7272 if test -n "$PERL"; then
7273   { $as_echo "$as_me:$LINENO: result: $PERL" >&5
7274 $as_echo "$PERL" >&6; }
7275 else
7276   { $as_echo "$as_me:$LINENO: result: no" >&5
7277 $as_echo "no" >&6; }
7278 fi
7279
7280
7281 fi
7282
7283 if test "$PERL"; then
7284   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'`
7285   { $as_echo "$as_me:$LINENO: using perl $pgac_perl_version" >&5
7286 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7287   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7288     $AWK '{ if ($1 = 5 && $2 >= 8) exit 1; else exit 0;}'
7289   then
7290     { $as_echo "$as_me:$LINENO: WARNING:
7291 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7292 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7293 $as_echo "$as_me: WARNING:
7294 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7295 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7296     PERL=""
7297   fi
7298 fi
7299
7300 if test -z "$PERL"; then
7301   { $as_echo "$as_me:$LINENO: WARNING:
7302 *** Without Perl you will not be able to build PostgreSQL from Git.
7303 *** You can obtain Perl from any CPAN mirror site.
7304 *** (If you are using the official distribution of PostgreSQL then you do not
7305 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7306 $as_echo "$as_me: WARNING:
7307 *** Without Perl you will not be able to build PostgreSQL from Git.
7308 *** You can obtain Perl from any CPAN mirror site.
7309 *** (If you are using the official distribution of PostgreSQL then you do not
7310 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7311 fi
7312
7313 if test "$with_perl" = yes; then
7314   if test -z "$PERL"; then
7315     { { $as_echo "$as_me:$LINENO: error: Perl not found" >&5
7316 $as_echo "$as_me: error: Perl not found" >&2;}
7317    { (exit 1); exit 1; }; }
7318   fi
7319
7320 { $as_echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
7321 $as_echo_n "checking for Perl archlibexp... " >&6; }
7322 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7323 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7324 { $as_echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
7325 $as_echo "$perl_archlibexp" >&6; }
7326 { $as_echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
7327 $as_echo_n "checking for Perl privlibexp... " >&6; }
7328 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7329 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7330 { $as_echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
7331 $as_echo "$perl_privlibexp" >&6; }
7332 { $as_echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
7333 $as_echo_n "checking for Perl useshrplib... " >&6; }
7334 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7335 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7336 { $as_echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
7337 $as_echo "$perl_useshrplib" >&6; }
7338
7339 { $as_echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
7340 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7341 if test "$PORTNAME" = "win32" ; then
7342 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7343 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7344 else
7345 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7346 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7347 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7348 fi
7349 if test -z "$perl_embed_ldflags" ; then
7350         { $as_echo "$as_me:$LINENO: result: no" >&5
7351 $as_echo "no" >&6; }
7352         { { $as_echo "$as_me:$LINENO: error: could not determine flags for linking embedded Perl.
7353 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7354 installed." >&5
7355 $as_echo "$as_me: error: could not determine flags for linking embedded Perl.
7356 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7357 installed." >&2;}
7358    { (exit 1); exit 1; }; }
7359 else
7360         { $as_echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
7361 $as_echo "$perl_embed_ldflags" >&6; }
7362 fi
7363
7364 fi
7365
7366 if test "$with_python" = yes; then
7367   # Extract the first word of "python", so it can be a program name with args.
7368 set dummy python; ac_word=$2
7369 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7370 $as_echo_n "checking for $ac_word... " >&6; }
7371 if test "${ac_cv_path_PYTHON+set}" = set; then
7372   $as_echo_n "(cached) " >&6
7373 else
7374   case $PYTHON in
7375   [\\/]* | ?:[\\/]*)
7376   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7377   ;;
7378   *)
7379   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7380 for as_dir in $PATH
7381 do
7382   IFS=$as_save_IFS
7383   test -z "$as_dir" && as_dir=.
7384   for ac_exec_ext in '' $ac_executable_extensions; do
7385   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7386     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7387     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7388     break 2
7389   fi
7390 done
7391 done
7392 IFS=$as_save_IFS
7393
7394   ;;
7395 esac
7396 fi
7397 PYTHON=$ac_cv_path_PYTHON
7398 if test -n "$PYTHON"; then
7399   { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5
7400 $as_echo "$PYTHON" >&6; }
7401 else
7402   { $as_echo "$as_me:$LINENO: result: no" >&5
7403 $as_echo "no" >&6; }
7404 fi
7405
7406
7407 if test x"$PYTHON" = x""; then
7408   { { $as_echo "$as_me:$LINENO: error: Python not found" >&5
7409 $as_echo "$as_me: error: Python not found" >&2;}
7410    { (exit 1); exit 1; }; }
7411 fi
7412
7413
7414 { $as_echo "$as_me:$LINENO: checking for Python distutils module" >&5
7415 $as_echo_n "checking for Python distutils module... " >&6; }
7416 if "${PYTHON}" -c 'import distutils' 2>&5
7417 then
7418     { $as_echo "$as_me:$LINENO: result: yes" >&5
7419 $as_echo "yes" >&6; }
7420 else
7421     { $as_echo "$as_me:$LINENO: result: no" >&5
7422 $as_echo "no" >&6; }
7423     { { $as_echo "$as_me:$LINENO: error: distutils module not found" >&5
7424 $as_echo "$as_me: error: distutils module not found" >&2;}
7425    { (exit 1); exit 1; }; }
7426 fi
7427 { $as_echo "$as_me:$LINENO: checking Python configuration directory" >&5
7428 $as_echo_n "checking Python configuration directory... " >&6; }
7429 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7430 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7431 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7432 { $as_echo "$as_me:$LINENO: result: $python_configdir" >&5
7433 $as_echo "$python_configdir" >&6; }
7434
7435 { $as_echo "$as_me:$LINENO: checking Python include directories" >&5
7436 $as_echo_n "checking Python include directories... " >&6; }
7437 python_includespec=`${PYTHON} -c "
7438 import distutils.sysconfig
7439 a = '-I' + distutils.sysconfig.get_python_inc(False)
7440 b = '-I' + distutils.sysconfig.get_python_inc(True)
7441 if a == b:
7442     print(a)
7443 else:
7444     print(a + ' ' + b)"`
7445 { $as_echo "$as_me:$LINENO: result: $python_includespec" >&5
7446 $as_echo "$python_includespec" >&6; }
7447
7448
7449
7450 { $as_echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
7451 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7452
7453 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7454 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7455 python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7456 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7457 python_framework=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('PYTHONFRAMEWORK'))))"`
7458 python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7459
7460 if test -n "$python_framework"; then
7461         python_frameworkprefix=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('PYTHONFRAMEWORKPREFIX'))))"`
7462         python_libspec="-F${python_frameworkprefix} -framework $python_framework"
7463         python_enable_shared=1
7464 elif test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7465 then
7466         # New way: use the official shared library
7467         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7468         python_libspec="-L${python_libdir} -l${ldlibrary}"
7469 else
7470         # Old way: use libpython from python_configdir
7471         python_libdir="${python_configdir}"
7472         # LDVERSION was introduced in Python 3.2.
7473         python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7474         if test x"${python_ldversion}" = x""; then
7475                 python_ldversion=$python_version
7476         fi
7477         python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7478 fi
7479
7480 if test -z "$python_framework"; then
7481         python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7482 fi
7483
7484 { $as_echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
7485 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7486
7487
7488 # threaded python is not supported on OpenBSD
7489 { $as_echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
7490 $as_echo_n "checking whether Python is compiled with thread support... " >&6; }
7491 pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"`
7492 if test "$pythreads" = "1"; then
7493   { $as_echo "$as_me:$LINENO: result: yes" >&5
7494 $as_echo "yes" >&6; }
7495   case $host_os in
7496   openbsd*)
7497     { { $as_echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
7498 $as_echo "$as_me: error: threaded Python not supported on this platform" >&2;}
7499    { (exit 1); exit 1; }; }
7500     ;;
7501   esac
7502 else
7503   { $as_echo "$as_me:$LINENO: result: no" >&5
7504 $as_echo "no" >&6; }
7505 fi
7506
7507
7508 fi
7509
7510 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7511   # Extract the first word of "zic", so it can be a program name with args.
7512 set dummy zic; ac_word=$2
7513 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7514 $as_echo_n "checking for $ac_word... " >&6; }
7515 if test "${ac_cv_path_ZIC+set}" = set; then
7516   $as_echo_n "(cached) " >&6
7517 else
7518   case $ZIC in
7519   [\\/]* | ?:[\\/]*)
7520   ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7521   ;;
7522   *)
7523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7524 for as_dir in $PATH
7525 do
7526   IFS=$as_save_IFS
7527   test -z "$as_dir" && as_dir=.
7528   for ac_exec_ext in '' $ac_executable_extensions; do
7529   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7530     ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7531     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7532     break 2
7533   fi
7534 done
7535 done
7536 IFS=$as_save_IFS
7537
7538   ;;
7539 esac
7540 fi
7541 ZIC=$ac_cv_path_ZIC
7542 if test -n "$ZIC"; then
7543   { $as_echo "$as_me:$LINENO: result: $ZIC" >&5
7544 $as_echo "$ZIC" >&6; }
7545 else
7546   { $as_echo "$as_me:$LINENO: result: no" >&5
7547 $as_echo "no" >&6; }
7548 fi
7549
7550
7551   if test -z "$ZIC"; then
7552     { { $as_echo "$as_me:$LINENO: error:
7553 When cross-compiling, either use the option --with-system-tzdata to use
7554 existing time-zone data, or set the environment variable ZIC to a zic
7555 program to use during the build." >&5
7556 $as_echo "$as_me: error:
7557 When cross-compiling, either use the option --with-system-tzdata to use
7558 existing time-zone data, or set the environment variable ZIC to a zic
7559 program to use during the build." >&2;}
7560    { (exit 1); exit 1; }; }
7561   fi
7562 fi
7563
7564
7565 ##
7566 ## Libraries
7567 ##
7568 ## Most libraries are included only if they demonstrably provide a function
7569 ## we need, but libm is an exception: always include it, because there are
7570 ## too many compilers that play cute optimization games that will break
7571 ## probes for standard functions such as pow().
7572 ##
7573
7574
7575 { $as_echo "$as_me:$LINENO: checking for main in -lm" >&5
7576 $as_echo_n "checking for main in -lm... " >&6; }
7577 if test "${ac_cv_lib_m_main+set}" = set; then
7578   $as_echo_n "(cached) " >&6
7579 else
7580   ac_check_lib_save_LIBS=$LIBS
7581 LIBS="-lm  $LIBS"
7582 cat >conftest.$ac_ext <<_ACEOF
7583 /* confdefs.h.  */
7584 _ACEOF
7585 cat confdefs.h >>conftest.$ac_ext
7586 cat >>conftest.$ac_ext <<_ACEOF
7587 /* end confdefs.h.  */
7588
7589
7590 int
7591 main ()
7592 {
7593 return main ();
7594   ;
7595   return 0;
7596 }
7597 _ACEOF
7598 rm -f conftest.$ac_objext conftest$ac_exeext
7599 if { (ac_try="$ac_link"
7600 case "(($ac_try" in
7601   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7602   *) ac_try_echo=$ac_try;;
7603 esac
7604 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7605 $as_echo "$ac_try_echo") >&5
7606   (eval "$ac_link") 2>conftest.er1
7607   ac_status=$?
7608   grep -v '^ *+' conftest.er1 >conftest.err
7609   rm -f conftest.er1
7610   cat conftest.err >&5
7611   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7612   (exit $ac_status); } && {
7613          test -z "$ac_c_werror_flag" ||
7614          test ! -s conftest.err
7615        } && test -s conftest$ac_exeext && {
7616          test "$cross_compiling" = yes ||
7617          $as_test_x conftest$ac_exeext
7618        }; then
7619   ac_cv_lib_m_main=yes
7620 else
7621   $as_echo "$as_me: failed program was:" >&5
7622 sed 's/^/| /' conftest.$ac_ext >&5
7623
7624         ac_cv_lib_m_main=no
7625 fi
7626
7627 rm -rf conftest.dSYM
7628 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7629       conftest$ac_exeext conftest.$ac_ext
7630 LIBS=$ac_check_lib_save_LIBS
7631 fi
7632 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
7633 $as_echo "$ac_cv_lib_m_main" >&6; }
7634 if test "x$ac_cv_lib_m_main" = x""yes; then
7635   cat >>confdefs.h <<_ACEOF
7636 #define HAVE_LIBM 1
7637 _ACEOF
7638
7639   LIBS="-lm $LIBS"
7640
7641 fi
7642
7643 { $as_echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
7644 $as_echo_n "checking for library containing setproctitle... " >&6; }
7645 if test "${ac_cv_search_setproctitle+set}" = set; then
7646   $as_echo_n "(cached) " >&6
7647 else
7648   ac_func_search_save_LIBS=$LIBS
7649 cat >conftest.$ac_ext <<_ACEOF
7650 /* confdefs.h.  */
7651 _ACEOF
7652 cat confdefs.h >>conftest.$ac_ext
7653 cat >>conftest.$ac_ext <<_ACEOF
7654 /* end confdefs.h.  */
7655
7656 /* Override any GCC internal prototype to avoid an error.
7657    Use char because int might match the return type of a GCC
7658    builtin and then its argument prototype would still apply.  */
7659 #ifdef __cplusplus
7660 extern "C"
7661 #endif
7662 char setproctitle ();
7663 int
7664 main ()
7665 {
7666 return setproctitle ();
7667   ;
7668   return 0;
7669 }
7670 _ACEOF
7671 for ac_lib in '' util; do
7672   if test -z "$ac_lib"; then
7673     ac_res="none required"
7674   else
7675     ac_res=-l$ac_lib
7676     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7677   fi
7678   rm -f conftest.$ac_objext conftest$ac_exeext
7679 if { (ac_try="$ac_link"
7680 case "(($ac_try" in
7681   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7682   *) ac_try_echo=$ac_try;;
7683 esac
7684 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7685 $as_echo "$ac_try_echo") >&5
7686   (eval "$ac_link") 2>conftest.er1
7687   ac_status=$?
7688   grep -v '^ *+' conftest.er1 >conftest.err
7689   rm -f conftest.er1
7690   cat conftest.err >&5
7691   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7692   (exit $ac_status); } && {
7693          test -z "$ac_c_werror_flag" ||
7694          test ! -s conftest.err
7695        } && test -s conftest$ac_exeext && {
7696          test "$cross_compiling" = yes ||
7697          $as_test_x conftest$ac_exeext
7698        }; then
7699   ac_cv_search_setproctitle=$ac_res
7700 else
7701   $as_echo "$as_me: failed program was:" >&5
7702 sed 's/^/| /' conftest.$ac_ext >&5
7703
7704
7705 fi
7706
7707 rm -rf conftest.dSYM
7708 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7709       conftest$ac_exeext
7710   if test "${ac_cv_search_setproctitle+set}" = set; then
7711   break
7712 fi
7713 done
7714 if test "${ac_cv_search_setproctitle+set}" = set; then
7715   :
7716 else
7717   ac_cv_search_setproctitle=no
7718 fi
7719 rm conftest.$ac_ext
7720 LIBS=$ac_func_search_save_LIBS
7721 fi
7722 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
7723 $as_echo "$ac_cv_search_setproctitle" >&6; }
7724 ac_res=$ac_cv_search_setproctitle
7725 if test "$ac_res" != no; then
7726   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7727
7728 fi
7729
7730 { $as_echo "$as_me:$LINENO: checking for library containing dlopen" >&5
7731 $as_echo_n "checking for library containing dlopen... " >&6; }
7732 if test "${ac_cv_search_dlopen+set}" = set; then
7733   $as_echo_n "(cached) " >&6
7734 else
7735   ac_func_search_save_LIBS=$LIBS
7736 cat >conftest.$ac_ext <<_ACEOF
7737 /* confdefs.h.  */
7738 _ACEOF
7739 cat confdefs.h >>conftest.$ac_ext
7740 cat >>conftest.$ac_ext <<_ACEOF
7741 /* end confdefs.h.  */
7742
7743 /* Override any GCC internal prototype to avoid an error.
7744    Use char because int might match the return type of a GCC
7745    builtin and then its argument prototype would still apply.  */
7746 #ifdef __cplusplus
7747 extern "C"
7748 #endif
7749 char dlopen ();
7750 int
7751 main ()
7752 {
7753 return dlopen ();
7754   ;
7755   return 0;
7756 }
7757 _ACEOF
7758 for ac_lib in '' dl; do
7759   if test -z "$ac_lib"; then
7760     ac_res="none required"
7761   else
7762     ac_res=-l$ac_lib
7763     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7764   fi
7765   rm -f conftest.$ac_objext conftest$ac_exeext
7766 if { (ac_try="$ac_link"
7767 case "(($ac_try" in
7768   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7769   *) ac_try_echo=$ac_try;;
7770 esac
7771 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7772 $as_echo "$ac_try_echo") >&5
7773   (eval "$ac_link") 2>conftest.er1
7774   ac_status=$?
7775   grep -v '^ *+' conftest.er1 >conftest.err
7776   rm -f conftest.er1
7777   cat conftest.err >&5
7778   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7779   (exit $ac_status); } && {
7780          test -z "$ac_c_werror_flag" ||
7781          test ! -s conftest.err
7782        } && test -s conftest$ac_exeext && {
7783          test "$cross_compiling" = yes ||
7784          $as_test_x conftest$ac_exeext
7785        }; then
7786   ac_cv_search_dlopen=$ac_res
7787 else
7788   $as_echo "$as_me: failed program was:" >&5
7789 sed 's/^/| /' conftest.$ac_ext >&5
7790
7791
7792 fi
7793
7794 rm -rf conftest.dSYM
7795 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7796       conftest$ac_exeext
7797   if test "${ac_cv_search_dlopen+set}" = set; then
7798   break
7799 fi
7800 done
7801 if test "${ac_cv_search_dlopen+set}" = set; then
7802   :
7803 else
7804   ac_cv_search_dlopen=no
7805 fi
7806 rm conftest.$ac_ext
7807 LIBS=$ac_func_search_save_LIBS
7808 fi
7809 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
7810 $as_echo "$ac_cv_search_dlopen" >&6; }
7811 ac_res=$ac_cv_search_dlopen
7812 if test "$ac_res" != no; then
7813   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7814
7815 fi
7816
7817 { $as_echo "$as_me:$LINENO: checking for library containing socket" >&5
7818 $as_echo_n "checking for library containing socket... " >&6; }
7819 if test "${ac_cv_search_socket+set}" = set; then
7820   $as_echo_n "(cached) " >&6
7821 else
7822   ac_func_search_save_LIBS=$LIBS
7823 cat >conftest.$ac_ext <<_ACEOF
7824 /* confdefs.h.  */
7825 _ACEOF
7826 cat confdefs.h >>conftest.$ac_ext
7827 cat >>conftest.$ac_ext <<_ACEOF
7828 /* end confdefs.h.  */
7829
7830 /* Override any GCC internal prototype to avoid an error.
7831    Use char because int might match the return type of a GCC
7832    builtin and then its argument prototype would still apply.  */
7833 #ifdef __cplusplus
7834 extern "C"
7835 #endif
7836 char socket ();
7837 int
7838 main ()
7839 {
7840 return socket ();
7841   ;
7842   return 0;
7843 }
7844 _ACEOF
7845 for ac_lib in '' socket wsock32; do
7846   if test -z "$ac_lib"; then
7847     ac_res="none required"
7848   else
7849     ac_res=-l$ac_lib
7850     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7851   fi
7852   rm -f conftest.$ac_objext conftest$ac_exeext
7853 if { (ac_try="$ac_link"
7854 case "(($ac_try" in
7855   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7856   *) ac_try_echo=$ac_try;;
7857 esac
7858 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7859 $as_echo "$ac_try_echo") >&5
7860   (eval "$ac_link") 2>conftest.er1
7861   ac_status=$?
7862   grep -v '^ *+' conftest.er1 >conftest.err
7863   rm -f conftest.er1
7864   cat conftest.err >&5
7865   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7866   (exit $ac_status); } && {
7867          test -z "$ac_c_werror_flag" ||
7868          test ! -s conftest.err
7869        } && test -s conftest$ac_exeext && {
7870          test "$cross_compiling" = yes ||
7871          $as_test_x conftest$ac_exeext
7872        }; then
7873   ac_cv_search_socket=$ac_res
7874 else
7875   $as_echo "$as_me: failed program was:" >&5
7876 sed 's/^/| /' conftest.$ac_ext >&5
7877
7878
7879 fi
7880
7881 rm -rf conftest.dSYM
7882 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7883       conftest$ac_exeext
7884   if test "${ac_cv_search_socket+set}" = set; then
7885   break
7886 fi
7887 done
7888 if test "${ac_cv_search_socket+set}" = set; then
7889   :
7890 else
7891   ac_cv_search_socket=no
7892 fi
7893 rm conftest.$ac_ext
7894 LIBS=$ac_func_search_save_LIBS
7895 fi
7896 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
7897 $as_echo "$ac_cv_search_socket" >&6; }
7898 ac_res=$ac_cv_search_socket
7899 if test "$ac_res" != no; then
7900   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7901
7902 fi
7903
7904 { $as_echo "$as_me:$LINENO: checking for library containing shl_load" >&5
7905 $as_echo_n "checking for library containing shl_load... " >&6; }
7906 if test "${ac_cv_search_shl_load+set}" = set; then
7907   $as_echo_n "(cached) " >&6
7908 else
7909   ac_func_search_save_LIBS=$LIBS
7910 cat >conftest.$ac_ext <<_ACEOF
7911 /* confdefs.h.  */
7912 _ACEOF
7913 cat confdefs.h >>conftest.$ac_ext
7914 cat >>conftest.$ac_ext <<_ACEOF
7915 /* end confdefs.h.  */
7916
7917 /* Override any GCC internal prototype to avoid an error.
7918    Use char because int might match the return type of a GCC
7919    builtin and then its argument prototype would still apply.  */
7920 #ifdef __cplusplus
7921 extern "C"
7922 #endif
7923 char shl_load ();
7924 int
7925 main ()
7926 {
7927 return shl_load ();
7928   ;
7929   return 0;
7930 }
7931 _ACEOF
7932 for ac_lib in '' dld; do
7933   if test -z "$ac_lib"; then
7934     ac_res="none required"
7935   else
7936     ac_res=-l$ac_lib
7937     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7938   fi
7939   rm -f conftest.$ac_objext conftest$ac_exeext
7940 if { (ac_try="$ac_link"
7941 case "(($ac_try" in
7942   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7943   *) ac_try_echo=$ac_try;;
7944 esac
7945 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7946 $as_echo "$ac_try_echo") >&5
7947   (eval "$ac_link") 2>conftest.er1
7948   ac_status=$?
7949   grep -v '^ *+' conftest.er1 >conftest.err
7950   rm -f conftest.er1
7951   cat conftest.err >&5
7952   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7953   (exit $ac_status); } && {
7954          test -z "$ac_c_werror_flag" ||
7955          test ! -s conftest.err
7956        } && test -s conftest$ac_exeext && {
7957          test "$cross_compiling" = yes ||
7958          $as_test_x conftest$ac_exeext
7959        }; then
7960   ac_cv_search_shl_load=$ac_res
7961 else
7962   $as_echo "$as_me: failed program was:" >&5
7963 sed 's/^/| /' conftest.$ac_ext >&5
7964
7965
7966 fi
7967
7968 rm -rf conftest.dSYM
7969 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7970       conftest$ac_exeext
7971   if test "${ac_cv_search_shl_load+set}" = set; then
7972   break
7973 fi
7974 done
7975 if test "${ac_cv_search_shl_load+set}" = set; then
7976   :
7977 else
7978   ac_cv_search_shl_load=no
7979 fi
7980 rm conftest.$ac_ext
7981 LIBS=$ac_func_search_save_LIBS
7982 fi
7983 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
7984 $as_echo "$ac_cv_search_shl_load" >&6; }
7985 ac_res=$ac_cv_search_shl_load
7986 if test "$ac_res" != no; then
7987   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7988
7989 fi
7990
7991 # We only use libld in port/dynloader/aix.c
7992 case $host_os in
7993      aix*)
7994         { $as_echo "$as_me:$LINENO: checking for library containing ldopen" >&5
7995 $as_echo_n "checking for library containing ldopen... " >&6; }
7996 if test "${ac_cv_search_ldopen+set}" = set; then
7997   $as_echo_n "(cached) " >&6
7998 else
7999   ac_func_search_save_LIBS=$LIBS
8000 cat >conftest.$ac_ext <<_ACEOF
8001 /* confdefs.h.  */
8002 _ACEOF
8003 cat confdefs.h >>conftest.$ac_ext
8004 cat >>conftest.$ac_ext <<_ACEOF
8005 /* end confdefs.h.  */
8006
8007 /* Override any GCC internal prototype to avoid an error.
8008    Use char because int might match the return type of a GCC
8009    builtin and then its argument prototype would still apply.  */
8010 #ifdef __cplusplus
8011 extern "C"
8012 #endif
8013 char ldopen ();
8014 int
8015 main ()
8016 {
8017 return ldopen ();
8018   ;
8019   return 0;
8020 }
8021 _ACEOF
8022 for ac_lib in '' ld; do
8023   if test -z "$ac_lib"; then
8024     ac_res="none required"
8025   else
8026     ac_res=-l$ac_lib
8027     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8028   fi
8029   rm -f conftest.$ac_objext conftest$ac_exeext
8030 if { (ac_try="$ac_link"
8031 case "(($ac_try" in
8032   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8033   *) ac_try_echo=$ac_try;;
8034 esac
8035 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8036 $as_echo "$ac_try_echo") >&5
8037   (eval "$ac_link") 2>conftest.er1
8038   ac_status=$?
8039   grep -v '^ *+' conftest.er1 >conftest.err
8040   rm -f conftest.er1
8041   cat conftest.err >&5
8042   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8043   (exit $ac_status); } && {
8044          test -z "$ac_c_werror_flag" ||
8045          test ! -s conftest.err
8046        } && test -s conftest$ac_exeext && {
8047          test "$cross_compiling" = yes ||
8048          $as_test_x conftest$ac_exeext
8049        }; then
8050   ac_cv_search_ldopen=$ac_res
8051 else
8052   $as_echo "$as_me: failed program was:" >&5
8053 sed 's/^/| /' conftest.$ac_ext >&5
8054
8055
8056 fi
8057
8058 rm -rf conftest.dSYM
8059 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8060       conftest$ac_exeext
8061   if test "${ac_cv_search_ldopen+set}" = set; then
8062   break
8063 fi
8064 done
8065 if test "${ac_cv_search_ldopen+set}" = set; then
8066   :
8067 else
8068   ac_cv_search_ldopen=no
8069 fi
8070 rm conftest.$ac_ext
8071 LIBS=$ac_func_search_save_LIBS
8072 fi
8073 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
8074 $as_echo "$ac_cv_search_ldopen" >&6; }
8075 ac_res=$ac_cv_search_ldopen
8076 if test "$ac_res" != no; then
8077   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8078
8079 fi
8080
8081         ;;
8082 esac
8083 { $as_echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
8084 $as_echo_n "checking for library containing getopt_long... " >&6; }
8085 if test "${ac_cv_search_getopt_long+set}" = set; then
8086   $as_echo_n "(cached) " >&6
8087 else
8088   ac_func_search_save_LIBS=$LIBS
8089 cat >conftest.$ac_ext <<_ACEOF
8090 /* confdefs.h.  */
8091 _ACEOF
8092 cat confdefs.h >>conftest.$ac_ext
8093 cat >>conftest.$ac_ext <<_ACEOF
8094 /* end confdefs.h.  */
8095
8096 /* Override any GCC internal prototype to avoid an error.
8097    Use char because int might match the return type of a GCC
8098    builtin and then its argument prototype would still apply.  */
8099 #ifdef __cplusplus
8100 extern "C"
8101 #endif
8102 char getopt_long ();
8103 int
8104 main ()
8105 {
8106 return getopt_long ();
8107   ;
8108   return 0;
8109 }
8110 _ACEOF
8111 for ac_lib in '' getopt gnugetopt; do
8112   if test -z "$ac_lib"; then
8113     ac_res="none required"
8114   else
8115     ac_res=-l$ac_lib
8116     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8117   fi
8118   rm -f conftest.$ac_objext conftest$ac_exeext
8119 if { (ac_try="$ac_link"
8120 case "(($ac_try" in
8121   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8122   *) ac_try_echo=$ac_try;;
8123 esac
8124 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8125 $as_echo "$ac_try_echo") >&5
8126   (eval "$ac_link") 2>conftest.er1
8127   ac_status=$?
8128   grep -v '^ *+' conftest.er1 >conftest.err
8129   rm -f conftest.er1
8130   cat conftest.err >&5
8131   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8132   (exit $ac_status); } && {
8133          test -z "$ac_c_werror_flag" ||
8134          test ! -s conftest.err
8135        } && test -s conftest$ac_exeext && {
8136          test "$cross_compiling" = yes ||
8137          $as_test_x conftest$ac_exeext
8138        }; then
8139   ac_cv_search_getopt_long=$ac_res
8140 else
8141   $as_echo "$as_me: failed program was:" >&5
8142 sed 's/^/| /' conftest.$ac_ext >&5
8143
8144
8145 fi
8146
8147 rm -rf conftest.dSYM
8148 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8149       conftest$ac_exeext
8150   if test "${ac_cv_search_getopt_long+set}" = set; then
8151   break
8152 fi
8153 done
8154 if test "${ac_cv_search_getopt_long+set}" = set; then
8155   :
8156 else
8157   ac_cv_search_getopt_long=no
8158 fi
8159 rm conftest.$ac_ext
8160 LIBS=$ac_func_search_save_LIBS
8161 fi
8162 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
8163 $as_echo "$ac_cv_search_getopt_long" >&6; }
8164 ac_res=$ac_cv_search_getopt_long
8165 if test "$ac_res" != no; then
8166   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8167
8168 fi
8169
8170 { $as_echo "$as_me:$LINENO: checking for library containing crypt" >&5
8171 $as_echo_n "checking for library containing crypt... " >&6; }
8172 if test "${ac_cv_search_crypt+set}" = set; then
8173   $as_echo_n "(cached) " >&6
8174 else
8175   ac_func_search_save_LIBS=$LIBS
8176 cat >conftest.$ac_ext <<_ACEOF
8177 /* confdefs.h.  */
8178 _ACEOF
8179 cat confdefs.h >>conftest.$ac_ext
8180 cat >>conftest.$ac_ext <<_ACEOF
8181 /* end confdefs.h.  */
8182
8183 /* Override any GCC internal prototype to avoid an error.
8184    Use char because int might match the return type of a GCC
8185    builtin and then its argument prototype would still apply.  */
8186 #ifdef __cplusplus
8187 extern "C"
8188 #endif
8189 char crypt ();
8190 int
8191 main ()
8192 {
8193 return crypt ();
8194   ;
8195   return 0;
8196 }
8197 _ACEOF
8198 for ac_lib in '' crypt; do
8199   if test -z "$ac_lib"; then
8200     ac_res="none required"
8201   else
8202     ac_res=-l$ac_lib
8203     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8204   fi
8205   rm -f conftest.$ac_objext conftest$ac_exeext
8206 if { (ac_try="$ac_link"
8207 case "(($ac_try" in
8208   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8209   *) ac_try_echo=$ac_try;;
8210 esac
8211 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8212 $as_echo "$ac_try_echo") >&5
8213   (eval "$ac_link") 2>conftest.er1
8214   ac_status=$?
8215   grep -v '^ *+' conftest.er1 >conftest.err
8216   rm -f conftest.er1
8217   cat conftest.err >&5
8218   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8219   (exit $ac_status); } && {
8220          test -z "$ac_c_werror_flag" ||
8221          test ! -s conftest.err
8222        } && test -s conftest$ac_exeext && {
8223          test "$cross_compiling" = yes ||
8224          $as_test_x conftest$ac_exeext
8225        }; then
8226   ac_cv_search_crypt=$ac_res
8227 else
8228   $as_echo "$as_me: failed program was:" >&5
8229 sed 's/^/| /' conftest.$ac_ext >&5
8230
8231
8232 fi
8233
8234 rm -rf conftest.dSYM
8235 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8236       conftest$ac_exeext
8237   if test "${ac_cv_search_crypt+set}" = set; then
8238   break
8239 fi
8240 done
8241 if test "${ac_cv_search_crypt+set}" = set; then
8242   :
8243 else
8244   ac_cv_search_crypt=no
8245 fi
8246 rm conftest.$ac_ext
8247 LIBS=$ac_func_search_save_LIBS
8248 fi
8249 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
8250 $as_echo "$ac_cv_search_crypt" >&6; }
8251 ac_res=$ac_cv_search_crypt
8252 if test "$ac_res" != no; then
8253   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8254
8255 fi
8256
8257 # Solaris:
8258 { $as_echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
8259 $as_echo_n "checking for library containing fdatasync... " >&6; }
8260 if test "${ac_cv_search_fdatasync+set}" = set; then
8261   $as_echo_n "(cached) " >&6
8262 else
8263   ac_func_search_save_LIBS=$LIBS
8264 cat >conftest.$ac_ext <<_ACEOF
8265 /* confdefs.h.  */
8266 _ACEOF
8267 cat confdefs.h >>conftest.$ac_ext
8268 cat >>conftest.$ac_ext <<_ACEOF
8269 /* end confdefs.h.  */
8270
8271 /* Override any GCC internal prototype to avoid an error.
8272    Use char because int might match the return type of a GCC
8273    builtin and then its argument prototype would still apply.  */
8274 #ifdef __cplusplus
8275 extern "C"
8276 #endif
8277 char fdatasync ();
8278 int
8279 main ()
8280 {
8281 return fdatasync ();
8282   ;
8283   return 0;
8284 }
8285 _ACEOF
8286 for ac_lib in '' rt posix4; do
8287   if test -z "$ac_lib"; then
8288     ac_res="none required"
8289   else
8290     ac_res=-l$ac_lib
8291     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8292   fi
8293   rm -f conftest.$ac_objext conftest$ac_exeext
8294 if { (ac_try="$ac_link"
8295 case "(($ac_try" in
8296   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8297   *) ac_try_echo=$ac_try;;
8298 esac
8299 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8300 $as_echo "$ac_try_echo") >&5
8301   (eval "$ac_link") 2>conftest.er1
8302   ac_status=$?
8303   grep -v '^ *+' conftest.er1 >conftest.err
8304   rm -f conftest.er1
8305   cat conftest.err >&5
8306   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8307   (exit $ac_status); } && {
8308          test -z "$ac_c_werror_flag" ||
8309          test ! -s conftest.err
8310        } && test -s conftest$ac_exeext && {
8311          test "$cross_compiling" = yes ||
8312          $as_test_x conftest$ac_exeext
8313        }; then
8314   ac_cv_search_fdatasync=$ac_res
8315 else
8316   $as_echo "$as_me: failed program was:" >&5
8317 sed 's/^/| /' conftest.$ac_ext >&5
8318
8319
8320 fi
8321
8322 rm -rf conftest.dSYM
8323 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8324       conftest$ac_exeext
8325   if test "${ac_cv_search_fdatasync+set}" = set; then
8326   break
8327 fi
8328 done
8329 if test "${ac_cv_search_fdatasync+set}" = set; then
8330   :
8331 else
8332   ac_cv_search_fdatasync=no
8333 fi
8334 rm conftest.$ac_ext
8335 LIBS=$ac_func_search_save_LIBS
8336 fi
8337 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
8338 $as_echo "$ac_cv_search_fdatasync" >&6; }
8339 ac_res=$ac_cv_search_fdatasync
8340 if test "$ac_res" != no; then
8341   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8342
8343 fi
8344
8345 # Required for thread_test.c on Solaris 2.5:
8346 # Other ports use it too (HP-UX) so test unconditionally
8347 { $as_echo "$as_me:$LINENO: checking for library containing gethostbyname_r" >&5
8348 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
8349 if test "${ac_cv_search_gethostbyname_r+set}" = set; then
8350   $as_echo_n "(cached) " >&6
8351 else
8352   ac_func_search_save_LIBS=$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 gethostbyname_r ();
8367 int
8368 main ()
8369 {
8370 return gethostbyname_r ();
8371   ;
8372   return 0;
8373 }
8374 _ACEOF
8375 for ac_lib in '' nsl; do
8376   if test -z "$ac_lib"; then
8377     ac_res="none required"
8378   else
8379     ac_res=-l$ac_lib
8380     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8381   fi
8382   rm -f conftest.$ac_objext conftest$ac_exeext
8383 if { (ac_try="$ac_link"
8384 case "(($ac_try" in
8385   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8386   *) ac_try_echo=$ac_try;;
8387 esac
8388 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8389 $as_echo "$ac_try_echo") >&5
8390   (eval "$ac_link") 2>conftest.er1
8391   ac_status=$?
8392   grep -v '^ *+' conftest.er1 >conftest.err
8393   rm -f conftest.er1
8394   cat conftest.err >&5
8395   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8396   (exit $ac_status); } && {
8397          test -z "$ac_c_werror_flag" ||
8398          test ! -s conftest.err
8399        } && test -s conftest$ac_exeext && {
8400          test "$cross_compiling" = yes ||
8401          $as_test_x conftest$ac_exeext
8402        }; then
8403   ac_cv_search_gethostbyname_r=$ac_res
8404 else
8405   $as_echo "$as_me: failed program was:" >&5
8406 sed 's/^/| /' conftest.$ac_ext >&5
8407
8408
8409 fi
8410
8411 rm -rf conftest.dSYM
8412 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8413       conftest$ac_exeext
8414   if test "${ac_cv_search_gethostbyname_r+set}" = set; then
8415   break
8416 fi
8417 done
8418 if test "${ac_cv_search_gethostbyname_r+set}" = set; then
8419   :
8420 else
8421   ac_cv_search_gethostbyname_r=no
8422 fi
8423 rm conftest.$ac_ext
8424 LIBS=$ac_func_search_save_LIBS
8425 fi
8426 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname_r" >&5
8427 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
8428 ac_res=$ac_cv_search_gethostbyname_r
8429 if test "$ac_res" != no; then
8430   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8431
8432 fi
8433
8434 # Cygwin:
8435 { $as_echo "$as_me:$LINENO: checking for library containing shmget" >&5
8436 $as_echo_n "checking for library containing shmget... " >&6; }
8437 if test "${ac_cv_search_shmget+set}" = set; then
8438   $as_echo_n "(cached) " >&6
8439 else
8440   ac_func_search_save_LIBS=$LIBS
8441 cat >conftest.$ac_ext <<_ACEOF
8442 /* confdefs.h.  */
8443 _ACEOF
8444 cat confdefs.h >>conftest.$ac_ext
8445 cat >>conftest.$ac_ext <<_ACEOF
8446 /* end confdefs.h.  */
8447
8448 /* Override any GCC internal prototype to avoid an error.
8449    Use char because int might match the return type of a GCC
8450    builtin and then its argument prototype would still apply.  */
8451 #ifdef __cplusplus
8452 extern "C"
8453 #endif
8454 char shmget ();
8455 int
8456 main ()
8457 {
8458 return shmget ();
8459   ;
8460   return 0;
8461 }
8462 _ACEOF
8463 for ac_lib in '' cygipc; do
8464   if test -z "$ac_lib"; then
8465     ac_res="none required"
8466   else
8467     ac_res=-l$ac_lib
8468     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8469   fi
8470   rm -f conftest.$ac_objext conftest$ac_exeext
8471 if { (ac_try="$ac_link"
8472 case "(($ac_try" in
8473   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8474   *) ac_try_echo=$ac_try;;
8475 esac
8476 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8477 $as_echo "$ac_try_echo") >&5
8478   (eval "$ac_link") 2>conftest.er1
8479   ac_status=$?
8480   grep -v '^ *+' conftest.er1 >conftest.err
8481   rm -f conftest.er1
8482   cat conftest.err >&5
8483   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8484   (exit $ac_status); } && {
8485          test -z "$ac_c_werror_flag" ||
8486          test ! -s conftest.err
8487        } && test -s conftest$ac_exeext && {
8488          test "$cross_compiling" = yes ||
8489          $as_test_x conftest$ac_exeext
8490        }; then
8491   ac_cv_search_shmget=$ac_res
8492 else
8493   $as_echo "$as_me: failed program was:" >&5
8494 sed 's/^/| /' conftest.$ac_ext >&5
8495
8496
8497 fi
8498
8499 rm -rf conftest.dSYM
8500 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8501       conftest$ac_exeext
8502   if test "${ac_cv_search_shmget+set}" = set; then
8503   break
8504 fi
8505 done
8506 if test "${ac_cv_search_shmget+set}" = set; then
8507   :
8508 else
8509   ac_cv_search_shmget=no
8510 fi
8511 rm conftest.$ac_ext
8512 LIBS=$ac_func_search_save_LIBS
8513 fi
8514 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
8515 $as_echo "$ac_cv_search_shmget" >&6; }
8516 ac_res=$ac_cv_search_shmget
8517 if test "$ac_res" != no; then
8518   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8519
8520 fi
8521
8522
8523 if test "$with_readline" = yes; then
8524
8525
8526 { $as_echo "$as_me:$LINENO: checking for library containing readline" >&5
8527 $as_echo_n "checking for library containing readline... " >&6; }
8528 if test "${pgac_cv_check_readline+set}" = set; then
8529   $as_echo_n "(cached) " >&6
8530 else
8531   pgac_cv_check_readline=no
8532 pgac_save_LIBS=$LIBS
8533 if test x"$with_libedit_preferred" != x"yes"
8534 then    READLINE_ORDER="-lreadline -ledit"
8535 else    READLINE_ORDER="-ledit -lreadline"
8536 fi
8537 for pgac_rllib in $READLINE_ORDER ; do
8538   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
8539     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
8540     cat >conftest.$ac_ext <<_ACEOF
8541 /* confdefs.h.  */
8542 _ACEOF
8543 cat confdefs.h >>conftest.$ac_ext
8544 cat >>conftest.$ac_ext <<_ACEOF
8545 /* end confdefs.h.  */
8546
8547 /* Override any GCC internal prototype to avoid an error.
8548    Use char because int might match the return type of a GCC
8549    builtin and then its argument prototype would still apply.  */
8550 #ifdef __cplusplus
8551 extern "C"
8552 #endif
8553 char readline ();
8554 int
8555 main ()
8556 {
8557 return readline ();
8558   ;
8559   return 0;
8560 }
8561 _ACEOF
8562 rm -f conftest.$ac_objext conftest$ac_exeext
8563 if { (ac_try="$ac_link"
8564 case "(($ac_try" in
8565   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8566   *) ac_try_echo=$ac_try;;
8567 esac
8568 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8569 $as_echo "$ac_try_echo") >&5
8570   (eval "$ac_link") 2>conftest.er1
8571   ac_status=$?
8572   grep -v '^ *+' conftest.er1 >conftest.err
8573   rm -f conftest.er1
8574   cat conftest.err >&5
8575   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8576   (exit $ac_status); } && {
8577          test -z "$ac_c_werror_flag" ||
8578          test ! -s conftest.err
8579        } && test -s conftest$ac_exeext && {
8580          test "$cross_compiling" = yes ||
8581          $as_test_x conftest$ac_exeext
8582        }; then
8583
8584       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
8585       # recognize dependent libraries; assume curses is needed if we didn't
8586       # find any dependency.
8587       case $host_os in
8588         netbsd* | openbsd* | irix*)
8589           if test x"$pgac_lib" = x"" ; then
8590             pgac_lib=" -lcurses"
8591           fi ;;
8592       esac
8593
8594       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
8595       break
8596
8597 else
8598   $as_echo "$as_me: failed program was:" >&5
8599 sed 's/^/| /' conftest.$ac_ext >&5
8600
8601
8602 fi
8603
8604 rm -rf conftest.dSYM
8605 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8606       conftest$ac_exeext conftest.$ac_ext
8607   done
8608   if test "$pgac_cv_check_readline" != no ; then
8609     break
8610   fi
8611 done
8612 LIBS=$pgac_save_LIBS
8613
8614 fi
8615 { $as_echo "$as_me:$LINENO: result: $pgac_cv_check_readline" >&5
8616 $as_echo "$pgac_cv_check_readline" >&6; }
8617 if test "$pgac_cv_check_readline" != no ; then
8618   LIBS="$pgac_cv_check_readline $LIBS"
8619
8620 cat >>confdefs.h <<\_ACEOF
8621 #define HAVE_LIBREADLINE 1
8622 _ACEOF
8623
8624 fi
8625
8626
8627   if test x"$pgac_cv_check_readline" = x"no"; then
8628     { { $as_echo "$as_me:$LINENO: error: readline library not found
8629 If you have readline already installed, see config.log for details on the
8630 failure.  It is possible the compiler isn't looking in the proper directory.
8631 Use --without-readline to disable readline support." >&5
8632 $as_echo "$as_me: error: readline library not found
8633 If you have readline already installed, see config.log for details on the
8634 failure.  It is possible the compiler isn't looking in the proper directory.
8635 Use --without-readline to disable readline support." >&2;}
8636    { (exit 1); exit 1; }; }
8637   fi
8638 fi
8639
8640 if test "$with_zlib" = yes; then
8641
8642 { $as_echo "$as_me:$LINENO: checking for inflate in -lz" >&5
8643 $as_echo_n "checking for inflate in -lz... " >&6; }
8644 if test "${ac_cv_lib_z_inflate+set}" = set; then
8645   $as_echo_n "(cached) " >&6
8646 else
8647   ac_check_lib_save_LIBS=$LIBS
8648 LIBS="-lz  $LIBS"
8649 cat >conftest.$ac_ext <<_ACEOF
8650 /* confdefs.h.  */
8651 _ACEOF
8652 cat confdefs.h >>conftest.$ac_ext
8653 cat >>conftest.$ac_ext <<_ACEOF
8654 /* end confdefs.h.  */
8655
8656 /* Override any GCC internal prototype to avoid an error.
8657    Use char because int might match the return type of a GCC
8658    builtin and then its argument prototype would still apply.  */
8659 #ifdef __cplusplus
8660 extern "C"
8661 #endif
8662 char inflate ();
8663 int
8664 main ()
8665 {
8666 return inflate ();
8667   ;
8668   return 0;
8669 }
8670 _ACEOF
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_lib_z_inflate=yes
8693 else
8694   $as_echo "$as_me: failed program was:" >&5
8695 sed 's/^/| /' conftest.$ac_ext >&5
8696
8697         ac_cv_lib_z_inflate=no
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 conftest.$ac_ext
8703 LIBS=$ac_check_lib_save_LIBS
8704 fi
8705 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
8706 $as_echo "$ac_cv_lib_z_inflate" >&6; }
8707 if test "x$ac_cv_lib_z_inflate" = x""yes; then
8708   cat >>confdefs.h <<_ACEOF
8709 #define HAVE_LIBZ 1
8710 _ACEOF
8711
8712   LIBS="-lz $LIBS"
8713
8714 else
8715   { { $as_echo "$as_me:$LINENO: error: zlib library not found
8716 If you have zlib already installed, see config.log for details on the
8717 failure.  It is possible the compiler isn't looking in the proper directory.
8718 Use --without-zlib to disable zlib support." >&5
8719 $as_echo "$as_me: error: zlib library not found
8720 If you have zlib already installed, see config.log for details on the
8721 failure.  It is possible the compiler isn't looking in the proper directory.
8722 Use --without-zlib to disable zlib support." >&2;}
8723    { (exit 1); exit 1; }; }
8724 fi
8725
8726 fi
8727
8728 if test "$enable_spinlocks" = yes; then
8729
8730 cat >>confdefs.h <<\_ACEOF
8731 #define HAVE_SPINLOCKS 1
8732 _ACEOF
8733
8734 else
8735   { $as_echo "$as_me:$LINENO: WARNING:
8736 *** Not using spinlocks will cause poor performance." >&5
8737 $as_echo "$as_me: WARNING:
8738 *** Not using spinlocks will cause poor performance." >&2;}
8739 fi
8740
8741 if test "$with_gssapi" = yes ; then
8742   if test "$PORTNAME" != "win32"; then
8743     { $as_echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5
8744 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
8745 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8746   $as_echo_n "(cached) " >&6
8747 else
8748   ac_func_search_save_LIBS=$LIBS
8749 cat >conftest.$ac_ext <<_ACEOF
8750 /* confdefs.h.  */
8751 _ACEOF
8752 cat confdefs.h >>conftest.$ac_ext
8753 cat >>conftest.$ac_ext <<_ACEOF
8754 /* end confdefs.h.  */
8755
8756 /* Override any GCC internal prototype to avoid an error.
8757    Use char because int might match the return type of a GCC
8758    builtin and then its argument prototype would still apply.  */
8759 #ifdef __cplusplus
8760 extern "C"
8761 #endif
8762 char gss_init_sec_context ();
8763 int
8764 main ()
8765 {
8766 return gss_init_sec_context ();
8767   ;
8768   return 0;
8769 }
8770 _ACEOF
8771 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
8772   if test -z "$ac_lib"; then
8773     ac_res="none required"
8774   else
8775     ac_res=-l$ac_lib
8776     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8777   fi
8778   rm -f conftest.$ac_objext conftest$ac_exeext
8779 if { (ac_try="$ac_link"
8780 case "(($ac_try" in
8781   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8782   *) ac_try_echo=$ac_try;;
8783 esac
8784 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8785 $as_echo "$ac_try_echo") >&5
8786   (eval "$ac_link") 2>conftest.er1
8787   ac_status=$?
8788   grep -v '^ *+' conftest.er1 >conftest.err
8789   rm -f conftest.er1
8790   cat conftest.err >&5
8791   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8792   (exit $ac_status); } && {
8793          test -z "$ac_c_werror_flag" ||
8794          test ! -s conftest.err
8795        } && test -s conftest$ac_exeext && {
8796          test "$cross_compiling" = yes ||
8797          $as_test_x conftest$ac_exeext
8798        }; then
8799   ac_cv_search_gss_init_sec_context=$ac_res
8800 else
8801   $as_echo "$as_me: failed program was:" >&5
8802 sed 's/^/| /' conftest.$ac_ext >&5
8803
8804
8805 fi
8806
8807 rm -rf conftest.dSYM
8808 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8809       conftest$ac_exeext
8810   if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8811   break
8812 fi
8813 done
8814 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
8815   :
8816 else
8817   ac_cv_search_gss_init_sec_context=no
8818 fi
8819 rm conftest.$ac_ext
8820 LIBS=$ac_func_search_save_LIBS
8821 fi
8822 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5
8823 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
8824 ac_res=$ac_cv_search_gss_init_sec_context
8825 if test "$ac_res" != no; then
8826   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8827
8828 else
8829   { { $as_echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5
8830 $as_echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;}
8831    { (exit 1); exit 1; }; }
8832 fi
8833
8834   else
8835     LIBS="$LIBS -lgssapi32"
8836   fi
8837 fi
8838
8839 if test "$with_krb5" = yes ; then
8840   if test "$PORTNAME" != "win32"; then
8841      { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
8842 $as_echo_n "checking for library containing com_err... " >&6; }
8843 if test "${ac_cv_search_com_err+set}" = set; then
8844   $as_echo_n "(cached) " >&6
8845 else
8846   ac_func_search_save_LIBS=$LIBS
8847 cat >conftest.$ac_ext <<_ACEOF
8848 /* confdefs.h.  */
8849 _ACEOF
8850 cat confdefs.h >>conftest.$ac_ext
8851 cat >>conftest.$ac_ext <<_ACEOF
8852 /* end confdefs.h.  */
8853
8854 /* Override any GCC internal prototype to avoid an error.
8855    Use char because int might match the return type of a GCC
8856    builtin and then its argument prototype would still apply.  */
8857 #ifdef __cplusplus
8858 extern "C"
8859 #endif
8860 char com_err ();
8861 int
8862 main ()
8863 {
8864 return com_err ();
8865   ;
8866   return 0;
8867 }
8868 _ACEOF
8869 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err 'com_err -lssl -lcrypto'; do
8870   if test -z "$ac_lib"; then
8871     ac_res="none required"
8872   else
8873     ac_res=-l$ac_lib
8874     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8875   fi
8876   rm -f conftest.$ac_objext conftest$ac_exeext
8877 if { (ac_try="$ac_link"
8878 case "(($ac_try" in
8879   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8880   *) ac_try_echo=$ac_try;;
8881 esac
8882 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8883 $as_echo "$ac_try_echo") >&5
8884   (eval "$ac_link") 2>conftest.er1
8885   ac_status=$?
8886   grep -v '^ *+' conftest.er1 >conftest.err
8887   rm -f conftest.er1
8888   cat conftest.err >&5
8889   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8890   (exit $ac_status); } && {
8891          test -z "$ac_c_werror_flag" ||
8892          test ! -s conftest.err
8893        } && test -s conftest$ac_exeext && {
8894          test "$cross_compiling" = yes ||
8895          $as_test_x conftest$ac_exeext
8896        }; then
8897   ac_cv_search_com_err=$ac_res
8898 else
8899   $as_echo "$as_me: failed program was:" >&5
8900 sed 's/^/| /' conftest.$ac_ext >&5
8901
8902
8903 fi
8904
8905 rm -rf conftest.dSYM
8906 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8907       conftest$ac_exeext
8908   if test "${ac_cv_search_com_err+set}" = set; then
8909   break
8910 fi
8911 done
8912 if test "${ac_cv_search_com_err+set}" = set; then
8913   :
8914 else
8915   ac_cv_search_com_err=no
8916 fi
8917 rm conftest.$ac_ext
8918 LIBS=$ac_func_search_save_LIBS
8919 fi
8920 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
8921 $as_echo "$ac_cv_search_com_err" >&6; }
8922 ac_res=$ac_cv_search_com_err
8923 if test "$ac_res" != no; then
8924   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8925
8926 else
8927   { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
8928 $as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
8929    { (exit 1); exit 1; }; }
8930 fi
8931
8932      { $as_echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
8933 $as_echo_n "checking for library containing krb5_sendauth... " >&6; }
8934 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
8935   $as_echo_n "(cached) " >&6
8936 else
8937   ac_func_search_save_LIBS=$LIBS
8938 cat >conftest.$ac_ext <<_ACEOF
8939 /* confdefs.h.  */
8940 _ACEOF
8941 cat confdefs.h >>conftest.$ac_ext
8942 cat >>conftest.$ac_ext <<_ACEOF
8943 /* end confdefs.h.  */
8944
8945 /* Override any GCC internal prototype to avoid an error.
8946    Use char because int might match the return type of a GCC
8947    builtin and then its argument prototype would still apply.  */
8948 #ifdef __cplusplus
8949 extern "C"
8950 #endif
8951 char krb5_sendauth ();
8952 int
8953 main ()
8954 {
8955 return krb5_sendauth ();
8956   ;
8957   return 0;
8958 }
8959 _ACEOF
8960 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
8961   if test -z "$ac_lib"; then
8962     ac_res="none required"
8963   else
8964     ac_res=-l$ac_lib
8965     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8966   fi
8967   rm -f conftest.$ac_objext conftest$ac_exeext
8968 if { (ac_try="$ac_link"
8969 case "(($ac_try" in
8970   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8971   *) ac_try_echo=$ac_try;;
8972 esac
8973 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8974 $as_echo "$ac_try_echo") >&5
8975   (eval "$ac_link") 2>conftest.er1
8976   ac_status=$?
8977   grep -v '^ *+' conftest.er1 >conftest.err
8978   rm -f conftest.er1
8979   cat conftest.err >&5
8980   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8981   (exit $ac_status); } && {
8982          test -z "$ac_c_werror_flag" ||
8983          test ! -s conftest.err
8984        } && test -s conftest$ac_exeext && {
8985          test "$cross_compiling" = yes ||
8986          $as_test_x conftest$ac_exeext
8987        }; then
8988   ac_cv_search_krb5_sendauth=$ac_res
8989 else
8990   $as_echo "$as_me: failed program was:" >&5
8991 sed 's/^/| /' conftest.$ac_ext >&5
8992
8993
8994 fi
8995
8996 rm -rf conftest.dSYM
8997 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8998       conftest$ac_exeext
8999   if test "${ac_cv_search_krb5_sendauth+set}" = set; then
9000   break
9001 fi
9002 done
9003 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
9004   :
9005 else
9006   ac_cv_search_krb5_sendauth=no
9007 fi
9008 rm conftest.$ac_ext
9009 LIBS=$ac_func_search_save_LIBS
9010 fi
9011 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
9012 $as_echo "$ac_cv_search_krb5_sendauth" >&6; }
9013 ac_res=$ac_cv_search_krb5_sendauth
9014 if test "$ac_res" != no; then
9015   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9016
9017 else
9018   { { $as_echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
9019 $as_echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
9020    { (exit 1); exit 1; }; }
9021 fi
9022
9023   else
9024      { $as_echo "$as_me:$LINENO: checking for library containing com_err" >&5
9025 $as_echo_n "checking for library containing com_err... " >&6; }
9026 if test "${ac_cv_search_com_err+set}" = set; then
9027   $as_echo_n "(cached) " >&6
9028 else
9029   ac_func_search_save_LIBS=$LIBS
9030 cat >conftest.$ac_ext <<_ACEOF
9031 /* confdefs.h.  */
9032 _ACEOF
9033 cat confdefs.h >>conftest.$ac_ext
9034 cat >>conftest.$ac_ext <<_ACEOF
9035 /* end confdefs.h.  */
9036
9037 /* Override any GCC internal prototype to avoid an error.
9038    Use char because int might match the return type of a GCC
9039    builtin and then its argument prototype would still apply.  */
9040 #ifdef __cplusplus
9041 extern "C"
9042 #endif
9043 char com_err ();
9044 int
9045 main ()
9046 {
9047 return com_err ();
9048   ;
9049   return 0;
9050 }
9051 _ACEOF
9052 for ac_lib in '' 'comerr32 -lkrb5_32'; do
9053   if test -z "$ac_lib"; then
9054     ac_res="none required"
9055   else
9056     ac_res=-l$ac_lib
9057     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9058   fi
9059   rm -f conftest.$ac_objext conftest$ac_exeext
9060 if { (ac_try="$ac_link"
9061 case "(($ac_try" in
9062   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9063   *) ac_try_echo=$ac_try;;
9064 esac
9065 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9066 $as_echo "$ac_try_echo") >&5
9067   (eval "$ac_link") 2>conftest.er1
9068   ac_status=$?
9069   grep -v '^ *+' conftest.er1 >conftest.err
9070   rm -f conftest.er1
9071   cat conftest.err >&5
9072   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9073   (exit $ac_status); } && {
9074          test -z "$ac_c_werror_flag" ||
9075          test ! -s conftest.err
9076        } && test -s conftest$ac_exeext && {
9077          test "$cross_compiling" = yes ||
9078          $as_test_x conftest$ac_exeext
9079        }; then
9080   ac_cv_search_com_err=$ac_res
9081 else
9082   $as_echo "$as_me: failed program was:" >&5
9083 sed 's/^/| /' conftest.$ac_ext >&5
9084
9085
9086 fi
9087
9088 rm -rf conftest.dSYM
9089 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9090       conftest$ac_exeext
9091   if test "${ac_cv_search_com_err+set}" = set; then
9092   break
9093 fi
9094 done
9095 if test "${ac_cv_search_com_err+set}" = set; then
9096   :
9097 else
9098   ac_cv_search_com_err=no
9099 fi
9100 rm conftest.$ac_ext
9101 LIBS=$ac_func_search_save_LIBS
9102 fi
9103 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
9104 $as_echo "$ac_cv_search_com_err" >&6; }
9105 ac_res=$ac_cv_search_com_err
9106 if test "$ac_res" != no; then
9107   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9108
9109 else
9110   { { $as_echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
9111 $as_echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
9112    { (exit 1); exit 1; }; }
9113 fi
9114
9115   fi
9116 fi
9117
9118 if test "$with_openssl" = yes ; then
9119     if test "$PORTNAME" != "win32"; then
9120
9121 { $as_echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9122 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9123 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
9124   $as_echo_n "(cached) " >&6
9125 else
9126   ac_check_lib_save_LIBS=$LIBS
9127 LIBS="-lcrypto  $LIBS"
9128 cat >conftest.$ac_ext <<_ACEOF
9129 /* confdefs.h.  */
9130 _ACEOF
9131 cat confdefs.h >>conftest.$ac_ext
9132 cat >>conftest.$ac_ext <<_ACEOF
9133 /* end confdefs.h.  */
9134
9135 /* Override any GCC internal prototype to avoid an error.
9136    Use char because int might match the return type of a GCC
9137    builtin and then its argument prototype would still apply.  */
9138 #ifdef __cplusplus
9139 extern "C"
9140 #endif
9141 char CRYPTO_new_ex_data ();
9142 int
9143 main ()
9144 {
9145 return CRYPTO_new_ex_data ();
9146   ;
9147   return 0;
9148 }
9149 _ACEOF
9150 rm -f conftest.$ac_objext conftest$ac_exeext
9151 if { (ac_try="$ac_link"
9152 case "(($ac_try" in
9153   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9154   *) ac_try_echo=$ac_try;;
9155 esac
9156 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9157 $as_echo "$ac_try_echo") >&5
9158   (eval "$ac_link") 2>conftest.er1
9159   ac_status=$?
9160   grep -v '^ *+' conftest.er1 >conftest.err
9161   rm -f conftest.er1
9162   cat conftest.err >&5
9163   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9164   (exit $ac_status); } && {
9165          test -z "$ac_c_werror_flag" ||
9166          test ! -s conftest.err
9167        } && test -s conftest$ac_exeext && {
9168          test "$cross_compiling" = yes ||
9169          $as_test_x conftest$ac_exeext
9170        }; then
9171   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9172 else
9173   $as_echo "$as_me: failed program was:" >&5
9174 sed 's/^/| /' conftest.$ac_ext >&5
9175
9176         ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9177 fi
9178
9179 rm -rf conftest.dSYM
9180 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9181       conftest$ac_exeext conftest.$ac_ext
9182 LIBS=$ac_check_lib_save_LIBS
9183 fi
9184 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
9185 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
9186 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = x""yes; then
9187   cat >>confdefs.h <<_ACEOF
9188 #define HAVE_LIBCRYPTO 1
9189 _ACEOF
9190
9191   LIBS="-lcrypto $LIBS"
9192
9193 else
9194   { { $as_echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
9195 $as_echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
9196    { (exit 1); exit 1; }; }
9197 fi
9198
9199
9200 { $as_echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
9201 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
9202 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
9203   $as_echo_n "(cached) " >&6
9204 else
9205   ac_check_lib_save_LIBS=$LIBS
9206 LIBS="-lssl  $LIBS"
9207 cat >conftest.$ac_ext <<_ACEOF
9208 /* confdefs.h.  */
9209 _ACEOF
9210 cat confdefs.h >>conftest.$ac_ext
9211 cat >>conftest.$ac_ext <<_ACEOF
9212 /* end confdefs.h.  */
9213
9214 /* Override any GCC internal prototype to avoid an error.
9215    Use char because int might match the return type of a GCC
9216    builtin and then its argument prototype would still apply.  */
9217 #ifdef __cplusplus
9218 extern "C"
9219 #endif
9220 char SSL_library_init ();
9221 int
9222 main ()
9223 {
9224 return SSL_library_init ();
9225   ;
9226   return 0;
9227 }
9228 _ACEOF
9229 rm -f conftest.$ac_objext conftest$ac_exeext
9230 if { (ac_try="$ac_link"
9231 case "(($ac_try" in
9232   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9233   *) ac_try_echo=$ac_try;;
9234 esac
9235 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9236 $as_echo "$ac_try_echo") >&5
9237   (eval "$ac_link") 2>conftest.er1
9238   ac_status=$?
9239   grep -v '^ *+' conftest.er1 >conftest.err
9240   rm -f conftest.er1
9241   cat conftest.err >&5
9242   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9243   (exit $ac_status); } && {
9244          test -z "$ac_c_werror_flag" ||
9245          test ! -s conftest.err
9246        } && test -s conftest$ac_exeext && {
9247          test "$cross_compiling" = yes ||
9248          $as_test_x conftest$ac_exeext
9249        }; then
9250   ac_cv_lib_ssl_SSL_library_init=yes
9251 else
9252   $as_echo "$as_me: failed program was:" >&5
9253 sed 's/^/| /' conftest.$ac_ext >&5
9254
9255         ac_cv_lib_ssl_SSL_library_init=no
9256 fi
9257
9258 rm -rf conftest.dSYM
9259 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9260       conftest$ac_exeext conftest.$ac_ext
9261 LIBS=$ac_check_lib_save_LIBS
9262 fi
9263 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
9264 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
9265 if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then
9266   cat >>confdefs.h <<_ACEOF
9267 #define HAVE_LIBSSL 1
9268 _ACEOF
9269
9270   LIBS="-lssl $LIBS"
9271
9272 else
9273   { { $as_echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
9274 $as_echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
9275    { (exit 1); exit 1; }; }
9276 fi
9277
9278   else
9279      { $as_echo "$as_me:$LINENO: checking for library containing CRYPTO_new_ex_data" >&5
9280 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
9281 if test "${ac_cv_search_CRYPTO_new_ex_data+set}" = set; then
9282   $as_echo_n "(cached) " >&6
9283 else
9284   ac_func_search_save_LIBS=$LIBS
9285 cat >conftest.$ac_ext <<_ACEOF
9286 /* confdefs.h.  */
9287 _ACEOF
9288 cat confdefs.h >>conftest.$ac_ext
9289 cat >>conftest.$ac_ext <<_ACEOF
9290 /* end confdefs.h.  */
9291
9292 /* Override any GCC internal prototype to avoid an error.
9293    Use char because int might match the return type of a GCC
9294    builtin and then its argument prototype would still apply.  */
9295 #ifdef __cplusplus
9296 extern "C"
9297 #endif
9298 char CRYPTO_new_ex_data ();
9299 int
9300 main ()
9301 {
9302 return CRYPTO_new_ex_data ();
9303   ;
9304   return 0;
9305 }
9306 _ACEOF
9307 for ac_lib in '' eay32 crypto; do
9308   if test -z "$ac_lib"; then
9309     ac_res="none required"
9310   else
9311     ac_res=-l$ac_lib
9312     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9313   fi
9314   rm -f conftest.$ac_objext conftest$ac_exeext
9315 if { (ac_try="$ac_link"
9316 case "(($ac_try" in
9317   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9318   *) ac_try_echo=$ac_try;;
9319 esac
9320 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9321 $as_echo "$ac_try_echo") >&5
9322   (eval "$ac_link") 2>conftest.er1
9323   ac_status=$?
9324   grep -v '^ *+' conftest.er1 >conftest.err
9325   rm -f conftest.er1
9326   cat conftest.err >&5
9327   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9328   (exit $ac_status); } && {
9329          test -z "$ac_c_werror_flag" ||
9330          test ! -s conftest.err
9331        } && test -s conftest$ac_exeext && {
9332          test "$cross_compiling" = yes ||
9333          $as_test_x conftest$ac_exeext
9334        }; then
9335   ac_cv_search_CRYPTO_new_ex_data=$ac_res
9336 else
9337   $as_echo "$as_me: failed program was:" >&5
9338 sed 's/^/| /' conftest.$ac_ext >&5
9339
9340
9341 fi
9342
9343 rm -rf conftest.dSYM
9344 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9345       conftest$ac_exeext
9346   if test "${ac_cv_search_CRYPTO_new_ex_data+set}" = set; then
9347   break
9348 fi
9349 done
9350 if test "${ac_cv_search_CRYPTO_new_ex_data+set}" = set; then
9351   :
9352 else
9353   ac_cv_search_CRYPTO_new_ex_data=no
9354 fi
9355 rm conftest.$ac_ext
9356 LIBS=$ac_func_search_save_LIBS
9357 fi
9358 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
9359 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
9360 ac_res=$ac_cv_search_CRYPTO_new_ex_data
9361 if test "$ac_res" != no; then
9362   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9363
9364 else
9365   { { $as_echo "$as_me:$LINENO: error: library 'eay32' or 'crypto' is required for OpenSSL" >&5
9366 $as_echo "$as_me: error: library 'eay32' or 'crypto' is required for OpenSSL" >&2;}
9367    { (exit 1); exit 1; }; }
9368 fi
9369
9370      { $as_echo "$as_me:$LINENO: checking for library containing SSL_library_init" >&5
9371 $as_echo_n "checking for library containing SSL_library_init... " >&6; }
9372 if test "${ac_cv_search_SSL_library_init+set}" = set; then
9373   $as_echo_n "(cached) " >&6
9374 else
9375   ac_func_search_save_LIBS=$LIBS
9376 cat >conftest.$ac_ext <<_ACEOF
9377 /* confdefs.h.  */
9378 _ACEOF
9379 cat confdefs.h >>conftest.$ac_ext
9380 cat >>conftest.$ac_ext <<_ACEOF
9381 /* end confdefs.h.  */
9382
9383 /* Override any GCC internal prototype to avoid an error.
9384    Use char because int might match the return type of a GCC
9385    builtin and then its argument prototype would still apply.  */
9386 #ifdef __cplusplus
9387 extern "C"
9388 #endif
9389 char SSL_library_init ();
9390 int
9391 main ()
9392 {
9393 return SSL_library_init ();
9394   ;
9395   return 0;
9396 }
9397 _ACEOF
9398 for ac_lib in '' ssleay32 ssl; do
9399   if test -z "$ac_lib"; then
9400     ac_res="none required"
9401   else
9402     ac_res=-l$ac_lib
9403     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9404   fi
9405   rm -f conftest.$ac_objext conftest$ac_exeext
9406 if { (ac_try="$ac_link"
9407 case "(($ac_try" in
9408   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9409   *) ac_try_echo=$ac_try;;
9410 esac
9411 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9412 $as_echo "$ac_try_echo") >&5
9413   (eval "$ac_link") 2>conftest.er1
9414   ac_status=$?
9415   grep -v '^ *+' conftest.er1 >conftest.err
9416   rm -f conftest.er1
9417   cat conftest.err >&5
9418   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9419   (exit $ac_status); } && {
9420          test -z "$ac_c_werror_flag" ||
9421          test ! -s conftest.err
9422        } && test -s conftest$ac_exeext && {
9423          test "$cross_compiling" = yes ||
9424          $as_test_x conftest$ac_exeext
9425        }; then
9426   ac_cv_search_SSL_library_init=$ac_res
9427 else
9428   $as_echo "$as_me: failed program was:" >&5
9429 sed 's/^/| /' conftest.$ac_ext >&5
9430
9431
9432 fi
9433
9434 rm -rf conftest.dSYM
9435 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9436       conftest$ac_exeext
9437   if test "${ac_cv_search_SSL_library_init+set}" = set; then
9438   break
9439 fi
9440 done
9441 if test "${ac_cv_search_SSL_library_init+set}" = set; then
9442   :
9443 else
9444   ac_cv_search_SSL_library_init=no
9445 fi
9446 rm conftest.$ac_ext
9447 LIBS=$ac_func_search_save_LIBS
9448 fi
9449 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_SSL_library_init" >&5
9450 $as_echo "$ac_cv_search_SSL_library_init" >&6; }
9451 ac_res=$ac_cv_search_SSL_library_init
9452 if test "$ac_res" != no; then
9453   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9454
9455 else
9456   { { $as_echo "$as_me:$LINENO: error: library 'ssleay32' or 'ssl' is required for OpenSSL" >&5
9457 $as_echo "$as_me: error: library 'ssleay32' or 'ssl' is required for OpenSSL" >&2;}
9458    { (exit 1); exit 1; }; }
9459 fi
9460
9461   fi
9462 fi
9463
9464 if test "$with_pam" = yes ; then
9465
9466 { $as_echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
9467 $as_echo_n "checking for pam_start in -lpam... " >&6; }
9468 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
9469   $as_echo_n "(cached) " >&6
9470 else
9471   ac_check_lib_save_LIBS=$LIBS
9472 LIBS="-lpam  $LIBS"
9473 cat >conftest.$ac_ext <<_ACEOF
9474 /* confdefs.h.  */
9475 _ACEOF
9476 cat confdefs.h >>conftest.$ac_ext
9477 cat >>conftest.$ac_ext <<_ACEOF
9478 /* end confdefs.h.  */
9479
9480 /* Override any GCC internal prototype to avoid an error.
9481    Use char because int might match the return type of a GCC
9482    builtin and then its argument prototype would still apply.  */
9483 #ifdef __cplusplus
9484 extern "C"
9485 #endif
9486 char pam_start ();
9487 int
9488 main ()
9489 {
9490 return pam_start ();
9491   ;
9492   return 0;
9493 }
9494 _ACEOF
9495 rm -f conftest.$ac_objext conftest$ac_exeext
9496 if { (ac_try="$ac_link"
9497 case "(($ac_try" in
9498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9499   *) ac_try_echo=$ac_try;;
9500 esac
9501 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9502 $as_echo "$ac_try_echo") >&5
9503   (eval "$ac_link") 2>conftest.er1
9504   ac_status=$?
9505   grep -v '^ *+' conftest.er1 >conftest.err
9506   rm -f conftest.er1
9507   cat conftest.err >&5
9508   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9509   (exit $ac_status); } && {
9510          test -z "$ac_c_werror_flag" ||
9511          test ! -s conftest.err
9512        } && test -s conftest$ac_exeext && {
9513          test "$cross_compiling" = yes ||
9514          $as_test_x conftest$ac_exeext
9515        }; then
9516   ac_cv_lib_pam_pam_start=yes
9517 else
9518   $as_echo "$as_me: failed program was:" >&5
9519 sed 's/^/| /' conftest.$ac_ext >&5
9520
9521         ac_cv_lib_pam_pam_start=no
9522 fi
9523
9524 rm -rf conftest.dSYM
9525 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9526       conftest$ac_exeext conftest.$ac_ext
9527 LIBS=$ac_check_lib_save_LIBS
9528 fi
9529 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
9530 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
9531 if test "x$ac_cv_lib_pam_pam_start" = x""yes; then
9532   cat >>confdefs.h <<_ACEOF
9533 #define HAVE_LIBPAM 1
9534 _ACEOF
9535
9536   LIBS="-lpam $LIBS"
9537
9538 else
9539   { { $as_echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
9540 $as_echo "$as_me: error: library 'pam' is required for PAM" >&2;}
9541    { (exit 1); exit 1; }; }
9542 fi
9543
9544 fi
9545
9546 if test "$with_libxml" = yes ; then
9547
9548 { $as_echo "$as_me:$LINENO: checking for xmlSaveToBuffer in -lxml2" >&5
9549 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
9550 if test "${ac_cv_lib_xml2_xmlSaveToBuffer+set}" = set; then
9551   $as_echo_n "(cached) " >&6
9552 else
9553   ac_check_lib_save_LIBS=$LIBS
9554 LIBS="-lxml2  $LIBS"
9555 cat >conftest.$ac_ext <<_ACEOF
9556 /* confdefs.h.  */
9557 _ACEOF
9558 cat confdefs.h >>conftest.$ac_ext
9559 cat >>conftest.$ac_ext <<_ACEOF
9560 /* end confdefs.h.  */
9561
9562 /* Override any GCC internal prototype to avoid an error.
9563    Use char because int might match the return type of a GCC
9564    builtin and then its argument prototype would still apply.  */
9565 #ifdef __cplusplus
9566 extern "C"
9567 #endif
9568 char xmlSaveToBuffer ();
9569 int
9570 main ()
9571 {
9572 return xmlSaveToBuffer ();
9573   ;
9574   return 0;
9575 }
9576 _ACEOF
9577 rm -f conftest.$ac_objext conftest$ac_exeext
9578 if { (ac_try="$ac_link"
9579 case "(($ac_try" in
9580   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9581   *) ac_try_echo=$ac_try;;
9582 esac
9583 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9584 $as_echo "$ac_try_echo") >&5
9585   (eval "$ac_link") 2>conftest.er1
9586   ac_status=$?
9587   grep -v '^ *+' conftest.er1 >conftest.err
9588   rm -f conftest.er1
9589   cat conftest.err >&5
9590   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9591   (exit $ac_status); } && {
9592          test -z "$ac_c_werror_flag" ||
9593          test ! -s conftest.err
9594        } && test -s conftest$ac_exeext && {
9595          test "$cross_compiling" = yes ||
9596          $as_test_x conftest$ac_exeext
9597        }; then
9598   ac_cv_lib_xml2_xmlSaveToBuffer=yes
9599 else
9600   $as_echo "$as_me: failed program was:" >&5
9601 sed 's/^/| /' conftest.$ac_ext >&5
9602
9603         ac_cv_lib_xml2_xmlSaveToBuffer=no
9604 fi
9605
9606 rm -rf conftest.dSYM
9607 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9608       conftest$ac_exeext conftest.$ac_ext
9609 LIBS=$ac_check_lib_save_LIBS
9610 fi
9611 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
9612 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
9613 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = x""yes; then
9614   cat >>confdefs.h <<_ACEOF
9615 #define HAVE_LIBXML2 1
9616 _ACEOF
9617
9618   LIBS="-lxml2 $LIBS"
9619
9620 else
9621   { { $as_echo "$as_me:$LINENO: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&5
9622 $as_echo "$as_me: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&2;}
9623    { (exit 1); exit 1; }; }
9624 fi
9625
9626 fi
9627
9628 if test "$with_libxslt" = yes ; then
9629
9630 { $as_echo "$as_me:$LINENO: checking for xsltCleanupGlobals in -lxslt" >&5
9631 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
9632 if test "${ac_cv_lib_xslt_xsltCleanupGlobals+set}" = set; then
9633   $as_echo_n "(cached) " >&6
9634 else
9635   ac_check_lib_save_LIBS=$LIBS
9636 LIBS="-lxslt  $LIBS"
9637 cat >conftest.$ac_ext <<_ACEOF
9638 /* confdefs.h.  */
9639 _ACEOF
9640 cat confdefs.h >>conftest.$ac_ext
9641 cat >>conftest.$ac_ext <<_ACEOF
9642 /* end confdefs.h.  */
9643
9644 /* Override any GCC internal prototype to avoid an error.
9645    Use char because int might match the return type of a GCC
9646    builtin and then its argument prototype would still apply.  */
9647 #ifdef __cplusplus
9648 extern "C"
9649 #endif
9650 char xsltCleanupGlobals ();
9651 int
9652 main ()
9653 {
9654 return xsltCleanupGlobals ();
9655   ;
9656   return 0;
9657 }
9658 _ACEOF
9659 rm -f conftest.$ac_objext conftest$ac_exeext
9660 if { (ac_try="$ac_link"
9661 case "(($ac_try" in
9662   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9663   *) ac_try_echo=$ac_try;;
9664 esac
9665 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9666 $as_echo "$ac_try_echo") >&5
9667   (eval "$ac_link") 2>conftest.er1
9668   ac_status=$?
9669   grep -v '^ *+' conftest.er1 >conftest.err
9670   rm -f conftest.er1
9671   cat conftest.err >&5
9672   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9673   (exit $ac_status); } && {
9674          test -z "$ac_c_werror_flag" ||
9675          test ! -s conftest.err
9676        } && test -s conftest$ac_exeext && {
9677          test "$cross_compiling" = yes ||
9678          $as_test_x conftest$ac_exeext
9679        }; then
9680   ac_cv_lib_xslt_xsltCleanupGlobals=yes
9681 else
9682   $as_echo "$as_me: failed program was:" >&5
9683 sed 's/^/| /' conftest.$ac_ext >&5
9684
9685         ac_cv_lib_xslt_xsltCleanupGlobals=no
9686 fi
9687
9688 rm -rf conftest.dSYM
9689 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9690       conftest$ac_exeext conftest.$ac_ext
9691 LIBS=$ac_check_lib_save_LIBS
9692 fi
9693 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
9694 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
9695 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = x""yes; then
9696   cat >>confdefs.h <<_ACEOF
9697 #define HAVE_LIBXSLT 1
9698 _ACEOF
9699
9700   LIBS="-lxslt $LIBS"
9701
9702 else
9703   { { $as_echo "$as_me:$LINENO: error: library 'xslt' is required for XSLT support" >&5
9704 $as_echo "$as_me: error: library 'xslt' is required for XSLT support" >&2;}
9705    { (exit 1); exit 1; }; }
9706 fi
9707
9708 fi
9709
9710 # for contrib/sepgsql
9711 if test "$with_selinux" = yes; then
9712
9713 { $as_echo "$as_me:$LINENO: checking for selinux_status_open in -lselinux" >&5
9714 $as_echo_n "checking for selinux_status_open in -lselinux... " >&6; }
9715 if test "${ac_cv_lib_selinux_selinux_status_open+set}" = set; then
9716   $as_echo_n "(cached) " >&6
9717 else
9718   ac_check_lib_save_LIBS=$LIBS
9719 LIBS="-lselinux  $LIBS"
9720 cat >conftest.$ac_ext <<_ACEOF
9721 /* confdefs.h.  */
9722 _ACEOF
9723 cat confdefs.h >>conftest.$ac_ext
9724 cat >>conftest.$ac_ext <<_ACEOF
9725 /* end confdefs.h.  */
9726
9727 /* Override any GCC internal prototype to avoid an error.
9728    Use char because int might match the return type of a GCC
9729    builtin and then its argument prototype would still apply.  */
9730 #ifdef __cplusplus
9731 extern "C"
9732 #endif
9733 char selinux_status_open ();
9734 int
9735 main ()
9736 {
9737 return selinux_status_open ();
9738   ;
9739   return 0;
9740 }
9741 _ACEOF
9742 rm -f conftest.$ac_objext conftest$ac_exeext
9743 if { (ac_try="$ac_link"
9744 case "(($ac_try" in
9745   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9746   *) ac_try_echo=$ac_try;;
9747 esac
9748 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9749 $as_echo "$ac_try_echo") >&5
9750   (eval "$ac_link") 2>conftest.er1
9751   ac_status=$?
9752   grep -v '^ *+' conftest.er1 >conftest.err
9753   rm -f conftest.er1
9754   cat conftest.err >&5
9755   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9756   (exit $ac_status); } && {
9757          test -z "$ac_c_werror_flag" ||
9758          test ! -s conftest.err
9759        } && test -s conftest$ac_exeext && {
9760          test "$cross_compiling" = yes ||
9761          $as_test_x conftest$ac_exeext
9762        }; then
9763   ac_cv_lib_selinux_selinux_status_open=yes
9764 else
9765   $as_echo "$as_me: failed program was:" >&5
9766 sed 's/^/| /' conftest.$ac_ext >&5
9767
9768         ac_cv_lib_selinux_selinux_status_open=no
9769 fi
9770
9771 rm -rf conftest.dSYM
9772 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9773       conftest$ac_exeext conftest.$ac_ext
9774 LIBS=$ac_check_lib_save_LIBS
9775 fi
9776 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_selinux_status_open" >&5
9777 $as_echo "$ac_cv_lib_selinux_selinux_status_open" >&6; }
9778 if test "x$ac_cv_lib_selinux_selinux_status_open" = x""yes; then
9779   cat >>confdefs.h <<_ACEOF
9780 #define HAVE_LIBSELINUX 1
9781 _ACEOF
9782
9783   LIBS="-lselinux $LIBS"
9784
9785 else
9786   { { $as_echo "$as_me:$LINENO: error: library 'libselinux', version 2.0.99 or newer, is required for SELinux support" >&5
9787 $as_echo "$as_me: error: library 'libselinux', version 2.0.99 or newer, is required for SELinux support" >&2;}
9788    { (exit 1); exit 1; }; }
9789 fi
9790
9791 fi
9792
9793 # for contrib/uuid-ossp
9794 if test "$with_ossp_uuid" = yes ; then
9795   { $as_echo "$as_me:$LINENO: checking for uuid_export in -lossp-uuid" >&5
9796 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
9797 if test "${ac_cv_lib_ossp_uuid_uuid_export+set}" = set; then
9798   $as_echo_n "(cached) " >&6
9799 else
9800   ac_check_lib_save_LIBS=$LIBS
9801 LIBS="-lossp-uuid  $LIBS"
9802 cat >conftest.$ac_ext <<_ACEOF
9803 /* confdefs.h.  */
9804 _ACEOF
9805 cat confdefs.h >>conftest.$ac_ext
9806 cat >>conftest.$ac_ext <<_ACEOF
9807 /* end confdefs.h.  */
9808
9809 /* Override any GCC internal prototype to avoid an error.
9810    Use char because int might match the return type of a GCC
9811    builtin and then its argument prototype would still apply.  */
9812 #ifdef __cplusplus
9813 extern "C"
9814 #endif
9815 char uuid_export ();
9816 int
9817 main ()
9818 {
9819 return uuid_export ();
9820   ;
9821   return 0;
9822 }
9823 _ACEOF
9824 rm -f conftest.$ac_objext conftest$ac_exeext
9825 if { (ac_try="$ac_link"
9826 case "(($ac_try" in
9827   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9828   *) ac_try_echo=$ac_try;;
9829 esac
9830 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9831 $as_echo "$ac_try_echo") >&5
9832   (eval "$ac_link") 2>conftest.er1
9833   ac_status=$?
9834   grep -v '^ *+' conftest.er1 >conftest.err
9835   rm -f conftest.er1
9836   cat conftest.err >&5
9837   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9838   (exit $ac_status); } && {
9839          test -z "$ac_c_werror_flag" ||
9840          test ! -s conftest.err
9841        } && test -s conftest$ac_exeext && {
9842          test "$cross_compiling" = yes ||
9843          $as_test_x conftest$ac_exeext
9844        }; then
9845   ac_cv_lib_ossp_uuid_uuid_export=yes
9846 else
9847   $as_echo "$as_me: failed program was:" >&5
9848 sed 's/^/| /' conftest.$ac_ext >&5
9849
9850         ac_cv_lib_ossp_uuid_uuid_export=no
9851 fi
9852
9853 rm -rf conftest.dSYM
9854 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9855       conftest$ac_exeext conftest.$ac_ext
9856 LIBS=$ac_check_lib_save_LIBS
9857 fi
9858 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
9859 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
9860 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = x""yes; then
9861   OSSP_UUID_LIBS="-lossp-uuid"
9862 else
9863   { $as_echo "$as_me:$LINENO: checking for uuid_export in -luuid" >&5
9864 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
9865 if test "${ac_cv_lib_uuid_uuid_export+set}" = set; then
9866   $as_echo_n "(cached) " >&6
9867 else
9868   ac_check_lib_save_LIBS=$LIBS
9869 LIBS="-luuid  $LIBS"
9870 cat >conftest.$ac_ext <<_ACEOF
9871 /* confdefs.h.  */
9872 _ACEOF
9873 cat confdefs.h >>conftest.$ac_ext
9874 cat >>conftest.$ac_ext <<_ACEOF
9875 /* end confdefs.h.  */
9876
9877 /* Override any GCC internal prototype to avoid an error.
9878    Use char because int might match the return type of a GCC
9879    builtin and then its argument prototype would still apply.  */
9880 #ifdef __cplusplus
9881 extern "C"
9882 #endif
9883 char uuid_export ();
9884 int
9885 main ()
9886 {
9887 return uuid_export ();
9888   ;
9889   return 0;
9890 }
9891 _ACEOF
9892 rm -f conftest.$ac_objext conftest$ac_exeext
9893 if { (ac_try="$ac_link"
9894 case "(($ac_try" in
9895   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9896   *) ac_try_echo=$ac_try;;
9897 esac
9898 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9899 $as_echo "$ac_try_echo") >&5
9900   (eval "$ac_link") 2>conftest.er1
9901   ac_status=$?
9902   grep -v '^ *+' conftest.er1 >conftest.err
9903   rm -f conftest.er1
9904   cat conftest.err >&5
9905   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9906   (exit $ac_status); } && {
9907          test -z "$ac_c_werror_flag" ||
9908          test ! -s conftest.err
9909        } && test -s conftest$ac_exeext && {
9910          test "$cross_compiling" = yes ||
9911          $as_test_x conftest$ac_exeext
9912        }; then
9913   ac_cv_lib_uuid_uuid_export=yes
9914 else
9915   $as_echo "$as_me: failed program was:" >&5
9916 sed 's/^/| /' conftest.$ac_ext >&5
9917
9918         ac_cv_lib_uuid_uuid_export=no
9919 fi
9920
9921 rm -rf conftest.dSYM
9922 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9923       conftest$ac_exeext conftest.$ac_ext
9924 LIBS=$ac_check_lib_save_LIBS
9925 fi
9926 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_export" >&5
9927 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
9928 if test "x$ac_cv_lib_uuid_uuid_export" = x""yes; then
9929   OSSP_UUID_LIBS="-luuid"
9930 else
9931   { { $as_echo "$as_me:$LINENO: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&5
9932 $as_echo "$as_me: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&2;}
9933    { (exit 1); exit 1; }; }
9934 fi
9935
9936 fi
9937
9938 fi
9939
9940
9941
9942 ##
9943 ## Header files
9944 ##
9945
9946 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
9947 $as_echo_n "checking for ANSI C header files... " >&6; }
9948 if test "${ac_cv_header_stdc+set}" = set; then
9949   $as_echo_n "(cached) " >&6
9950 else
9951   cat >conftest.$ac_ext <<_ACEOF
9952 /* confdefs.h.  */
9953 _ACEOF
9954 cat confdefs.h >>conftest.$ac_ext
9955 cat >>conftest.$ac_ext <<_ACEOF
9956 /* end confdefs.h.  */
9957 #include <stdlib.h>
9958 #include <stdarg.h>
9959 #include <string.h>
9960 #include <float.h>
9961
9962 int
9963 main ()
9964 {
9965
9966   ;
9967   return 0;
9968 }
9969 _ACEOF
9970 rm -f conftest.$ac_objext
9971 if { (ac_try="$ac_compile"
9972 case "(($ac_try" in
9973   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9974   *) ac_try_echo=$ac_try;;
9975 esac
9976 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9977 $as_echo "$ac_try_echo") >&5
9978   (eval "$ac_compile") 2>conftest.er1
9979   ac_status=$?
9980   grep -v '^ *+' conftest.er1 >conftest.err
9981   rm -f conftest.er1
9982   cat conftest.err >&5
9983   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9984   (exit $ac_status); } && {
9985          test -z "$ac_c_werror_flag" ||
9986          test ! -s conftest.err
9987        } && test -s conftest.$ac_objext; then
9988   ac_cv_header_stdc=yes
9989 else
9990   $as_echo "$as_me: failed program was:" >&5
9991 sed 's/^/| /' conftest.$ac_ext >&5
9992
9993         ac_cv_header_stdc=no
9994 fi
9995
9996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9997
9998 if test $ac_cv_header_stdc = yes; then
9999   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10000   cat >conftest.$ac_ext <<_ACEOF
10001 /* confdefs.h.  */
10002 _ACEOF
10003 cat confdefs.h >>conftest.$ac_ext
10004 cat >>conftest.$ac_ext <<_ACEOF
10005 /* end confdefs.h.  */
10006 #include <string.h>
10007
10008 _ACEOF
10009 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10010   $EGREP "memchr" >/dev/null 2>&1; then
10011   :
10012 else
10013   ac_cv_header_stdc=no
10014 fi
10015 rm -f conftest*
10016
10017 fi
10018
10019 if test $ac_cv_header_stdc = yes; then
10020   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10021   cat >conftest.$ac_ext <<_ACEOF
10022 /* confdefs.h.  */
10023 _ACEOF
10024 cat confdefs.h >>conftest.$ac_ext
10025 cat >>conftest.$ac_ext <<_ACEOF
10026 /* end confdefs.h.  */
10027 #include <stdlib.h>
10028
10029 _ACEOF
10030 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10031   $EGREP "free" >/dev/null 2>&1; then
10032   :
10033 else
10034   ac_cv_header_stdc=no
10035 fi
10036 rm -f conftest*
10037
10038 fi
10039
10040 if test $ac_cv_header_stdc = yes; then
10041   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10042   if test "$cross_compiling" = yes; then
10043   :
10044 else
10045   cat >conftest.$ac_ext <<_ACEOF
10046 /* confdefs.h.  */
10047 _ACEOF
10048 cat confdefs.h >>conftest.$ac_ext
10049 cat >>conftest.$ac_ext <<_ACEOF
10050 /* end confdefs.h.  */
10051 #include <ctype.h>
10052 #include <stdlib.h>
10053 #if ((' ' & 0x0FF) == 0x020)
10054 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10055 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10056 #else
10057 # define ISLOWER(c) \
10058                    (('a' <= (c) && (c) <= 'i') \
10059                      || ('j' <= (c) && (c) <= 'r') \
10060                      || ('s' <= (c) && (c) <= 'z'))
10061 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10062 #endif
10063
10064 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10065 int
10066 main ()
10067 {
10068   int i;
10069   for (i = 0; i < 256; i++)
10070     if (XOR (islower (i), ISLOWER (i))
10071         || toupper (i) != TOUPPER (i))
10072       return 2;
10073   return 0;
10074 }
10075 _ACEOF
10076 rm -f conftest$ac_exeext
10077 if { (ac_try="$ac_link"
10078 case "(($ac_try" in
10079   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10080   *) ac_try_echo=$ac_try;;
10081 esac
10082 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10083 $as_echo "$ac_try_echo") >&5
10084   (eval "$ac_link") 2>&5
10085   ac_status=$?
10086   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10087   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10088   { (case "(($ac_try" in
10089   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10090   *) ac_try_echo=$ac_try;;
10091 esac
10092 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10093 $as_echo "$ac_try_echo") >&5
10094   (eval "$ac_try") 2>&5
10095   ac_status=$?
10096   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10097   (exit $ac_status); }; }; then
10098   :
10099 else
10100   $as_echo "$as_me: program exited with status $ac_status" >&5
10101 $as_echo "$as_me: failed program was:" >&5
10102 sed 's/^/| /' conftest.$ac_ext >&5
10103
10104 ( exit $ac_status )
10105 ac_cv_header_stdc=no
10106 fi
10107 rm -rf conftest.dSYM
10108 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10109 fi
10110
10111
10112 fi
10113 fi
10114 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
10115 $as_echo "$ac_cv_header_stdc" >&6; }
10116 if test $ac_cv_header_stdc = yes; then
10117
10118 cat >>confdefs.h <<\_ACEOF
10119 #define STDC_HEADERS 1
10120 _ACEOF
10121
10122 fi
10123
10124 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10135                   inttypes.h stdint.h unistd.h
10136 do
10137 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10138 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10139 $as_echo_n "checking for $ac_header... " >&6; }
10140 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10141   $as_echo_n "(cached) " >&6
10142 else
10143   cat >conftest.$ac_ext <<_ACEOF
10144 /* confdefs.h.  */
10145 _ACEOF
10146 cat confdefs.h >>conftest.$ac_ext
10147 cat >>conftest.$ac_ext <<_ACEOF
10148 /* end confdefs.h.  */
10149 $ac_includes_default
10150
10151 #include <$ac_header>
10152 _ACEOF
10153 rm -f conftest.$ac_objext
10154 if { (ac_try="$ac_compile"
10155 case "(($ac_try" in
10156   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10157   *) ac_try_echo=$ac_try;;
10158 esac
10159 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10160 $as_echo "$ac_try_echo") >&5
10161   (eval "$ac_compile") 2>conftest.er1
10162   ac_status=$?
10163   grep -v '^ *+' conftest.er1 >conftest.err
10164   rm -f conftest.er1
10165   cat conftest.err >&5
10166   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10167   (exit $ac_status); } && {
10168          test -z "$ac_c_werror_flag" ||
10169          test ! -s conftest.err
10170        } && test -s conftest.$ac_objext; then
10171   eval "$as_ac_Header=yes"
10172 else
10173   $as_echo "$as_me: failed program was:" >&5
10174 sed 's/^/| /' conftest.$ac_ext >&5
10175
10176         eval "$as_ac_Header=no"
10177 fi
10178
10179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10180 fi
10181 ac_res=`eval 'as_val=${'$as_ac_Header'}
10182                  $as_echo "$as_val"'`
10183                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10184 $as_echo "$ac_res" >&6; }
10185 as_val=`eval 'as_val=${'$as_ac_Header'}
10186                  $as_echo "$as_val"'`
10187    if test "x$as_val" = x""yes; then
10188   cat >>confdefs.h <<_ACEOF
10189 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10190 _ACEOF
10191
10192 fi
10193
10194 done
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225 for ac_header in crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h poll.h pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/ucred.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
10226 do
10227 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10228 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10229   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10230 $as_echo_n "checking for $ac_header... " >&6; }
10231 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10232   $as_echo_n "(cached) " >&6
10233 fi
10234 ac_res=`eval 'as_val=${'$as_ac_Header'}
10235                  $as_echo "$as_val"'`
10236                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10237 $as_echo "$ac_res" >&6; }
10238 else
10239   # Is the header compilable?
10240 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10241 $as_echo_n "checking $ac_header usability... " >&6; }
10242 cat >conftest.$ac_ext <<_ACEOF
10243 /* confdefs.h.  */
10244 _ACEOF
10245 cat confdefs.h >>conftest.$ac_ext
10246 cat >>conftest.$ac_ext <<_ACEOF
10247 /* end confdefs.h.  */
10248 $ac_includes_default
10249 #include <$ac_header>
10250 _ACEOF
10251 rm -f conftest.$ac_objext
10252 if { (ac_try="$ac_compile"
10253 case "(($ac_try" in
10254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10255   *) ac_try_echo=$ac_try;;
10256 esac
10257 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10258 $as_echo "$ac_try_echo") >&5
10259   (eval "$ac_compile") 2>conftest.er1
10260   ac_status=$?
10261   grep -v '^ *+' conftest.er1 >conftest.err
10262   rm -f conftest.er1
10263   cat conftest.err >&5
10264   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10265   (exit $ac_status); } && {
10266          test -z "$ac_c_werror_flag" ||
10267          test ! -s conftest.err
10268        } && test -s conftest.$ac_objext; then
10269   ac_header_compiler=yes
10270 else
10271   $as_echo "$as_me: failed program was:" >&5
10272 sed 's/^/| /' conftest.$ac_ext >&5
10273
10274         ac_header_compiler=no
10275 fi
10276
10277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10278 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10279 $as_echo "$ac_header_compiler" >&6; }
10280
10281 # Is the header present?
10282 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10283 $as_echo_n "checking $ac_header presence... " >&6; }
10284 cat >conftest.$ac_ext <<_ACEOF
10285 /* confdefs.h.  */
10286 _ACEOF
10287 cat confdefs.h >>conftest.$ac_ext
10288 cat >>conftest.$ac_ext <<_ACEOF
10289 /* end confdefs.h.  */
10290 #include <$ac_header>
10291 _ACEOF
10292 if { (ac_try="$ac_cpp conftest.$ac_ext"
10293 case "(($ac_try" in
10294   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10295   *) ac_try_echo=$ac_try;;
10296 esac
10297 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10298 $as_echo "$ac_try_echo") >&5
10299   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10300   ac_status=$?
10301   grep -v '^ *+' conftest.er1 >conftest.err
10302   rm -f conftest.er1
10303   cat conftest.err >&5
10304   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10305   (exit $ac_status); } >/dev/null && {
10306          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10307          test ! -s conftest.err
10308        }; then
10309   ac_header_preproc=yes
10310 else
10311   $as_echo "$as_me: failed program was:" >&5
10312 sed 's/^/| /' conftest.$ac_ext >&5
10313
10314   ac_header_preproc=no
10315 fi
10316
10317 rm -f conftest.err conftest.$ac_ext
10318 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10319 $as_echo "$ac_header_preproc" >&6; }
10320
10321 # So?  What about this header?
10322 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10323   yes:no: )
10324     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10325 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10326     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10327 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10328     ac_header_preproc=yes
10329     ;;
10330   no:yes:* )
10331     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10332 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10333     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10334 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10335     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10336 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10337     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10338 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10339     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10340 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10341     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10342 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10343     ( cat <<\_ASBOX
10344 ## ---------------------------------------- ##
10345 ## Report this to pgsql-bugs@postgresql.org ##
10346 ## ---------------------------------------- ##
10347 _ASBOX
10348      ) | sed "s/^/$as_me: WARNING:     /" >&2
10349     ;;
10350 esac
10351 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10352 $as_echo_n "checking for $ac_header... " >&6; }
10353 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10354   $as_echo_n "(cached) " >&6
10355 else
10356   eval "$as_ac_Header=\$ac_header_preproc"
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
10363 fi
10364 as_val=`eval 'as_val=${'$as_ac_Header'}
10365                  $as_echo "$as_val"'`
10366    if test "x$as_val" = x""yes; then
10367   cat >>confdefs.h <<_ACEOF
10368 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10369 _ACEOF
10370
10371 fi
10372
10373 done
10374
10375
10376 # On BSD, cpp test for net/if.h will fail unless sys/socket.h
10377 # is included first.
10378
10379 for ac_header in net/if.h
10380 do
10381 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10382 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10383 $as_echo_n "checking for $ac_header... " >&6; }
10384 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10385   $as_echo_n "(cached) " >&6
10386 else
10387   cat >conftest.$ac_ext <<_ACEOF
10388 /* confdefs.h.  */
10389 _ACEOF
10390 cat confdefs.h >>conftest.$ac_ext
10391 cat >>conftest.$ac_ext <<_ACEOF
10392 /* end confdefs.h.  */
10393 $ac_includes_default
10394 #ifdef HAVE_SYS_SOCKET_H
10395 #include <sys/socket.h>
10396 #endif
10397
10398
10399 #include <$ac_header>
10400 _ACEOF
10401 rm -f conftest.$ac_objext
10402 if { (ac_try="$ac_compile"
10403 case "(($ac_try" in
10404   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10405   *) ac_try_echo=$ac_try;;
10406 esac
10407 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10408 $as_echo "$ac_try_echo") >&5
10409   (eval "$ac_compile") 2>conftest.er1
10410   ac_status=$?
10411   grep -v '^ *+' conftest.er1 >conftest.err
10412   rm -f conftest.er1
10413   cat conftest.err >&5
10414   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10415   (exit $ac_status); } && {
10416          test -z "$ac_c_werror_flag" ||
10417          test ! -s conftest.err
10418        } && test -s conftest.$ac_objext; then
10419   eval "$as_ac_Header=yes"
10420 else
10421   $as_echo "$as_me: failed program was:" >&5
10422 sed 's/^/| /' conftest.$ac_ext >&5
10423
10424         eval "$as_ac_Header=no"
10425 fi
10426
10427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10428 fi
10429 ac_res=`eval 'as_val=${'$as_ac_Header'}
10430                  $as_echo "$as_val"'`
10431                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10432 $as_echo "$ac_res" >&6; }
10433 as_val=`eval 'as_val=${'$as_ac_Header'}
10434                  $as_echo "$as_val"'`
10435    if test "x$as_val" = x""yes; then
10436   cat >>confdefs.h <<_ACEOF
10437 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10438 _ACEOF
10439
10440 fi
10441
10442 done
10443
10444
10445 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
10446 # netinet/in.h is included first.
10447
10448 for ac_header in netinet/in.h
10449 do
10450 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10451 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10452   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10453 $as_echo_n "checking for $ac_header... " >&6; }
10454 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10455   $as_echo_n "(cached) " >&6
10456 fi
10457 ac_res=`eval 'as_val=${'$as_ac_Header'}
10458                  $as_echo "$as_val"'`
10459                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10460 $as_echo "$ac_res" >&6; }
10461 else
10462   # Is the header compilable?
10463 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10464 $as_echo_n "checking $ac_header usability... " >&6; }
10465 cat >conftest.$ac_ext <<_ACEOF
10466 /* confdefs.h.  */
10467 _ACEOF
10468 cat confdefs.h >>conftest.$ac_ext
10469 cat >>conftest.$ac_ext <<_ACEOF
10470 /* end confdefs.h.  */
10471 $ac_includes_default
10472 #include <$ac_header>
10473 _ACEOF
10474 rm -f conftest.$ac_objext
10475 if { (ac_try="$ac_compile"
10476 case "(($ac_try" in
10477   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10478   *) ac_try_echo=$ac_try;;
10479 esac
10480 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10481 $as_echo "$ac_try_echo") >&5
10482   (eval "$ac_compile") 2>conftest.er1
10483   ac_status=$?
10484   grep -v '^ *+' conftest.er1 >conftest.err
10485   rm -f conftest.er1
10486   cat conftest.err >&5
10487   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10488   (exit $ac_status); } && {
10489          test -z "$ac_c_werror_flag" ||
10490          test ! -s conftest.err
10491        } && test -s conftest.$ac_objext; then
10492   ac_header_compiler=yes
10493 else
10494   $as_echo "$as_me: failed program was:" >&5
10495 sed 's/^/| /' conftest.$ac_ext >&5
10496
10497         ac_header_compiler=no
10498 fi
10499
10500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10501 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10502 $as_echo "$ac_header_compiler" >&6; }
10503
10504 # Is the header present?
10505 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10506 $as_echo_n "checking $ac_header presence... " >&6; }
10507 cat >conftest.$ac_ext <<_ACEOF
10508 /* confdefs.h.  */
10509 _ACEOF
10510 cat confdefs.h >>conftest.$ac_ext
10511 cat >>conftest.$ac_ext <<_ACEOF
10512 /* end confdefs.h.  */
10513 #include <$ac_header>
10514 _ACEOF
10515 if { (ac_try="$ac_cpp conftest.$ac_ext"
10516 case "(($ac_try" in
10517   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10518   *) ac_try_echo=$ac_try;;
10519 esac
10520 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10521 $as_echo "$ac_try_echo") >&5
10522   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10523   ac_status=$?
10524   grep -v '^ *+' conftest.er1 >conftest.err
10525   rm -f conftest.er1
10526   cat conftest.err >&5
10527   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10528   (exit $ac_status); } >/dev/null && {
10529          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10530          test ! -s conftest.err
10531        }; then
10532   ac_header_preproc=yes
10533 else
10534   $as_echo "$as_me: failed program was:" >&5
10535 sed 's/^/| /' conftest.$ac_ext >&5
10536
10537   ac_header_preproc=no
10538 fi
10539
10540 rm -f conftest.err conftest.$ac_ext
10541 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10542 $as_echo "$ac_header_preproc" >&6; }
10543
10544 # So?  What about this header?
10545 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10546   yes:no: )
10547     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10548 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10549     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10550 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10551     ac_header_preproc=yes
10552     ;;
10553   no:yes:* )
10554     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10555 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10556     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10557 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10558     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10559 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10560     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10561 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10562     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10563 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10564     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10565 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10566     ( cat <<\_ASBOX
10567 ## ---------------------------------------- ##
10568 ## Report this to pgsql-bugs@postgresql.org ##
10569 ## ---------------------------------------- ##
10570 _ASBOX
10571      ) | sed "s/^/$as_me: WARNING:     /" >&2
10572     ;;
10573 esac
10574 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10575 $as_echo_n "checking for $ac_header... " >&6; }
10576 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10577   $as_echo_n "(cached) " >&6
10578 else
10579   eval "$as_ac_Header=\$ac_header_preproc"
10580 fi
10581 ac_res=`eval 'as_val=${'$as_ac_Header'}
10582                  $as_echo "$as_val"'`
10583                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10584 $as_echo "$ac_res" >&6; }
10585
10586 fi
10587 as_val=`eval 'as_val=${'$as_ac_Header'}
10588                  $as_echo "$as_val"'`
10589    if test "x$as_val" = x""yes; then
10590   cat >>confdefs.h <<_ACEOF
10591 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10592 _ACEOF
10593
10594 fi
10595
10596 done
10597
10598
10599 for ac_header in netinet/tcp.h
10600 do
10601 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10602 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10603 $as_echo_n "checking for $ac_header... " >&6; }
10604 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10605   $as_echo_n "(cached) " >&6
10606 else
10607   cat >conftest.$ac_ext <<_ACEOF
10608 /* confdefs.h.  */
10609 _ACEOF
10610 cat confdefs.h >>conftest.$ac_ext
10611 cat >>conftest.$ac_ext <<_ACEOF
10612 /* end confdefs.h.  */
10613 $ac_includes_default
10614 #ifdef HAVE_NETINET_IN_H
10615 #include <netinet/in.h>
10616 #endif
10617
10618
10619 #include <$ac_header>
10620 _ACEOF
10621 rm -f conftest.$ac_objext
10622 if { (ac_try="$ac_compile"
10623 case "(($ac_try" in
10624   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10625   *) ac_try_echo=$ac_try;;
10626 esac
10627 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10628 $as_echo "$ac_try_echo") >&5
10629   (eval "$ac_compile") 2>conftest.er1
10630   ac_status=$?
10631   grep -v '^ *+' conftest.er1 >conftest.err
10632   rm -f conftest.er1
10633   cat conftest.err >&5
10634   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10635   (exit $ac_status); } && {
10636          test -z "$ac_c_werror_flag" ||
10637          test ! -s conftest.err
10638        } && test -s conftest.$ac_objext; then
10639   eval "$as_ac_Header=yes"
10640 else
10641   $as_echo "$as_me: failed program was:" >&5
10642 sed 's/^/| /' conftest.$ac_ext >&5
10643
10644         eval "$as_ac_Header=no"
10645 fi
10646
10647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10648 fi
10649 ac_res=`eval 'as_val=${'$as_ac_Header'}
10650                  $as_echo "$as_val"'`
10651                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10652 $as_echo "$ac_res" >&6; }
10653 as_val=`eval 'as_val=${'$as_ac_Header'}
10654                  $as_echo "$as_val"'`
10655    if test "x$as_val" = x""yes; then
10656   cat >>confdefs.h <<_ACEOF
10657 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10658 _ACEOF
10659
10660 fi
10661
10662 done
10663
10664
10665 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10666
10667 for ac_header in readline/readline.h
10668 do
10669 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10670 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10671   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10672 $as_echo_n "checking for $ac_header... " >&6; }
10673 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10674   $as_echo_n "(cached) " >&6
10675 fi
10676 ac_res=`eval 'as_val=${'$as_ac_Header'}
10677                  $as_echo "$as_val"'`
10678                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10679 $as_echo "$ac_res" >&6; }
10680 else
10681   # Is the header compilable?
10682 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10683 $as_echo_n "checking $ac_header usability... " >&6; }
10684 cat >conftest.$ac_ext <<_ACEOF
10685 /* confdefs.h.  */
10686 _ACEOF
10687 cat confdefs.h >>conftest.$ac_ext
10688 cat >>conftest.$ac_ext <<_ACEOF
10689 /* end confdefs.h.  */
10690 $ac_includes_default
10691 #include <$ac_header>
10692 _ACEOF
10693 rm -f conftest.$ac_objext
10694 if { (ac_try="$ac_compile"
10695 case "(($ac_try" in
10696   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10697   *) ac_try_echo=$ac_try;;
10698 esac
10699 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10700 $as_echo "$ac_try_echo") >&5
10701   (eval "$ac_compile") 2>conftest.er1
10702   ac_status=$?
10703   grep -v '^ *+' conftest.er1 >conftest.err
10704   rm -f conftest.er1
10705   cat conftest.err >&5
10706   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10707   (exit $ac_status); } && {
10708          test -z "$ac_c_werror_flag" ||
10709          test ! -s conftest.err
10710        } && test -s conftest.$ac_objext; then
10711   ac_header_compiler=yes
10712 else
10713   $as_echo "$as_me: failed program was:" >&5
10714 sed 's/^/| /' conftest.$ac_ext >&5
10715
10716         ac_header_compiler=no
10717 fi
10718
10719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10720 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10721 $as_echo "$ac_header_compiler" >&6; }
10722
10723 # Is the header present?
10724 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10725 $as_echo_n "checking $ac_header presence... " >&6; }
10726 cat >conftest.$ac_ext <<_ACEOF
10727 /* confdefs.h.  */
10728 _ACEOF
10729 cat confdefs.h >>conftest.$ac_ext
10730 cat >>conftest.$ac_ext <<_ACEOF
10731 /* end confdefs.h.  */
10732 #include <$ac_header>
10733 _ACEOF
10734 if { (ac_try="$ac_cpp conftest.$ac_ext"
10735 case "(($ac_try" in
10736   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10737   *) ac_try_echo=$ac_try;;
10738 esac
10739 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10740 $as_echo "$ac_try_echo") >&5
10741   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10742   ac_status=$?
10743   grep -v '^ *+' conftest.er1 >conftest.err
10744   rm -f conftest.er1
10745   cat conftest.err >&5
10746   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10747   (exit $ac_status); } >/dev/null && {
10748          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10749          test ! -s conftest.err
10750        }; then
10751   ac_header_preproc=yes
10752 else
10753   $as_echo "$as_me: failed program was:" >&5
10754 sed 's/^/| /' conftest.$ac_ext >&5
10755
10756   ac_header_preproc=no
10757 fi
10758
10759 rm -f conftest.err conftest.$ac_ext
10760 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10761 $as_echo "$ac_header_preproc" >&6; }
10762
10763 # So?  What about this header?
10764 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10765   yes:no: )
10766     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10767 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10768     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10769 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10770     ac_header_preproc=yes
10771     ;;
10772   no:yes:* )
10773     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10774 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10775     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10776 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10777     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10778 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10779     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10780 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10781     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10782 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10783     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10784 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10785     ( cat <<\_ASBOX
10786 ## ---------------------------------------- ##
10787 ## Report this to pgsql-bugs@postgresql.org ##
10788 ## ---------------------------------------- ##
10789 _ASBOX
10790      ) | sed "s/^/$as_me: WARNING:     /" >&2
10791     ;;
10792 esac
10793 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10794 $as_echo_n "checking for $ac_header... " >&6; }
10795 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10796   $as_echo_n "(cached) " >&6
10797 else
10798   eval "$as_ac_Header=\$ac_header_preproc"
10799 fi
10800 ac_res=`eval 'as_val=${'$as_ac_Header'}
10801                  $as_echo "$as_val"'`
10802                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10803 $as_echo "$ac_res" >&6; }
10804
10805 fi
10806 as_val=`eval 'as_val=${'$as_ac_Header'}
10807                  $as_echo "$as_val"'`
10808    if test "x$as_val" = x""yes; then
10809   cat >>confdefs.h <<_ACEOF
10810 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10811 _ACEOF
10812
10813 else
10814
10815 for ac_header in readline.h
10816 do
10817 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10818 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10819   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10820 $as_echo_n "checking for $ac_header... " >&6; }
10821 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10822   $as_echo_n "(cached) " >&6
10823 fi
10824 ac_res=`eval 'as_val=${'$as_ac_Header'}
10825                  $as_echo "$as_val"'`
10826                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10827 $as_echo "$ac_res" >&6; }
10828 else
10829   # Is the header compilable?
10830 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10831 $as_echo_n "checking $ac_header usability... " >&6; }
10832 cat >conftest.$ac_ext <<_ACEOF
10833 /* confdefs.h.  */
10834 _ACEOF
10835 cat confdefs.h >>conftest.$ac_ext
10836 cat >>conftest.$ac_ext <<_ACEOF
10837 /* end confdefs.h.  */
10838 $ac_includes_default
10839 #include <$ac_header>
10840 _ACEOF
10841 rm -f conftest.$ac_objext
10842 if { (ac_try="$ac_compile"
10843 case "(($ac_try" in
10844   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10845   *) ac_try_echo=$ac_try;;
10846 esac
10847 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10848 $as_echo "$ac_try_echo") >&5
10849   (eval "$ac_compile") 2>conftest.er1
10850   ac_status=$?
10851   grep -v '^ *+' conftest.er1 >conftest.err
10852   rm -f conftest.er1
10853   cat conftest.err >&5
10854   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10855   (exit $ac_status); } && {
10856          test -z "$ac_c_werror_flag" ||
10857          test ! -s conftest.err
10858        } && test -s conftest.$ac_objext; then
10859   ac_header_compiler=yes
10860 else
10861   $as_echo "$as_me: failed program was:" >&5
10862 sed 's/^/| /' conftest.$ac_ext >&5
10863
10864         ac_header_compiler=no
10865 fi
10866
10867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10868 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10869 $as_echo "$ac_header_compiler" >&6; }
10870
10871 # Is the header present?
10872 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
10873 $as_echo_n "checking $ac_header presence... " >&6; }
10874 cat >conftest.$ac_ext <<_ACEOF
10875 /* confdefs.h.  */
10876 _ACEOF
10877 cat confdefs.h >>conftest.$ac_ext
10878 cat >>conftest.$ac_ext <<_ACEOF
10879 /* end confdefs.h.  */
10880 #include <$ac_header>
10881 _ACEOF
10882 if { (ac_try="$ac_cpp conftest.$ac_ext"
10883 case "(($ac_try" in
10884   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10885   *) ac_try_echo=$ac_try;;
10886 esac
10887 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10888 $as_echo "$ac_try_echo") >&5
10889   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10890   ac_status=$?
10891   grep -v '^ *+' conftest.er1 >conftest.err
10892   rm -f conftest.er1
10893   cat conftest.err >&5
10894   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10895   (exit $ac_status); } >/dev/null && {
10896          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10897          test ! -s conftest.err
10898        }; then
10899   ac_header_preproc=yes
10900 else
10901   $as_echo "$as_me: failed program was:" >&5
10902 sed 's/^/| /' conftest.$ac_ext >&5
10903
10904   ac_header_preproc=no
10905 fi
10906
10907 rm -f conftest.err conftest.$ac_ext
10908 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10909 $as_echo "$ac_header_preproc" >&6; }
10910
10911 # So?  What about this header?
10912 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10913   yes:no: )
10914     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10915 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10916     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10917 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10918     ac_header_preproc=yes
10919     ;;
10920   no:yes:* )
10921     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10922 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10923     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10924 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10925     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10926 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10927     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10928 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10929     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10930 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10931     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10932 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10933     ( cat <<\_ASBOX
10934 ## ---------------------------------------- ##
10935 ## Report this to pgsql-bugs@postgresql.org ##
10936 ## ---------------------------------------- ##
10937 _ASBOX
10938      ) | sed "s/^/$as_me: WARNING:     /" >&2
10939     ;;
10940 esac
10941 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10942 $as_echo_n "checking for $ac_header... " >&6; }
10943 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10944   $as_echo_n "(cached) " >&6
10945 else
10946   eval "$as_ac_Header=\$ac_header_preproc"
10947 fi
10948 ac_res=`eval 'as_val=${'$as_ac_Header'}
10949                  $as_echo "$as_val"'`
10950                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10951 $as_echo "$ac_res" >&6; }
10952
10953 fi
10954 as_val=`eval 'as_val=${'$as_ac_Header'}
10955                  $as_echo "$as_val"'`
10956    if test "x$as_val" = x""yes; then
10957   cat >>confdefs.h <<_ACEOF
10958 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10959 _ACEOF
10960
10961 else
10962   { { $as_echo "$as_me:$LINENO: error: readline header not found
10963 If you have readline already installed, see config.log for details on the
10964 failure.  It is possible the compiler isn't looking in the proper directory.
10965 Use --without-readline to disable readline support." >&5
10966 $as_echo "$as_me: error: readline header not found
10967 If you have readline already installed, see config.log for details on the
10968 failure.  It is possible the compiler isn't looking in the proper directory.
10969 Use --without-readline to disable readline support." >&2;}
10970    { (exit 1); exit 1; }; }
10971 fi
10972
10973 done
10974
10975 fi
10976
10977 done
10978
10979
10980 for ac_header in readline/history.h
10981 do
10982 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10983 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10984   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
10985 $as_echo_n "checking for $ac_header... " >&6; }
10986 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10987   $as_echo_n "(cached) " >&6
10988 fi
10989 ac_res=`eval 'as_val=${'$as_ac_Header'}
10990                  $as_echo "$as_val"'`
10991                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
10992 $as_echo "$ac_res" >&6; }
10993 else
10994   # Is the header compilable?
10995 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
10996 $as_echo_n "checking $ac_header usability... " >&6; }
10997 cat >conftest.$ac_ext <<_ACEOF
10998 /* confdefs.h.  */
10999 _ACEOF
11000 cat confdefs.h >>conftest.$ac_ext
11001 cat >>conftest.$ac_ext <<_ACEOF
11002 /* end confdefs.h.  */
11003 $ac_includes_default
11004 #include <$ac_header>
11005 _ACEOF
11006 rm -f conftest.$ac_objext
11007 if { (ac_try="$ac_compile"
11008 case "(($ac_try" in
11009   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11010   *) ac_try_echo=$ac_try;;
11011 esac
11012 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11013 $as_echo "$ac_try_echo") >&5
11014   (eval "$ac_compile") 2>conftest.er1
11015   ac_status=$?
11016   grep -v '^ *+' conftest.er1 >conftest.err
11017   rm -f conftest.er1
11018   cat conftest.err >&5
11019   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11020   (exit $ac_status); } && {
11021          test -z "$ac_c_werror_flag" ||
11022          test ! -s conftest.err
11023        } && test -s conftest.$ac_objext; then
11024   ac_header_compiler=yes
11025 else
11026   $as_echo "$as_me: failed program was:" >&5
11027 sed 's/^/| /' conftest.$ac_ext >&5
11028
11029         ac_header_compiler=no
11030 fi
11031
11032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11033 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11034 $as_echo "$ac_header_compiler" >&6; }
11035
11036 # Is the header present?
11037 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11038 $as_echo_n "checking $ac_header presence... " >&6; }
11039 cat >conftest.$ac_ext <<_ACEOF
11040 /* confdefs.h.  */
11041 _ACEOF
11042 cat confdefs.h >>conftest.$ac_ext
11043 cat >>conftest.$ac_ext <<_ACEOF
11044 /* end confdefs.h.  */
11045 #include <$ac_header>
11046 _ACEOF
11047 if { (ac_try="$ac_cpp conftest.$ac_ext"
11048 case "(($ac_try" in
11049   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11050   *) ac_try_echo=$ac_try;;
11051 esac
11052 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11053 $as_echo "$ac_try_echo") >&5
11054   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11055   ac_status=$?
11056   grep -v '^ *+' conftest.er1 >conftest.err
11057   rm -f conftest.er1
11058   cat conftest.err >&5
11059   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11060   (exit $ac_status); } >/dev/null && {
11061          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11062          test ! -s conftest.err
11063        }; then
11064   ac_header_preproc=yes
11065 else
11066   $as_echo "$as_me: failed program was:" >&5
11067 sed 's/^/| /' conftest.$ac_ext >&5
11068
11069   ac_header_preproc=no
11070 fi
11071
11072 rm -f conftest.err conftest.$ac_ext
11073 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11074 $as_echo "$ac_header_preproc" >&6; }
11075
11076 # So?  What about this header?
11077 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11078   yes:no: )
11079     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11080 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11081     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11082 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11083     ac_header_preproc=yes
11084     ;;
11085   no:yes:* )
11086     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11087 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11088     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11089 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11090     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11091 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11092     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11093 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11094     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11095 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11096     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11097 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11098     ( cat <<\_ASBOX
11099 ## ---------------------------------------- ##
11100 ## Report this to pgsql-bugs@postgresql.org ##
11101 ## ---------------------------------------- ##
11102 _ASBOX
11103      ) | sed "s/^/$as_me: WARNING:     /" >&2
11104     ;;
11105 esac
11106 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11107 $as_echo_n "checking for $ac_header... " >&6; }
11108 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11109   $as_echo_n "(cached) " >&6
11110 else
11111   eval "$as_ac_Header=\$ac_header_preproc"
11112 fi
11113 ac_res=`eval 'as_val=${'$as_ac_Header'}
11114                  $as_echo "$as_val"'`
11115                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11116 $as_echo "$ac_res" >&6; }
11117
11118 fi
11119 as_val=`eval 'as_val=${'$as_ac_Header'}
11120                  $as_echo "$as_val"'`
11121    if test "x$as_val" = x""yes; then
11122   cat >>confdefs.h <<_ACEOF
11123 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11124 _ACEOF
11125
11126 else
11127
11128 for ac_header in history.h
11129 do
11130 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11131 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11132   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11133 $as_echo_n "checking for $ac_header... " >&6; }
11134 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11135   $as_echo_n "(cached) " >&6
11136 fi
11137 ac_res=`eval 'as_val=${'$as_ac_Header'}
11138                  $as_echo "$as_val"'`
11139                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11140 $as_echo "$ac_res" >&6; }
11141 else
11142   # Is the header compilable?
11143 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11144 $as_echo_n "checking $ac_header usability... " >&6; }
11145 cat >conftest.$ac_ext <<_ACEOF
11146 /* confdefs.h.  */
11147 _ACEOF
11148 cat confdefs.h >>conftest.$ac_ext
11149 cat >>conftest.$ac_ext <<_ACEOF
11150 /* end confdefs.h.  */
11151 $ac_includes_default
11152 #include <$ac_header>
11153 _ACEOF
11154 rm -f conftest.$ac_objext
11155 if { (ac_try="$ac_compile"
11156 case "(($ac_try" in
11157   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11158   *) ac_try_echo=$ac_try;;
11159 esac
11160 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11161 $as_echo "$ac_try_echo") >&5
11162   (eval "$ac_compile") 2>conftest.er1
11163   ac_status=$?
11164   grep -v '^ *+' conftest.er1 >conftest.err
11165   rm -f conftest.er1
11166   cat conftest.err >&5
11167   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11168   (exit $ac_status); } && {
11169          test -z "$ac_c_werror_flag" ||
11170          test ! -s conftest.err
11171        } && test -s conftest.$ac_objext; then
11172   ac_header_compiler=yes
11173 else
11174   $as_echo "$as_me: failed program was:" >&5
11175 sed 's/^/| /' conftest.$ac_ext >&5
11176
11177         ac_header_compiler=no
11178 fi
11179
11180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11181 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11182 $as_echo "$ac_header_compiler" >&6; }
11183
11184 # Is the header present?
11185 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11186 $as_echo_n "checking $ac_header presence... " >&6; }
11187 cat >conftest.$ac_ext <<_ACEOF
11188 /* confdefs.h.  */
11189 _ACEOF
11190 cat confdefs.h >>conftest.$ac_ext
11191 cat >>conftest.$ac_ext <<_ACEOF
11192 /* end confdefs.h.  */
11193 #include <$ac_header>
11194 _ACEOF
11195 if { (ac_try="$ac_cpp conftest.$ac_ext"
11196 case "(($ac_try" in
11197   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11198   *) ac_try_echo=$ac_try;;
11199 esac
11200 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11201 $as_echo "$ac_try_echo") >&5
11202   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11203   ac_status=$?
11204   grep -v '^ *+' conftest.er1 >conftest.err
11205   rm -f conftest.er1
11206   cat conftest.err >&5
11207   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11208   (exit $ac_status); } >/dev/null && {
11209          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11210          test ! -s conftest.err
11211        }; then
11212   ac_header_preproc=yes
11213 else
11214   $as_echo "$as_me: failed program was:" >&5
11215 sed 's/^/| /' conftest.$ac_ext >&5
11216
11217   ac_header_preproc=no
11218 fi
11219
11220 rm -f conftest.err conftest.$ac_ext
11221 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11222 $as_echo "$ac_header_preproc" >&6; }
11223
11224 # So?  What about this header?
11225 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11226   yes:no: )
11227     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11228 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11229     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11230 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11231     ac_header_preproc=yes
11232     ;;
11233   no:yes:* )
11234     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11235 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11236     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11237 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11238     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11239 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11240     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11241 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11242     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11243 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11244     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11245 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11246     ( cat <<\_ASBOX
11247 ## ---------------------------------------- ##
11248 ## Report this to pgsql-bugs@postgresql.org ##
11249 ## ---------------------------------------- ##
11250 _ASBOX
11251      ) | sed "s/^/$as_me: WARNING:     /" >&2
11252     ;;
11253 esac
11254 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11255 $as_echo_n "checking for $ac_header... " >&6; }
11256 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11257   $as_echo_n "(cached) " >&6
11258 else
11259   eval "$as_ac_Header=\$ac_header_preproc"
11260 fi
11261 ac_res=`eval 'as_val=${'$as_ac_Header'}
11262                  $as_echo "$as_val"'`
11263                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11264 $as_echo "$ac_res" >&6; }
11265
11266 fi
11267 as_val=`eval 'as_val=${'$as_ac_Header'}
11268                  $as_echo "$as_val"'`
11269    if test "x$as_val" = x""yes; then
11270   cat >>confdefs.h <<_ACEOF
11271 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11272 _ACEOF
11273
11274 else
11275   { { $as_echo "$as_me:$LINENO: error: history header not found
11276 If you have readline already installed, see config.log for details on the
11277 failure.  It is possible the compiler isn't looking in the proper directory.
11278 Use --without-readline to disable readline support." >&5
11279 $as_echo "$as_me: error: history header not found
11280 If you have readline already installed, see config.log for details on the
11281 failure.  It is possible the compiler isn't looking in the proper directory.
11282 Use --without-readline to disable readline support." >&2;}
11283    { (exit 1); exit 1; }; }
11284 fi
11285
11286 done
11287
11288 fi
11289
11290 done
11291
11292 fi
11293
11294 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
11295 # Some installations of libedit usurp /usr/include/readline/, which seems
11296 # bad practice, since in combined installations readline will have its headers
11297 # there.  We might have to resort to AC_EGREP checks to make sure we found
11298 # the proper header...
11299
11300 for ac_header in editline/readline.h
11301 do
11302 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11303 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11304   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11305 $as_echo_n "checking for $ac_header... " >&6; }
11306 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11307   $as_echo_n "(cached) " >&6
11308 fi
11309 ac_res=`eval 'as_val=${'$as_ac_Header'}
11310                  $as_echo "$as_val"'`
11311                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11312 $as_echo "$ac_res" >&6; }
11313 else
11314   # Is the header compilable?
11315 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11316 $as_echo_n "checking $ac_header usability... " >&6; }
11317 cat >conftest.$ac_ext <<_ACEOF
11318 /* confdefs.h.  */
11319 _ACEOF
11320 cat confdefs.h >>conftest.$ac_ext
11321 cat >>conftest.$ac_ext <<_ACEOF
11322 /* end confdefs.h.  */
11323 $ac_includes_default
11324 #include <$ac_header>
11325 _ACEOF
11326 rm -f conftest.$ac_objext
11327 if { (ac_try="$ac_compile"
11328 case "(($ac_try" in
11329   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11330   *) ac_try_echo=$ac_try;;
11331 esac
11332 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11333 $as_echo "$ac_try_echo") >&5
11334   (eval "$ac_compile") 2>conftest.er1
11335   ac_status=$?
11336   grep -v '^ *+' conftest.er1 >conftest.err
11337   rm -f conftest.er1
11338   cat conftest.err >&5
11339   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11340   (exit $ac_status); } && {
11341          test -z "$ac_c_werror_flag" ||
11342          test ! -s conftest.err
11343        } && test -s conftest.$ac_objext; then
11344   ac_header_compiler=yes
11345 else
11346   $as_echo "$as_me: failed program was:" >&5
11347 sed 's/^/| /' conftest.$ac_ext >&5
11348
11349         ac_header_compiler=no
11350 fi
11351
11352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11353 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11354 $as_echo "$ac_header_compiler" >&6; }
11355
11356 # Is the header present?
11357 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11358 $as_echo_n "checking $ac_header presence... " >&6; }
11359 cat >conftest.$ac_ext <<_ACEOF
11360 /* confdefs.h.  */
11361 _ACEOF
11362 cat confdefs.h >>conftest.$ac_ext
11363 cat >>conftest.$ac_ext <<_ACEOF
11364 /* end confdefs.h.  */
11365 #include <$ac_header>
11366 _ACEOF
11367 if { (ac_try="$ac_cpp conftest.$ac_ext"
11368 case "(($ac_try" in
11369   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11370   *) ac_try_echo=$ac_try;;
11371 esac
11372 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11373 $as_echo "$ac_try_echo") >&5
11374   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11375   ac_status=$?
11376   grep -v '^ *+' conftest.er1 >conftest.err
11377   rm -f conftest.er1
11378   cat conftest.err >&5
11379   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11380   (exit $ac_status); } >/dev/null && {
11381          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11382          test ! -s conftest.err
11383        }; then
11384   ac_header_preproc=yes
11385 else
11386   $as_echo "$as_me: failed program was:" >&5
11387 sed 's/^/| /' conftest.$ac_ext >&5
11388
11389   ac_header_preproc=no
11390 fi
11391
11392 rm -f conftest.err conftest.$ac_ext
11393 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11394 $as_echo "$ac_header_preproc" >&6; }
11395
11396 # So?  What about this header?
11397 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11398   yes:no: )
11399     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11400 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11401     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11402 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11403     ac_header_preproc=yes
11404     ;;
11405   no:yes:* )
11406     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11407 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11408     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11409 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11410     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11411 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11412     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11413 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11414     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11415 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11416     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11417 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11418     ( cat <<\_ASBOX
11419 ## ---------------------------------------- ##
11420 ## Report this to pgsql-bugs@postgresql.org ##
11421 ## ---------------------------------------- ##
11422 _ASBOX
11423      ) | sed "s/^/$as_me: WARNING:     /" >&2
11424     ;;
11425 esac
11426 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11427 $as_echo_n "checking for $ac_header... " >&6; }
11428 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11429   $as_echo_n "(cached) " >&6
11430 else
11431   eval "$as_ac_Header=\$ac_header_preproc"
11432 fi
11433 ac_res=`eval 'as_val=${'$as_ac_Header'}
11434                  $as_echo "$as_val"'`
11435                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11436 $as_echo "$ac_res" >&6; }
11437
11438 fi
11439 as_val=`eval 'as_val=${'$as_ac_Header'}
11440                  $as_echo "$as_val"'`
11441    if test "x$as_val" = x""yes; then
11442   cat >>confdefs.h <<_ACEOF
11443 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11444 _ACEOF
11445
11446 else
11447
11448 for ac_header in readline.h
11449 do
11450 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11451 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11452   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11453 $as_echo_n "checking for $ac_header... " >&6; }
11454 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11455   $as_echo_n "(cached) " >&6
11456 fi
11457 ac_res=`eval 'as_val=${'$as_ac_Header'}
11458                  $as_echo "$as_val"'`
11459                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11460 $as_echo "$ac_res" >&6; }
11461 else
11462   # Is the header compilable?
11463 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11464 $as_echo_n "checking $ac_header usability... " >&6; }
11465 cat >conftest.$ac_ext <<_ACEOF
11466 /* confdefs.h.  */
11467 _ACEOF
11468 cat confdefs.h >>conftest.$ac_ext
11469 cat >>conftest.$ac_ext <<_ACEOF
11470 /* end confdefs.h.  */
11471 $ac_includes_default
11472 #include <$ac_header>
11473 _ACEOF
11474 rm -f conftest.$ac_objext
11475 if { (ac_try="$ac_compile"
11476 case "(($ac_try" in
11477   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11478   *) ac_try_echo=$ac_try;;
11479 esac
11480 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11481 $as_echo "$ac_try_echo") >&5
11482   (eval "$ac_compile") 2>conftest.er1
11483   ac_status=$?
11484   grep -v '^ *+' conftest.er1 >conftest.err
11485   rm -f conftest.er1
11486   cat conftest.err >&5
11487   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11488   (exit $ac_status); } && {
11489          test -z "$ac_c_werror_flag" ||
11490          test ! -s conftest.err
11491        } && test -s conftest.$ac_objext; then
11492   ac_header_compiler=yes
11493 else
11494   $as_echo "$as_me: failed program was:" >&5
11495 sed 's/^/| /' conftest.$ac_ext >&5
11496
11497         ac_header_compiler=no
11498 fi
11499
11500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11501 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11502 $as_echo "$ac_header_compiler" >&6; }
11503
11504 # Is the header present?
11505 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11506 $as_echo_n "checking $ac_header presence... " >&6; }
11507 cat >conftest.$ac_ext <<_ACEOF
11508 /* confdefs.h.  */
11509 _ACEOF
11510 cat confdefs.h >>conftest.$ac_ext
11511 cat >>conftest.$ac_ext <<_ACEOF
11512 /* end confdefs.h.  */
11513 #include <$ac_header>
11514 _ACEOF
11515 if { (ac_try="$ac_cpp conftest.$ac_ext"
11516 case "(($ac_try" in
11517   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11518   *) ac_try_echo=$ac_try;;
11519 esac
11520 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11521 $as_echo "$ac_try_echo") >&5
11522   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11523   ac_status=$?
11524   grep -v '^ *+' conftest.er1 >conftest.err
11525   rm -f conftest.er1
11526   cat conftest.err >&5
11527   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11528   (exit $ac_status); } >/dev/null && {
11529          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11530          test ! -s conftest.err
11531        }; then
11532   ac_header_preproc=yes
11533 else
11534   $as_echo "$as_me: failed program was:" >&5
11535 sed 's/^/| /' conftest.$ac_ext >&5
11536
11537   ac_header_preproc=no
11538 fi
11539
11540 rm -f conftest.err conftest.$ac_ext
11541 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11542 $as_echo "$ac_header_preproc" >&6; }
11543
11544 # So?  What about this header?
11545 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11546   yes:no: )
11547     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11548 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11549     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11550 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11551     ac_header_preproc=yes
11552     ;;
11553   no:yes:* )
11554     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11555 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11556     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11557 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11558     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11559 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11560     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11561 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11562     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11563 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11564     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11565 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11566     ( cat <<\_ASBOX
11567 ## ---------------------------------------- ##
11568 ## Report this to pgsql-bugs@postgresql.org ##
11569 ## ---------------------------------------- ##
11570 _ASBOX
11571      ) | sed "s/^/$as_me: WARNING:     /" >&2
11572     ;;
11573 esac
11574 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11575 $as_echo_n "checking for $ac_header... " >&6; }
11576 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11577   $as_echo_n "(cached) " >&6
11578 else
11579   eval "$as_ac_Header=\$ac_header_preproc"
11580 fi
11581 ac_res=`eval 'as_val=${'$as_ac_Header'}
11582                  $as_echo "$as_val"'`
11583                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11584 $as_echo "$ac_res" >&6; }
11585
11586 fi
11587 as_val=`eval 'as_val=${'$as_ac_Header'}
11588                  $as_echo "$as_val"'`
11589    if test "x$as_val" = x""yes; then
11590   cat >>confdefs.h <<_ACEOF
11591 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11592 _ACEOF
11593
11594 else
11595
11596 for ac_header in readline/readline.h
11597 do
11598 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11599 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11600   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11601 $as_echo_n "checking for $ac_header... " >&6; }
11602 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11603   $as_echo_n "(cached) " >&6
11604 fi
11605 ac_res=`eval 'as_val=${'$as_ac_Header'}
11606                  $as_echo "$as_val"'`
11607                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11608 $as_echo "$ac_res" >&6; }
11609 else
11610   # Is the header compilable?
11611 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11612 $as_echo_n "checking $ac_header usability... " >&6; }
11613 cat >conftest.$ac_ext <<_ACEOF
11614 /* confdefs.h.  */
11615 _ACEOF
11616 cat confdefs.h >>conftest.$ac_ext
11617 cat >>conftest.$ac_ext <<_ACEOF
11618 /* end confdefs.h.  */
11619 $ac_includes_default
11620 #include <$ac_header>
11621 _ACEOF
11622 rm -f conftest.$ac_objext
11623 if { (ac_try="$ac_compile"
11624 case "(($ac_try" in
11625   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11626   *) ac_try_echo=$ac_try;;
11627 esac
11628 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11629 $as_echo "$ac_try_echo") >&5
11630   (eval "$ac_compile") 2>conftest.er1
11631   ac_status=$?
11632   grep -v '^ *+' conftest.er1 >conftest.err
11633   rm -f conftest.er1
11634   cat conftest.err >&5
11635   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11636   (exit $ac_status); } && {
11637          test -z "$ac_c_werror_flag" ||
11638          test ! -s conftest.err
11639        } && test -s conftest.$ac_objext; then
11640   ac_header_compiler=yes
11641 else
11642   $as_echo "$as_me: failed program was:" >&5
11643 sed 's/^/| /' conftest.$ac_ext >&5
11644
11645         ac_header_compiler=no
11646 fi
11647
11648 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11649 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11650 $as_echo "$ac_header_compiler" >&6; }
11651
11652 # Is the header present?
11653 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11654 $as_echo_n "checking $ac_header presence... " >&6; }
11655 cat >conftest.$ac_ext <<_ACEOF
11656 /* confdefs.h.  */
11657 _ACEOF
11658 cat confdefs.h >>conftest.$ac_ext
11659 cat >>conftest.$ac_ext <<_ACEOF
11660 /* end confdefs.h.  */
11661 #include <$ac_header>
11662 _ACEOF
11663 if { (ac_try="$ac_cpp conftest.$ac_ext"
11664 case "(($ac_try" in
11665   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11666   *) ac_try_echo=$ac_try;;
11667 esac
11668 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11669 $as_echo "$ac_try_echo") >&5
11670   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11671   ac_status=$?
11672   grep -v '^ *+' conftest.er1 >conftest.err
11673   rm -f conftest.er1
11674   cat conftest.err >&5
11675   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11676   (exit $ac_status); } >/dev/null && {
11677          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11678          test ! -s conftest.err
11679        }; then
11680   ac_header_preproc=yes
11681 else
11682   $as_echo "$as_me: failed program was:" >&5
11683 sed 's/^/| /' conftest.$ac_ext >&5
11684
11685   ac_header_preproc=no
11686 fi
11687
11688 rm -f conftest.err conftest.$ac_ext
11689 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11690 $as_echo "$ac_header_preproc" >&6; }
11691
11692 # So?  What about this header?
11693 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11694   yes:no: )
11695     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11696 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11697     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11698 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11699     ac_header_preproc=yes
11700     ;;
11701   no:yes:* )
11702     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11703 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11704     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11705 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11706     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11707 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11708     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11709 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11710     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11711 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11712     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11713 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11714     ( cat <<\_ASBOX
11715 ## ---------------------------------------- ##
11716 ## Report this to pgsql-bugs@postgresql.org ##
11717 ## ---------------------------------------- ##
11718 _ASBOX
11719      ) | sed "s/^/$as_me: WARNING:     /" >&2
11720     ;;
11721 esac
11722 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11723 $as_echo_n "checking for $ac_header... " >&6; }
11724 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11725   $as_echo_n "(cached) " >&6
11726 else
11727   eval "$as_ac_Header=\$ac_header_preproc"
11728 fi
11729 ac_res=`eval 'as_val=${'$as_ac_Header'}
11730                  $as_echo "$as_val"'`
11731                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11732 $as_echo "$ac_res" >&6; }
11733
11734 fi
11735 as_val=`eval 'as_val=${'$as_ac_Header'}
11736                  $as_echo "$as_val"'`
11737    if test "x$as_val" = x""yes; then
11738   cat >>confdefs.h <<_ACEOF
11739 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11740 _ACEOF
11741
11742 else
11743   { { $as_echo "$as_me:$LINENO: error: readline header not found
11744 If you have libedit already installed, see config.log for details on the
11745 failure.  It is possible the compiler isn't looking in the proper directory.
11746 Use --without-readline to disable libedit support." >&5
11747 $as_echo "$as_me: error: readline header not found
11748 If you have libedit already installed, see config.log for details on the
11749 failure.  It is possible the compiler isn't looking in the proper directory.
11750 Use --without-readline to disable libedit support." >&2;}
11751    { (exit 1); exit 1; }; }
11752 fi
11753
11754 done
11755
11756 fi
11757
11758 done
11759
11760 fi
11761
11762 done
11763
11764 # Note: in a libedit installation, history.h is sometimes a dummy, and may
11765 # not be there at all.  Hence, don't complain if not found.  We must check
11766 # though, since in yet other versions it is an independent header.
11767
11768 for ac_header in editline/history.h
11769 do
11770 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11771 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11772   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11773 $as_echo_n "checking for $ac_header... " >&6; }
11774 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11775   $as_echo_n "(cached) " >&6
11776 fi
11777 ac_res=`eval 'as_val=${'$as_ac_Header'}
11778                  $as_echo "$as_val"'`
11779                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11780 $as_echo "$ac_res" >&6; }
11781 else
11782   # Is the header compilable?
11783 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11784 $as_echo_n "checking $ac_header usability... " >&6; }
11785 cat >conftest.$ac_ext <<_ACEOF
11786 /* confdefs.h.  */
11787 _ACEOF
11788 cat confdefs.h >>conftest.$ac_ext
11789 cat >>conftest.$ac_ext <<_ACEOF
11790 /* end confdefs.h.  */
11791 $ac_includes_default
11792 #include <$ac_header>
11793 _ACEOF
11794 rm -f conftest.$ac_objext
11795 if { (ac_try="$ac_compile"
11796 case "(($ac_try" in
11797   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11798   *) ac_try_echo=$ac_try;;
11799 esac
11800 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11801 $as_echo "$ac_try_echo") >&5
11802   (eval "$ac_compile") 2>conftest.er1
11803   ac_status=$?
11804   grep -v '^ *+' conftest.er1 >conftest.err
11805   rm -f conftest.er1
11806   cat conftest.err >&5
11807   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11808   (exit $ac_status); } && {
11809          test -z "$ac_c_werror_flag" ||
11810          test ! -s conftest.err
11811        } && test -s conftest.$ac_objext; then
11812   ac_header_compiler=yes
11813 else
11814   $as_echo "$as_me: failed program was:" >&5
11815 sed 's/^/| /' conftest.$ac_ext >&5
11816
11817         ac_header_compiler=no
11818 fi
11819
11820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11821 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11822 $as_echo "$ac_header_compiler" >&6; }
11823
11824 # Is the header present?
11825 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11826 $as_echo_n "checking $ac_header presence... " >&6; }
11827 cat >conftest.$ac_ext <<_ACEOF
11828 /* confdefs.h.  */
11829 _ACEOF
11830 cat confdefs.h >>conftest.$ac_ext
11831 cat >>conftest.$ac_ext <<_ACEOF
11832 /* end confdefs.h.  */
11833 #include <$ac_header>
11834 _ACEOF
11835 if { (ac_try="$ac_cpp conftest.$ac_ext"
11836 case "(($ac_try" in
11837   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11838   *) ac_try_echo=$ac_try;;
11839 esac
11840 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11841 $as_echo "$ac_try_echo") >&5
11842   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11843   ac_status=$?
11844   grep -v '^ *+' conftest.er1 >conftest.err
11845   rm -f conftest.er1
11846   cat conftest.err >&5
11847   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11848   (exit $ac_status); } >/dev/null && {
11849          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11850          test ! -s conftest.err
11851        }; then
11852   ac_header_preproc=yes
11853 else
11854   $as_echo "$as_me: failed program was:" >&5
11855 sed 's/^/| /' conftest.$ac_ext >&5
11856
11857   ac_header_preproc=no
11858 fi
11859
11860 rm -f conftest.err conftest.$ac_ext
11861 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11862 $as_echo "$ac_header_preproc" >&6; }
11863
11864 # So?  What about this header?
11865 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11866   yes:no: )
11867     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11868 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11869     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11870 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11871     ac_header_preproc=yes
11872     ;;
11873   no:yes:* )
11874     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11875 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11876     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11877 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11878     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11879 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11880     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11881 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11882     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11883 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11884     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11885 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11886     ( cat <<\_ASBOX
11887 ## ---------------------------------------- ##
11888 ## Report this to pgsql-bugs@postgresql.org ##
11889 ## ---------------------------------------- ##
11890 _ASBOX
11891      ) | sed "s/^/$as_me: WARNING:     /" >&2
11892     ;;
11893 esac
11894 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11895 $as_echo_n "checking for $ac_header... " >&6; }
11896 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11897   $as_echo_n "(cached) " >&6
11898 else
11899   eval "$as_ac_Header=\$ac_header_preproc"
11900 fi
11901 ac_res=`eval 'as_val=${'$as_ac_Header'}
11902                  $as_echo "$as_val"'`
11903                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11904 $as_echo "$ac_res" >&6; }
11905
11906 fi
11907 as_val=`eval 'as_val=${'$as_ac_Header'}
11908                  $as_echo "$as_val"'`
11909    if test "x$as_val" = x""yes; then
11910   cat >>confdefs.h <<_ACEOF
11911 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11912 _ACEOF
11913
11914 else
11915
11916 for ac_header in history.h
11917 do
11918 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11919 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11920   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
11921 $as_echo_n "checking for $ac_header... " >&6; }
11922 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11923   $as_echo_n "(cached) " >&6
11924 fi
11925 ac_res=`eval 'as_val=${'$as_ac_Header'}
11926                  $as_echo "$as_val"'`
11927                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11928 $as_echo "$ac_res" >&6; }
11929 else
11930   # Is the header compilable?
11931 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
11932 $as_echo_n "checking $ac_header usability... " >&6; }
11933 cat >conftest.$ac_ext <<_ACEOF
11934 /* confdefs.h.  */
11935 _ACEOF
11936 cat confdefs.h >>conftest.$ac_ext
11937 cat >>conftest.$ac_ext <<_ACEOF
11938 /* end confdefs.h.  */
11939 $ac_includes_default
11940 #include <$ac_header>
11941 _ACEOF
11942 rm -f conftest.$ac_objext
11943 if { (ac_try="$ac_compile"
11944 case "(($ac_try" in
11945   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11946   *) ac_try_echo=$ac_try;;
11947 esac
11948 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11949 $as_echo "$ac_try_echo") >&5
11950   (eval "$ac_compile") 2>conftest.er1
11951   ac_status=$?
11952   grep -v '^ *+' conftest.er1 >conftest.err
11953   rm -f conftest.er1
11954   cat conftest.err >&5
11955   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11956   (exit $ac_status); } && {
11957          test -z "$ac_c_werror_flag" ||
11958          test ! -s conftest.err
11959        } && test -s conftest.$ac_objext; then
11960   ac_header_compiler=yes
11961 else
11962   $as_echo "$as_me: failed program was:" >&5
11963 sed 's/^/| /' conftest.$ac_ext >&5
11964
11965         ac_header_compiler=no
11966 fi
11967
11968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11969 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11970 $as_echo "$ac_header_compiler" >&6; }
11971
11972 # Is the header present?
11973 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
11974 $as_echo_n "checking $ac_header presence... " >&6; }
11975 cat >conftest.$ac_ext <<_ACEOF
11976 /* confdefs.h.  */
11977 _ACEOF
11978 cat confdefs.h >>conftest.$ac_ext
11979 cat >>conftest.$ac_ext <<_ACEOF
11980 /* end confdefs.h.  */
11981 #include <$ac_header>
11982 _ACEOF
11983 if { (ac_try="$ac_cpp conftest.$ac_ext"
11984 case "(($ac_try" in
11985   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11986   *) ac_try_echo=$ac_try;;
11987 esac
11988 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11989 $as_echo "$ac_try_echo") >&5
11990   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11991   ac_status=$?
11992   grep -v '^ *+' conftest.er1 >conftest.err
11993   rm -f conftest.er1
11994   cat conftest.err >&5
11995   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11996   (exit $ac_status); } >/dev/null && {
11997          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11998          test ! -s conftest.err
11999        }; then
12000   ac_header_preproc=yes
12001 else
12002   $as_echo "$as_me: failed program was:" >&5
12003 sed 's/^/| /' conftest.$ac_ext >&5
12004
12005   ac_header_preproc=no
12006 fi
12007
12008 rm -f conftest.err conftest.$ac_ext
12009 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12010 $as_echo "$ac_header_preproc" >&6; }
12011
12012 # So?  What about this header?
12013 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12014   yes:no: )
12015     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12016 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12017     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12018 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12019     ac_header_preproc=yes
12020     ;;
12021   no:yes:* )
12022     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12023 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12024     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12025 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12026     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12027 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12028     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12029 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12030     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12031 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12032     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12033 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12034     ( cat <<\_ASBOX
12035 ## ---------------------------------------- ##
12036 ## Report this to pgsql-bugs@postgresql.org ##
12037 ## ---------------------------------------- ##
12038 _ASBOX
12039      ) | sed "s/^/$as_me: WARNING:     /" >&2
12040     ;;
12041 esac
12042 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12043 $as_echo_n "checking for $ac_header... " >&6; }
12044 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12045   $as_echo_n "(cached) " >&6
12046 else
12047   eval "$as_ac_Header=\$ac_header_preproc"
12048 fi
12049 ac_res=`eval 'as_val=${'$as_ac_Header'}
12050                  $as_echo "$as_val"'`
12051                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12052 $as_echo "$ac_res" >&6; }
12053
12054 fi
12055 as_val=`eval 'as_val=${'$as_ac_Header'}
12056                  $as_echo "$as_val"'`
12057    if test "x$as_val" = x""yes; then
12058   cat >>confdefs.h <<_ACEOF
12059 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12060 _ACEOF
12061
12062 else
12063
12064 for ac_header in readline/history.h
12065 do
12066 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12067 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12068   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12069 $as_echo_n "checking for $ac_header... " >&6; }
12070 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12071   $as_echo_n "(cached) " >&6
12072 fi
12073 ac_res=`eval 'as_val=${'$as_ac_Header'}
12074                  $as_echo "$as_val"'`
12075                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12076 $as_echo "$ac_res" >&6; }
12077 else
12078   # Is the header compilable?
12079 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12080 $as_echo_n "checking $ac_header usability... " >&6; }
12081 cat >conftest.$ac_ext <<_ACEOF
12082 /* confdefs.h.  */
12083 _ACEOF
12084 cat confdefs.h >>conftest.$ac_ext
12085 cat >>conftest.$ac_ext <<_ACEOF
12086 /* end confdefs.h.  */
12087 $ac_includes_default
12088 #include <$ac_header>
12089 _ACEOF
12090 rm -f conftest.$ac_objext
12091 if { (ac_try="$ac_compile"
12092 case "(($ac_try" in
12093   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12094   *) ac_try_echo=$ac_try;;
12095 esac
12096 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12097 $as_echo "$ac_try_echo") >&5
12098   (eval "$ac_compile") 2>conftest.er1
12099   ac_status=$?
12100   grep -v '^ *+' conftest.er1 >conftest.err
12101   rm -f conftest.er1
12102   cat conftest.err >&5
12103   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12104   (exit $ac_status); } && {
12105          test -z "$ac_c_werror_flag" ||
12106          test ! -s conftest.err
12107        } && test -s conftest.$ac_objext; then
12108   ac_header_compiler=yes
12109 else
12110   $as_echo "$as_me: failed program was:" >&5
12111 sed 's/^/| /' conftest.$ac_ext >&5
12112
12113         ac_header_compiler=no
12114 fi
12115
12116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12117 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12118 $as_echo "$ac_header_compiler" >&6; }
12119
12120 # Is the header present?
12121 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12122 $as_echo_n "checking $ac_header presence... " >&6; }
12123 cat >conftest.$ac_ext <<_ACEOF
12124 /* confdefs.h.  */
12125 _ACEOF
12126 cat confdefs.h >>conftest.$ac_ext
12127 cat >>conftest.$ac_ext <<_ACEOF
12128 /* end confdefs.h.  */
12129 #include <$ac_header>
12130 _ACEOF
12131 if { (ac_try="$ac_cpp conftest.$ac_ext"
12132 case "(($ac_try" in
12133   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12134   *) ac_try_echo=$ac_try;;
12135 esac
12136 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12137 $as_echo "$ac_try_echo") >&5
12138   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12139   ac_status=$?
12140   grep -v '^ *+' conftest.er1 >conftest.err
12141   rm -f conftest.er1
12142   cat conftest.err >&5
12143   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12144   (exit $ac_status); } >/dev/null && {
12145          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12146          test ! -s conftest.err
12147        }; then
12148   ac_header_preproc=yes
12149 else
12150   $as_echo "$as_me: failed program was:" >&5
12151 sed 's/^/| /' conftest.$ac_ext >&5
12152
12153   ac_header_preproc=no
12154 fi
12155
12156 rm -f conftest.err conftest.$ac_ext
12157 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12158 $as_echo "$ac_header_preproc" >&6; }
12159
12160 # So?  What about this header?
12161 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12162   yes:no: )
12163     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12164 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12165     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12166 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12167     ac_header_preproc=yes
12168     ;;
12169   no:yes:* )
12170     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12171 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12172     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12173 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12174     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12175 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12176     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12177 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12178     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12179 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12180     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12181 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12182     ( cat <<\_ASBOX
12183 ## ---------------------------------------- ##
12184 ## Report this to pgsql-bugs@postgresql.org ##
12185 ## ---------------------------------------- ##
12186 _ASBOX
12187      ) | sed "s/^/$as_me: WARNING:     /" >&2
12188     ;;
12189 esac
12190 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12191 $as_echo_n "checking for $ac_header... " >&6; }
12192 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12193   $as_echo_n "(cached) " >&6
12194 else
12195   eval "$as_ac_Header=\$ac_header_preproc"
12196 fi
12197 ac_res=`eval 'as_val=${'$as_ac_Header'}
12198                  $as_echo "$as_val"'`
12199                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12200 $as_echo "$ac_res" >&6; }
12201
12202 fi
12203 as_val=`eval 'as_val=${'$as_ac_Header'}
12204                  $as_echo "$as_val"'`
12205    if test "x$as_val" = x""yes; then
12206   cat >>confdefs.h <<_ACEOF
12207 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12208 _ACEOF
12209
12210 fi
12211
12212 done
12213
12214 fi
12215
12216 done
12217
12218 fi
12219
12220 done
12221
12222 fi
12223
12224 if test "$with_zlib" = yes; then
12225   if test "${ac_cv_header_zlib_h+set}" = set; then
12226   { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
12227 $as_echo_n "checking for zlib.h... " >&6; }
12228 if test "${ac_cv_header_zlib_h+set}" = set; then
12229   $as_echo_n "(cached) " >&6
12230 fi
12231 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
12232 $as_echo "$ac_cv_header_zlib_h" >&6; }
12233 else
12234   # Is the header compilable?
12235 { $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
12236 $as_echo_n "checking zlib.h usability... " >&6; }
12237 cat >conftest.$ac_ext <<_ACEOF
12238 /* confdefs.h.  */
12239 _ACEOF
12240 cat confdefs.h >>conftest.$ac_ext
12241 cat >>conftest.$ac_ext <<_ACEOF
12242 /* end confdefs.h.  */
12243 $ac_includes_default
12244 #include <zlib.h>
12245 _ACEOF
12246 rm -f conftest.$ac_objext
12247 if { (ac_try="$ac_compile"
12248 case "(($ac_try" in
12249   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12250   *) ac_try_echo=$ac_try;;
12251 esac
12252 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12253 $as_echo "$ac_try_echo") >&5
12254   (eval "$ac_compile") 2>conftest.er1
12255   ac_status=$?
12256   grep -v '^ *+' conftest.er1 >conftest.err
12257   rm -f conftest.er1
12258   cat conftest.err >&5
12259   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12260   (exit $ac_status); } && {
12261          test -z "$ac_c_werror_flag" ||
12262          test ! -s conftest.err
12263        } && test -s conftest.$ac_objext; then
12264   ac_header_compiler=yes
12265 else
12266   $as_echo "$as_me: failed program was:" >&5
12267 sed 's/^/| /' conftest.$ac_ext >&5
12268
12269         ac_header_compiler=no
12270 fi
12271
12272 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12273 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12274 $as_echo "$ac_header_compiler" >&6; }
12275
12276 # Is the header present?
12277 { $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
12278 $as_echo_n "checking zlib.h presence... " >&6; }
12279 cat >conftest.$ac_ext <<_ACEOF
12280 /* confdefs.h.  */
12281 _ACEOF
12282 cat confdefs.h >>conftest.$ac_ext
12283 cat >>conftest.$ac_ext <<_ACEOF
12284 /* end confdefs.h.  */
12285 #include <zlib.h>
12286 _ACEOF
12287 if { (ac_try="$ac_cpp conftest.$ac_ext"
12288 case "(($ac_try" in
12289   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12290   *) ac_try_echo=$ac_try;;
12291 esac
12292 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12293 $as_echo "$ac_try_echo") >&5
12294   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12295   ac_status=$?
12296   grep -v '^ *+' conftest.er1 >conftest.err
12297   rm -f conftest.er1
12298   cat conftest.err >&5
12299   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12300   (exit $ac_status); } >/dev/null && {
12301          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12302          test ! -s conftest.err
12303        }; then
12304   ac_header_preproc=yes
12305 else
12306   $as_echo "$as_me: failed program was:" >&5
12307 sed 's/^/| /' conftest.$ac_ext >&5
12308
12309   ac_header_preproc=no
12310 fi
12311
12312 rm -f conftest.err conftest.$ac_ext
12313 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12314 $as_echo "$ac_header_preproc" >&6; }
12315
12316 # So?  What about this header?
12317 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12318   yes:no: )
12319     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
12320 $as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12321     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
12322 $as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
12323     ac_header_preproc=yes
12324     ;;
12325   no:yes:* )
12326     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
12327 $as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
12328     { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
12329 $as_echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
12330     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
12331 $as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
12332     { $as_echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
12333 $as_echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12334     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
12335 $as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
12336     { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
12337 $as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
12338     ( cat <<\_ASBOX
12339 ## ---------------------------------------- ##
12340 ## Report this to pgsql-bugs@postgresql.org ##
12341 ## ---------------------------------------- ##
12342 _ASBOX
12343      ) | sed "s/^/$as_me: WARNING:     /" >&2
12344     ;;
12345 esac
12346 { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
12347 $as_echo_n "checking for zlib.h... " >&6; }
12348 if test "${ac_cv_header_zlib_h+set}" = set; then
12349   $as_echo_n "(cached) " >&6
12350 else
12351   ac_cv_header_zlib_h=$ac_header_preproc
12352 fi
12353 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
12354 $as_echo "$ac_cv_header_zlib_h" >&6; }
12355
12356 fi
12357 if test "x$ac_cv_header_zlib_h" = x""yes; then
12358   :
12359 else
12360   { { $as_echo "$as_me:$LINENO: error: zlib header not found
12361 If you have zlib already installed, see config.log for details on the
12362 failure.  It is possible the compiler isn't looking in the proper directory.
12363 Use --without-zlib to disable zlib support." >&5
12364 $as_echo "$as_me: error: zlib header not found
12365 If you have zlib already installed, see config.log for details on the
12366 failure.  It is possible the compiler isn't looking in the proper directory.
12367 Use --without-zlib to disable zlib support." >&2;}
12368    { (exit 1); exit 1; }; }
12369 fi
12370
12371
12372 fi
12373
12374 if test "$with_gssapi" = yes ; then
12375
12376 for ac_header in gssapi/gssapi.h
12377 do
12378 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12379 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12380   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12381 $as_echo_n "checking for $ac_header... " >&6; }
12382 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12383   $as_echo_n "(cached) " >&6
12384 fi
12385 ac_res=`eval 'as_val=${'$as_ac_Header'}
12386                  $as_echo "$as_val"'`
12387                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12388 $as_echo "$ac_res" >&6; }
12389 else
12390   # Is the header compilable?
12391 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12392 $as_echo_n "checking $ac_header usability... " >&6; }
12393 cat >conftest.$ac_ext <<_ACEOF
12394 /* confdefs.h.  */
12395 _ACEOF
12396 cat confdefs.h >>conftest.$ac_ext
12397 cat >>conftest.$ac_ext <<_ACEOF
12398 /* end confdefs.h.  */
12399 $ac_includes_default
12400 #include <$ac_header>
12401 _ACEOF
12402 rm -f conftest.$ac_objext
12403 if { (ac_try="$ac_compile"
12404 case "(($ac_try" in
12405   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12406   *) ac_try_echo=$ac_try;;
12407 esac
12408 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12409 $as_echo "$ac_try_echo") >&5
12410   (eval "$ac_compile") 2>conftest.er1
12411   ac_status=$?
12412   grep -v '^ *+' conftest.er1 >conftest.err
12413   rm -f conftest.er1
12414   cat conftest.err >&5
12415   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12416   (exit $ac_status); } && {
12417          test -z "$ac_c_werror_flag" ||
12418          test ! -s conftest.err
12419        } && test -s conftest.$ac_objext; then
12420   ac_header_compiler=yes
12421 else
12422   $as_echo "$as_me: failed program was:" >&5
12423 sed 's/^/| /' conftest.$ac_ext >&5
12424
12425         ac_header_compiler=no
12426 fi
12427
12428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12429 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12430 $as_echo "$ac_header_compiler" >&6; }
12431
12432 # Is the header present?
12433 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12434 $as_echo_n "checking $ac_header presence... " >&6; }
12435 cat >conftest.$ac_ext <<_ACEOF
12436 /* confdefs.h.  */
12437 _ACEOF
12438 cat confdefs.h >>conftest.$ac_ext
12439 cat >>conftest.$ac_ext <<_ACEOF
12440 /* end confdefs.h.  */
12441 #include <$ac_header>
12442 _ACEOF
12443 if { (ac_try="$ac_cpp conftest.$ac_ext"
12444 case "(($ac_try" in
12445   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12446   *) ac_try_echo=$ac_try;;
12447 esac
12448 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12449 $as_echo "$ac_try_echo") >&5
12450   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12451   ac_status=$?
12452   grep -v '^ *+' conftest.er1 >conftest.err
12453   rm -f conftest.er1
12454   cat conftest.err >&5
12455   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12456   (exit $ac_status); } >/dev/null && {
12457          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12458          test ! -s conftest.err
12459        }; then
12460   ac_header_preproc=yes
12461 else
12462   $as_echo "$as_me: failed program was:" >&5
12463 sed 's/^/| /' conftest.$ac_ext >&5
12464
12465   ac_header_preproc=no
12466 fi
12467
12468 rm -f conftest.err conftest.$ac_ext
12469 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12470 $as_echo "$ac_header_preproc" >&6; }
12471
12472 # So?  What about this header?
12473 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12474   yes:no: )
12475     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12476 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12477     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12478 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12479     ac_header_preproc=yes
12480     ;;
12481   no:yes:* )
12482     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12483 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12484     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12485 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12486     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12487 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12488     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12489 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12490     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12491 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12492     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12493 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12494     ( cat <<\_ASBOX
12495 ## ---------------------------------------- ##
12496 ## Report this to pgsql-bugs@postgresql.org ##
12497 ## ---------------------------------------- ##
12498 _ASBOX
12499      ) | sed "s/^/$as_me: WARNING:     /" >&2
12500     ;;
12501 esac
12502 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12503 $as_echo_n "checking for $ac_header... " >&6; }
12504 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12505   $as_echo_n "(cached) " >&6
12506 else
12507   eval "$as_ac_Header=\$ac_header_preproc"
12508 fi
12509 ac_res=`eval 'as_val=${'$as_ac_Header'}
12510                  $as_echo "$as_val"'`
12511                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12512 $as_echo "$ac_res" >&6; }
12513
12514 fi
12515 as_val=`eval 'as_val=${'$as_ac_Header'}
12516                  $as_echo "$as_val"'`
12517    if test "x$as_val" = x""yes; then
12518   cat >>confdefs.h <<_ACEOF
12519 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12520 _ACEOF
12521
12522 else
12523
12524 for ac_header in gssapi.h
12525 do
12526 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12527 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12528   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12529 $as_echo_n "checking for $ac_header... " >&6; }
12530 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12531   $as_echo_n "(cached) " >&6
12532 fi
12533 ac_res=`eval 'as_val=${'$as_ac_Header'}
12534                  $as_echo "$as_val"'`
12535                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12536 $as_echo "$ac_res" >&6; }
12537 else
12538   # Is the header compilable?
12539 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12540 $as_echo_n "checking $ac_header usability... " >&6; }
12541 cat >conftest.$ac_ext <<_ACEOF
12542 /* confdefs.h.  */
12543 _ACEOF
12544 cat confdefs.h >>conftest.$ac_ext
12545 cat >>conftest.$ac_ext <<_ACEOF
12546 /* end confdefs.h.  */
12547 $ac_includes_default
12548 #include <$ac_header>
12549 _ACEOF
12550 rm -f conftest.$ac_objext
12551 if { (ac_try="$ac_compile"
12552 case "(($ac_try" in
12553   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12554   *) ac_try_echo=$ac_try;;
12555 esac
12556 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12557 $as_echo "$ac_try_echo") >&5
12558   (eval "$ac_compile") 2>conftest.er1
12559   ac_status=$?
12560   grep -v '^ *+' conftest.er1 >conftest.err
12561   rm -f conftest.er1
12562   cat conftest.err >&5
12563   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12564   (exit $ac_status); } && {
12565          test -z "$ac_c_werror_flag" ||
12566          test ! -s conftest.err
12567        } && test -s conftest.$ac_objext; then
12568   ac_header_compiler=yes
12569 else
12570   $as_echo "$as_me: failed program was:" >&5
12571 sed 's/^/| /' conftest.$ac_ext >&5
12572
12573         ac_header_compiler=no
12574 fi
12575
12576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12577 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12578 $as_echo "$ac_header_compiler" >&6; }
12579
12580 # Is the header present?
12581 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12582 $as_echo_n "checking $ac_header presence... " >&6; }
12583 cat >conftest.$ac_ext <<_ACEOF
12584 /* confdefs.h.  */
12585 _ACEOF
12586 cat confdefs.h >>conftest.$ac_ext
12587 cat >>conftest.$ac_ext <<_ACEOF
12588 /* end confdefs.h.  */
12589 #include <$ac_header>
12590 _ACEOF
12591 if { (ac_try="$ac_cpp conftest.$ac_ext"
12592 case "(($ac_try" in
12593   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12594   *) ac_try_echo=$ac_try;;
12595 esac
12596 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12597 $as_echo "$ac_try_echo") >&5
12598   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12599   ac_status=$?
12600   grep -v '^ *+' conftest.er1 >conftest.err
12601   rm -f conftest.er1
12602   cat conftest.err >&5
12603   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12604   (exit $ac_status); } >/dev/null && {
12605          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12606          test ! -s conftest.err
12607        }; then
12608   ac_header_preproc=yes
12609 else
12610   $as_echo "$as_me: failed program was:" >&5
12611 sed 's/^/| /' conftest.$ac_ext >&5
12612
12613   ac_header_preproc=no
12614 fi
12615
12616 rm -f conftest.err conftest.$ac_ext
12617 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12618 $as_echo "$ac_header_preproc" >&6; }
12619
12620 # So?  What about this header?
12621 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12622   yes:no: )
12623     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12624 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12625     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12626 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12627     ac_header_preproc=yes
12628     ;;
12629   no:yes:* )
12630     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12631 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12632     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12633 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12634     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12635 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12636     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12637 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12638     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12639 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12640     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12641 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12642     ( cat <<\_ASBOX
12643 ## ---------------------------------------- ##
12644 ## Report this to pgsql-bugs@postgresql.org ##
12645 ## ---------------------------------------- ##
12646 _ASBOX
12647      ) | sed "s/^/$as_me: WARNING:     /" >&2
12648     ;;
12649 esac
12650 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12651 $as_echo_n "checking for $ac_header... " >&6; }
12652 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12653   $as_echo_n "(cached) " >&6
12654 else
12655   eval "$as_ac_Header=\$ac_header_preproc"
12656 fi
12657 ac_res=`eval 'as_val=${'$as_ac_Header'}
12658                  $as_echo "$as_val"'`
12659                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12660 $as_echo "$ac_res" >&6; }
12661
12662 fi
12663 as_val=`eval 'as_val=${'$as_ac_Header'}
12664                  $as_echo "$as_val"'`
12665    if test "x$as_val" = x""yes; then
12666   cat >>confdefs.h <<_ACEOF
12667 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12668 _ACEOF
12669
12670 else
12671   { { $as_echo "$as_me:$LINENO: error: gssapi.h header file is required for GSSAPI" >&5
12672 $as_echo "$as_me: error: gssapi.h header file is required for GSSAPI" >&2;}
12673    { (exit 1); exit 1; }; }
12674 fi
12675
12676 done
12677
12678 fi
12679
12680 done
12681
12682 fi
12683
12684 if test "$with_krb5" = yes ; then
12685   if test "${ac_cv_header_krb5_h+set}" = set; then
12686   { $as_echo "$as_me:$LINENO: checking for krb5.h" >&5
12687 $as_echo_n "checking for krb5.h... " >&6; }
12688 if test "${ac_cv_header_krb5_h+set}" = set; then
12689   $as_echo_n "(cached) " >&6
12690 fi
12691 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
12692 $as_echo "$ac_cv_header_krb5_h" >&6; }
12693 else
12694   # Is the header compilable?
12695 { $as_echo "$as_me:$LINENO: checking krb5.h usability" >&5
12696 $as_echo_n "checking krb5.h usability... " >&6; }
12697 cat >conftest.$ac_ext <<_ACEOF
12698 /* confdefs.h.  */
12699 _ACEOF
12700 cat confdefs.h >>conftest.$ac_ext
12701 cat >>conftest.$ac_ext <<_ACEOF
12702 /* end confdefs.h.  */
12703 $ac_includes_default
12704 #include <krb5.h>
12705 _ACEOF
12706 rm -f conftest.$ac_objext
12707 if { (ac_try="$ac_compile"
12708 case "(($ac_try" in
12709   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12710   *) ac_try_echo=$ac_try;;
12711 esac
12712 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12713 $as_echo "$ac_try_echo") >&5
12714   (eval "$ac_compile") 2>conftest.er1
12715   ac_status=$?
12716   grep -v '^ *+' conftest.er1 >conftest.err
12717   rm -f conftest.er1
12718   cat conftest.err >&5
12719   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12720   (exit $ac_status); } && {
12721          test -z "$ac_c_werror_flag" ||
12722          test ! -s conftest.err
12723        } && test -s conftest.$ac_objext; then
12724   ac_header_compiler=yes
12725 else
12726   $as_echo "$as_me: failed program was:" >&5
12727 sed 's/^/| /' conftest.$ac_ext >&5
12728
12729         ac_header_compiler=no
12730 fi
12731
12732 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12733 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12734 $as_echo "$ac_header_compiler" >&6; }
12735
12736 # Is the header present?
12737 { $as_echo "$as_me:$LINENO: checking krb5.h presence" >&5
12738 $as_echo_n "checking krb5.h presence... " >&6; }
12739 cat >conftest.$ac_ext <<_ACEOF
12740 /* confdefs.h.  */
12741 _ACEOF
12742 cat confdefs.h >>conftest.$ac_ext
12743 cat >>conftest.$ac_ext <<_ACEOF
12744 /* end confdefs.h.  */
12745 #include <krb5.h>
12746 _ACEOF
12747 if { (ac_try="$ac_cpp conftest.$ac_ext"
12748 case "(($ac_try" in
12749   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12750   *) ac_try_echo=$ac_try;;
12751 esac
12752 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12753 $as_echo "$ac_try_echo") >&5
12754   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12755   ac_status=$?
12756   grep -v '^ *+' conftest.er1 >conftest.err
12757   rm -f conftest.er1
12758   cat conftest.err >&5
12759   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12760   (exit $ac_status); } >/dev/null && {
12761          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12762          test ! -s conftest.err
12763        }; then
12764   ac_header_preproc=yes
12765 else
12766   $as_echo "$as_me: failed program was:" >&5
12767 sed 's/^/| /' conftest.$ac_ext >&5
12768
12769   ac_header_preproc=no
12770 fi
12771
12772 rm -f conftest.err conftest.$ac_ext
12773 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12774 $as_echo "$ac_header_preproc" >&6; }
12775
12776 # So?  What about this header?
12777 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12778   yes:no: )
12779     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
12780 $as_echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12781     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
12782 $as_echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
12783     ac_header_preproc=yes
12784     ;;
12785   no:yes:* )
12786     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
12787 $as_echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
12788     { $as_echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
12789 $as_echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
12790     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
12791 $as_echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
12792     { $as_echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
12793 $as_echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12794     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
12795 $as_echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
12796     { $as_echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
12797 $as_echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
12798     ( cat <<\_ASBOX
12799 ## ---------------------------------------- ##
12800 ## Report this to pgsql-bugs@postgresql.org ##
12801 ## ---------------------------------------- ##
12802 _ASBOX
12803      ) | sed "s/^/$as_me: WARNING:     /" >&2
12804     ;;
12805 esac
12806 { $as_echo "$as_me:$LINENO: checking for krb5.h" >&5
12807 $as_echo_n "checking for krb5.h... " >&6; }
12808 if test "${ac_cv_header_krb5_h+set}" = set; then
12809   $as_echo_n "(cached) " >&6
12810 else
12811   ac_cv_header_krb5_h=$ac_header_preproc
12812 fi
12813 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
12814 $as_echo "$ac_cv_header_krb5_h" >&6; }
12815
12816 fi
12817 if test "x$ac_cv_header_krb5_h" = x""yes; then
12818   :
12819 else
12820   { { $as_echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
12821 $as_echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
12822    { (exit 1); exit 1; }; }
12823 fi
12824
12825
12826 fi
12827
12828 if test "$with_openssl" = yes ; then
12829   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
12830   { $as_echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
12831 $as_echo_n "checking for openssl/ssl.h... " >&6; }
12832 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
12833   $as_echo_n "(cached) " >&6
12834 fi
12835 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
12836 $as_echo "$ac_cv_header_openssl_ssl_h" >&6; }
12837 else
12838   # Is the header compilable?
12839 { $as_echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
12840 $as_echo_n "checking openssl/ssl.h usability... " >&6; }
12841 cat >conftest.$ac_ext <<_ACEOF
12842 /* confdefs.h.  */
12843 _ACEOF
12844 cat confdefs.h >>conftest.$ac_ext
12845 cat >>conftest.$ac_ext <<_ACEOF
12846 /* end confdefs.h.  */
12847 $ac_includes_default
12848 #include <openssl/ssl.h>
12849 _ACEOF
12850 rm -f conftest.$ac_objext
12851 if { (ac_try="$ac_compile"
12852 case "(($ac_try" in
12853   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12854   *) ac_try_echo=$ac_try;;
12855 esac
12856 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12857 $as_echo "$ac_try_echo") >&5
12858   (eval "$ac_compile") 2>conftest.er1
12859   ac_status=$?
12860   grep -v '^ *+' conftest.er1 >conftest.err
12861   rm -f conftest.er1
12862   cat conftest.err >&5
12863   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12864   (exit $ac_status); } && {
12865          test -z "$ac_c_werror_flag" ||
12866          test ! -s conftest.err
12867        } && test -s conftest.$ac_objext; then
12868   ac_header_compiler=yes
12869 else
12870   $as_echo "$as_me: failed program was:" >&5
12871 sed 's/^/| /' conftest.$ac_ext >&5
12872
12873         ac_header_compiler=no
12874 fi
12875
12876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12877 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12878 $as_echo "$ac_header_compiler" >&6; }
12879
12880 # Is the header present?
12881 { $as_echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
12882 $as_echo_n "checking openssl/ssl.h presence... " >&6; }
12883 cat >conftest.$ac_ext <<_ACEOF
12884 /* confdefs.h.  */
12885 _ACEOF
12886 cat confdefs.h >>conftest.$ac_ext
12887 cat >>conftest.$ac_ext <<_ACEOF
12888 /* end confdefs.h.  */
12889 #include <openssl/ssl.h>
12890 _ACEOF
12891 if { (ac_try="$ac_cpp conftest.$ac_ext"
12892 case "(($ac_try" in
12893   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12894   *) ac_try_echo=$ac_try;;
12895 esac
12896 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12897 $as_echo "$ac_try_echo") >&5
12898   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12899   ac_status=$?
12900   grep -v '^ *+' conftest.er1 >conftest.err
12901   rm -f conftest.er1
12902   cat conftest.err >&5
12903   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12904   (exit $ac_status); } >/dev/null && {
12905          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12906          test ! -s conftest.err
12907        }; then
12908   ac_header_preproc=yes
12909 else
12910   $as_echo "$as_me: failed program was:" >&5
12911 sed 's/^/| /' conftest.$ac_ext >&5
12912
12913   ac_header_preproc=no
12914 fi
12915
12916 rm -f conftest.err conftest.$ac_ext
12917 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12918 $as_echo "$ac_header_preproc" >&6; }
12919
12920 # So?  What about this header?
12921 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12922   yes:no: )
12923     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
12924 $as_echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12925     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
12926 $as_echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
12927     ac_header_preproc=yes
12928     ;;
12929   no:yes:* )
12930     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
12931 $as_echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
12932     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
12933 $as_echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
12934     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
12935 $as_echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
12936     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
12937 $as_echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12938     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
12939 $as_echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
12940     { $as_echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
12941 $as_echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
12942     ( cat <<\_ASBOX
12943 ## ---------------------------------------- ##
12944 ## Report this to pgsql-bugs@postgresql.org ##
12945 ## ---------------------------------------- ##
12946 _ASBOX
12947      ) | sed "s/^/$as_me: WARNING:     /" >&2
12948     ;;
12949 esac
12950 { $as_echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
12951 $as_echo_n "checking for openssl/ssl.h... " >&6; }
12952 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
12953   $as_echo_n "(cached) " >&6
12954 else
12955   ac_cv_header_openssl_ssl_h=$ac_header_preproc
12956 fi
12957 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
12958 $as_echo "$ac_cv_header_openssl_ssl_h" >&6; }
12959
12960 fi
12961 if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then
12962   :
12963 else
12964   { { $as_echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
12965 $as_echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
12966    { (exit 1); exit 1; }; }
12967 fi
12968
12969
12970   if test "${ac_cv_header_openssl_err_h+set}" = set; then
12971   { $as_echo "$as_me:$LINENO: checking for openssl/err.h" >&5
12972 $as_echo_n "checking for openssl/err.h... " >&6; }
12973 if test "${ac_cv_header_openssl_err_h+set}" = set; then
12974   $as_echo_n "(cached) " >&6
12975 fi
12976 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
12977 $as_echo "$ac_cv_header_openssl_err_h" >&6; }
12978 else
12979   # Is the header compilable?
12980 { $as_echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
12981 $as_echo_n "checking openssl/err.h usability... " >&6; }
12982 cat >conftest.$ac_ext <<_ACEOF
12983 /* confdefs.h.  */
12984 _ACEOF
12985 cat confdefs.h >>conftest.$ac_ext
12986 cat >>conftest.$ac_ext <<_ACEOF
12987 /* end confdefs.h.  */
12988 $ac_includes_default
12989 #include <openssl/err.h>
12990 _ACEOF
12991 rm -f conftest.$ac_objext
12992 if { (ac_try="$ac_compile"
12993 case "(($ac_try" in
12994   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12995   *) ac_try_echo=$ac_try;;
12996 esac
12997 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12998 $as_echo "$ac_try_echo") >&5
12999   (eval "$ac_compile") 2>conftest.er1
13000   ac_status=$?
13001   grep -v '^ *+' conftest.er1 >conftest.err
13002   rm -f conftest.er1
13003   cat conftest.err >&5
13004   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13005   (exit $ac_status); } && {
13006          test -z "$ac_c_werror_flag" ||
13007          test ! -s conftest.err
13008        } && test -s conftest.$ac_objext; then
13009   ac_header_compiler=yes
13010 else
13011   $as_echo "$as_me: failed program was:" >&5
13012 sed 's/^/| /' conftest.$ac_ext >&5
13013
13014         ac_header_compiler=no
13015 fi
13016
13017 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13018 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13019 $as_echo "$ac_header_compiler" >&6; }
13020
13021 # Is the header present?
13022 { $as_echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
13023 $as_echo_n "checking openssl/err.h presence... " >&6; }
13024 cat >conftest.$ac_ext <<_ACEOF
13025 /* confdefs.h.  */
13026 _ACEOF
13027 cat confdefs.h >>conftest.$ac_ext
13028 cat >>conftest.$ac_ext <<_ACEOF
13029 /* end confdefs.h.  */
13030 #include <openssl/err.h>
13031 _ACEOF
13032 if { (ac_try="$ac_cpp conftest.$ac_ext"
13033 case "(($ac_try" in
13034   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13035   *) ac_try_echo=$ac_try;;
13036 esac
13037 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13038 $as_echo "$ac_try_echo") >&5
13039   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13040   ac_status=$?
13041   grep -v '^ *+' conftest.er1 >conftest.err
13042   rm -f conftest.er1
13043   cat conftest.err >&5
13044   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13045   (exit $ac_status); } >/dev/null && {
13046          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13047          test ! -s conftest.err
13048        }; then
13049   ac_header_preproc=yes
13050 else
13051   $as_echo "$as_me: failed program was:" >&5
13052 sed 's/^/| /' conftest.$ac_ext >&5
13053
13054   ac_header_preproc=no
13055 fi
13056
13057 rm -f conftest.err conftest.$ac_ext
13058 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13059 $as_echo "$ac_header_preproc" >&6; }
13060
13061 # So?  What about this header?
13062 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13063   yes:no: )
13064     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
13065 $as_echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13066     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
13067 $as_echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
13068     ac_header_preproc=yes
13069     ;;
13070   no:yes:* )
13071     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
13072 $as_echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
13073     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
13074 $as_echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
13075     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
13076 $as_echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
13077     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
13078 $as_echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
13079     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
13080 $as_echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
13081     { $as_echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
13082 $as_echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
13083     ( cat <<\_ASBOX
13084 ## ---------------------------------------- ##
13085 ## Report this to pgsql-bugs@postgresql.org ##
13086 ## ---------------------------------------- ##
13087 _ASBOX
13088      ) | sed "s/^/$as_me: WARNING:     /" >&2
13089     ;;
13090 esac
13091 { $as_echo "$as_me:$LINENO: checking for openssl/err.h" >&5
13092 $as_echo_n "checking for openssl/err.h... " >&6; }
13093 if test "${ac_cv_header_openssl_err_h+set}" = set; then
13094   $as_echo_n "(cached) " >&6
13095 else
13096   ac_cv_header_openssl_err_h=$ac_header_preproc
13097 fi
13098 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
13099 $as_echo "$ac_cv_header_openssl_err_h" >&6; }
13100
13101 fi
13102 if test "x$ac_cv_header_openssl_err_h" = x""yes; then
13103   :
13104 else
13105   { { $as_echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
13106 $as_echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
13107    { (exit 1); exit 1; }; }
13108 fi
13109
13110
13111 fi
13112
13113 if test "$with_pam" = yes ; then
13114
13115 for ac_header in security/pam_appl.h
13116 do
13117 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13118 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13119   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13120 $as_echo_n "checking for $ac_header... " >&6; }
13121 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13122   $as_echo_n "(cached) " >&6
13123 fi
13124 ac_res=`eval 'as_val=${'$as_ac_Header'}
13125                  $as_echo "$as_val"'`
13126                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13127 $as_echo "$ac_res" >&6; }
13128 else
13129   # Is the header compilable?
13130 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
13131 $as_echo_n "checking $ac_header usability... " >&6; }
13132 cat >conftest.$ac_ext <<_ACEOF
13133 /* confdefs.h.  */
13134 _ACEOF
13135 cat confdefs.h >>conftest.$ac_ext
13136 cat >>conftest.$ac_ext <<_ACEOF
13137 /* end confdefs.h.  */
13138 $ac_includes_default
13139 #include <$ac_header>
13140 _ACEOF
13141 rm -f conftest.$ac_objext
13142 if { (ac_try="$ac_compile"
13143 case "(($ac_try" in
13144   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13145   *) ac_try_echo=$ac_try;;
13146 esac
13147 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13148 $as_echo "$ac_try_echo") >&5
13149   (eval "$ac_compile") 2>conftest.er1
13150   ac_status=$?
13151   grep -v '^ *+' conftest.er1 >conftest.err
13152   rm -f conftest.er1
13153   cat conftest.err >&5
13154   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13155   (exit $ac_status); } && {
13156          test -z "$ac_c_werror_flag" ||
13157          test ! -s conftest.err
13158        } && test -s conftest.$ac_objext; then
13159   ac_header_compiler=yes
13160 else
13161   $as_echo "$as_me: failed program was:" >&5
13162 sed 's/^/| /' conftest.$ac_ext >&5
13163
13164         ac_header_compiler=no
13165 fi
13166
13167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13168 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13169 $as_echo "$ac_header_compiler" >&6; }
13170
13171 # Is the header present?
13172 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
13173 $as_echo_n "checking $ac_header presence... " >&6; }
13174 cat >conftest.$ac_ext <<_ACEOF
13175 /* confdefs.h.  */
13176 _ACEOF
13177 cat confdefs.h >>conftest.$ac_ext
13178 cat >>conftest.$ac_ext <<_ACEOF
13179 /* end confdefs.h.  */
13180 #include <$ac_header>
13181 _ACEOF
13182 if { (ac_try="$ac_cpp conftest.$ac_ext"
13183 case "(($ac_try" in
13184   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13185   *) ac_try_echo=$ac_try;;
13186 esac
13187 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13188 $as_echo "$ac_try_echo") >&5
13189   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13190   ac_status=$?
13191   grep -v '^ *+' conftest.er1 >conftest.err
13192   rm -f conftest.er1
13193   cat conftest.err >&5
13194   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13195   (exit $ac_status); } >/dev/null && {
13196          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13197          test ! -s conftest.err
13198        }; then
13199   ac_header_preproc=yes
13200 else
13201   $as_echo "$as_me: failed program was:" >&5
13202 sed 's/^/| /' conftest.$ac_ext >&5
13203
13204   ac_header_preproc=no
13205 fi
13206
13207 rm -f conftest.err conftest.$ac_ext
13208 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13209 $as_echo "$ac_header_preproc" >&6; }
13210
13211 # So?  What about this header?
13212 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13213   yes:no: )
13214     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13215 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13216     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13217 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13218     ac_header_preproc=yes
13219     ;;
13220   no:yes:* )
13221     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13222 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13223     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13224 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13225     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13226 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13227     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13228 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13229     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13230 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13231     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13232 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13233     ( cat <<\_ASBOX
13234 ## ---------------------------------------- ##
13235 ## Report this to pgsql-bugs@postgresql.org ##
13236 ## ---------------------------------------- ##
13237 _ASBOX
13238      ) | sed "s/^/$as_me: WARNING:     /" >&2
13239     ;;
13240 esac
13241 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13242 $as_echo_n "checking for $ac_header... " >&6; }
13243 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13244   $as_echo_n "(cached) " >&6
13245 else
13246   eval "$as_ac_Header=\$ac_header_preproc"
13247 fi
13248 ac_res=`eval 'as_val=${'$as_ac_Header'}
13249                  $as_echo "$as_val"'`
13250                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13251 $as_echo "$ac_res" >&6; }
13252
13253 fi
13254 as_val=`eval 'as_val=${'$as_ac_Header'}
13255                  $as_echo "$as_val"'`
13256    if test "x$as_val" = x""yes; then
13257   cat >>confdefs.h <<_ACEOF
13258 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13259 _ACEOF
13260
13261 else
13262
13263 for ac_header in pam/pam_appl.h
13264 do
13265 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13266 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13267   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13268 $as_echo_n "checking for $ac_header... " >&6; }
13269 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13270   $as_echo_n "(cached) " >&6
13271 fi
13272 ac_res=`eval 'as_val=${'$as_ac_Header'}
13273                  $as_echo "$as_val"'`
13274                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13275 $as_echo "$ac_res" >&6; }
13276 else
13277   # Is the header compilable?
13278 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
13279 $as_echo_n "checking $ac_header usability... " >&6; }
13280 cat >conftest.$ac_ext <<_ACEOF
13281 /* confdefs.h.  */
13282 _ACEOF
13283 cat confdefs.h >>conftest.$ac_ext
13284 cat >>conftest.$ac_ext <<_ACEOF
13285 /* end confdefs.h.  */
13286 $ac_includes_default
13287 #include <$ac_header>
13288 _ACEOF
13289 rm -f conftest.$ac_objext
13290 if { (ac_try="$ac_compile"
13291 case "(($ac_try" in
13292   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13293   *) ac_try_echo=$ac_try;;
13294 esac
13295 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13296 $as_echo "$ac_try_echo") >&5
13297   (eval "$ac_compile") 2>conftest.er1
13298   ac_status=$?
13299   grep -v '^ *+' conftest.er1 >conftest.err
13300   rm -f conftest.er1
13301   cat conftest.err >&5
13302   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13303   (exit $ac_status); } && {
13304          test -z "$ac_c_werror_flag" ||
13305          test ! -s conftest.err
13306        } && test -s conftest.$ac_objext; then
13307   ac_header_compiler=yes
13308 else
13309   $as_echo "$as_me: failed program was:" >&5
13310 sed 's/^/| /' conftest.$ac_ext >&5
13311
13312         ac_header_compiler=no
13313 fi
13314
13315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13316 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13317 $as_echo "$ac_header_compiler" >&6; }
13318
13319 # Is the header present?
13320 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
13321 $as_echo_n "checking $ac_header presence... " >&6; }
13322 cat >conftest.$ac_ext <<_ACEOF
13323 /* confdefs.h.  */
13324 _ACEOF
13325 cat confdefs.h >>conftest.$ac_ext
13326 cat >>conftest.$ac_ext <<_ACEOF
13327 /* end confdefs.h.  */
13328 #include <$ac_header>
13329 _ACEOF
13330 if { (ac_try="$ac_cpp conftest.$ac_ext"
13331 case "(($ac_try" in
13332   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13333   *) ac_try_echo=$ac_try;;
13334 esac
13335 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13336 $as_echo "$ac_try_echo") >&5
13337   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13338   ac_status=$?
13339   grep -v '^ *+' conftest.er1 >conftest.err
13340   rm -f conftest.er1
13341   cat conftest.err >&5
13342   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13343   (exit $ac_status); } >/dev/null && {
13344          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13345          test ! -s conftest.err
13346        }; then
13347   ac_header_preproc=yes
13348 else
13349   $as_echo "$as_me: failed program was:" >&5
13350 sed 's/^/| /' conftest.$ac_ext >&5
13351
13352   ac_header_preproc=no
13353 fi
13354
13355 rm -f conftest.err conftest.$ac_ext
13356 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13357 $as_echo "$ac_header_preproc" >&6; }
13358
13359 # So?  What about this header?
13360 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13361   yes:no: )
13362     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13363 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13364     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13365 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13366     ac_header_preproc=yes
13367     ;;
13368   no:yes:* )
13369     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13370 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13371     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13372 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13373     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13374 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13375     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13376 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13377     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13378 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13379     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13380 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13381     ( cat <<\_ASBOX
13382 ## ---------------------------------------- ##
13383 ## Report this to pgsql-bugs@postgresql.org ##
13384 ## ---------------------------------------- ##
13385 _ASBOX
13386      ) | sed "s/^/$as_me: WARNING:     /" >&2
13387     ;;
13388 esac
13389 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13390 $as_echo_n "checking for $ac_header... " >&6; }
13391 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13392   $as_echo_n "(cached) " >&6
13393 else
13394   eval "$as_ac_Header=\$ac_header_preproc"
13395 fi
13396 ac_res=`eval 'as_val=${'$as_ac_Header'}
13397                  $as_echo "$as_val"'`
13398                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13399 $as_echo "$ac_res" >&6; }
13400
13401 fi
13402 as_val=`eval 'as_val=${'$as_ac_Header'}
13403                  $as_echo "$as_val"'`
13404    if test "x$as_val" = x""yes; then
13405   cat >>confdefs.h <<_ACEOF
13406 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13407 _ACEOF
13408
13409 else
13410   { { $as_echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
13411 $as_echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
13412    { (exit 1); exit 1; }; }
13413 fi
13414
13415 done
13416
13417 fi
13418
13419 done
13420
13421 fi
13422
13423 if test "$with_libxml" = yes ; then
13424   if test "${ac_cv_header_libxml_parser_h+set}" = set; then
13425   { $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
13426 $as_echo_n "checking for libxml/parser.h... " >&6; }
13427 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
13428   $as_echo_n "(cached) " >&6
13429 fi
13430 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
13431 $as_echo "$ac_cv_header_libxml_parser_h" >&6; }
13432 else
13433   # Is the header compilable?
13434 { $as_echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
13435 $as_echo_n "checking libxml/parser.h usability... " >&6; }
13436 cat >conftest.$ac_ext <<_ACEOF
13437 /* confdefs.h.  */
13438 _ACEOF
13439 cat confdefs.h >>conftest.$ac_ext
13440 cat >>conftest.$ac_ext <<_ACEOF
13441 /* end confdefs.h.  */
13442 $ac_includes_default
13443 #include <libxml/parser.h>
13444 _ACEOF
13445 rm -f conftest.$ac_objext
13446 if { (ac_try="$ac_compile"
13447 case "(($ac_try" in
13448   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13449   *) ac_try_echo=$ac_try;;
13450 esac
13451 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13452 $as_echo "$ac_try_echo") >&5
13453   (eval "$ac_compile") 2>conftest.er1
13454   ac_status=$?
13455   grep -v '^ *+' conftest.er1 >conftest.err
13456   rm -f conftest.er1
13457   cat conftest.err >&5
13458   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13459   (exit $ac_status); } && {
13460          test -z "$ac_c_werror_flag" ||
13461          test ! -s conftest.err
13462        } && test -s conftest.$ac_objext; then
13463   ac_header_compiler=yes
13464 else
13465   $as_echo "$as_me: failed program was:" >&5
13466 sed 's/^/| /' conftest.$ac_ext >&5
13467
13468         ac_header_compiler=no
13469 fi
13470
13471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13472 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13473 $as_echo "$ac_header_compiler" >&6; }
13474
13475 # Is the header present?
13476 { $as_echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
13477 $as_echo_n "checking libxml/parser.h presence... " >&6; }
13478 cat >conftest.$ac_ext <<_ACEOF
13479 /* confdefs.h.  */
13480 _ACEOF
13481 cat confdefs.h >>conftest.$ac_ext
13482 cat >>conftest.$ac_ext <<_ACEOF
13483 /* end confdefs.h.  */
13484 #include <libxml/parser.h>
13485 _ACEOF
13486 if { (ac_try="$ac_cpp conftest.$ac_ext"
13487 case "(($ac_try" in
13488   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13489   *) ac_try_echo=$ac_try;;
13490 esac
13491 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13492 $as_echo "$ac_try_echo") >&5
13493   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13494   ac_status=$?
13495   grep -v '^ *+' conftest.er1 >conftest.err
13496   rm -f conftest.er1
13497   cat conftest.err >&5
13498   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13499   (exit $ac_status); } >/dev/null && {
13500          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13501          test ! -s conftest.err
13502        }; then
13503   ac_header_preproc=yes
13504 else
13505   $as_echo "$as_me: failed program was:" >&5
13506 sed 's/^/| /' conftest.$ac_ext >&5
13507
13508   ac_header_preproc=no
13509 fi
13510
13511 rm -f conftest.err conftest.$ac_ext
13512 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13513 $as_echo "$ac_header_preproc" >&6; }
13514
13515 # So?  What about this header?
13516 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13517   yes:no: )
13518     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
13519 $as_echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13520     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
13521 $as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
13522     ac_header_preproc=yes
13523     ;;
13524   no:yes:* )
13525     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
13526 $as_echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
13527     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
13528 $as_echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
13529     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
13530 $as_echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
13531     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
13532 $as_echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
13533     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
13534 $as_echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
13535     { $as_echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
13536 $as_echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
13537     ( cat <<\_ASBOX
13538 ## ---------------------------------------- ##
13539 ## Report this to pgsql-bugs@postgresql.org ##
13540 ## ---------------------------------------- ##
13541 _ASBOX
13542      ) | sed "s/^/$as_me: WARNING:     /" >&2
13543     ;;
13544 esac
13545 { $as_echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
13546 $as_echo_n "checking for libxml/parser.h... " >&6; }
13547 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
13548   $as_echo_n "(cached) " >&6
13549 else
13550   ac_cv_header_libxml_parser_h=$ac_header_preproc
13551 fi
13552 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
13553 $as_echo "$ac_cv_header_libxml_parser_h" >&6; }
13554
13555 fi
13556 if test "x$ac_cv_header_libxml_parser_h" = x""yes; then
13557   :
13558 else
13559   { { $as_echo "$as_me:$LINENO: error: header file <libxml/parser.h> is required for XML support" >&5
13560 $as_echo "$as_me: error: header file <libxml/parser.h> is required for XML support" >&2;}
13561    { (exit 1); exit 1; }; }
13562 fi
13563
13564
13565 fi
13566
13567 if test "$with_libxslt" = yes ; then
13568   if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
13569   { $as_echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
13570 $as_echo_n "checking for libxslt/xslt.h... " >&6; }
13571 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
13572   $as_echo_n "(cached) " >&6
13573 fi
13574 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
13575 $as_echo "$ac_cv_header_libxslt_xslt_h" >&6; }
13576 else
13577   # Is the header compilable?
13578 { $as_echo "$as_me:$LINENO: checking libxslt/xslt.h usability" >&5
13579 $as_echo_n "checking libxslt/xslt.h usability... " >&6; }
13580 cat >conftest.$ac_ext <<_ACEOF
13581 /* confdefs.h.  */
13582 _ACEOF
13583 cat confdefs.h >>conftest.$ac_ext
13584 cat >>conftest.$ac_ext <<_ACEOF
13585 /* end confdefs.h.  */
13586 $ac_includes_default
13587 #include <libxslt/xslt.h>
13588 _ACEOF
13589 rm -f conftest.$ac_objext
13590 if { (ac_try="$ac_compile"
13591 case "(($ac_try" in
13592   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13593   *) ac_try_echo=$ac_try;;
13594 esac
13595 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13596 $as_echo "$ac_try_echo") >&5
13597   (eval "$ac_compile") 2>conftest.er1
13598   ac_status=$?
13599   grep -v '^ *+' conftest.er1 >conftest.err
13600   rm -f conftest.er1
13601   cat conftest.err >&5
13602   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13603   (exit $ac_status); } && {
13604          test -z "$ac_c_werror_flag" ||
13605          test ! -s conftest.err
13606        } && test -s conftest.$ac_objext; then
13607   ac_header_compiler=yes
13608 else
13609   $as_echo "$as_me: failed program was:" >&5
13610 sed 's/^/| /' conftest.$ac_ext >&5
13611
13612         ac_header_compiler=no
13613 fi
13614
13615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13616 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13617 $as_echo "$ac_header_compiler" >&6; }
13618
13619 # Is the header present?
13620 { $as_echo "$as_me:$LINENO: checking libxslt/xslt.h presence" >&5
13621 $as_echo_n "checking libxslt/xslt.h presence... " >&6; }
13622 cat >conftest.$ac_ext <<_ACEOF
13623 /* confdefs.h.  */
13624 _ACEOF
13625 cat confdefs.h >>conftest.$ac_ext
13626 cat >>conftest.$ac_ext <<_ACEOF
13627 /* end confdefs.h.  */
13628 #include <libxslt/xslt.h>
13629 _ACEOF
13630 if { (ac_try="$ac_cpp conftest.$ac_ext"
13631 case "(($ac_try" in
13632   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13633   *) ac_try_echo=$ac_try;;
13634 esac
13635 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13636 $as_echo "$ac_try_echo") >&5
13637   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13638   ac_status=$?
13639   grep -v '^ *+' conftest.er1 >conftest.err
13640   rm -f conftest.er1
13641   cat conftest.err >&5
13642   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13643   (exit $ac_status); } >/dev/null && {
13644          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13645          test ! -s conftest.err
13646        }; then
13647   ac_header_preproc=yes
13648 else
13649   $as_echo "$as_me: failed program was:" >&5
13650 sed 's/^/| /' conftest.$ac_ext >&5
13651
13652   ac_header_preproc=no
13653 fi
13654
13655 rm -f conftest.err conftest.$ac_ext
13656 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13657 $as_echo "$ac_header_preproc" >&6; }
13658
13659 # So?  What about this header?
13660 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13661   yes:no: )
13662     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&5
13663 $as_echo "$as_me: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13664     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&5
13665 $as_echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&2;}
13666     ac_header_preproc=yes
13667     ;;
13668   no:yes:* )
13669     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: present but cannot be compiled" >&5
13670 $as_echo "$as_me: WARNING: libxslt/xslt.h: present but cannot be compiled" >&2;}
13671     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&5
13672 $as_echo "$as_me: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&2;}
13673     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&5
13674 $as_echo "$as_me: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&2;}
13675     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&5
13676 $as_echo "$as_me: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
13677     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&5
13678 $as_echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&2;}
13679     { $as_echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&5
13680 $as_echo "$as_me: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&2;}
13681     ( cat <<\_ASBOX
13682 ## ---------------------------------------- ##
13683 ## Report this to pgsql-bugs@postgresql.org ##
13684 ## ---------------------------------------- ##
13685 _ASBOX
13686      ) | sed "s/^/$as_me: WARNING:     /" >&2
13687     ;;
13688 esac
13689 { $as_echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
13690 $as_echo_n "checking for libxslt/xslt.h... " >&6; }
13691 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
13692   $as_echo_n "(cached) " >&6
13693 else
13694   ac_cv_header_libxslt_xslt_h=$ac_header_preproc
13695 fi
13696 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
13697 $as_echo "$ac_cv_header_libxslt_xslt_h" >&6; }
13698
13699 fi
13700 if test "x$ac_cv_header_libxslt_xslt_h" = x""yes; then
13701   :
13702 else
13703   { { $as_echo "$as_me:$LINENO: error: header file <libxslt/xslt.h> is required for XSLT support" >&5
13704 $as_echo "$as_me: error: header file <libxslt/xslt.h> is required for XSLT support" >&2;}
13705    { (exit 1); exit 1; }; }
13706 fi
13707
13708
13709 fi
13710
13711 if test "$with_ldap" = yes ; then
13712   if test "$PORTNAME" != "win32"; then
13713
13714 for ac_header in ldap.h
13715 do
13716 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13717 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13718   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13719 $as_echo_n "checking for $ac_header... " >&6; }
13720 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13721   $as_echo_n "(cached) " >&6
13722 fi
13723 ac_res=`eval 'as_val=${'$as_ac_Header'}
13724                  $as_echo "$as_val"'`
13725                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13726 $as_echo "$ac_res" >&6; }
13727 else
13728   # Is the header compilable?
13729 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
13730 $as_echo_n "checking $ac_header usability... " >&6; }
13731 cat >conftest.$ac_ext <<_ACEOF
13732 /* confdefs.h.  */
13733 _ACEOF
13734 cat confdefs.h >>conftest.$ac_ext
13735 cat >>conftest.$ac_ext <<_ACEOF
13736 /* end confdefs.h.  */
13737 $ac_includes_default
13738 #include <$ac_header>
13739 _ACEOF
13740 rm -f conftest.$ac_objext
13741 if { (ac_try="$ac_compile"
13742 case "(($ac_try" in
13743   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13744   *) ac_try_echo=$ac_try;;
13745 esac
13746 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13747 $as_echo "$ac_try_echo") >&5
13748   (eval "$ac_compile") 2>conftest.er1
13749   ac_status=$?
13750   grep -v '^ *+' conftest.er1 >conftest.err
13751   rm -f conftest.er1
13752   cat conftest.err >&5
13753   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13754   (exit $ac_status); } && {
13755          test -z "$ac_c_werror_flag" ||
13756          test ! -s conftest.err
13757        } && test -s conftest.$ac_objext; then
13758   ac_header_compiler=yes
13759 else
13760   $as_echo "$as_me: failed program was:" >&5
13761 sed 's/^/| /' conftest.$ac_ext >&5
13762
13763         ac_header_compiler=no
13764 fi
13765
13766 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13767 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13768 $as_echo "$ac_header_compiler" >&6; }
13769
13770 # Is the header present?
13771 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
13772 $as_echo_n "checking $ac_header presence... " >&6; }
13773 cat >conftest.$ac_ext <<_ACEOF
13774 /* confdefs.h.  */
13775 _ACEOF
13776 cat confdefs.h >>conftest.$ac_ext
13777 cat >>conftest.$ac_ext <<_ACEOF
13778 /* end confdefs.h.  */
13779 #include <$ac_header>
13780 _ACEOF
13781 if { (ac_try="$ac_cpp conftest.$ac_ext"
13782 case "(($ac_try" in
13783   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13784   *) ac_try_echo=$ac_try;;
13785 esac
13786 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13787 $as_echo "$ac_try_echo") >&5
13788   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13789   ac_status=$?
13790   grep -v '^ *+' conftest.er1 >conftest.err
13791   rm -f conftest.er1
13792   cat conftest.err >&5
13793   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13794   (exit $ac_status); } >/dev/null && {
13795          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13796          test ! -s conftest.err
13797        }; then
13798   ac_header_preproc=yes
13799 else
13800   $as_echo "$as_me: failed program was:" >&5
13801 sed 's/^/| /' conftest.$ac_ext >&5
13802
13803   ac_header_preproc=no
13804 fi
13805
13806 rm -f conftest.err conftest.$ac_ext
13807 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13808 $as_echo "$ac_header_preproc" >&6; }
13809
13810 # So?  What about this header?
13811 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13812   yes:no: )
13813     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13814 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13815     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13816 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13817     ac_header_preproc=yes
13818     ;;
13819   no:yes:* )
13820     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13821 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13822     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13823 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13824     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13825 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13826     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13827 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13828     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13829 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13830     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13831 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13832     ( cat <<\_ASBOX
13833 ## ---------------------------------------- ##
13834 ## Report this to pgsql-bugs@postgresql.org ##
13835 ## ---------------------------------------- ##
13836 _ASBOX
13837      ) | sed "s/^/$as_me: WARNING:     /" >&2
13838     ;;
13839 esac
13840 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13841 $as_echo_n "checking for $ac_header... " >&6; }
13842 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13843   $as_echo_n "(cached) " >&6
13844 else
13845   eval "$as_ac_Header=\$ac_header_preproc"
13846 fi
13847 ac_res=`eval 'as_val=${'$as_ac_Header'}
13848                  $as_echo "$as_val"'`
13849                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13850 $as_echo "$ac_res" >&6; }
13851
13852 fi
13853 as_val=`eval 'as_val=${'$as_ac_Header'}
13854                  $as_echo "$as_val"'`
13855    if test "x$as_val" = x""yes; then
13856   cat >>confdefs.h <<_ACEOF
13857 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13858 _ACEOF
13859
13860 else
13861   { { $as_echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
13862 $as_echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
13863    { (exit 1); exit 1; }; }
13864 fi
13865
13866 done
13867
13868   else
13869
13870 for ac_header in winldap.h
13871 do
13872 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13873 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
13874 $as_echo_n "checking for $ac_header... " >&6; }
13875 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13876   $as_echo_n "(cached) " >&6
13877 else
13878   cat >conftest.$ac_ext <<_ACEOF
13879 /* confdefs.h.  */
13880 _ACEOF
13881 cat confdefs.h >>conftest.$ac_ext
13882 cat >>conftest.$ac_ext <<_ACEOF
13883 /* end confdefs.h.  */
13884 $ac_includes_default
13885 #include <windows.h>
13886
13887
13888 #include <$ac_header>
13889 _ACEOF
13890 rm -f conftest.$ac_objext
13891 if { (ac_try="$ac_compile"
13892 case "(($ac_try" in
13893   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13894   *) ac_try_echo=$ac_try;;
13895 esac
13896 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13897 $as_echo "$ac_try_echo") >&5
13898   (eval "$ac_compile") 2>conftest.er1
13899   ac_status=$?
13900   grep -v '^ *+' conftest.er1 >conftest.err
13901   rm -f conftest.er1
13902   cat conftest.err >&5
13903   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13904   (exit $ac_status); } && {
13905          test -z "$ac_c_werror_flag" ||
13906          test ! -s conftest.err
13907        } && test -s conftest.$ac_objext; then
13908   eval "$as_ac_Header=yes"
13909 else
13910   $as_echo "$as_me: failed program was:" >&5
13911 sed 's/^/| /' conftest.$ac_ext >&5
13912
13913         eval "$as_ac_Header=no"
13914 fi
13915
13916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13917 fi
13918 ac_res=`eval 'as_val=${'$as_ac_Header'}
13919                  $as_echo "$as_val"'`
13920                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13921 $as_echo "$ac_res" >&6; }
13922 as_val=`eval 'as_val=${'$as_ac_Header'}
13923                  $as_echo "$as_val"'`
13924    if test "x$as_val" = x""yes; then
13925   cat >>confdefs.h <<_ACEOF
13926 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13927 _ACEOF
13928
13929 else
13930   { { $as_echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
13931 $as_echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
13932    { (exit 1); exit 1; }; }
13933 fi
13934
13935 done
13936
13937   fi
13938 fi
13939
13940 if test "$with_bonjour" = yes ; then
13941   if test "${ac_cv_header_dns_sd_h+set}" = set; then
13942   { $as_echo "$as_me:$LINENO: checking for dns_sd.h" >&5
13943 $as_echo_n "checking for dns_sd.h... " >&6; }
13944 if test "${ac_cv_header_dns_sd_h+set}" = set; then
13945   $as_echo_n "(cached) " >&6
13946 fi
13947 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_dns_sd_h" >&5
13948 $as_echo "$ac_cv_header_dns_sd_h" >&6; }
13949 else
13950   # Is the header compilable?
13951 { $as_echo "$as_me:$LINENO: checking dns_sd.h usability" >&5
13952 $as_echo_n "checking dns_sd.h usability... " >&6; }
13953 cat >conftest.$ac_ext <<_ACEOF
13954 /* confdefs.h.  */
13955 _ACEOF
13956 cat confdefs.h >>conftest.$ac_ext
13957 cat >>conftest.$ac_ext <<_ACEOF
13958 /* end confdefs.h.  */
13959 $ac_includes_default
13960 #include <dns_sd.h>
13961 _ACEOF
13962 rm -f conftest.$ac_objext
13963 if { (ac_try="$ac_compile"
13964 case "(($ac_try" in
13965   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13966   *) ac_try_echo=$ac_try;;
13967 esac
13968 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13969 $as_echo "$ac_try_echo") >&5
13970   (eval "$ac_compile") 2>conftest.er1
13971   ac_status=$?
13972   grep -v '^ *+' conftest.er1 >conftest.err
13973   rm -f conftest.er1
13974   cat conftest.err >&5
13975   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13976   (exit $ac_status); } && {
13977          test -z "$ac_c_werror_flag" ||
13978          test ! -s conftest.err
13979        } && test -s conftest.$ac_objext; then
13980   ac_header_compiler=yes
13981 else
13982   $as_echo "$as_me: failed program was:" >&5
13983 sed 's/^/| /' conftest.$ac_ext >&5
13984
13985         ac_header_compiler=no
13986 fi
13987
13988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13989 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13990 $as_echo "$ac_header_compiler" >&6; }
13991
13992 # Is the header present?
13993 { $as_echo "$as_me:$LINENO: checking dns_sd.h presence" >&5
13994 $as_echo_n "checking dns_sd.h presence... " >&6; }
13995 cat >conftest.$ac_ext <<_ACEOF
13996 /* confdefs.h.  */
13997 _ACEOF
13998 cat confdefs.h >>conftest.$ac_ext
13999 cat >>conftest.$ac_ext <<_ACEOF
14000 /* end confdefs.h.  */
14001 #include <dns_sd.h>
14002 _ACEOF
14003 if { (ac_try="$ac_cpp conftest.$ac_ext"
14004 case "(($ac_try" in
14005   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14006   *) ac_try_echo=$ac_try;;
14007 esac
14008 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14009 $as_echo "$ac_try_echo") >&5
14010   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14011   ac_status=$?
14012   grep -v '^ *+' conftest.er1 >conftest.err
14013   rm -f conftest.er1
14014   cat conftest.err >&5
14015   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14016   (exit $ac_status); } >/dev/null && {
14017          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14018          test ! -s conftest.err
14019        }; then
14020   ac_header_preproc=yes
14021 else
14022   $as_echo "$as_me: failed program was:" >&5
14023 sed 's/^/| /' conftest.$ac_ext >&5
14024
14025   ac_header_preproc=no
14026 fi
14027
14028 rm -f conftest.err conftest.$ac_ext
14029 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14030 $as_echo "$ac_header_preproc" >&6; }
14031
14032 # So?  What about this header?
14033 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14034   yes:no: )
14035     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: accepted by the compiler, rejected by the preprocessor!" >&5
14036 $as_echo "$as_me: WARNING: dns_sd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14037     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: proceeding with the compiler's result" >&5
14038 $as_echo "$as_me: WARNING: dns_sd.h: proceeding with the compiler's result" >&2;}
14039     ac_header_preproc=yes
14040     ;;
14041   no:yes:* )
14042     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: present but cannot be compiled" >&5
14043 $as_echo "$as_me: WARNING: dns_sd.h: present but cannot be compiled" >&2;}
14044     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h:     check for missing prerequisite headers?" >&5
14045 $as_echo "$as_me: WARNING: dns_sd.h:     check for missing prerequisite headers?" >&2;}
14046     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: see the Autoconf documentation" >&5
14047 $as_echo "$as_me: WARNING: dns_sd.h: see the Autoconf documentation" >&2;}
14048     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h:     section \"Present But Cannot Be Compiled\"" >&5
14049 $as_echo "$as_me: WARNING: dns_sd.h:     section \"Present But Cannot Be Compiled\"" >&2;}
14050     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: proceeding with the preprocessor's result" >&5
14051 $as_echo "$as_me: WARNING: dns_sd.h: proceeding with the preprocessor's result" >&2;}
14052     { $as_echo "$as_me:$LINENO: WARNING: dns_sd.h: in the future, the compiler will take precedence" >&5
14053 $as_echo "$as_me: WARNING: dns_sd.h: in the future, the compiler will take precedence" >&2;}
14054     ( cat <<\_ASBOX
14055 ## ---------------------------------------- ##
14056 ## Report this to pgsql-bugs@postgresql.org ##
14057 ## ---------------------------------------- ##
14058 _ASBOX
14059      ) | sed "s/^/$as_me: WARNING:     /" >&2
14060     ;;
14061 esac
14062 { $as_echo "$as_me:$LINENO: checking for dns_sd.h" >&5
14063 $as_echo_n "checking for dns_sd.h... " >&6; }
14064 if test "${ac_cv_header_dns_sd_h+set}" = set; then
14065   $as_echo_n "(cached) " >&6
14066 else
14067   ac_cv_header_dns_sd_h=$ac_header_preproc
14068 fi
14069 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_dns_sd_h" >&5
14070 $as_echo "$ac_cv_header_dns_sd_h" >&6; }
14071
14072 fi
14073 if test "x$ac_cv_header_dns_sd_h" = x""yes; then
14074   :
14075 else
14076   { { $as_echo "$as_me:$LINENO: error: header file <dns_sd.h> is required for Bonjour" >&5
14077 $as_echo "$as_me: error: header file <dns_sd.h> is required for Bonjour" >&2;}
14078    { (exit 1); exit 1; }; }
14079 fi
14080
14081
14082 fi
14083
14084 # for contrib/uuid-ossp
14085 if test "$with_ossp_uuid" = yes ; then
14086
14087 for ac_header in ossp/uuid.h
14088 do
14089 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14090 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14091   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14092 $as_echo_n "checking for $ac_header... " >&6; }
14093 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14094   $as_echo_n "(cached) " >&6
14095 fi
14096 ac_res=`eval 'as_val=${'$as_ac_Header'}
14097                  $as_echo "$as_val"'`
14098                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14099 $as_echo "$ac_res" >&6; }
14100 else
14101   # Is the header compilable?
14102 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
14103 $as_echo_n "checking $ac_header usability... " >&6; }
14104 cat >conftest.$ac_ext <<_ACEOF
14105 /* confdefs.h.  */
14106 _ACEOF
14107 cat confdefs.h >>conftest.$ac_ext
14108 cat >>conftest.$ac_ext <<_ACEOF
14109 /* end confdefs.h.  */
14110 $ac_includes_default
14111 #include <$ac_header>
14112 _ACEOF
14113 rm -f conftest.$ac_objext
14114 if { (ac_try="$ac_compile"
14115 case "(($ac_try" in
14116   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14117   *) ac_try_echo=$ac_try;;
14118 esac
14119 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14120 $as_echo "$ac_try_echo") >&5
14121   (eval "$ac_compile") 2>conftest.er1
14122   ac_status=$?
14123   grep -v '^ *+' conftest.er1 >conftest.err
14124   rm -f conftest.er1
14125   cat conftest.err >&5
14126   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14127   (exit $ac_status); } && {
14128          test -z "$ac_c_werror_flag" ||
14129          test ! -s conftest.err
14130        } && test -s conftest.$ac_objext; then
14131   ac_header_compiler=yes
14132 else
14133   $as_echo "$as_me: failed program was:" >&5
14134 sed 's/^/| /' conftest.$ac_ext >&5
14135
14136         ac_header_compiler=no
14137 fi
14138
14139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14140 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14141 $as_echo "$ac_header_compiler" >&6; }
14142
14143 # Is the header present?
14144 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
14145 $as_echo_n "checking $ac_header presence... " >&6; }
14146 cat >conftest.$ac_ext <<_ACEOF
14147 /* confdefs.h.  */
14148 _ACEOF
14149 cat confdefs.h >>conftest.$ac_ext
14150 cat >>conftest.$ac_ext <<_ACEOF
14151 /* end confdefs.h.  */
14152 #include <$ac_header>
14153 _ACEOF
14154 if { (ac_try="$ac_cpp conftest.$ac_ext"
14155 case "(($ac_try" in
14156   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14157   *) ac_try_echo=$ac_try;;
14158 esac
14159 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14160 $as_echo "$ac_try_echo") >&5
14161   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14162   ac_status=$?
14163   grep -v '^ *+' conftest.er1 >conftest.err
14164   rm -f conftest.er1
14165   cat conftest.err >&5
14166   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14167   (exit $ac_status); } >/dev/null && {
14168          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14169          test ! -s conftest.err
14170        }; then
14171   ac_header_preproc=yes
14172 else
14173   $as_echo "$as_me: failed program was:" >&5
14174 sed 's/^/| /' conftest.$ac_ext >&5
14175
14176   ac_header_preproc=no
14177 fi
14178
14179 rm -f conftest.err conftest.$ac_ext
14180 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14181 $as_echo "$ac_header_preproc" >&6; }
14182
14183 # So?  What about this header?
14184 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14185   yes:no: )
14186     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14187 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14188     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14189 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14190     ac_header_preproc=yes
14191     ;;
14192   no:yes:* )
14193     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14194 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14195     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14196 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14197     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14198 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14199     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14200 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14201     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14202 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14203     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14204 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14205     ( cat <<\_ASBOX
14206 ## ---------------------------------------- ##
14207 ## Report this to pgsql-bugs@postgresql.org ##
14208 ## ---------------------------------------- ##
14209 _ASBOX
14210      ) | sed "s/^/$as_me: WARNING:     /" >&2
14211     ;;
14212 esac
14213 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14214 $as_echo_n "checking for $ac_header... " >&6; }
14215 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14216   $as_echo_n "(cached) " >&6
14217 else
14218   eval "$as_ac_Header=\$ac_header_preproc"
14219 fi
14220 ac_res=`eval 'as_val=${'$as_ac_Header'}
14221                  $as_echo "$as_val"'`
14222                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14223 $as_echo "$ac_res" >&6; }
14224
14225 fi
14226 as_val=`eval 'as_val=${'$as_ac_Header'}
14227                  $as_echo "$as_val"'`
14228    if test "x$as_val" = x""yes; then
14229   cat >>confdefs.h <<_ACEOF
14230 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14231 _ACEOF
14232
14233 else
14234
14235
14236 for ac_header in uuid.h
14237 do
14238 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14239 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14240   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14241 $as_echo_n "checking for $ac_header... " >&6; }
14242 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14243   $as_echo_n "(cached) " >&6
14244 fi
14245 ac_res=`eval 'as_val=${'$as_ac_Header'}
14246                  $as_echo "$as_val"'`
14247                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14248 $as_echo "$ac_res" >&6; }
14249 else
14250   # Is the header compilable?
14251 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
14252 $as_echo_n "checking $ac_header usability... " >&6; }
14253 cat >conftest.$ac_ext <<_ACEOF
14254 /* confdefs.h.  */
14255 _ACEOF
14256 cat confdefs.h >>conftest.$ac_ext
14257 cat >>conftest.$ac_ext <<_ACEOF
14258 /* end confdefs.h.  */
14259 $ac_includes_default
14260 #include <$ac_header>
14261 _ACEOF
14262 rm -f conftest.$ac_objext
14263 if { (ac_try="$ac_compile"
14264 case "(($ac_try" in
14265   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14266   *) ac_try_echo=$ac_try;;
14267 esac
14268 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14269 $as_echo "$ac_try_echo") >&5
14270   (eval "$ac_compile") 2>conftest.er1
14271   ac_status=$?
14272   grep -v '^ *+' conftest.er1 >conftest.err
14273   rm -f conftest.er1
14274   cat conftest.err >&5
14275   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14276   (exit $ac_status); } && {
14277          test -z "$ac_c_werror_flag" ||
14278          test ! -s conftest.err
14279        } && test -s conftest.$ac_objext; then
14280   ac_header_compiler=yes
14281 else
14282   $as_echo "$as_me: failed program was:" >&5
14283 sed 's/^/| /' conftest.$ac_ext >&5
14284
14285         ac_header_compiler=no
14286 fi
14287
14288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14289 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14290 $as_echo "$ac_header_compiler" >&6; }
14291
14292 # Is the header present?
14293 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
14294 $as_echo_n "checking $ac_header presence... " >&6; }
14295 cat >conftest.$ac_ext <<_ACEOF
14296 /* confdefs.h.  */
14297 _ACEOF
14298 cat confdefs.h >>conftest.$ac_ext
14299 cat >>conftest.$ac_ext <<_ACEOF
14300 /* end confdefs.h.  */
14301 #include <$ac_header>
14302 _ACEOF
14303 if { (ac_try="$ac_cpp conftest.$ac_ext"
14304 case "(($ac_try" in
14305   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14306   *) ac_try_echo=$ac_try;;
14307 esac
14308 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14309 $as_echo "$ac_try_echo") >&5
14310   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14311   ac_status=$?
14312   grep -v '^ *+' conftest.er1 >conftest.err
14313   rm -f conftest.er1
14314   cat conftest.err >&5
14315   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14316   (exit $ac_status); } >/dev/null && {
14317          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14318          test ! -s conftest.err
14319        }; then
14320   ac_header_preproc=yes
14321 else
14322   $as_echo "$as_me: failed program was:" >&5
14323 sed 's/^/| /' conftest.$ac_ext >&5
14324
14325   ac_header_preproc=no
14326 fi
14327
14328 rm -f conftest.err conftest.$ac_ext
14329 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14330 $as_echo "$ac_header_preproc" >&6; }
14331
14332 # So?  What about this header?
14333 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14334   yes:no: )
14335     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14336 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14337     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14338 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14339     ac_header_preproc=yes
14340     ;;
14341   no:yes:* )
14342     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14343 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14344     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14345 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14346     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14347 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14348     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14349 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14350     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14351 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14352     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14353 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14354     ( cat <<\_ASBOX
14355 ## ---------------------------------------- ##
14356 ## Report this to pgsql-bugs@postgresql.org ##
14357 ## ---------------------------------------- ##
14358 _ASBOX
14359      ) | sed "s/^/$as_me: WARNING:     /" >&2
14360     ;;
14361 esac
14362 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14363 $as_echo_n "checking for $ac_header... " >&6; }
14364 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14365   $as_echo_n "(cached) " >&6
14366 else
14367   eval "$as_ac_Header=\$ac_header_preproc"
14368 fi
14369 ac_res=`eval 'as_val=${'$as_ac_Header'}
14370                  $as_echo "$as_val"'`
14371                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14372 $as_echo "$ac_res" >&6; }
14373
14374 fi
14375 as_val=`eval 'as_val=${'$as_ac_Header'}
14376                  $as_echo "$as_val"'`
14377    if test "x$as_val" = x""yes; then
14378   cat >>confdefs.h <<_ACEOF
14379 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14380 _ACEOF
14381
14382 else
14383   { { $as_echo "$as_me:$LINENO: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&5
14384 $as_echo "$as_me: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&2;}
14385    { (exit 1); exit 1; }; }
14386 fi
14387
14388 done
14389
14390 fi
14391
14392 done
14393
14394 fi
14395
14396 if test "$PORTNAME" = "win32" ; then
14397
14398 for ac_header in crtdefs.h
14399 do
14400 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14401 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14402   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14403 $as_echo_n "checking for $ac_header... " >&6; }
14404 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14405   $as_echo_n "(cached) " >&6
14406 fi
14407 ac_res=`eval 'as_val=${'$as_ac_Header'}
14408                  $as_echo "$as_val"'`
14409                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14410 $as_echo "$ac_res" >&6; }
14411 else
14412   # Is the header compilable?
14413 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
14414 $as_echo_n "checking $ac_header usability... " >&6; }
14415 cat >conftest.$ac_ext <<_ACEOF
14416 /* confdefs.h.  */
14417 _ACEOF
14418 cat confdefs.h >>conftest.$ac_ext
14419 cat >>conftest.$ac_ext <<_ACEOF
14420 /* end confdefs.h.  */
14421 $ac_includes_default
14422 #include <$ac_header>
14423 _ACEOF
14424 rm -f conftest.$ac_objext
14425 if { (ac_try="$ac_compile"
14426 case "(($ac_try" in
14427   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14428   *) ac_try_echo=$ac_try;;
14429 esac
14430 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14431 $as_echo "$ac_try_echo") >&5
14432   (eval "$ac_compile") 2>conftest.er1
14433   ac_status=$?
14434   grep -v '^ *+' conftest.er1 >conftest.err
14435   rm -f conftest.er1
14436   cat conftest.err >&5
14437   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14438   (exit $ac_status); } && {
14439          test -z "$ac_c_werror_flag" ||
14440          test ! -s conftest.err
14441        } && test -s conftest.$ac_objext; then
14442   ac_header_compiler=yes
14443 else
14444   $as_echo "$as_me: failed program was:" >&5
14445 sed 's/^/| /' conftest.$ac_ext >&5
14446
14447         ac_header_compiler=no
14448 fi
14449
14450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14451 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14452 $as_echo "$ac_header_compiler" >&6; }
14453
14454 # Is the header present?
14455 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
14456 $as_echo_n "checking $ac_header presence... " >&6; }
14457 cat >conftest.$ac_ext <<_ACEOF
14458 /* confdefs.h.  */
14459 _ACEOF
14460 cat confdefs.h >>conftest.$ac_ext
14461 cat >>conftest.$ac_ext <<_ACEOF
14462 /* end confdefs.h.  */
14463 #include <$ac_header>
14464 _ACEOF
14465 if { (ac_try="$ac_cpp conftest.$ac_ext"
14466 case "(($ac_try" in
14467   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14468   *) ac_try_echo=$ac_try;;
14469 esac
14470 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14471 $as_echo "$ac_try_echo") >&5
14472   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14473   ac_status=$?
14474   grep -v '^ *+' conftest.er1 >conftest.err
14475   rm -f conftest.er1
14476   cat conftest.err >&5
14477   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14478   (exit $ac_status); } >/dev/null && {
14479          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14480          test ! -s conftest.err
14481        }; then
14482   ac_header_preproc=yes
14483 else
14484   $as_echo "$as_me: failed program was:" >&5
14485 sed 's/^/| /' conftest.$ac_ext >&5
14486
14487   ac_header_preproc=no
14488 fi
14489
14490 rm -f conftest.err conftest.$ac_ext
14491 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14492 $as_echo "$ac_header_preproc" >&6; }
14493
14494 # So?  What about this header?
14495 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14496   yes:no: )
14497     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14498 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14499     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14500 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14501     ac_header_preproc=yes
14502     ;;
14503   no:yes:* )
14504     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14505 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14506     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14507 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14508     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14509 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14510     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14511 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14512     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14513 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14514     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14515 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14516     ( cat <<\_ASBOX
14517 ## ---------------------------------------- ##
14518 ## Report this to pgsql-bugs@postgresql.org ##
14519 ## ---------------------------------------- ##
14520 _ASBOX
14521      ) | sed "s/^/$as_me: WARNING:     /" >&2
14522     ;;
14523 esac
14524 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14525 $as_echo_n "checking for $ac_header... " >&6; }
14526 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14527   $as_echo_n "(cached) " >&6
14528 else
14529   eval "$as_ac_Header=\$ac_header_preproc"
14530 fi
14531 ac_res=`eval 'as_val=${'$as_ac_Header'}
14532                  $as_echo "$as_val"'`
14533                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14534 $as_echo "$ac_res" >&6; }
14535
14536 fi
14537 as_val=`eval 'as_val=${'$as_ac_Header'}
14538                  $as_echo "$as_val"'`
14539    if test "x$as_val" = x""yes; then
14540   cat >>confdefs.h <<_ACEOF
14541 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14542 _ACEOF
14543
14544 fi
14545
14546 done
14547
14548 fi
14549
14550 ##
14551 ## Types, structures, compiler characteristics
14552 ##
14553
14554
14555  { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
14556 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14557 if test "${ac_cv_c_bigendian+set}" = set; then
14558   $as_echo_n "(cached) " >&6
14559 else
14560   ac_cv_c_bigendian=unknown
14561     # See if we're dealing with a universal compiler.
14562     cat >conftest.$ac_ext <<_ACEOF
14563 /* confdefs.h.  */
14564 _ACEOF
14565 cat confdefs.h >>conftest.$ac_ext
14566 cat >>conftest.$ac_ext <<_ACEOF
14567 /* end confdefs.h.  */
14568 #ifndef __APPLE_CC__
14569                not a universal capable compiler
14570              #endif
14571              typedef int dummy;
14572
14573 _ACEOF
14574 rm -f conftest.$ac_objext
14575 if { (ac_try="$ac_compile"
14576 case "(($ac_try" in
14577   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14578   *) ac_try_echo=$ac_try;;
14579 esac
14580 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14581 $as_echo "$ac_try_echo") >&5
14582   (eval "$ac_compile") 2>conftest.er1
14583   ac_status=$?
14584   grep -v '^ *+' conftest.er1 >conftest.err
14585   rm -f conftest.er1
14586   cat conftest.err >&5
14587   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14588   (exit $ac_status); } && {
14589          test -z "$ac_c_werror_flag" ||
14590          test ! -s conftest.err
14591        } && test -s conftest.$ac_objext; then
14592
14593         # Check for potential -arch flags.  It is not universal unless
14594         # there are some -arch flags.  Note that *ppc* also matches
14595         # ppc64.  This check is also rather less than ideal.
14596         case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
14597           *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
14598         esac
14599 else
14600   $as_echo "$as_me: failed program was:" >&5
14601 sed 's/^/| /' conftest.$ac_ext >&5
14602
14603
14604 fi
14605
14606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14607     if test $ac_cv_c_bigendian = unknown; then
14608       # See if sys/param.h defines the BYTE_ORDER macro.
14609       cat >conftest.$ac_ext <<_ACEOF
14610 /* confdefs.h.  */
14611 _ACEOF
14612 cat confdefs.h >>conftest.$ac_ext
14613 cat >>conftest.$ac_ext <<_ACEOF
14614 /* end confdefs.h.  */
14615 #include <sys/types.h>
14616              #include <sys/param.h>
14617
14618 int
14619 main ()
14620 {
14621 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14622                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14623                      && LITTLE_ENDIAN)
14624               bogus endian macros
14625              #endif
14626
14627   ;
14628   return 0;
14629 }
14630 _ACEOF
14631 rm -f conftest.$ac_objext
14632 if { (ac_try="$ac_compile"
14633 case "(($ac_try" in
14634   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14635   *) ac_try_echo=$ac_try;;
14636 esac
14637 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14638 $as_echo "$ac_try_echo") >&5
14639   (eval "$ac_compile") 2>conftest.er1
14640   ac_status=$?
14641   grep -v '^ *+' conftest.er1 >conftest.err
14642   rm -f conftest.er1
14643   cat conftest.err >&5
14644   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14645   (exit $ac_status); } && {
14646          test -z "$ac_c_werror_flag" ||
14647          test ! -s conftest.err
14648        } && test -s conftest.$ac_objext; then
14649   # It does; now see whether it defined to BIG_ENDIAN or not.
14650          cat >conftest.$ac_ext <<_ACEOF
14651 /* confdefs.h.  */
14652 _ACEOF
14653 cat confdefs.h >>conftest.$ac_ext
14654 cat >>conftest.$ac_ext <<_ACEOF
14655 /* end confdefs.h.  */
14656 #include <sys/types.h>
14657                 #include <sys/param.h>
14658
14659 int
14660 main ()
14661 {
14662 #if BYTE_ORDER != BIG_ENDIAN
14663                  not big endian
14664                 #endif
14665
14666   ;
14667   return 0;
14668 }
14669 _ACEOF
14670 rm -f conftest.$ac_objext
14671 if { (ac_try="$ac_compile"
14672 case "(($ac_try" in
14673   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14674   *) ac_try_echo=$ac_try;;
14675 esac
14676 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14677 $as_echo "$ac_try_echo") >&5
14678   (eval "$ac_compile") 2>conftest.er1
14679   ac_status=$?
14680   grep -v '^ *+' conftest.er1 >conftest.err
14681   rm -f conftest.er1
14682   cat conftest.err >&5
14683   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14684   (exit $ac_status); } && {
14685          test -z "$ac_c_werror_flag" ||
14686          test ! -s conftest.err
14687        } && test -s conftest.$ac_objext; then
14688   ac_cv_c_bigendian=yes
14689 else
14690   $as_echo "$as_me: failed program was:" >&5
14691 sed 's/^/| /' conftest.$ac_ext >&5
14692
14693         ac_cv_c_bigendian=no
14694 fi
14695
14696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14697 else
14698   $as_echo "$as_me: failed program was:" >&5
14699 sed 's/^/| /' conftest.$ac_ext >&5
14700
14701
14702 fi
14703
14704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14705     fi
14706     if test $ac_cv_c_bigendian = unknown; then
14707       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14708       cat >conftest.$ac_ext <<_ACEOF
14709 /* confdefs.h.  */
14710 _ACEOF
14711 cat confdefs.h >>conftest.$ac_ext
14712 cat >>conftest.$ac_ext <<_ACEOF
14713 /* end confdefs.h.  */
14714 #include <limits.h>
14715
14716 int
14717 main ()
14718 {
14719 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14720               bogus endian macros
14721              #endif
14722
14723   ;
14724   return 0;
14725 }
14726 _ACEOF
14727 rm -f conftest.$ac_objext
14728 if { (ac_try="$ac_compile"
14729 case "(($ac_try" in
14730   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14731   *) ac_try_echo=$ac_try;;
14732 esac
14733 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14734 $as_echo "$ac_try_echo") >&5
14735   (eval "$ac_compile") 2>conftest.er1
14736   ac_status=$?
14737   grep -v '^ *+' conftest.er1 >conftest.err
14738   rm -f conftest.er1
14739   cat conftest.err >&5
14740   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14741   (exit $ac_status); } && {
14742          test -z "$ac_c_werror_flag" ||
14743          test ! -s conftest.err
14744        } && test -s conftest.$ac_objext; then
14745   # It does; now see whether it defined to _BIG_ENDIAN or not.
14746          cat >conftest.$ac_ext <<_ACEOF
14747 /* confdefs.h.  */
14748 _ACEOF
14749 cat confdefs.h >>conftest.$ac_ext
14750 cat >>conftest.$ac_ext <<_ACEOF
14751 /* end confdefs.h.  */
14752 #include <limits.h>
14753
14754 int
14755 main ()
14756 {
14757 #ifndef _BIG_ENDIAN
14758                  not big endian
14759                 #endif
14760
14761   ;
14762   return 0;
14763 }
14764 _ACEOF
14765 rm -f conftest.$ac_objext
14766 if { (ac_try="$ac_compile"
14767 case "(($ac_try" in
14768   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14769   *) ac_try_echo=$ac_try;;
14770 esac
14771 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14772 $as_echo "$ac_try_echo") >&5
14773   (eval "$ac_compile") 2>conftest.er1
14774   ac_status=$?
14775   grep -v '^ *+' conftest.er1 >conftest.err
14776   rm -f conftest.er1
14777   cat conftest.err >&5
14778   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14779   (exit $ac_status); } && {
14780          test -z "$ac_c_werror_flag" ||
14781          test ! -s conftest.err
14782        } && test -s conftest.$ac_objext; then
14783   ac_cv_c_bigendian=yes
14784 else
14785   $as_echo "$as_me: failed program was:" >&5
14786 sed 's/^/| /' conftest.$ac_ext >&5
14787
14788         ac_cv_c_bigendian=no
14789 fi
14790
14791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14792 else
14793   $as_echo "$as_me: failed program was:" >&5
14794 sed 's/^/| /' conftest.$ac_ext >&5
14795
14796
14797 fi
14798
14799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14800     fi
14801     if test $ac_cv_c_bigendian = unknown; then
14802       # Compile a test program.
14803       if test "$cross_compiling" = yes; then
14804   # Try to guess by grepping values from an object file.
14805          cat >conftest.$ac_ext <<_ACEOF
14806 /* confdefs.h.  */
14807 _ACEOF
14808 cat confdefs.h >>conftest.$ac_ext
14809 cat >>conftest.$ac_ext <<_ACEOF
14810 /* end confdefs.h.  */
14811 short int ascii_mm[] =
14812                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14813                 short int ascii_ii[] =
14814                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14815                 int use_ascii (int i) {
14816                   return ascii_mm[i] + ascii_ii[i];
14817                 }
14818                 short int ebcdic_ii[] =
14819                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14820                 short int ebcdic_mm[] =
14821                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14822                 int use_ebcdic (int i) {
14823                   return ebcdic_mm[i] + ebcdic_ii[i];
14824                 }
14825                 extern int foo;
14826
14827 int
14828 main ()
14829 {
14830 return use_ascii (foo) == use_ebcdic (foo);
14831   ;
14832   return 0;
14833 }
14834 _ACEOF
14835 rm -f conftest.$ac_objext
14836 if { (ac_try="$ac_compile"
14837 case "(($ac_try" in
14838   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14839   *) ac_try_echo=$ac_try;;
14840 esac
14841 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14842 $as_echo "$ac_try_echo") >&5
14843   (eval "$ac_compile") 2>conftest.er1
14844   ac_status=$?
14845   grep -v '^ *+' conftest.er1 >conftest.err
14846   rm -f conftest.er1
14847   cat conftest.err >&5
14848   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14849   (exit $ac_status); } && {
14850          test -z "$ac_c_werror_flag" ||
14851          test ! -s conftest.err
14852        } && test -s conftest.$ac_objext; then
14853   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14854               ac_cv_c_bigendian=yes
14855             fi
14856             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14857               if test "$ac_cv_c_bigendian" = unknown; then
14858                 ac_cv_c_bigendian=no
14859               else
14860                 # finding both strings is unlikely to happen, but who knows?
14861                 ac_cv_c_bigendian=unknown
14862               fi
14863             fi
14864 else
14865   $as_echo "$as_me: failed program was:" >&5
14866 sed 's/^/| /' conftest.$ac_ext >&5
14867
14868
14869 fi
14870
14871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14872 else
14873   cat >conftest.$ac_ext <<_ACEOF
14874 /* confdefs.h.  */
14875 _ACEOF
14876 cat confdefs.h >>conftest.$ac_ext
14877 cat >>conftest.$ac_ext <<_ACEOF
14878 /* end confdefs.h.  */
14879 $ac_includes_default
14880 int
14881 main ()
14882 {
14883
14884              /* Are we little or big endian?  From Harbison&Steele.  */
14885              union
14886              {
14887                long int l;
14888                char c[sizeof (long int)];
14889              } u;
14890              u.l = 1;
14891              return u.c[sizeof (long int) - 1] == 1;
14892
14893   ;
14894   return 0;
14895 }
14896 _ACEOF
14897 rm -f conftest$ac_exeext
14898 if { (ac_try="$ac_link"
14899 case "(($ac_try" in
14900   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14901   *) ac_try_echo=$ac_try;;
14902 esac
14903 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14904 $as_echo "$ac_try_echo") >&5
14905   (eval "$ac_link") 2>&5
14906   ac_status=$?
14907   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14908   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14909   { (case "(($ac_try" in
14910   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14911   *) ac_try_echo=$ac_try;;
14912 esac
14913 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14914 $as_echo "$ac_try_echo") >&5
14915   (eval "$ac_try") 2>&5
14916   ac_status=$?
14917   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14918   (exit $ac_status); }; }; then
14919   ac_cv_c_bigendian=no
14920 else
14921   $as_echo "$as_me: program exited with status $ac_status" >&5
14922 $as_echo "$as_me: failed program was:" >&5
14923 sed 's/^/| /' conftest.$ac_ext >&5
14924
14925 ( exit $ac_status )
14926 ac_cv_c_bigendian=yes
14927 fi
14928 rm -rf conftest.dSYM
14929 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14930 fi
14931
14932
14933     fi
14934 fi
14935 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
14936 $as_echo "$ac_cv_c_bigendian" >&6; }
14937  case $ac_cv_c_bigendian in #(
14938    yes)
14939      cat >>confdefs.h <<\_ACEOF
14940 #define WORDS_BIGENDIAN 1
14941 _ACEOF
14942 ;; #(
14943    no)
14944       ;; #(
14945    universal)
14946
14947 cat >>confdefs.h <<\_ACEOF
14948 #define AC_APPLE_UNIVERSAL_BUILD 1
14949 _ACEOF
14950
14951      ;; #(
14952    *)
14953      { { $as_echo "$as_me:$LINENO: error: unknown endianness
14954  presetting ac_cv_c_bigendian=no (or yes) will help" >&5
14955 $as_echo "$as_me: error: unknown endianness
14956  presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
14957    { (exit 1); exit 1; }; } ;;
14958  esac
14959
14960 { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14961 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
14962 if test "${ac_cv_c_const+set}" = set; then
14963   $as_echo_n "(cached) " >&6
14964 else
14965   cat >conftest.$ac_ext <<_ACEOF
14966 /* confdefs.h.  */
14967 _ACEOF
14968 cat confdefs.h >>conftest.$ac_ext
14969 cat >>conftest.$ac_ext <<_ACEOF
14970 /* end confdefs.h.  */
14971
14972 int
14973 main ()
14974 {
14975 /* FIXME: Include the comments suggested by Paul. */
14976 #ifndef __cplusplus
14977   /* Ultrix mips cc rejects this.  */
14978   typedef int charset[2];
14979   const charset cs;
14980   /* SunOS 4.1.1 cc rejects this.  */
14981   char const *const *pcpcc;
14982   char **ppc;
14983   /* NEC SVR4.0.2 mips cc rejects this.  */
14984   struct point {int x, y;};
14985   static struct point const zero = {0,0};
14986   /* AIX XL C 1.02.0.0 rejects this.
14987      It does not let you subtract one const X* pointer from another in
14988      an arm of an if-expression whose if-part is not a constant
14989      expression */
14990   const char *g = "string";
14991   pcpcc = &g + (g ? g-g : 0);
14992   /* HPUX 7.0 cc rejects these. */
14993   ++pcpcc;
14994   ppc = (char**) pcpcc;
14995   pcpcc = (char const *const *) ppc;
14996   { /* SCO 3.2v4 cc rejects this.  */
14997     char *t;
14998     char const *s = 0 ? (char *) 0 : (char const *) 0;
14999
15000     *t++ = 0;
15001     if (s) return 0;
15002   }
15003   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15004     int x[] = {25, 17};
15005     const int *foo = &x[0];
15006     ++foo;
15007   }
15008   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15009     typedef const int *iptr;
15010     iptr p = 0;
15011     ++p;
15012   }
15013   { /* AIX XL C 1.02.0.0 rejects this saying
15014        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15015     struct s { int j; const int *ap[3]; };
15016     struct s *b; b->j = 5;
15017   }
15018   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15019     const int foo = 10;
15020     if (!foo) return 0;
15021   }
15022   return !cs[0] && !zero.x;
15023 #endif
15024
15025   ;
15026   return 0;
15027 }
15028 _ACEOF
15029 rm -f conftest.$ac_objext
15030 if { (ac_try="$ac_compile"
15031 case "(($ac_try" in
15032   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15033   *) ac_try_echo=$ac_try;;
15034 esac
15035 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15036 $as_echo "$ac_try_echo") >&5
15037   (eval "$ac_compile") 2>conftest.er1
15038   ac_status=$?
15039   grep -v '^ *+' conftest.er1 >conftest.err
15040   rm -f conftest.er1
15041   cat conftest.err >&5
15042   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15043   (exit $ac_status); } && {
15044          test -z "$ac_c_werror_flag" ||
15045          test ! -s conftest.err
15046        } && test -s conftest.$ac_objext; then
15047   ac_cv_c_const=yes
15048 else
15049   $as_echo "$as_me: failed program was:" >&5
15050 sed 's/^/| /' conftest.$ac_ext >&5
15051
15052         ac_cv_c_const=no
15053 fi
15054
15055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15056 fi
15057 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15058 $as_echo "$ac_cv_c_const" >&6; }
15059 if test $ac_cv_c_const = no; then
15060
15061 cat >>confdefs.h <<\_ACEOF
15062 #define const /**/
15063 _ACEOF
15064
15065 fi
15066
15067 { $as_echo "$as_me:$LINENO: checking for inline" >&5
15068 $as_echo_n "checking for inline... " >&6; }
15069 if test "${ac_cv_c_inline+set}" = set; then
15070   $as_echo_n "(cached) " >&6
15071 else
15072   ac_cv_c_inline=no
15073 for ac_kw in inline __inline__ __inline; do
15074   cat >conftest.$ac_ext <<_ACEOF
15075 /* confdefs.h.  */
15076 _ACEOF
15077 cat confdefs.h >>conftest.$ac_ext
15078 cat >>conftest.$ac_ext <<_ACEOF
15079 /* end confdefs.h.  */
15080 #ifndef __cplusplus
15081 typedef int foo_t;
15082 static $ac_kw foo_t static_foo () {return 0; }
15083 $ac_kw foo_t foo () {return 0; }
15084 #endif
15085
15086 _ACEOF
15087 rm -f conftest.$ac_objext
15088 if { (ac_try="$ac_compile"
15089 case "(($ac_try" in
15090   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15091   *) ac_try_echo=$ac_try;;
15092 esac
15093 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15094 $as_echo "$ac_try_echo") >&5
15095   (eval "$ac_compile") 2>conftest.er1
15096   ac_status=$?
15097   grep -v '^ *+' conftest.er1 >conftest.err
15098   rm -f conftest.er1
15099   cat conftest.err >&5
15100   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15101   (exit $ac_status); } && {
15102          test -z "$ac_c_werror_flag" ||
15103          test ! -s conftest.err
15104        } && test -s conftest.$ac_objext; then
15105   ac_cv_c_inline=$ac_kw
15106 else
15107   $as_echo "$as_me: failed program was:" >&5
15108 sed 's/^/| /' conftest.$ac_ext >&5
15109
15110
15111 fi
15112
15113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15114   test "$ac_cv_c_inline" != no && break
15115 done
15116
15117 fi
15118 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
15119 $as_echo "$ac_cv_c_inline" >&6; }
15120
15121
15122 case $ac_cv_c_inline in
15123   inline | yes) ;;
15124   *)
15125     case $ac_cv_c_inline in
15126       no) ac_val=;;
15127       *) ac_val=$ac_cv_c_inline;;
15128     esac
15129     cat >>confdefs.h <<_ACEOF
15130 #ifndef __cplusplus
15131 #define inline $ac_val
15132 #endif
15133 _ACEOF
15134     ;;
15135 esac
15136
15137 { $as_echo "$as_me:$LINENO: checking for quiet inline (no complaint if unreferenced)" >&5
15138 $as_echo_n "checking for quiet inline (no complaint if unreferenced)... " >&6; }
15139 if test "${pgac_cv_c_inline_quietly+set}" = set; then
15140   $as_echo_n "(cached) " >&6
15141 else
15142   pgac_cv_c_inline_quietly=no
15143   if test "$ac_cv_c_inline" != no; then
15144     pgac_c_inline_save_werror=$ac_c_werror_flag
15145     ac_c_werror_flag=yes
15146     cat >conftest.$ac_ext <<_ACEOF
15147 /* confdefs.h.  */
15148 _ACEOF
15149 cat confdefs.h >>conftest.$ac_ext
15150 cat >>conftest.$ac_ext <<_ACEOF
15151 /* end confdefs.h.  */
15152 static inline int fun () {return 0;}
15153 int
15154 main ()
15155 {
15156
15157   ;
15158   return 0;
15159 }
15160 _ACEOF
15161 rm -f conftest.$ac_objext conftest$ac_exeext
15162 if { (ac_try="$ac_link"
15163 case "(($ac_try" in
15164   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15165   *) ac_try_echo=$ac_try;;
15166 esac
15167 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15168 $as_echo "$ac_try_echo") >&5
15169   (eval "$ac_link") 2>conftest.er1
15170   ac_status=$?
15171   grep -v '^ *+' conftest.er1 >conftest.err
15172   rm -f conftest.er1
15173   cat conftest.err >&5
15174   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15175   (exit $ac_status); } && {
15176          test -z "$ac_c_werror_flag" ||
15177          test ! -s conftest.err
15178        } && test -s conftest$ac_exeext && {
15179          test "$cross_compiling" = yes ||
15180          $as_test_x conftest$ac_exeext
15181        }; then
15182   pgac_cv_c_inline_quietly=yes
15183 else
15184   $as_echo "$as_me: failed program was:" >&5
15185 sed 's/^/| /' conftest.$ac_ext >&5
15186
15187
15188 fi
15189
15190 rm -rf conftest.dSYM
15191 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15192       conftest$ac_exeext conftest.$ac_ext
15193     ac_c_werror_flag=$pgac_c_inline_save_werror
15194   fi
15195 fi
15196 { $as_echo "$as_me:$LINENO: result: $pgac_cv_c_inline_quietly" >&5
15197 $as_echo "$pgac_cv_c_inline_quietly" >&6; }
15198 if test "$pgac_cv_c_inline_quietly" != no; then
15199
15200 cat >>confdefs.h <<_ACEOF
15201 #define PG_USE_INLINE 1
15202 _ACEOF
15203
15204 fi
15205
15206 { $as_echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
15207 $as_echo_n "checking for preprocessor stringizing operator... " >&6; }
15208 if test "${ac_cv_c_stringize+set}" = set; then
15209   $as_echo_n "(cached) " >&6
15210 else
15211   cat >conftest.$ac_ext <<_ACEOF
15212 /* confdefs.h.  */
15213 _ACEOF
15214 cat confdefs.h >>conftest.$ac_ext
15215 cat >>conftest.$ac_ext <<_ACEOF
15216 /* end confdefs.h.  */
15217 #define x(y) #y
15218
15219 char *s = x(teststring);
15220 _ACEOF
15221 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15222   $EGREP "#teststring" >/dev/null 2>&1; then
15223   ac_cv_c_stringize=no
15224 else
15225   ac_cv_c_stringize=yes
15226 fi
15227 rm -f conftest*
15228
15229 fi
15230 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
15231 $as_echo "$ac_cv_c_stringize" >&6; }
15232 if test $ac_cv_c_stringize = yes; then
15233
15234 cat >>confdefs.h <<\_ACEOF
15235 #define HAVE_STRINGIZE 1
15236 _ACEOF
15237
15238 fi
15239
15240
15241   { $as_echo "$as_me:$LINENO: checking for flexible array members" >&5
15242 $as_echo_n "checking for flexible array members... " >&6; }
15243 if test "${ac_cv_c_flexmember+set}" = set; then
15244   $as_echo_n "(cached) " >&6
15245 else
15246   cat >conftest.$ac_ext <<_ACEOF
15247 /* confdefs.h.  */
15248 _ACEOF
15249 cat confdefs.h >>conftest.$ac_ext
15250 cat >>conftest.$ac_ext <<_ACEOF
15251 /* end confdefs.h.  */
15252 #include <stdlib.h>
15253             #include <stdio.h>
15254             #include <stddef.h>
15255             struct s { int n; double d[]; };
15256 int
15257 main ()
15258 {
15259 int m = getchar ();
15260             struct s *p = malloc (offsetof (struct s, d)
15261                                   + m * sizeof (double));
15262             p->d[0] = 0.0;
15263             return p->d != (double *) NULL;
15264   ;
15265   return 0;
15266 }
15267 _ACEOF
15268 rm -f conftest.$ac_objext
15269 if { (ac_try="$ac_compile"
15270 case "(($ac_try" in
15271   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15272   *) ac_try_echo=$ac_try;;
15273 esac
15274 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15275 $as_echo "$ac_try_echo") >&5
15276   (eval "$ac_compile") 2>conftest.er1
15277   ac_status=$?
15278   grep -v '^ *+' conftest.er1 >conftest.err
15279   rm -f conftest.er1
15280   cat conftest.err >&5
15281   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15282   (exit $ac_status); } && {
15283          test -z "$ac_c_werror_flag" ||
15284          test ! -s conftest.err
15285        } && test -s conftest.$ac_objext; then
15286   ac_cv_c_flexmember=yes
15287 else
15288   $as_echo "$as_me: failed program was:" >&5
15289 sed 's/^/| /' conftest.$ac_ext >&5
15290
15291         ac_cv_c_flexmember=no
15292 fi
15293
15294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15295 fi
15296 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_flexmember" >&5
15297 $as_echo "$ac_cv_c_flexmember" >&6; }
15298   if test $ac_cv_c_flexmember = yes; then
15299
15300 cat >>confdefs.h <<\_ACEOF
15301 #define FLEXIBLE_ARRAY_MEMBER /**/
15302 _ACEOF
15303
15304   else
15305     cat >>confdefs.h <<\_ACEOF
15306 #define FLEXIBLE_ARRAY_MEMBER 1
15307 _ACEOF
15308
15309   fi
15310
15311 { $as_echo "$as_me:$LINENO: checking for signed types" >&5
15312 $as_echo_n "checking for signed types... " >&6; }
15313 if test "${pgac_cv_c_signed+set}" = set; then
15314   $as_echo_n "(cached) " >&6
15315 else
15316   cat >conftest.$ac_ext <<_ACEOF
15317 /* confdefs.h.  */
15318 _ACEOF
15319 cat confdefs.h >>conftest.$ac_ext
15320 cat >>conftest.$ac_ext <<_ACEOF
15321 /* end confdefs.h.  */
15322
15323 int
15324 main ()
15325 {
15326 signed char c; signed short s; signed int i;
15327   ;
15328   return 0;
15329 }
15330 _ACEOF
15331 rm -f conftest.$ac_objext
15332 if { (ac_try="$ac_compile"
15333 case "(($ac_try" in
15334   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15335   *) ac_try_echo=$ac_try;;
15336 esac
15337 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15338 $as_echo "$ac_try_echo") >&5
15339   (eval "$ac_compile") 2>conftest.er1
15340   ac_status=$?
15341   grep -v '^ *+' conftest.er1 >conftest.err
15342   rm -f conftest.er1
15343   cat conftest.err >&5
15344   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15345   (exit $ac_status); } && {
15346          test -z "$ac_c_werror_flag" ||
15347          test ! -s conftest.err
15348        } && test -s conftest.$ac_objext; then
15349   pgac_cv_c_signed=yes
15350 else
15351   $as_echo "$as_me: failed program was:" >&5
15352 sed 's/^/| /' conftest.$ac_ext >&5
15353
15354         pgac_cv_c_signed=no
15355 fi
15356
15357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15358 fi
15359 { $as_echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
15360 $as_echo "$pgac_cv_c_signed" >&6; }
15361 if test x"$pgac_cv_c_signed" = xno ; then
15362
15363 cat >>confdefs.h <<\_ACEOF
15364 #define signed /**/
15365 _ACEOF
15366
15367 fi
15368 { $as_echo "$as_me:$LINENO: checking for working volatile" >&5
15369 $as_echo_n "checking for working volatile... " >&6; }
15370 if test "${ac_cv_c_volatile+set}" = set; then
15371   $as_echo_n "(cached) " >&6
15372 else
15373   cat >conftest.$ac_ext <<_ACEOF
15374 /* confdefs.h.  */
15375 _ACEOF
15376 cat confdefs.h >>conftest.$ac_ext
15377 cat >>conftest.$ac_ext <<_ACEOF
15378 /* end confdefs.h.  */
15379
15380 int
15381 main ()
15382 {
15383
15384 volatile int x;
15385 int * volatile y = (int *) 0;
15386 return !x && !y;
15387   ;
15388   return 0;
15389 }
15390 _ACEOF
15391 rm -f conftest.$ac_objext
15392 if { (ac_try="$ac_compile"
15393 case "(($ac_try" in
15394   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15395   *) ac_try_echo=$ac_try;;
15396 esac
15397 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15398 $as_echo "$ac_try_echo") >&5
15399   (eval "$ac_compile") 2>conftest.er1
15400   ac_status=$?
15401   grep -v '^ *+' conftest.er1 >conftest.err
15402   rm -f conftest.er1
15403   cat conftest.err >&5
15404   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15405   (exit $ac_status); } && {
15406          test -z "$ac_c_werror_flag" ||
15407          test ! -s conftest.err
15408        } && test -s conftest.$ac_objext; then
15409   ac_cv_c_volatile=yes
15410 else
15411   $as_echo "$as_me: failed program was:" >&5
15412 sed 's/^/| /' conftest.$ac_ext >&5
15413
15414         ac_cv_c_volatile=no
15415 fi
15416
15417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15418 fi
15419 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
15420 $as_echo "$ac_cv_c_volatile" >&6; }
15421 if test $ac_cv_c_volatile = no; then
15422
15423 cat >>confdefs.h <<\_ACEOF
15424 #define volatile /**/
15425 _ACEOF
15426
15427 fi
15428
15429 { $as_echo "$as_me:$LINENO: checking for __func__" >&5
15430 $as_echo_n "checking for __func__... " >&6; }
15431 if test "${pgac_cv_funcname_func_support+set}" = set; then
15432   $as_echo_n "(cached) " >&6
15433 else
15434   cat >conftest.$ac_ext <<_ACEOF
15435 /* confdefs.h.  */
15436 _ACEOF
15437 cat confdefs.h >>conftest.$ac_ext
15438 cat >>conftest.$ac_ext <<_ACEOF
15439 /* end confdefs.h.  */
15440 #include <stdio.h>
15441 int
15442 main ()
15443 {
15444 printf("%s\n", __func__);
15445   ;
15446   return 0;
15447 }
15448 _ACEOF
15449 rm -f conftest.$ac_objext
15450 if { (ac_try="$ac_compile"
15451 case "(($ac_try" in
15452   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15453   *) ac_try_echo=$ac_try;;
15454 esac
15455 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15456 $as_echo "$ac_try_echo") >&5
15457   (eval "$ac_compile") 2>conftest.er1
15458   ac_status=$?
15459   grep -v '^ *+' conftest.er1 >conftest.err
15460   rm -f conftest.er1
15461   cat conftest.err >&5
15462   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15463   (exit $ac_status); } && {
15464          test -z "$ac_c_werror_flag" ||
15465          test ! -s conftest.err
15466        } && test -s conftest.$ac_objext; then
15467   pgac_cv_funcname_func_support=yes
15468 else
15469   $as_echo "$as_me: failed program was:" >&5
15470 sed 's/^/| /' conftest.$ac_ext >&5
15471
15472         pgac_cv_funcname_func_support=no
15473 fi
15474
15475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15476 fi
15477 { $as_echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
15478 $as_echo "$pgac_cv_funcname_func_support" >&6; }
15479 if test x"$pgac_cv_funcname_func_support" = xyes ; then
15480
15481 cat >>confdefs.h <<\_ACEOF
15482 #define HAVE_FUNCNAME__FUNC 1
15483 _ACEOF
15484
15485 else
15486 { $as_echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
15487 $as_echo_n "checking for __FUNCTION__... " >&6; }
15488 if test "${pgac_cv_funcname_function_support+set}" = set; then
15489   $as_echo_n "(cached) " >&6
15490 else
15491   cat >conftest.$ac_ext <<_ACEOF
15492 /* confdefs.h.  */
15493 _ACEOF
15494 cat confdefs.h >>conftest.$ac_ext
15495 cat >>conftest.$ac_ext <<_ACEOF
15496 /* end confdefs.h.  */
15497 #include <stdio.h>
15498 int
15499 main ()
15500 {
15501 printf("%s\n", __FUNCTION__);
15502   ;
15503   return 0;
15504 }
15505 _ACEOF
15506 rm -f conftest.$ac_objext
15507 if { (ac_try="$ac_compile"
15508 case "(($ac_try" in
15509   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15510   *) ac_try_echo=$ac_try;;
15511 esac
15512 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15513 $as_echo "$ac_try_echo") >&5
15514   (eval "$ac_compile") 2>conftest.er1
15515   ac_status=$?
15516   grep -v '^ *+' conftest.er1 >conftest.err
15517   rm -f conftest.er1
15518   cat conftest.err >&5
15519   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15520   (exit $ac_status); } && {
15521          test -z "$ac_c_werror_flag" ||
15522          test ! -s conftest.err
15523        } && test -s conftest.$ac_objext; then
15524   pgac_cv_funcname_function_support=yes
15525 else
15526   $as_echo "$as_me: failed program was:" >&5
15527 sed 's/^/| /' conftest.$ac_ext >&5
15528
15529         pgac_cv_funcname_function_support=no
15530 fi
15531
15532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15533 fi
15534 { $as_echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
15535 $as_echo "$pgac_cv_funcname_function_support" >&6; }
15536 if test x"$pgac_cv_funcname_function_support" = xyes ; then
15537
15538 cat >>confdefs.h <<\_ACEOF
15539 #define HAVE_FUNCNAME__FUNCTION 1
15540 _ACEOF
15541
15542 fi
15543 fi
15544 { $as_echo "$as_me:$LINENO: checking for _Static_assert" >&5
15545 $as_echo_n "checking for _Static_assert... " >&6; }
15546 if test "${pgac_cv__static_assert+set}" = set; then
15547   $as_echo_n "(cached) " >&6
15548 else
15549   cat >conftest.$ac_ext <<_ACEOF
15550 /* confdefs.h.  */
15551 _ACEOF
15552 cat confdefs.h >>conftest.$ac_ext
15553 cat >>conftest.$ac_ext <<_ACEOF
15554 /* end confdefs.h.  */
15555
15556 int
15557 main ()
15558 {
15559 ({ _Static_assert(1, "foo"); })
15560   ;
15561   return 0;
15562 }
15563 _ACEOF
15564 rm -f conftest.$ac_objext conftest$ac_exeext
15565 if { (ac_try="$ac_link"
15566 case "(($ac_try" in
15567   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15568   *) ac_try_echo=$ac_try;;
15569 esac
15570 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15571 $as_echo "$ac_try_echo") >&5
15572   (eval "$ac_link") 2>conftest.er1
15573   ac_status=$?
15574   grep -v '^ *+' conftest.er1 >conftest.err
15575   rm -f conftest.er1
15576   cat conftest.err >&5
15577   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15578   (exit $ac_status); } && {
15579          test -z "$ac_c_werror_flag" ||
15580          test ! -s conftest.err
15581        } && test -s conftest$ac_exeext && {
15582          test "$cross_compiling" = yes ||
15583          $as_test_x conftest$ac_exeext
15584        }; then
15585   pgac_cv__static_assert=yes
15586 else
15587   $as_echo "$as_me: failed program was:" >&5
15588 sed 's/^/| /' conftest.$ac_ext >&5
15589
15590         pgac_cv__static_assert=no
15591 fi
15592
15593 rm -rf conftest.dSYM
15594 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15595       conftest$ac_exeext conftest.$ac_ext
15596 fi
15597 { $as_echo "$as_me:$LINENO: result: $pgac_cv__static_assert" >&5
15598 $as_echo "$pgac_cv__static_assert" >&6; }
15599 if test x"$pgac_cv__static_assert" = xyes ; then
15600
15601 cat >>confdefs.h <<\_ACEOF
15602 #define HAVE__STATIC_ASSERT 1
15603 _ACEOF
15604
15605 fi
15606 { $as_echo "$as_me:$LINENO: checking for __builtin_types_compatible_p" >&5
15607 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
15608 if test "${pgac_cv__types_compatible+set}" = set; then
15609   $as_echo_n "(cached) " >&6
15610 else
15611   cat >conftest.$ac_ext <<_ACEOF
15612 /* confdefs.h.  */
15613 _ACEOF
15614 cat confdefs.h >>conftest.$ac_ext
15615 cat >>conftest.$ac_ext <<_ACEOF
15616 /* end confdefs.h.  */
15617
15618 int
15619 main ()
15620 {
15621  int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
15622   ;
15623   return 0;
15624 }
15625 _ACEOF
15626 rm -f conftest.$ac_objext
15627 if { (ac_try="$ac_compile"
15628 case "(($ac_try" in
15629   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15630   *) ac_try_echo=$ac_try;;
15631 esac
15632 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15633 $as_echo "$ac_try_echo") >&5
15634   (eval "$ac_compile") 2>conftest.er1
15635   ac_status=$?
15636   grep -v '^ *+' conftest.er1 >conftest.err
15637   rm -f conftest.er1
15638   cat conftest.err >&5
15639   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15640   (exit $ac_status); } && {
15641          test -z "$ac_c_werror_flag" ||
15642          test ! -s conftest.err
15643        } && test -s conftest.$ac_objext; then
15644   pgac_cv__types_compatible=yes
15645 else
15646   $as_echo "$as_me: failed program was:" >&5
15647 sed 's/^/| /' conftest.$ac_ext >&5
15648
15649         pgac_cv__types_compatible=no
15650 fi
15651
15652 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15653 fi
15654 { $as_echo "$as_me:$LINENO: result: $pgac_cv__types_compatible" >&5
15655 $as_echo "$pgac_cv__types_compatible" >&6; }
15656 if test x"$pgac_cv__types_compatible" = xyes ; then
15657
15658 cat >>confdefs.h <<\_ACEOF
15659 #define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1
15660 _ACEOF
15661
15662 fi
15663 { $as_echo "$as_me:$LINENO: checking for __builtin_constant_p" >&5
15664 $as_echo_n "checking for __builtin_constant_p... " >&6; }
15665 if test "${pgac_cv__builtin_constant_p+set}" = set; then
15666   $as_echo_n "(cached) " >&6
15667 else
15668   cat >conftest.$ac_ext <<_ACEOF
15669 /* confdefs.h.  */
15670 _ACEOF
15671 cat confdefs.h >>conftest.$ac_ext
15672 cat >>conftest.$ac_ext <<_ACEOF
15673 /* end confdefs.h.  */
15674 static int x; static int y[__builtin_constant_p(x) ? x : 1];
15675 int
15676 main ()
15677 {
15678
15679   ;
15680   return 0;
15681 }
15682 _ACEOF
15683 rm -f conftest.$ac_objext
15684 if { (ac_try="$ac_compile"
15685 case "(($ac_try" in
15686   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15687   *) ac_try_echo=$ac_try;;
15688 esac
15689 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15690 $as_echo "$ac_try_echo") >&5
15691   (eval "$ac_compile") 2>conftest.er1
15692   ac_status=$?
15693   grep -v '^ *+' conftest.er1 >conftest.err
15694   rm -f conftest.er1
15695   cat conftest.err >&5
15696   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15697   (exit $ac_status); } && {
15698          test -z "$ac_c_werror_flag" ||
15699          test ! -s conftest.err
15700        } && test -s conftest.$ac_objext; then
15701   pgac_cv__builtin_constant_p=yes
15702 else
15703   $as_echo "$as_me: failed program was:" >&5
15704 sed 's/^/| /' conftest.$ac_ext >&5
15705
15706         pgac_cv__builtin_constant_p=no
15707 fi
15708
15709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15710 fi
15711 { $as_echo "$as_me:$LINENO: result: $pgac_cv__builtin_constant_p" >&5
15712 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
15713 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
15714
15715 cat >>confdefs.h <<\_ACEOF
15716 #define HAVE__BUILTIN_CONSTANT_P 1
15717 _ACEOF
15718
15719 fi
15720 { $as_echo "$as_me:$LINENO: checking for __builtin_unreachable" >&5
15721 $as_echo_n "checking for __builtin_unreachable... " >&6; }
15722 if test "${pgac_cv__builtin_unreachable+set}" = set; then
15723   $as_echo_n "(cached) " >&6
15724 else
15725   cat >conftest.$ac_ext <<_ACEOF
15726 /* confdefs.h.  */
15727 _ACEOF
15728 cat confdefs.h >>conftest.$ac_ext
15729 cat >>conftest.$ac_ext <<_ACEOF
15730 /* end confdefs.h.  */
15731
15732 int
15733 main ()
15734 {
15735 __builtin_unreachable();
15736   ;
15737   return 0;
15738 }
15739 _ACEOF
15740 rm -f conftest.$ac_objext conftest$ac_exeext
15741 if { (ac_try="$ac_link"
15742 case "(($ac_try" in
15743   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15744   *) ac_try_echo=$ac_try;;
15745 esac
15746 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15747 $as_echo "$ac_try_echo") >&5
15748   (eval "$ac_link") 2>conftest.er1
15749   ac_status=$?
15750   grep -v '^ *+' conftest.er1 >conftest.err
15751   rm -f conftest.er1
15752   cat conftest.err >&5
15753   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15754   (exit $ac_status); } && {
15755          test -z "$ac_c_werror_flag" ||
15756          test ! -s conftest.err
15757        } && test -s conftest$ac_exeext && {
15758          test "$cross_compiling" = yes ||
15759          $as_test_x conftest$ac_exeext
15760        }; then
15761   pgac_cv__builtin_unreachable=yes
15762 else
15763   $as_echo "$as_me: failed program was:" >&5
15764 sed 's/^/| /' conftest.$ac_ext >&5
15765
15766         pgac_cv__builtin_unreachable=no
15767 fi
15768
15769 rm -rf conftest.dSYM
15770 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15771       conftest$ac_exeext conftest.$ac_ext
15772 fi
15773 { $as_echo "$as_me:$LINENO: result: $pgac_cv__builtin_unreachable" >&5
15774 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
15775 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
15776
15777 cat >>confdefs.h <<\_ACEOF
15778 #define HAVE__BUILTIN_UNREACHABLE 1
15779 _ACEOF
15780
15781 fi
15782 { $as_echo "$as_me:$LINENO: checking for __VA_ARGS__" >&5
15783 $as_echo_n "checking for __VA_ARGS__... " >&6; }
15784 if test "${pgac_cv__va_args+set}" = set; then
15785   $as_echo_n "(cached) " >&6
15786 else
15787   cat >conftest.$ac_ext <<_ACEOF
15788 /* confdefs.h.  */
15789 _ACEOF
15790 cat confdefs.h >>conftest.$ac_ext
15791 cat >>conftest.$ac_ext <<_ACEOF
15792 /* end confdefs.h.  */
15793 #include <stdio.h>
15794 int
15795 main ()
15796 {
15797 #define debug(...) fprintf(stderr, __VA_ARGS__)
15798 debug("%s", "blarg");
15799
15800   ;
15801   return 0;
15802 }
15803 _ACEOF
15804 rm -f conftest.$ac_objext
15805 if { (ac_try="$ac_compile"
15806 case "(($ac_try" in
15807   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15808   *) ac_try_echo=$ac_try;;
15809 esac
15810 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15811 $as_echo "$ac_try_echo") >&5
15812   (eval "$ac_compile") 2>conftest.er1
15813   ac_status=$?
15814   grep -v '^ *+' conftest.er1 >conftest.err
15815   rm -f conftest.er1
15816   cat conftest.err >&5
15817   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15818   (exit $ac_status); } && {
15819          test -z "$ac_c_werror_flag" ||
15820          test ! -s conftest.err
15821        } && test -s conftest.$ac_objext; then
15822   pgac_cv__va_args=yes
15823 else
15824   $as_echo "$as_me: failed program was:" >&5
15825 sed 's/^/| /' conftest.$ac_ext >&5
15826
15827         pgac_cv__va_args=no
15828 fi
15829
15830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15831 fi
15832 { $as_echo "$as_me:$LINENO: result: $pgac_cv__va_args" >&5
15833 $as_echo "$pgac_cv__va_args" >&6; }
15834 if test x"$pgac_cv__va_args" = xyes ; then
15835
15836 cat >>confdefs.h <<\_ACEOF
15837 #define HAVE__VA_ARGS 1
15838 _ACEOF
15839
15840 fi
15841 { $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15842 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
15843 if test "${ac_cv_struct_tm+set}" = set; then
15844   $as_echo_n "(cached) " >&6
15845 else
15846   cat >conftest.$ac_ext <<_ACEOF
15847 /* confdefs.h.  */
15848 _ACEOF
15849 cat confdefs.h >>conftest.$ac_ext
15850 cat >>conftest.$ac_ext <<_ACEOF
15851 /* end confdefs.h.  */
15852 #include <sys/types.h>
15853 #include <time.h>
15854
15855 int
15856 main ()
15857 {
15858 struct tm tm;
15859                                      int *p = &tm.tm_sec;
15860                                      return !p;
15861   ;
15862   return 0;
15863 }
15864 _ACEOF
15865 rm -f conftest.$ac_objext
15866 if { (ac_try="$ac_compile"
15867 case "(($ac_try" in
15868   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15869   *) ac_try_echo=$ac_try;;
15870 esac
15871 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15872 $as_echo "$ac_try_echo") >&5
15873   (eval "$ac_compile") 2>conftest.er1
15874   ac_status=$?
15875   grep -v '^ *+' conftest.er1 >conftest.err
15876   rm -f conftest.er1
15877   cat conftest.err >&5
15878   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15879   (exit $ac_status); } && {
15880          test -z "$ac_c_werror_flag" ||
15881          test ! -s conftest.err
15882        } && test -s conftest.$ac_objext; then
15883   ac_cv_struct_tm=time.h
15884 else
15885   $as_echo "$as_me: failed program was:" >&5
15886 sed 's/^/| /' conftest.$ac_ext >&5
15887
15888         ac_cv_struct_tm=sys/time.h
15889 fi
15890
15891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15892 fi
15893 { $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
15894 $as_echo "$ac_cv_struct_tm" >&6; }
15895 if test $ac_cv_struct_tm = sys/time.h; then
15896
15897 cat >>confdefs.h <<\_ACEOF
15898 #define TM_IN_SYS_TIME 1
15899 _ACEOF
15900
15901 fi
15902
15903 { $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
15904 $as_echo_n "checking for struct tm.tm_zone... " >&6; }
15905 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
15906   $as_echo_n "(cached) " >&6
15907 else
15908   cat >conftest.$ac_ext <<_ACEOF
15909 /* confdefs.h.  */
15910 _ACEOF
15911 cat confdefs.h >>conftest.$ac_ext
15912 cat >>conftest.$ac_ext <<_ACEOF
15913 /* end confdefs.h.  */
15914 #include <sys/types.h>
15915 #include <$ac_cv_struct_tm>
15916
15917
15918 int
15919 main ()
15920 {
15921 static struct tm ac_aggr;
15922 if (ac_aggr.tm_zone)
15923 return 0;
15924   ;
15925   return 0;
15926 }
15927 _ACEOF
15928 rm -f conftest.$ac_objext
15929 if { (ac_try="$ac_compile"
15930 case "(($ac_try" in
15931   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15932   *) ac_try_echo=$ac_try;;
15933 esac
15934 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15935 $as_echo "$ac_try_echo") >&5
15936   (eval "$ac_compile") 2>conftest.er1
15937   ac_status=$?
15938   grep -v '^ *+' conftest.er1 >conftest.err
15939   rm -f conftest.er1
15940   cat conftest.err >&5
15941   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15942   (exit $ac_status); } && {
15943          test -z "$ac_c_werror_flag" ||
15944          test ! -s conftest.err
15945        } && test -s conftest.$ac_objext; then
15946   ac_cv_member_struct_tm_tm_zone=yes
15947 else
15948   $as_echo "$as_me: failed program was:" >&5
15949 sed 's/^/| /' conftest.$ac_ext >&5
15950
15951         cat >conftest.$ac_ext <<_ACEOF
15952 /* confdefs.h.  */
15953 _ACEOF
15954 cat confdefs.h >>conftest.$ac_ext
15955 cat >>conftest.$ac_ext <<_ACEOF
15956 /* end confdefs.h.  */
15957 #include <sys/types.h>
15958 #include <$ac_cv_struct_tm>
15959
15960
15961 int
15962 main ()
15963 {
15964 static struct tm ac_aggr;
15965 if (sizeof ac_aggr.tm_zone)
15966 return 0;
15967   ;
15968   return 0;
15969 }
15970 _ACEOF
15971 rm -f conftest.$ac_objext
15972 if { (ac_try="$ac_compile"
15973 case "(($ac_try" in
15974   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15975   *) ac_try_echo=$ac_try;;
15976 esac
15977 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15978 $as_echo "$ac_try_echo") >&5
15979   (eval "$ac_compile") 2>conftest.er1
15980   ac_status=$?
15981   grep -v '^ *+' conftest.er1 >conftest.err
15982   rm -f conftest.er1
15983   cat conftest.err >&5
15984   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15985   (exit $ac_status); } && {
15986          test -z "$ac_c_werror_flag" ||
15987          test ! -s conftest.err
15988        } && test -s conftest.$ac_objext; then
15989   ac_cv_member_struct_tm_tm_zone=yes
15990 else
15991   $as_echo "$as_me: failed program was:" >&5
15992 sed 's/^/| /' conftest.$ac_ext >&5
15993
15994         ac_cv_member_struct_tm_tm_zone=no
15995 fi
15996
15997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15998 fi
15999
16000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16001 fi
16002 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16003 $as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
16004 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
16005
16006 cat >>confdefs.h <<_ACEOF
16007 #define HAVE_STRUCT_TM_TM_ZONE 1
16008 _ACEOF
16009
16010
16011 fi
16012
16013 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16014
16015 cat >>confdefs.h <<\_ACEOF
16016 #define HAVE_TM_ZONE 1
16017 _ACEOF
16018
16019 fi
16020 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
16021 $as_echo_n "checking for tzname... " >&6; }
16022 if test "${ac_cv_var_tzname+set}" = set; then
16023   $as_echo_n "(cached) " >&6
16024 else
16025   cat >conftest.$ac_ext <<_ACEOF
16026 /* confdefs.h.  */
16027 _ACEOF
16028 cat confdefs.h >>conftest.$ac_ext
16029 cat >>conftest.$ac_ext <<_ACEOF
16030 /* end confdefs.h.  */
16031 #include <time.h>
16032 #ifndef tzname /* For SGI.  */
16033 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
16034 #endif
16035
16036 int
16037 main ()
16038 {
16039 atoi(*tzname);
16040   ;
16041   return 0;
16042 }
16043 _ACEOF
16044 rm -f conftest.$ac_objext conftest$ac_exeext
16045 if { (ac_try="$ac_link"
16046 case "(($ac_try" in
16047   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16048   *) ac_try_echo=$ac_try;;
16049 esac
16050 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16051 $as_echo "$ac_try_echo") >&5
16052   (eval "$ac_link") 2>conftest.er1
16053   ac_status=$?
16054   grep -v '^ *+' conftest.er1 >conftest.err
16055   rm -f conftest.er1
16056   cat conftest.err >&5
16057   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16058   (exit $ac_status); } && {
16059          test -z "$ac_c_werror_flag" ||
16060          test ! -s conftest.err
16061        } && test -s conftest$ac_exeext && {
16062          test "$cross_compiling" = yes ||
16063          $as_test_x conftest$ac_exeext
16064        }; then
16065   ac_cv_var_tzname=yes
16066 else
16067   $as_echo "$as_me: failed program was:" >&5
16068 sed 's/^/| /' conftest.$ac_ext >&5
16069
16070         ac_cv_var_tzname=no
16071 fi
16072
16073 rm -rf conftest.dSYM
16074 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16075       conftest$ac_exeext conftest.$ac_ext
16076 fi
16077 { $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
16078 $as_echo "$ac_cv_var_tzname" >&6; }
16079 if test $ac_cv_var_tzname = yes; then
16080
16081 cat >>confdefs.h <<\_ACEOF
16082 #define HAVE_TZNAME 1
16083 _ACEOF
16084
16085 fi
16086
16087 { $as_echo "$as_me:$LINENO: checking for union semun" >&5
16088 $as_echo_n "checking for union semun... " >&6; }
16089 if test "${ac_cv_type_union_semun+set}" = set; then
16090   $as_echo_n "(cached) " >&6
16091 else
16092   ac_cv_type_union_semun=no
16093 cat >conftest.$ac_ext <<_ACEOF
16094 /* confdefs.h.  */
16095 _ACEOF
16096 cat confdefs.h >>conftest.$ac_ext
16097 cat >>conftest.$ac_ext <<_ACEOF
16098 /* end confdefs.h.  */
16099 #include <sys/types.h>
16100 #include <sys/ipc.h>
16101 #include <sys/sem.h>
16102
16103 int
16104 main ()
16105 {
16106 if (sizeof (union semun))
16107        return 0;
16108   ;
16109   return 0;
16110 }
16111 _ACEOF
16112 rm -f conftest.$ac_objext
16113 if { (ac_try="$ac_compile"
16114 case "(($ac_try" in
16115   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16116   *) ac_try_echo=$ac_try;;
16117 esac
16118 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16119 $as_echo "$ac_try_echo") >&5
16120   (eval "$ac_compile") 2>conftest.er1
16121   ac_status=$?
16122   grep -v '^ *+' conftest.er1 >conftest.err
16123   rm -f conftest.er1
16124   cat conftest.err >&5
16125   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16126   (exit $ac_status); } && {
16127          test -z "$ac_c_werror_flag" ||
16128          test ! -s conftest.err
16129        } && test -s conftest.$ac_objext; then
16130   cat >conftest.$ac_ext <<_ACEOF
16131 /* confdefs.h.  */
16132 _ACEOF
16133 cat confdefs.h >>conftest.$ac_ext
16134 cat >>conftest.$ac_ext <<_ACEOF
16135 /* end confdefs.h.  */
16136 #include <sys/types.h>
16137 #include <sys/ipc.h>
16138 #include <sys/sem.h>
16139
16140 int
16141 main ()
16142 {
16143 if (sizeof ((union semun)))
16144           return 0;
16145   ;
16146   return 0;
16147 }
16148 _ACEOF
16149 rm -f conftest.$ac_objext
16150 if { (ac_try="$ac_compile"
16151 case "(($ac_try" in
16152   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16153   *) ac_try_echo=$ac_try;;
16154 esac
16155 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16156 $as_echo "$ac_try_echo") >&5
16157   (eval "$ac_compile") 2>conftest.er1
16158   ac_status=$?
16159   grep -v '^ *+' conftest.er1 >conftest.err
16160   rm -f conftest.er1
16161   cat conftest.err >&5
16162   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16163   (exit $ac_status); } && {
16164          test -z "$ac_c_werror_flag" ||
16165          test ! -s conftest.err
16166        } && test -s conftest.$ac_objext; then
16167   :
16168 else
16169   $as_echo "$as_me: failed program was:" >&5
16170 sed 's/^/| /' conftest.$ac_ext >&5
16171
16172         ac_cv_type_union_semun=yes
16173 fi
16174
16175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16176 else
16177   $as_echo "$as_me: failed program was:" >&5
16178 sed 's/^/| /' conftest.$ac_ext >&5
16179
16180
16181 fi
16182
16183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16184 fi
16185 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
16186 $as_echo "$ac_cv_type_union_semun" >&6; }
16187 if test "x$ac_cv_type_union_semun" = x""yes; then
16188
16189 cat >>confdefs.h <<_ACEOF
16190 #define HAVE_UNION_SEMUN 1
16191 _ACEOF
16192
16193
16194 fi
16195
16196 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
16197 $as_echo_n "checking for struct sockaddr_un... " >&6; }
16198 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
16199   $as_echo_n "(cached) " >&6
16200 else
16201   ac_cv_type_struct_sockaddr_un=no
16202 cat >conftest.$ac_ext <<_ACEOF
16203 /* confdefs.h.  */
16204 _ACEOF
16205 cat confdefs.h >>conftest.$ac_ext
16206 cat >>conftest.$ac_ext <<_ACEOF
16207 /* end confdefs.h.  */
16208 #include <sys/types.h>
16209 #ifdef HAVE_SYS_UN_H
16210 #include <sys/un.h>
16211 #endif
16212
16213
16214 int
16215 main ()
16216 {
16217 if (sizeof (struct sockaddr_un))
16218        return 0;
16219   ;
16220   return 0;
16221 }
16222 _ACEOF
16223 rm -f conftest.$ac_objext
16224 if { (ac_try="$ac_compile"
16225 case "(($ac_try" in
16226   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16227   *) ac_try_echo=$ac_try;;
16228 esac
16229 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16230 $as_echo "$ac_try_echo") >&5
16231   (eval "$ac_compile") 2>conftest.er1
16232   ac_status=$?
16233   grep -v '^ *+' conftest.er1 >conftest.err
16234   rm -f conftest.er1
16235   cat conftest.err >&5
16236   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16237   (exit $ac_status); } && {
16238          test -z "$ac_c_werror_flag" ||
16239          test ! -s conftest.err
16240        } && test -s conftest.$ac_objext; then
16241   cat >conftest.$ac_ext <<_ACEOF
16242 /* confdefs.h.  */
16243 _ACEOF
16244 cat confdefs.h >>conftest.$ac_ext
16245 cat >>conftest.$ac_ext <<_ACEOF
16246 /* end confdefs.h.  */
16247 #include <sys/types.h>
16248 #ifdef HAVE_SYS_UN_H
16249 #include <sys/un.h>
16250 #endif
16251
16252
16253 int
16254 main ()
16255 {
16256 if (sizeof ((struct sockaddr_un)))
16257           return 0;
16258   ;
16259   return 0;
16260 }
16261 _ACEOF
16262 rm -f conftest.$ac_objext
16263 if { (ac_try="$ac_compile"
16264 case "(($ac_try" in
16265   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16266   *) ac_try_echo=$ac_try;;
16267 esac
16268 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16269 $as_echo "$ac_try_echo") >&5
16270   (eval "$ac_compile") 2>conftest.er1
16271   ac_status=$?
16272   grep -v '^ *+' conftest.er1 >conftest.err
16273   rm -f conftest.er1
16274   cat conftest.err >&5
16275   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16276   (exit $ac_status); } && {
16277          test -z "$ac_c_werror_flag" ||
16278          test ! -s conftest.err
16279        } && test -s conftest.$ac_objext; then
16280   :
16281 else
16282   $as_echo "$as_me: failed program was:" >&5
16283 sed 's/^/| /' conftest.$ac_ext >&5
16284
16285         ac_cv_type_struct_sockaddr_un=yes
16286 fi
16287
16288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16289 else
16290   $as_echo "$as_me: failed program was:" >&5
16291 sed 's/^/| /' conftest.$ac_ext >&5
16292
16293
16294 fi
16295
16296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16297 fi
16298 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
16299 $as_echo "$ac_cv_type_struct_sockaddr_un" >&6; }
16300 if test "x$ac_cv_type_struct_sockaddr_un" = x""yes; then
16301
16302 cat >>confdefs.h <<\_ACEOF
16303 #define HAVE_UNIX_SOCKETS 1
16304 _ACEOF
16305
16306 fi
16307
16308 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
16309 $as_echo_n "checking for struct sockaddr_storage... " >&6; }
16310 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
16311   $as_echo_n "(cached) " >&6
16312 else
16313   ac_cv_type_struct_sockaddr_storage=no
16314 cat >conftest.$ac_ext <<_ACEOF
16315 /* confdefs.h.  */
16316 _ACEOF
16317 cat confdefs.h >>conftest.$ac_ext
16318 cat >>conftest.$ac_ext <<_ACEOF
16319 /* end confdefs.h.  */
16320 #include <sys/types.h>
16321 #ifdef HAVE_SYS_SOCKET_H
16322 #include <sys/socket.h>
16323 #endif
16324
16325
16326 int
16327 main ()
16328 {
16329 if (sizeof (struct sockaddr_storage))
16330        return 0;
16331   ;
16332   return 0;
16333 }
16334 _ACEOF
16335 rm -f conftest.$ac_objext
16336 if { (ac_try="$ac_compile"
16337 case "(($ac_try" in
16338   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16339   *) ac_try_echo=$ac_try;;
16340 esac
16341 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16342 $as_echo "$ac_try_echo") >&5
16343   (eval "$ac_compile") 2>conftest.er1
16344   ac_status=$?
16345   grep -v '^ *+' conftest.er1 >conftest.err
16346   rm -f conftest.er1
16347   cat conftest.err >&5
16348   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16349   (exit $ac_status); } && {
16350          test -z "$ac_c_werror_flag" ||
16351          test ! -s conftest.err
16352        } && test -s conftest.$ac_objext; then
16353   cat >conftest.$ac_ext <<_ACEOF
16354 /* confdefs.h.  */
16355 _ACEOF
16356 cat confdefs.h >>conftest.$ac_ext
16357 cat >>conftest.$ac_ext <<_ACEOF
16358 /* end confdefs.h.  */
16359 #include <sys/types.h>
16360 #ifdef HAVE_SYS_SOCKET_H
16361 #include <sys/socket.h>
16362 #endif
16363
16364
16365 int
16366 main ()
16367 {
16368 if (sizeof ((struct sockaddr_storage)))
16369           return 0;
16370   ;
16371   return 0;
16372 }
16373 _ACEOF
16374 rm -f conftest.$ac_objext
16375 if { (ac_try="$ac_compile"
16376 case "(($ac_try" in
16377   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16378   *) ac_try_echo=$ac_try;;
16379 esac
16380 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16381 $as_echo "$ac_try_echo") >&5
16382   (eval "$ac_compile") 2>conftest.er1
16383   ac_status=$?
16384   grep -v '^ *+' conftest.er1 >conftest.err
16385   rm -f conftest.er1
16386   cat conftest.err >&5
16387   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16388   (exit $ac_status); } && {
16389          test -z "$ac_c_werror_flag" ||
16390          test ! -s conftest.err
16391        } && test -s conftest.$ac_objext; then
16392   :
16393 else
16394   $as_echo "$as_me: failed program was:" >&5
16395 sed 's/^/| /' conftest.$ac_ext >&5
16396
16397         ac_cv_type_struct_sockaddr_storage=yes
16398 fi
16399
16400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16401 else
16402   $as_echo "$as_me: failed program was:" >&5
16403 sed 's/^/| /' conftest.$ac_ext >&5
16404
16405
16406 fi
16407
16408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16409 fi
16410 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
16411 $as_echo "$ac_cv_type_struct_sockaddr_storage" >&6; }
16412 if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then
16413
16414 cat >>confdefs.h <<_ACEOF
16415 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
16416 _ACEOF
16417
16418
16419 fi
16420
16421 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
16422 $as_echo_n "checking for struct sockaddr_storage.ss_family... " >&6; }
16423 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
16424   $as_echo_n "(cached) " >&6
16425 else
16426   cat >conftest.$ac_ext <<_ACEOF
16427 /* confdefs.h.  */
16428 _ACEOF
16429 cat confdefs.h >>conftest.$ac_ext
16430 cat >>conftest.$ac_ext <<_ACEOF
16431 /* end confdefs.h.  */
16432 #include <sys/types.h>
16433 #ifdef HAVE_SYS_SOCKET_H
16434 #include <sys/socket.h>
16435 #endif
16436
16437
16438 int
16439 main ()
16440 {
16441 static struct sockaddr_storage ac_aggr;
16442 if (ac_aggr.ss_family)
16443 return 0;
16444   ;
16445   return 0;
16446 }
16447 _ACEOF
16448 rm -f conftest.$ac_objext
16449 if { (ac_try="$ac_compile"
16450 case "(($ac_try" in
16451   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16452   *) ac_try_echo=$ac_try;;
16453 esac
16454 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16455 $as_echo "$ac_try_echo") >&5
16456   (eval "$ac_compile") 2>conftest.er1
16457   ac_status=$?
16458   grep -v '^ *+' conftest.er1 >conftest.err
16459   rm -f conftest.er1
16460   cat conftest.err >&5
16461   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16462   (exit $ac_status); } && {
16463          test -z "$ac_c_werror_flag" ||
16464          test ! -s conftest.err
16465        } && test -s conftest.$ac_objext; then
16466   ac_cv_member_struct_sockaddr_storage_ss_family=yes
16467 else
16468   $as_echo "$as_me: failed program was:" >&5
16469 sed 's/^/| /' conftest.$ac_ext >&5
16470
16471         cat >conftest.$ac_ext <<_ACEOF
16472 /* confdefs.h.  */
16473 _ACEOF
16474 cat confdefs.h >>conftest.$ac_ext
16475 cat >>conftest.$ac_ext <<_ACEOF
16476 /* end confdefs.h.  */
16477 #include <sys/types.h>
16478 #ifdef HAVE_SYS_SOCKET_H
16479 #include <sys/socket.h>
16480 #endif
16481
16482
16483 int
16484 main ()
16485 {
16486 static struct sockaddr_storage ac_aggr;
16487 if (sizeof ac_aggr.ss_family)
16488 return 0;
16489   ;
16490   return 0;
16491 }
16492 _ACEOF
16493 rm -f conftest.$ac_objext
16494 if { (ac_try="$ac_compile"
16495 case "(($ac_try" in
16496   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16497   *) ac_try_echo=$ac_try;;
16498 esac
16499 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16500 $as_echo "$ac_try_echo") >&5
16501   (eval "$ac_compile") 2>conftest.er1
16502   ac_status=$?
16503   grep -v '^ *+' conftest.er1 >conftest.err
16504   rm -f conftest.er1
16505   cat conftest.err >&5
16506   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16507   (exit $ac_status); } && {
16508          test -z "$ac_c_werror_flag" ||
16509          test ! -s conftest.err
16510        } && test -s conftest.$ac_objext; then
16511   ac_cv_member_struct_sockaddr_storage_ss_family=yes
16512 else
16513   $as_echo "$as_me: failed program was:" >&5
16514 sed 's/^/| /' conftest.$ac_ext >&5
16515
16516         ac_cv_member_struct_sockaddr_storage_ss_family=no
16517 fi
16518
16519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16520 fi
16521
16522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16523 fi
16524 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
16525 $as_echo "$ac_cv_member_struct_sockaddr_storage_ss_family" >&6; }
16526 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = x""yes; then
16527
16528 cat >>confdefs.h <<_ACEOF
16529 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
16530 _ACEOF
16531
16532
16533 fi
16534 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
16535 $as_echo_n "checking for struct sockaddr_storage.__ss_family... " >&6; }
16536 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
16537   $as_echo_n "(cached) " >&6
16538 else
16539   cat >conftest.$ac_ext <<_ACEOF
16540 /* confdefs.h.  */
16541 _ACEOF
16542 cat confdefs.h >>conftest.$ac_ext
16543 cat >>conftest.$ac_ext <<_ACEOF
16544 /* end confdefs.h.  */
16545 #include <sys/types.h>
16546 #ifdef HAVE_SYS_SOCKET_H
16547 #include <sys/socket.h>
16548 #endif
16549
16550
16551 int
16552 main ()
16553 {
16554 static struct sockaddr_storage ac_aggr;
16555 if (ac_aggr.__ss_family)
16556 return 0;
16557   ;
16558   return 0;
16559 }
16560 _ACEOF
16561 rm -f conftest.$ac_objext
16562 if { (ac_try="$ac_compile"
16563 case "(($ac_try" in
16564   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16565   *) ac_try_echo=$ac_try;;
16566 esac
16567 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16568 $as_echo "$ac_try_echo") >&5
16569   (eval "$ac_compile") 2>conftest.er1
16570   ac_status=$?
16571   grep -v '^ *+' conftest.er1 >conftest.err
16572   rm -f conftest.er1
16573   cat conftest.err >&5
16574   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16575   (exit $ac_status); } && {
16576          test -z "$ac_c_werror_flag" ||
16577          test ! -s conftest.err
16578        } && test -s conftest.$ac_objext; then
16579   ac_cv_member_struct_sockaddr_storage___ss_family=yes
16580 else
16581   $as_echo "$as_me: failed program was:" >&5
16582 sed 's/^/| /' conftest.$ac_ext >&5
16583
16584         cat >conftest.$ac_ext <<_ACEOF
16585 /* confdefs.h.  */
16586 _ACEOF
16587 cat confdefs.h >>conftest.$ac_ext
16588 cat >>conftest.$ac_ext <<_ACEOF
16589 /* end confdefs.h.  */
16590 #include <sys/types.h>
16591 #ifdef HAVE_SYS_SOCKET_H
16592 #include <sys/socket.h>
16593 #endif
16594
16595
16596 int
16597 main ()
16598 {
16599 static struct sockaddr_storage ac_aggr;
16600 if (sizeof ac_aggr.__ss_family)
16601 return 0;
16602   ;
16603   return 0;
16604 }
16605 _ACEOF
16606 rm -f conftest.$ac_objext
16607 if { (ac_try="$ac_compile"
16608 case "(($ac_try" in
16609   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16610   *) ac_try_echo=$ac_try;;
16611 esac
16612 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16613 $as_echo "$ac_try_echo") >&5
16614   (eval "$ac_compile") 2>conftest.er1
16615   ac_status=$?
16616   grep -v '^ *+' conftest.er1 >conftest.err
16617   rm -f conftest.er1
16618   cat conftest.err >&5
16619   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16620   (exit $ac_status); } && {
16621          test -z "$ac_c_werror_flag" ||
16622          test ! -s conftest.err
16623        } && test -s conftest.$ac_objext; then
16624   ac_cv_member_struct_sockaddr_storage___ss_family=yes
16625 else
16626   $as_echo "$as_me: failed program was:" >&5
16627 sed 's/^/| /' conftest.$ac_ext >&5
16628
16629         ac_cv_member_struct_sockaddr_storage___ss_family=no
16630 fi
16631
16632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16633 fi
16634
16635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16636 fi
16637 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
16638 $as_echo "$ac_cv_member_struct_sockaddr_storage___ss_family" >&6; }
16639 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = x""yes; then
16640
16641 cat >>confdefs.h <<_ACEOF
16642 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
16643 _ACEOF
16644
16645
16646 fi
16647 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
16648 $as_echo_n "checking for struct sockaddr_storage.ss_len... " >&6; }
16649 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
16650   $as_echo_n "(cached) " >&6
16651 else
16652   cat >conftest.$ac_ext <<_ACEOF
16653 /* confdefs.h.  */
16654 _ACEOF
16655 cat confdefs.h >>conftest.$ac_ext
16656 cat >>conftest.$ac_ext <<_ACEOF
16657 /* end confdefs.h.  */
16658 #include <sys/types.h>
16659 #ifdef HAVE_SYS_SOCKET_H
16660 #include <sys/socket.h>
16661 #endif
16662
16663
16664 int
16665 main ()
16666 {
16667 static struct sockaddr_storage ac_aggr;
16668 if (ac_aggr.ss_len)
16669 return 0;
16670   ;
16671   return 0;
16672 }
16673 _ACEOF
16674 rm -f conftest.$ac_objext
16675 if { (ac_try="$ac_compile"
16676 case "(($ac_try" in
16677   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16678   *) ac_try_echo=$ac_try;;
16679 esac
16680 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16681 $as_echo "$ac_try_echo") >&5
16682   (eval "$ac_compile") 2>conftest.er1
16683   ac_status=$?
16684   grep -v '^ *+' conftest.er1 >conftest.err
16685   rm -f conftest.er1
16686   cat conftest.err >&5
16687   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16688   (exit $ac_status); } && {
16689          test -z "$ac_c_werror_flag" ||
16690          test ! -s conftest.err
16691        } && test -s conftest.$ac_objext; then
16692   ac_cv_member_struct_sockaddr_storage_ss_len=yes
16693 else
16694   $as_echo "$as_me: failed program was:" >&5
16695 sed 's/^/| /' conftest.$ac_ext >&5
16696
16697         cat >conftest.$ac_ext <<_ACEOF
16698 /* confdefs.h.  */
16699 _ACEOF
16700 cat confdefs.h >>conftest.$ac_ext
16701 cat >>conftest.$ac_ext <<_ACEOF
16702 /* end confdefs.h.  */
16703 #include <sys/types.h>
16704 #ifdef HAVE_SYS_SOCKET_H
16705 #include <sys/socket.h>
16706 #endif
16707
16708
16709 int
16710 main ()
16711 {
16712 static struct sockaddr_storage ac_aggr;
16713 if (sizeof ac_aggr.ss_len)
16714 return 0;
16715   ;
16716   return 0;
16717 }
16718 _ACEOF
16719 rm -f conftest.$ac_objext
16720 if { (ac_try="$ac_compile"
16721 case "(($ac_try" in
16722   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16723   *) ac_try_echo=$ac_try;;
16724 esac
16725 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16726 $as_echo "$ac_try_echo") >&5
16727   (eval "$ac_compile") 2>conftest.er1
16728   ac_status=$?
16729   grep -v '^ *+' conftest.er1 >conftest.err
16730   rm -f conftest.er1
16731   cat conftest.err >&5
16732   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16733   (exit $ac_status); } && {
16734          test -z "$ac_c_werror_flag" ||
16735          test ! -s conftest.err
16736        } && test -s conftest.$ac_objext; then
16737   ac_cv_member_struct_sockaddr_storage_ss_len=yes
16738 else
16739   $as_echo "$as_me: failed program was:" >&5
16740 sed 's/^/| /' conftest.$ac_ext >&5
16741
16742         ac_cv_member_struct_sockaddr_storage_ss_len=no
16743 fi
16744
16745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16746 fi
16747
16748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16749 fi
16750 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
16751 $as_echo "$ac_cv_member_struct_sockaddr_storage_ss_len" >&6; }
16752 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = x""yes; then
16753
16754 cat >>confdefs.h <<_ACEOF
16755 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
16756 _ACEOF
16757
16758
16759 fi
16760 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
16761 $as_echo_n "checking for struct sockaddr_storage.__ss_len... " >&6; }
16762 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
16763   $as_echo_n "(cached) " >&6
16764 else
16765   cat >conftest.$ac_ext <<_ACEOF
16766 /* confdefs.h.  */
16767 _ACEOF
16768 cat confdefs.h >>conftest.$ac_ext
16769 cat >>conftest.$ac_ext <<_ACEOF
16770 /* end confdefs.h.  */
16771 #include <sys/types.h>
16772 #ifdef HAVE_SYS_SOCKET_H
16773 #include <sys/socket.h>
16774 #endif
16775
16776
16777 int
16778 main ()
16779 {
16780 static struct sockaddr_storage ac_aggr;
16781 if (ac_aggr.__ss_len)
16782 return 0;
16783   ;
16784   return 0;
16785 }
16786 _ACEOF
16787 rm -f conftest.$ac_objext
16788 if { (ac_try="$ac_compile"
16789 case "(($ac_try" in
16790   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16791   *) ac_try_echo=$ac_try;;
16792 esac
16793 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16794 $as_echo "$ac_try_echo") >&5
16795   (eval "$ac_compile") 2>conftest.er1
16796   ac_status=$?
16797   grep -v '^ *+' conftest.er1 >conftest.err
16798   rm -f conftest.er1
16799   cat conftest.err >&5
16800   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16801   (exit $ac_status); } && {
16802          test -z "$ac_c_werror_flag" ||
16803          test ! -s conftest.err
16804        } && test -s conftest.$ac_objext; then
16805   ac_cv_member_struct_sockaddr_storage___ss_len=yes
16806 else
16807   $as_echo "$as_me: failed program was:" >&5
16808 sed 's/^/| /' conftest.$ac_ext >&5
16809
16810         cat >conftest.$ac_ext <<_ACEOF
16811 /* confdefs.h.  */
16812 _ACEOF
16813 cat confdefs.h >>conftest.$ac_ext
16814 cat >>conftest.$ac_ext <<_ACEOF
16815 /* end confdefs.h.  */
16816 #include <sys/types.h>
16817 #ifdef HAVE_SYS_SOCKET_H
16818 #include <sys/socket.h>
16819 #endif
16820
16821
16822 int
16823 main ()
16824 {
16825 static struct sockaddr_storage ac_aggr;
16826 if (sizeof ac_aggr.__ss_len)
16827 return 0;
16828   ;
16829   return 0;
16830 }
16831 _ACEOF
16832 rm -f conftest.$ac_objext
16833 if { (ac_try="$ac_compile"
16834 case "(($ac_try" in
16835   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16836   *) ac_try_echo=$ac_try;;
16837 esac
16838 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16839 $as_echo "$ac_try_echo") >&5
16840   (eval "$ac_compile") 2>conftest.er1
16841   ac_status=$?
16842   grep -v '^ *+' conftest.er1 >conftest.err
16843   rm -f conftest.er1
16844   cat conftest.err >&5
16845   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16846   (exit $ac_status); } && {
16847          test -z "$ac_c_werror_flag" ||
16848          test ! -s conftest.err
16849        } && test -s conftest.$ac_objext; then
16850   ac_cv_member_struct_sockaddr_storage___ss_len=yes
16851 else
16852   $as_echo "$as_me: failed program was:" >&5
16853 sed 's/^/| /' conftest.$ac_ext >&5
16854
16855         ac_cv_member_struct_sockaddr_storage___ss_len=no
16856 fi
16857
16858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16859 fi
16860
16861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16862 fi
16863 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
16864 $as_echo "$ac_cv_member_struct_sockaddr_storage___ss_len" >&6; }
16865 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = x""yes; then
16866
16867 cat >>confdefs.h <<_ACEOF
16868 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
16869 _ACEOF
16870
16871
16872 fi
16873 { $as_echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
16874 $as_echo_n "checking for struct sockaddr.sa_len... " >&6; }
16875 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
16876   $as_echo_n "(cached) " >&6
16877 else
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 <sys/types.h>
16885 #ifdef HAVE_SYS_SOCKET_H
16886 #include <sys/socket.h>
16887 #endif
16888
16889
16890 int
16891 main ()
16892 {
16893 static struct sockaddr ac_aggr;
16894 if (ac_aggr.sa_len)
16895 return 0;
16896   ;
16897   return 0;
16898 }
16899 _ACEOF
16900 rm -f conftest.$ac_objext
16901 if { (ac_try="$ac_compile"
16902 case "(($ac_try" in
16903   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16904   *) ac_try_echo=$ac_try;;
16905 esac
16906 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16907 $as_echo "$ac_try_echo") >&5
16908   (eval "$ac_compile") 2>conftest.er1
16909   ac_status=$?
16910   grep -v '^ *+' conftest.er1 >conftest.err
16911   rm -f conftest.er1
16912   cat conftest.err >&5
16913   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16914   (exit $ac_status); } && {
16915          test -z "$ac_c_werror_flag" ||
16916          test ! -s conftest.err
16917        } && test -s conftest.$ac_objext; then
16918   ac_cv_member_struct_sockaddr_sa_len=yes
16919 else
16920   $as_echo "$as_me: failed program was:" >&5
16921 sed 's/^/| /' conftest.$ac_ext >&5
16922
16923         cat >conftest.$ac_ext <<_ACEOF
16924 /* confdefs.h.  */
16925 _ACEOF
16926 cat confdefs.h >>conftest.$ac_ext
16927 cat >>conftest.$ac_ext <<_ACEOF
16928 /* end confdefs.h.  */
16929 #include <sys/types.h>
16930 #ifdef HAVE_SYS_SOCKET_H
16931 #include <sys/socket.h>
16932 #endif
16933
16934
16935 int
16936 main ()
16937 {
16938 static struct sockaddr ac_aggr;
16939 if (sizeof ac_aggr.sa_len)
16940 return 0;
16941   ;
16942   return 0;
16943 }
16944 _ACEOF
16945 rm -f conftest.$ac_objext
16946 if { (ac_try="$ac_compile"
16947 case "(($ac_try" in
16948   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16949   *) ac_try_echo=$ac_try;;
16950 esac
16951 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16952 $as_echo "$ac_try_echo") >&5
16953   (eval "$ac_compile") 2>conftest.er1
16954   ac_status=$?
16955   grep -v '^ *+' conftest.er1 >conftest.err
16956   rm -f conftest.er1
16957   cat conftest.err >&5
16958   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16959   (exit $ac_status); } && {
16960          test -z "$ac_c_werror_flag" ||
16961          test ! -s conftest.err
16962        } && test -s conftest.$ac_objext; then
16963   ac_cv_member_struct_sockaddr_sa_len=yes
16964 else
16965   $as_echo "$as_me: failed program was:" >&5
16966 sed 's/^/| /' conftest.$ac_ext >&5
16967
16968         ac_cv_member_struct_sockaddr_sa_len=no
16969 fi
16970
16971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16972 fi
16973
16974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16975 fi
16976 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
16977 $as_echo "$ac_cv_member_struct_sockaddr_sa_len" >&6; }
16978 if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then
16979
16980 cat >>confdefs.h <<_ACEOF
16981 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
16982 _ACEOF
16983
16984
16985 fi
16986
16987 { $as_echo "$as_me:$LINENO: checking for struct addrinfo" >&5
16988 $as_echo_n "checking for struct addrinfo... " >&6; }
16989 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
16990   $as_echo_n "(cached) " >&6
16991 else
16992   ac_cv_type_struct_addrinfo=no
16993 cat >conftest.$ac_ext <<_ACEOF
16994 /* confdefs.h.  */
16995 _ACEOF
16996 cat confdefs.h >>conftest.$ac_ext
16997 cat >>conftest.$ac_ext <<_ACEOF
16998 /* end confdefs.h.  */
16999 #include <sys/types.h>
17000 #include <sys/socket.h>
17001 #include <netdb.h>
17002
17003
17004 int
17005 main ()
17006 {
17007 if (sizeof (struct addrinfo))
17008        return 0;
17009   ;
17010   return 0;
17011 }
17012 _ACEOF
17013 rm -f conftest.$ac_objext
17014 if { (ac_try="$ac_compile"
17015 case "(($ac_try" in
17016   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17017   *) ac_try_echo=$ac_try;;
17018 esac
17019 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17020 $as_echo "$ac_try_echo") >&5
17021   (eval "$ac_compile") 2>conftest.er1
17022   ac_status=$?
17023   grep -v '^ *+' conftest.er1 >conftest.err
17024   rm -f conftest.er1
17025   cat conftest.err >&5
17026   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17027   (exit $ac_status); } && {
17028          test -z "$ac_c_werror_flag" ||
17029          test ! -s conftest.err
17030        } && test -s conftest.$ac_objext; then
17031   cat >conftest.$ac_ext <<_ACEOF
17032 /* confdefs.h.  */
17033 _ACEOF
17034 cat confdefs.h >>conftest.$ac_ext
17035 cat >>conftest.$ac_ext <<_ACEOF
17036 /* end confdefs.h.  */
17037 #include <sys/types.h>
17038 #include <sys/socket.h>
17039 #include <netdb.h>
17040
17041
17042 int
17043 main ()
17044 {
17045 if (sizeof ((struct addrinfo)))
17046           return 0;
17047   ;
17048   return 0;
17049 }
17050 _ACEOF
17051 rm -f conftest.$ac_objext
17052 if { (ac_try="$ac_compile"
17053 case "(($ac_try" in
17054   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17055   *) ac_try_echo=$ac_try;;
17056 esac
17057 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17058 $as_echo "$ac_try_echo") >&5
17059   (eval "$ac_compile") 2>conftest.er1
17060   ac_status=$?
17061   grep -v '^ *+' conftest.er1 >conftest.err
17062   rm -f conftest.er1
17063   cat conftest.err >&5
17064   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17065   (exit $ac_status); } && {
17066          test -z "$ac_c_werror_flag" ||
17067          test ! -s conftest.err
17068        } && test -s conftest.$ac_objext; then
17069   :
17070 else
17071   $as_echo "$as_me: failed program was:" >&5
17072 sed 's/^/| /' conftest.$ac_ext >&5
17073
17074         ac_cv_type_struct_addrinfo=yes
17075 fi
17076
17077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17078 else
17079   $as_echo "$as_me: failed program was:" >&5
17080 sed 's/^/| /' conftest.$ac_ext >&5
17081
17082
17083 fi
17084
17085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17086 fi
17087 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
17088 $as_echo "$ac_cv_type_struct_addrinfo" >&6; }
17089 if test "x$ac_cv_type_struct_addrinfo" = x""yes; then
17090
17091 cat >>confdefs.h <<_ACEOF
17092 #define HAVE_STRUCT_ADDRINFO 1
17093 _ACEOF
17094
17095
17096 fi
17097
17098
17099   { $as_echo "$as_me:$LINENO: checking for intptr_t" >&5
17100 $as_echo_n "checking for intptr_t... " >&6; }
17101 if test "${ac_cv_type_intptr_t+set}" = set; then
17102   $as_echo_n "(cached) " >&6
17103 else
17104   ac_cv_type_intptr_t=no
17105 cat >conftest.$ac_ext <<_ACEOF
17106 /* confdefs.h.  */
17107 _ACEOF
17108 cat confdefs.h >>conftest.$ac_ext
17109 cat >>conftest.$ac_ext <<_ACEOF
17110 /* end confdefs.h.  */
17111 $ac_includes_default
17112 int
17113 main ()
17114 {
17115 if (sizeof (intptr_t))
17116        return 0;
17117   ;
17118   return 0;
17119 }
17120 _ACEOF
17121 rm -f conftest.$ac_objext
17122 if { (ac_try="$ac_compile"
17123 case "(($ac_try" in
17124   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17125   *) ac_try_echo=$ac_try;;
17126 esac
17127 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17128 $as_echo "$ac_try_echo") >&5
17129   (eval "$ac_compile") 2>conftest.er1
17130   ac_status=$?
17131   grep -v '^ *+' conftest.er1 >conftest.err
17132   rm -f conftest.er1
17133   cat conftest.err >&5
17134   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17135   (exit $ac_status); } && {
17136          test -z "$ac_c_werror_flag" ||
17137          test ! -s conftest.err
17138        } && test -s conftest.$ac_objext; then
17139   cat >conftest.$ac_ext <<_ACEOF
17140 /* confdefs.h.  */
17141 _ACEOF
17142 cat confdefs.h >>conftest.$ac_ext
17143 cat >>conftest.$ac_ext <<_ACEOF
17144 /* end confdefs.h.  */
17145 $ac_includes_default
17146 int
17147 main ()
17148 {
17149 if (sizeof ((intptr_t)))
17150           return 0;
17151   ;
17152   return 0;
17153 }
17154 _ACEOF
17155 rm -f conftest.$ac_objext
17156 if { (ac_try="$ac_compile"
17157 case "(($ac_try" in
17158   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17159   *) ac_try_echo=$ac_try;;
17160 esac
17161 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17162 $as_echo "$ac_try_echo") >&5
17163   (eval "$ac_compile") 2>conftest.er1
17164   ac_status=$?
17165   grep -v '^ *+' conftest.er1 >conftest.err
17166   rm -f conftest.er1
17167   cat conftest.err >&5
17168   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17169   (exit $ac_status); } && {
17170          test -z "$ac_c_werror_flag" ||
17171          test ! -s conftest.err
17172        } && test -s conftest.$ac_objext; then
17173   :
17174 else
17175   $as_echo "$as_me: failed program was:" >&5
17176 sed 's/^/| /' conftest.$ac_ext >&5
17177
17178         ac_cv_type_intptr_t=yes
17179 fi
17180
17181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17182 else
17183   $as_echo "$as_me: failed program was:" >&5
17184 sed 's/^/| /' conftest.$ac_ext >&5
17185
17186
17187 fi
17188
17189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17190 fi
17191 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
17192 $as_echo "$ac_cv_type_intptr_t" >&6; }
17193 if test "x$ac_cv_type_intptr_t" = x""yes; then
17194
17195 cat >>confdefs.h <<\_ACEOF
17196 #define HAVE_INTPTR_T 1
17197 _ACEOF
17198
17199 else
17200   for ac_type in 'int' 'long int' 'long long int'; do
17201        cat >conftest.$ac_ext <<_ACEOF
17202 /* confdefs.h.  */
17203 _ACEOF
17204 cat confdefs.h >>conftest.$ac_ext
17205 cat >>conftest.$ac_ext <<_ACEOF
17206 /* end confdefs.h.  */
17207 $ac_includes_default
17208 int
17209 main ()
17210 {
17211 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
17212 test_array [0] = 0
17213
17214   ;
17215   return 0;
17216 }
17217 _ACEOF
17218 rm -f conftest.$ac_objext
17219 if { (ac_try="$ac_compile"
17220 case "(($ac_try" in
17221   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17222   *) ac_try_echo=$ac_try;;
17223 esac
17224 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17225 $as_echo "$ac_try_echo") >&5
17226   (eval "$ac_compile") 2>conftest.er1
17227   ac_status=$?
17228   grep -v '^ *+' conftest.er1 >conftest.err
17229   rm -f conftest.er1
17230   cat conftest.err >&5
17231   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17232   (exit $ac_status); } && {
17233          test -z "$ac_c_werror_flag" ||
17234          test ! -s conftest.err
17235        } && test -s conftest.$ac_objext; then
17236
17237 cat >>confdefs.h <<_ACEOF
17238 #define intptr_t $ac_type
17239 _ACEOF
17240
17241           ac_type=
17242 else
17243   $as_echo "$as_me: failed program was:" >&5
17244 sed 's/^/| /' conftest.$ac_ext >&5
17245
17246
17247 fi
17248
17249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17250        test -z "$ac_type" && break
17251      done
17252 fi
17253
17254
17255
17256   { $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5
17257 $as_echo_n "checking for uintptr_t... " >&6; }
17258 if test "${ac_cv_type_uintptr_t+set}" = set; then
17259   $as_echo_n "(cached) " >&6
17260 else
17261   ac_cv_type_uintptr_t=no
17262 cat >conftest.$ac_ext <<_ACEOF
17263 /* confdefs.h.  */
17264 _ACEOF
17265 cat confdefs.h >>conftest.$ac_ext
17266 cat >>conftest.$ac_ext <<_ACEOF
17267 /* end confdefs.h.  */
17268 $ac_includes_default
17269 int
17270 main ()
17271 {
17272 if (sizeof (uintptr_t))
17273        return 0;
17274   ;
17275   return 0;
17276 }
17277 _ACEOF
17278 rm -f conftest.$ac_objext
17279 if { (ac_try="$ac_compile"
17280 case "(($ac_try" in
17281   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17282   *) ac_try_echo=$ac_try;;
17283 esac
17284 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17285 $as_echo "$ac_try_echo") >&5
17286   (eval "$ac_compile") 2>conftest.er1
17287   ac_status=$?
17288   grep -v '^ *+' conftest.er1 >conftest.err
17289   rm -f conftest.er1
17290   cat conftest.err >&5
17291   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17292   (exit $ac_status); } && {
17293          test -z "$ac_c_werror_flag" ||
17294          test ! -s conftest.err
17295        } && test -s conftest.$ac_objext; then
17296   cat >conftest.$ac_ext <<_ACEOF
17297 /* confdefs.h.  */
17298 _ACEOF
17299 cat confdefs.h >>conftest.$ac_ext
17300 cat >>conftest.$ac_ext <<_ACEOF
17301 /* end confdefs.h.  */
17302 $ac_includes_default
17303 int
17304 main ()
17305 {
17306 if (sizeof ((uintptr_t)))
17307           return 0;
17308   ;
17309   return 0;
17310 }
17311 _ACEOF
17312 rm -f conftest.$ac_objext
17313 if { (ac_try="$ac_compile"
17314 case "(($ac_try" in
17315   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17316   *) ac_try_echo=$ac_try;;
17317 esac
17318 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17319 $as_echo "$ac_try_echo") >&5
17320   (eval "$ac_compile") 2>conftest.er1
17321   ac_status=$?
17322   grep -v '^ *+' conftest.er1 >conftest.err
17323   rm -f conftest.er1
17324   cat conftest.err >&5
17325   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17326   (exit $ac_status); } && {
17327          test -z "$ac_c_werror_flag" ||
17328          test ! -s conftest.err
17329        } && test -s conftest.$ac_objext; then
17330   :
17331 else
17332   $as_echo "$as_me: failed program was:" >&5
17333 sed 's/^/| /' conftest.$ac_ext >&5
17334
17335         ac_cv_type_uintptr_t=yes
17336 fi
17337
17338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17339 else
17340   $as_echo "$as_me: failed program was:" >&5
17341 sed 's/^/| /' conftest.$ac_ext >&5
17342
17343
17344 fi
17345
17346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17347 fi
17348 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
17349 $as_echo "$ac_cv_type_uintptr_t" >&6; }
17350 if test "x$ac_cv_type_uintptr_t" = x""yes; then
17351
17352 cat >>confdefs.h <<\_ACEOF
17353 #define HAVE_UINTPTR_T 1
17354 _ACEOF
17355
17356 else
17357   for ac_type in 'unsigned int' 'unsigned long int' \
17358         'unsigned long long int'; do
17359        cat >conftest.$ac_ext <<_ACEOF
17360 /* confdefs.h.  */
17361 _ACEOF
17362 cat confdefs.h >>conftest.$ac_ext
17363 cat >>conftest.$ac_ext <<_ACEOF
17364 /* end confdefs.h.  */
17365 $ac_includes_default
17366 int
17367 main ()
17368 {
17369 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
17370 test_array [0] = 0
17371
17372   ;
17373   return 0;
17374 }
17375 _ACEOF
17376 rm -f conftest.$ac_objext
17377 if { (ac_try="$ac_compile"
17378 case "(($ac_try" in
17379   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17380   *) ac_try_echo=$ac_try;;
17381 esac
17382 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17383 $as_echo "$ac_try_echo") >&5
17384   (eval "$ac_compile") 2>conftest.er1
17385   ac_status=$?
17386   grep -v '^ *+' conftest.er1 >conftest.err
17387   rm -f conftest.er1
17388   cat conftest.err >&5
17389   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17390   (exit $ac_status); } && {
17391          test -z "$ac_c_werror_flag" ||
17392          test ! -s conftest.err
17393        } && test -s conftest.$ac_objext; then
17394
17395 cat >>confdefs.h <<_ACEOF
17396 #define uintptr_t $ac_type
17397 _ACEOF
17398
17399           ac_type=
17400 else
17401   $as_echo "$as_me: failed program was:" >&5
17402 sed 's/^/| /' conftest.$ac_ext >&5
17403
17404
17405 fi
17406
17407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17408        test -z "$ac_type" && break
17409      done
17410 fi
17411
17412
17413
17414   { $as_echo "$as_me:$LINENO: checking for long long int" >&5
17415 $as_echo_n "checking for long long int... " >&6; }
17416 if test "${ac_cv_type_long_long_int+set}" = set; then
17417   $as_echo_n "(cached) " >&6
17418 else
17419   cat >conftest.$ac_ext <<_ACEOF
17420
17421   /* confdefs.h.  */
17422 _ACEOF
17423 cat confdefs.h >>conftest.$ac_ext
17424 cat >>conftest.$ac_ext <<_ACEOF
17425 /* end confdefs.h.  */
17426 /* For now, do not test the preprocessor; as of 2007 there are too many
17427          implementations with broken preprocessors.  Perhaps this can
17428          be revisited in 2012.  In the meantime, code should not expect
17429          #if to work with literals wider than 32 bits.  */
17430       /* Test literals.  */
17431       long long int ll = 9223372036854775807ll;
17432       long long int nll = -9223372036854775807LL;
17433       unsigned long long int ull = 18446744073709551615ULL;
17434       /* Test constant expressions.   */
17435       typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
17436                      ? 1 : -1)];
17437       typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
17438                      ? 1 : -1)];
17439       int i = 63;
17440 int
17441 main ()
17442 {
17443 /* Test availability of runtime routines for shift and division.  */
17444       long long int llmax = 9223372036854775807ll;
17445       unsigned long long int ullmax = 18446744073709551615ull;
17446       return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
17447               | (llmax / ll) | (llmax % ll)
17448               | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
17449               | (ullmax / ull) | (ullmax % ull));
17450   ;
17451   return 0;
17452 }
17453
17454 _ACEOF
17455 rm -f conftest.$ac_objext conftest$ac_exeext
17456 if { (ac_try="$ac_link"
17457 case "(($ac_try" in
17458   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17459   *) ac_try_echo=$ac_try;;
17460 esac
17461 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17462 $as_echo "$ac_try_echo") >&5
17463   (eval "$ac_link") 2>conftest.er1
17464   ac_status=$?
17465   grep -v '^ *+' conftest.er1 >conftest.err
17466   rm -f conftest.er1
17467   cat conftest.err >&5
17468   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17469   (exit $ac_status); } && {
17470          test -z "$ac_c_werror_flag" ||
17471          test ! -s conftest.err
17472        } && test -s conftest$ac_exeext && {
17473          test "$cross_compiling" = yes ||
17474          $as_test_x conftest$ac_exeext
17475        }; then
17476                         if test "$cross_compiling" = yes; then
17477   ac_cv_type_long_long_int=yes
17478 else
17479   cat >conftest.$ac_ext <<_ACEOF
17480 /* confdefs.h.  */
17481 _ACEOF
17482 cat confdefs.h >>conftest.$ac_ext
17483 cat >>conftest.$ac_ext <<_ACEOF
17484 /* end confdefs.h.  */
17485 #include <limits.h>
17486                #ifndef LLONG_MAX
17487                # define HALF \
17488                         (1LL << (sizeof (long long int) * CHAR_BIT - 2))
17489                # define LLONG_MAX (HALF - 1 + HALF)
17490                #endif
17491 int
17492 main ()
17493 {
17494 long long int n = 1;
17495                int i;
17496                for (i = 0; ; i++)
17497                  {
17498                    long long int m = n << i;
17499                    if (m >> i != n)
17500                      return 1;
17501                    if (LLONG_MAX / 2 < m)
17502                      break;
17503                  }
17504                return 0;
17505   ;
17506   return 0;
17507 }
17508 _ACEOF
17509 rm -f conftest$ac_exeext
17510 if { (ac_try="$ac_link"
17511 case "(($ac_try" in
17512   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17513   *) ac_try_echo=$ac_try;;
17514 esac
17515 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17516 $as_echo "$ac_try_echo") >&5
17517   (eval "$ac_link") 2>&5
17518   ac_status=$?
17519   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17520   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17521   { (case "(($ac_try" in
17522   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17523   *) ac_try_echo=$ac_try;;
17524 esac
17525 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17526 $as_echo "$ac_try_echo") >&5
17527   (eval "$ac_try") 2>&5
17528   ac_status=$?
17529   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17530   (exit $ac_status); }; }; then
17531   ac_cv_type_long_long_int=yes
17532 else
17533   $as_echo "$as_me: program exited with status $ac_status" >&5
17534 $as_echo "$as_me: failed program was:" >&5
17535 sed 's/^/| /' conftest.$ac_ext >&5
17536
17537 ( exit $ac_status )
17538 ac_cv_type_long_long_int=no
17539 fi
17540 rm -rf conftest.dSYM
17541 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17542 fi
17543
17544
17545 else
17546   $as_echo "$as_me: failed program was:" >&5
17547 sed 's/^/| /' conftest.$ac_ext >&5
17548
17549         ac_cv_type_long_long_int=no
17550 fi
17551
17552 rm -rf conftest.dSYM
17553 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17554       conftest$ac_exeext conftest.$ac_ext
17555 fi
17556 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
17557 $as_echo "$ac_cv_type_long_long_int" >&6; }
17558   if test $ac_cv_type_long_long_int = yes; then
17559
17560 cat >>confdefs.h <<\_ACEOF
17561 #define HAVE_LONG_LONG_INT 1
17562 _ACEOF
17563
17564   fi
17565
17566
17567 { $as_echo "$as_me:$LINENO: checking for locale_t" >&5
17568 $as_echo_n "checking for locale_t... " >&6; }
17569 if test "${pgac_cv_type_locale_t+set}" = set; then
17570   $as_echo_n "(cached) " >&6
17571 else
17572   cat >conftest.$ac_ext <<_ACEOF
17573 /* confdefs.h.  */
17574 _ACEOF
17575 cat confdefs.h >>conftest.$ac_ext
17576 cat >>conftest.$ac_ext <<_ACEOF
17577 /* end confdefs.h.  */
17578 #include <locale.h>
17579 locale_t x;
17580 int
17581 main ()
17582 {
17583
17584   ;
17585   return 0;
17586 }
17587 _ACEOF
17588 rm -f conftest.$ac_objext
17589 if { (ac_try="$ac_compile"
17590 case "(($ac_try" in
17591   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17592   *) ac_try_echo=$ac_try;;
17593 esac
17594 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17595 $as_echo "$ac_try_echo") >&5
17596   (eval "$ac_compile") 2>conftest.er1
17597   ac_status=$?
17598   grep -v '^ *+' conftest.er1 >conftest.err
17599   rm -f conftest.er1
17600   cat conftest.err >&5
17601   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17602   (exit $ac_status); } && {
17603          test -z "$ac_c_werror_flag" ||
17604          test ! -s conftest.err
17605        } && test -s conftest.$ac_objext; then
17606   pgac_cv_type_locale_t=yes
17607 else
17608   $as_echo "$as_me: failed program was:" >&5
17609 sed 's/^/| /' conftest.$ac_ext >&5
17610
17611         cat >conftest.$ac_ext <<_ACEOF
17612 /* confdefs.h.  */
17613 _ACEOF
17614 cat confdefs.h >>conftest.$ac_ext
17615 cat >>conftest.$ac_ext <<_ACEOF
17616 /* end confdefs.h.  */
17617 #include <xlocale.h>
17618 locale_t x;
17619 int
17620 main ()
17621 {
17622
17623   ;
17624   return 0;
17625 }
17626 _ACEOF
17627 rm -f conftest.$ac_objext
17628 if { (ac_try="$ac_compile"
17629 case "(($ac_try" in
17630   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17631   *) ac_try_echo=$ac_try;;
17632 esac
17633 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17634 $as_echo "$ac_try_echo") >&5
17635   (eval "$ac_compile") 2>conftest.er1
17636   ac_status=$?
17637   grep -v '^ *+' conftest.er1 >conftest.err
17638   rm -f conftest.er1
17639   cat conftest.err >&5
17640   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17641   (exit $ac_status); } && {
17642          test -z "$ac_c_werror_flag" ||
17643          test ! -s conftest.err
17644        } && test -s conftest.$ac_objext; then
17645   pgac_cv_type_locale_t='yes (in xlocale.h)'
17646 else
17647   $as_echo "$as_me: failed program was:" >&5
17648 sed 's/^/| /' conftest.$ac_ext >&5
17649
17650         pgac_cv_type_locale_t=no
17651 fi
17652
17653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17654 fi
17655
17656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17657 fi
17658 { $as_echo "$as_me:$LINENO: result: $pgac_cv_type_locale_t" >&5
17659 $as_echo "$pgac_cv_type_locale_t" >&6; }
17660 if test "$pgac_cv_type_locale_t" != no; then
17661
17662 cat >>confdefs.h <<\_ACEOF
17663 #define HAVE_LOCALE_T 1
17664 _ACEOF
17665
17666 fi
17667 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
17668
17669 cat >>confdefs.h <<\_ACEOF
17670 #define LOCALE_T_IN_XLOCALE 1
17671 _ACEOF
17672
17673 fi
17674
17675 { $as_echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
17676 $as_echo_n "checking for struct cmsgcred... " >&6; }
17677 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
17678   $as_echo_n "(cached) " >&6
17679 else
17680   ac_cv_type_struct_cmsgcred=no
17681 cat >conftest.$ac_ext <<_ACEOF
17682 /* confdefs.h.  */
17683 _ACEOF
17684 cat confdefs.h >>conftest.$ac_ext
17685 cat >>conftest.$ac_ext <<_ACEOF
17686 /* end confdefs.h.  */
17687 #include <sys/socket.h>
17688 #ifdef HAVE_SYS_UCRED_H
17689 #include <sys/ucred.h>
17690 #endif
17691
17692 int
17693 main ()
17694 {
17695 if (sizeof (struct cmsgcred))
17696        return 0;
17697   ;
17698   return 0;
17699 }
17700 _ACEOF
17701 rm -f conftest.$ac_objext
17702 if { (ac_try="$ac_compile"
17703 case "(($ac_try" in
17704   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17705   *) ac_try_echo=$ac_try;;
17706 esac
17707 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17708 $as_echo "$ac_try_echo") >&5
17709   (eval "$ac_compile") 2>conftest.er1
17710   ac_status=$?
17711   grep -v '^ *+' conftest.er1 >conftest.err
17712   rm -f conftest.er1
17713   cat conftest.err >&5
17714   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17715   (exit $ac_status); } && {
17716          test -z "$ac_c_werror_flag" ||
17717          test ! -s conftest.err
17718        } && test -s conftest.$ac_objext; then
17719   cat >conftest.$ac_ext <<_ACEOF
17720 /* confdefs.h.  */
17721 _ACEOF
17722 cat confdefs.h >>conftest.$ac_ext
17723 cat >>conftest.$ac_ext <<_ACEOF
17724 /* end confdefs.h.  */
17725 #include <sys/socket.h>
17726 #ifdef HAVE_SYS_UCRED_H
17727 #include <sys/ucred.h>
17728 #endif
17729
17730 int
17731 main ()
17732 {
17733 if (sizeof ((struct cmsgcred)))
17734           return 0;
17735   ;
17736   return 0;
17737 }
17738 _ACEOF
17739 rm -f conftest.$ac_objext
17740 if { (ac_try="$ac_compile"
17741 case "(($ac_try" in
17742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17743   *) ac_try_echo=$ac_try;;
17744 esac
17745 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17746 $as_echo "$ac_try_echo") >&5
17747   (eval "$ac_compile") 2>conftest.er1
17748   ac_status=$?
17749   grep -v '^ *+' conftest.er1 >conftest.err
17750   rm -f conftest.er1
17751   cat conftest.err >&5
17752   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17753   (exit $ac_status); } && {
17754          test -z "$ac_c_werror_flag" ||
17755          test ! -s conftest.err
17756        } && test -s conftest.$ac_objext; then
17757   :
17758 else
17759   $as_echo "$as_me: failed program was:" >&5
17760 sed 's/^/| /' conftest.$ac_ext >&5
17761
17762         ac_cv_type_struct_cmsgcred=yes
17763 fi
17764
17765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17766 else
17767   $as_echo "$as_me: failed program was:" >&5
17768 sed 's/^/| /' conftest.$ac_ext >&5
17769
17770
17771 fi
17772
17773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17774 fi
17775 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
17776 $as_echo "$ac_cv_type_struct_cmsgcred" >&6; }
17777 if test "x$ac_cv_type_struct_cmsgcred" = x""yes; then
17778
17779 cat >>confdefs.h <<_ACEOF
17780 #define HAVE_STRUCT_CMSGCRED 1
17781 _ACEOF
17782
17783
17784 fi
17785
17786
17787 { $as_echo "$as_me:$LINENO: checking for struct option" >&5
17788 $as_echo_n "checking for struct option... " >&6; }
17789 if test "${ac_cv_type_struct_option+set}" = set; then
17790   $as_echo_n "(cached) " >&6
17791 else
17792   ac_cv_type_struct_option=no
17793 cat >conftest.$ac_ext <<_ACEOF
17794 /* confdefs.h.  */
17795 _ACEOF
17796 cat confdefs.h >>conftest.$ac_ext
17797 cat >>conftest.$ac_ext <<_ACEOF
17798 /* end confdefs.h.  */
17799 #ifdef HAVE_GETOPT_H
17800 #include <getopt.h>
17801 #endif
17802
17803 int
17804 main ()
17805 {
17806 if (sizeof (struct option))
17807        return 0;
17808   ;
17809   return 0;
17810 }
17811 _ACEOF
17812 rm -f conftest.$ac_objext
17813 if { (ac_try="$ac_compile"
17814 case "(($ac_try" in
17815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17816   *) ac_try_echo=$ac_try;;
17817 esac
17818 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17819 $as_echo "$ac_try_echo") >&5
17820   (eval "$ac_compile") 2>conftest.er1
17821   ac_status=$?
17822   grep -v '^ *+' conftest.er1 >conftest.err
17823   rm -f conftest.er1
17824   cat conftest.err >&5
17825   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17826   (exit $ac_status); } && {
17827          test -z "$ac_c_werror_flag" ||
17828          test ! -s conftest.err
17829        } && test -s conftest.$ac_objext; then
17830   cat >conftest.$ac_ext <<_ACEOF
17831 /* confdefs.h.  */
17832 _ACEOF
17833 cat confdefs.h >>conftest.$ac_ext
17834 cat >>conftest.$ac_ext <<_ACEOF
17835 /* end confdefs.h.  */
17836 #ifdef HAVE_GETOPT_H
17837 #include <getopt.h>
17838 #endif
17839
17840 int
17841 main ()
17842 {
17843 if (sizeof ((struct option)))
17844           return 0;
17845   ;
17846   return 0;
17847 }
17848 _ACEOF
17849 rm -f conftest.$ac_objext
17850 if { (ac_try="$ac_compile"
17851 case "(($ac_try" in
17852   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17853   *) ac_try_echo=$ac_try;;
17854 esac
17855 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17856 $as_echo "$ac_try_echo") >&5
17857   (eval "$ac_compile") 2>conftest.er1
17858   ac_status=$?
17859   grep -v '^ *+' conftest.er1 >conftest.err
17860   rm -f conftest.er1
17861   cat conftest.err >&5
17862   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17863   (exit $ac_status); } && {
17864          test -z "$ac_c_werror_flag" ||
17865          test ! -s conftest.err
17866        } && test -s conftest.$ac_objext; then
17867   :
17868 else
17869   $as_echo "$as_me: failed program was:" >&5
17870 sed 's/^/| /' conftest.$ac_ext >&5
17871
17872         ac_cv_type_struct_option=yes
17873 fi
17874
17875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17876 else
17877   $as_echo "$as_me: failed program was:" >&5
17878 sed 's/^/| /' conftest.$ac_ext >&5
17879
17880
17881 fi
17882
17883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17884 fi
17885 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
17886 $as_echo "$ac_cv_type_struct_option" >&6; }
17887 if test "x$ac_cv_type_struct_option" = x""yes; then
17888
17889 cat >>confdefs.h <<_ACEOF
17890 #define HAVE_STRUCT_OPTION 1
17891 _ACEOF
17892
17893
17894 fi
17895
17896
17897 if test "$with_zlib" = yes; then
17898   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
17899   # did not).  While we could work around the lack of z_streamp, it
17900   # seems unwise to encourage people to use such old zlib versions...
17901   { $as_echo "$as_me:$LINENO: checking for z_streamp" >&5
17902 $as_echo_n "checking for z_streamp... " >&6; }
17903 if test "${ac_cv_type_z_streamp+set}" = set; then
17904   $as_echo_n "(cached) " >&6
17905 else
17906   ac_cv_type_z_streamp=no
17907 cat >conftest.$ac_ext <<_ACEOF
17908 /* confdefs.h.  */
17909 _ACEOF
17910 cat confdefs.h >>conftest.$ac_ext
17911 cat >>conftest.$ac_ext <<_ACEOF
17912 /* end confdefs.h.  */
17913 #include <zlib.h>
17914
17915 int
17916 main ()
17917 {
17918 if (sizeof (z_streamp))
17919        return 0;
17920   ;
17921   return 0;
17922 }
17923 _ACEOF
17924 rm -f conftest.$ac_objext
17925 if { (ac_try="$ac_compile"
17926 case "(($ac_try" in
17927   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17928   *) ac_try_echo=$ac_try;;
17929 esac
17930 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17931 $as_echo "$ac_try_echo") >&5
17932   (eval "$ac_compile") 2>conftest.er1
17933   ac_status=$?
17934   grep -v '^ *+' conftest.er1 >conftest.err
17935   rm -f conftest.er1
17936   cat conftest.err >&5
17937   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17938   (exit $ac_status); } && {
17939          test -z "$ac_c_werror_flag" ||
17940          test ! -s conftest.err
17941        } && test -s conftest.$ac_objext; then
17942   cat >conftest.$ac_ext <<_ACEOF
17943 /* confdefs.h.  */
17944 _ACEOF
17945 cat confdefs.h >>conftest.$ac_ext
17946 cat >>conftest.$ac_ext <<_ACEOF
17947 /* end confdefs.h.  */
17948 #include <zlib.h>
17949
17950 int
17951 main ()
17952 {
17953 if (sizeof ((z_streamp)))
17954           return 0;
17955   ;
17956   return 0;
17957 }
17958 _ACEOF
17959 rm -f conftest.$ac_objext
17960 if { (ac_try="$ac_compile"
17961 case "(($ac_try" in
17962   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17963   *) ac_try_echo=$ac_try;;
17964 esac
17965 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17966 $as_echo "$ac_try_echo") >&5
17967   (eval "$ac_compile") 2>conftest.er1
17968   ac_status=$?
17969   grep -v '^ *+' conftest.er1 >conftest.err
17970   rm -f conftest.er1
17971   cat conftest.err >&5
17972   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17973   (exit $ac_status); } && {
17974          test -z "$ac_c_werror_flag" ||
17975          test ! -s conftest.err
17976        } && test -s conftest.$ac_objext; then
17977   :
17978 else
17979   $as_echo "$as_me: failed program was:" >&5
17980 sed 's/^/| /' conftest.$ac_ext >&5
17981
17982         ac_cv_type_z_streamp=yes
17983 fi
17984
17985 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17986 else
17987   $as_echo "$as_me: failed program was:" >&5
17988 sed 's/^/| /' conftest.$ac_ext >&5
17989
17990
17991 fi
17992
17993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17994 fi
17995 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
17996 $as_echo "$ac_cv_type_z_streamp" >&6; }
17997 if test "x$ac_cv_type_z_streamp" = x""yes; then
17998   :
17999 else
18000   { { $as_echo "$as_me:$LINENO: error: zlib version is too old
18001 Use --without-zlib to disable zlib support." >&5
18002 $as_echo "$as_me: error: zlib version is too old
18003 Use --without-zlib to disable zlib support." >&2;}
18004    { (exit 1); exit 1; }; }
18005 fi
18006
18007 fi
18008
18009 if test "$with_krb5" = yes; then
18010 # Check for differences between MIT and Heimdal (KTH) releases
18011   { $as_echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
18012 $as_echo_n "checking for krb5_ticket.enc_part2... " >&6; }
18013 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
18014   $as_echo_n "(cached) " >&6
18015 else
18016   cat >conftest.$ac_ext <<_ACEOF
18017 /* confdefs.h.  */
18018 _ACEOF
18019 cat confdefs.h >>conftest.$ac_ext
18020 cat >>conftest.$ac_ext <<_ACEOF
18021 /* end confdefs.h.  */
18022 #include <krb5.h>
18023
18024 int
18025 main ()
18026 {
18027 static krb5_ticket ac_aggr;
18028 if (ac_aggr.enc_part2)
18029 return 0;
18030   ;
18031   return 0;
18032 }
18033 _ACEOF
18034 rm -f conftest.$ac_objext
18035 if { (ac_try="$ac_compile"
18036 case "(($ac_try" in
18037   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18038   *) ac_try_echo=$ac_try;;
18039 esac
18040 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18041 $as_echo "$ac_try_echo") >&5
18042   (eval "$ac_compile") 2>conftest.er1
18043   ac_status=$?
18044   grep -v '^ *+' conftest.er1 >conftest.err
18045   rm -f conftest.er1
18046   cat conftest.err >&5
18047   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18048   (exit $ac_status); } && {
18049          test -z "$ac_c_werror_flag" ||
18050          test ! -s conftest.err
18051        } && test -s conftest.$ac_objext; then
18052   ac_cv_member_krb5_ticket_enc_part2=yes
18053 else
18054   $as_echo "$as_me: failed program was:" >&5
18055 sed 's/^/| /' conftest.$ac_ext >&5
18056
18057         cat >conftest.$ac_ext <<_ACEOF
18058 /* confdefs.h.  */
18059 _ACEOF
18060 cat confdefs.h >>conftest.$ac_ext
18061 cat >>conftest.$ac_ext <<_ACEOF
18062 /* end confdefs.h.  */
18063 #include <krb5.h>
18064
18065 int
18066 main ()
18067 {
18068 static krb5_ticket ac_aggr;
18069 if (sizeof ac_aggr.enc_part2)
18070 return 0;
18071   ;
18072   return 0;
18073 }
18074 _ACEOF
18075 rm -f conftest.$ac_objext
18076 if { (ac_try="$ac_compile"
18077 case "(($ac_try" in
18078   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18079   *) ac_try_echo=$ac_try;;
18080 esac
18081 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18082 $as_echo "$ac_try_echo") >&5
18083   (eval "$ac_compile") 2>conftest.er1
18084   ac_status=$?
18085   grep -v '^ *+' conftest.er1 >conftest.err
18086   rm -f conftest.er1
18087   cat conftest.err >&5
18088   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18089   (exit $ac_status); } && {
18090          test -z "$ac_c_werror_flag" ||
18091          test ! -s conftest.err
18092        } && test -s conftest.$ac_objext; then
18093   ac_cv_member_krb5_ticket_enc_part2=yes
18094 else
18095   $as_echo "$as_me: failed program was:" >&5
18096 sed 's/^/| /' conftest.$ac_ext >&5
18097
18098         ac_cv_member_krb5_ticket_enc_part2=no
18099 fi
18100
18101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18102 fi
18103
18104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18105 fi
18106 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
18107 $as_echo "$ac_cv_member_krb5_ticket_enc_part2" >&6; }
18108 if test "x$ac_cv_member_krb5_ticket_enc_part2" = x""yes; then
18109
18110 cat >>confdefs.h <<_ACEOF
18111 #define HAVE_KRB5_TICKET_ENC_PART2 1
18112 _ACEOF
18113
18114
18115 else
18116   { $as_echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
18117 $as_echo_n "checking for krb5_ticket.client... " >&6; }
18118 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
18119   $as_echo_n "(cached) " >&6
18120 else
18121   cat >conftest.$ac_ext <<_ACEOF
18122 /* confdefs.h.  */
18123 _ACEOF
18124 cat confdefs.h >>conftest.$ac_ext
18125 cat >>conftest.$ac_ext <<_ACEOF
18126 /* end confdefs.h.  */
18127 #include <krb5.h>
18128
18129 int
18130 main ()
18131 {
18132 static krb5_ticket ac_aggr;
18133 if (ac_aggr.client)
18134 return 0;
18135   ;
18136   return 0;
18137 }
18138 _ACEOF
18139 rm -f conftest.$ac_objext
18140 if { (ac_try="$ac_compile"
18141 case "(($ac_try" in
18142   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18143   *) ac_try_echo=$ac_try;;
18144 esac
18145 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18146 $as_echo "$ac_try_echo") >&5
18147   (eval "$ac_compile") 2>conftest.er1
18148   ac_status=$?
18149   grep -v '^ *+' conftest.er1 >conftest.err
18150   rm -f conftest.er1
18151   cat conftest.err >&5
18152   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18153   (exit $ac_status); } && {
18154          test -z "$ac_c_werror_flag" ||
18155          test ! -s conftest.err
18156        } && test -s conftest.$ac_objext; then
18157   ac_cv_member_krb5_ticket_client=yes
18158 else
18159   $as_echo "$as_me: failed program was:" >&5
18160 sed 's/^/| /' conftest.$ac_ext >&5
18161
18162         cat >conftest.$ac_ext <<_ACEOF
18163 /* confdefs.h.  */
18164 _ACEOF
18165 cat confdefs.h >>conftest.$ac_ext
18166 cat >>conftest.$ac_ext <<_ACEOF
18167 /* end confdefs.h.  */
18168 #include <krb5.h>
18169
18170 int
18171 main ()
18172 {
18173 static krb5_ticket ac_aggr;
18174 if (sizeof ac_aggr.client)
18175 return 0;
18176   ;
18177   return 0;
18178 }
18179 _ACEOF
18180 rm -f conftest.$ac_objext
18181 if { (ac_try="$ac_compile"
18182 case "(($ac_try" in
18183   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18184   *) ac_try_echo=$ac_try;;
18185 esac
18186 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18187 $as_echo "$ac_try_echo") >&5
18188   (eval "$ac_compile") 2>conftest.er1
18189   ac_status=$?
18190   grep -v '^ *+' conftest.er1 >conftest.err
18191   rm -f conftest.er1
18192   cat conftest.err >&5
18193   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18194   (exit $ac_status); } && {
18195          test -z "$ac_c_werror_flag" ||
18196          test ! -s conftest.err
18197        } && test -s conftest.$ac_objext; then
18198   ac_cv_member_krb5_ticket_client=yes
18199 else
18200   $as_echo "$as_me: failed program was:" >&5
18201 sed 's/^/| /' conftest.$ac_ext >&5
18202
18203         ac_cv_member_krb5_ticket_client=no
18204 fi
18205
18206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18207 fi
18208
18209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18210 fi
18211 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
18212 $as_echo "$ac_cv_member_krb5_ticket_client" >&6; }
18213 if test "x$ac_cv_member_krb5_ticket_client" = x""yes; then
18214
18215 cat >>confdefs.h <<_ACEOF
18216 #define HAVE_KRB5_TICKET_CLIENT 1
18217 _ACEOF
18218
18219
18220 else
18221   { { $as_echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
18222 $as_echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
18223    { (exit 1); exit 1; }; }
18224 fi
18225
18226 fi
18227
18228   { $as_echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
18229 $as_echo_n "checking for krb5_error.text.data... " >&6; }
18230 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
18231   $as_echo_n "(cached) " >&6
18232 else
18233   cat >conftest.$ac_ext <<_ACEOF
18234 /* confdefs.h.  */
18235 _ACEOF
18236 cat confdefs.h >>conftest.$ac_ext
18237 cat >>conftest.$ac_ext <<_ACEOF
18238 /* end confdefs.h.  */
18239 #include <krb5.h>
18240
18241 int
18242 main ()
18243 {
18244 static krb5_error ac_aggr;
18245 if (ac_aggr.text.data)
18246 return 0;
18247   ;
18248   return 0;
18249 }
18250 _ACEOF
18251 rm -f conftest.$ac_objext
18252 if { (ac_try="$ac_compile"
18253 case "(($ac_try" in
18254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18255   *) ac_try_echo=$ac_try;;
18256 esac
18257 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18258 $as_echo "$ac_try_echo") >&5
18259   (eval "$ac_compile") 2>conftest.er1
18260   ac_status=$?
18261   grep -v '^ *+' conftest.er1 >conftest.err
18262   rm -f conftest.er1
18263   cat conftest.err >&5
18264   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18265   (exit $ac_status); } && {
18266          test -z "$ac_c_werror_flag" ||
18267          test ! -s conftest.err
18268        } && test -s conftest.$ac_objext; then
18269   ac_cv_member_krb5_error_text_data=yes
18270 else
18271   $as_echo "$as_me: failed program was:" >&5
18272 sed 's/^/| /' conftest.$ac_ext >&5
18273
18274         cat >conftest.$ac_ext <<_ACEOF
18275 /* confdefs.h.  */
18276 _ACEOF
18277 cat confdefs.h >>conftest.$ac_ext
18278 cat >>conftest.$ac_ext <<_ACEOF
18279 /* end confdefs.h.  */
18280 #include <krb5.h>
18281
18282 int
18283 main ()
18284 {
18285 static krb5_error ac_aggr;
18286 if (sizeof ac_aggr.text.data)
18287 return 0;
18288   ;
18289   return 0;
18290 }
18291 _ACEOF
18292 rm -f conftest.$ac_objext
18293 if { (ac_try="$ac_compile"
18294 case "(($ac_try" in
18295   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18296   *) ac_try_echo=$ac_try;;
18297 esac
18298 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18299 $as_echo "$ac_try_echo") >&5
18300   (eval "$ac_compile") 2>conftest.er1
18301   ac_status=$?
18302   grep -v '^ *+' conftest.er1 >conftest.err
18303   rm -f conftest.er1
18304   cat conftest.err >&5
18305   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18306   (exit $ac_status); } && {
18307          test -z "$ac_c_werror_flag" ||
18308          test ! -s conftest.err
18309        } && test -s conftest.$ac_objext; then
18310   ac_cv_member_krb5_error_text_data=yes
18311 else
18312   $as_echo "$as_me: failed program was:" >&5
18313 sed 's/^/| /' conftest.$ac_ext >&5
18314
18315         ac_cv_member_krb5_error_text_data=no
18316 fi
18317
18318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18319 fi
18320
18321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18322 fi
18323 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
18324 $as_echo "$ac_cv_member_krb5_error_text_data" >&6; }
18325 if test "x$ac_cv_member_krb5_error_text_data" = x""yes; then
18326
18327 cat >>confdefs.h <<_ACEOF
18328 #define HAVE_KRB5_ERROR_TEXT_DATA 1
18329 _ACEOF
18330
18331
18332 else
18333   { $as_echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
18334 $as_echo_n "checking for krb5_error.e_data... " >&6; }
18335 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
18336   $as_echo_n "(cached) " >&6
18337 else
18338   cat >conftest.$ac_ext <<_ACEOF
18339 /* confdefs.h.  */
18340 _ACEOF
18341 cat confdefs.h >>conftest.$ac_ext
18342 cat >>conftest.$ac_ext <<_ACEOF
18343 /* end confdefs.h.  */
18344 #include <krb5.h>
18345
18346 int
18347 main ()
18348 {
18349 static krb5_error ac_aggr;
18350 if (ac_aggr.e_data)
18351 return 0;
18352   ;
18353   return 0;
18354 }
18355 _ACEOF
18356 rm -f conftest.$ac_objext
18357 if { (ac_try="$ac_compile"
18358 case "(($ac_try" in
18359   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18360   *) ac_try_echo=$ac_try;;
18361 esac
18362 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18363 $as_echo "$ac_try_echo") >&5
18364   (eval "$ac_compile") 2>conftest.er1
18365   ac_status=$?
18366   grep -v '^ *+' conftest.er1 >conftest.err
18367   rm -f conftest.er1
18368   cat conftest.err >&5
18369   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18370   (exit $ac_status); } && {
18371          test -z "$ac_c_werror_flag" ||
18372          test ! -s conftest.err
18373        } && test -s conftest.$ac_objext; then
18374   ac_cv_member_krb5_error_e_data=yes
18375 else
18376   $as_echo "$as_me: failed program was:" >&5
18377 sed 's/^/| /' conftest.$ac_ext >&5
18378
18379         cat >conftest.$ac_ext <<_ACEOF
18380 /* confdefs.h.  */
18381 _ACEOF
18382 cat confdefs.h >>conftest.$ac_ext
18383 cat >>conftest.$ac_ext <<_ACEOF
18384 /* end confdefs.h.  */
18385 #include <krb5.h>
18386
18387 int
18388 main ()
18389 {
18390 static krb5_error ac_aggr;
18391 if (sizeof ac_aggr.e_data)
18392 return 0;
18393   ;
18394   return 0;
18395 }
18396 _ACEOF
18397 rm -f conftest.$ac_objext
18398 if { (ac_try="$ac_compile"
18399 case "(($ac_try" in
18400   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18401   *) ac_try_echo=$ac_try;;
18402 esac
18403 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18404 $as_echo "$ac_try_echo") >&5
18405   (eval "$ac_compile") 2>conftest.er1
18406   ac_status=$?
18407   grep -v '^ *+' conftest.er1 >conftest.err
18408   rm -f conftest.er1
18409   cat conftest.err >&5
18410   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18411   (exit $ac_status); } && {
18412          test -z "$ac_c_werror_flag" ||
18413          test ! -s conftest.err
18414        } && test -s conftest.$ac_objext; then
18415   ac_cv_member_krb5_error_e_data=yes
18416 else
18417   $as_echo "$as_me: failed program was:" >&5
18418 sed 's/^/| /' conftest.$ac_ext >&5
18419
18420         ac_cv_member_krb5_error_e_data=no
18421 fi
18422
18423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18424 fi
18425
18426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18427 fi
18428 { $as_echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
18429 $as_echo "$ac_cv_member_krb5_error_e_data" >&6; }
18430 if test "x$ac_cv_member_krb5_error_e_data" = x""yes; then
18431
18432 cat >>confdefs.h <<_ACEOF
18433 #define HAVE_KRB5_ERROR_E_DATA 1
18434 _ACEOF
18435
18436
18437 else
18438   { { $as_echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
18439 $as_echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
18440    { (exit 1); exit 1; }; }
18441 fi
18442
18443 fi
18444
18445
18446 # Win32 requires headers to be loaded for __stdcall, so can't use
18447 # AC_CHECK_FUNCS here.
18448   { $as_echo "$as_me:$LINENO: checking for krb5_free_unparsed_name" >&5
18449 $as_echo_n "checking for krb5_free_unparsed_name... " >&6; }
18450   cat >conftest.$ac_ext <<_ACEOF
18451 /* confdefs.h.  */
18452 _ACEOF
18453 cat confdefs.h >>conftest.$ac_ext
18454 cat >>conftest.$ac_ext <<_ACEOF
18455 /* end confdefs.h.  */
18456 #include <krb5.h>
18457 int
18458 main ()
18459 {
18460 krb5_free_unparsed_name(NULL,NULL);
18461   ;
18462   return 0;
18463 }
18464 _ACEOF
18465 rm -f conftest.$ac_objext conftest$ac_exeext
18466 if { (ac_try="$ac_link"
18467 case "(($ac_try" in
18468   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18469   *) ac_try_echo=$ac_try;;
18470 esac
18471 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18472 $as_echo "$ac_try_echo") >&5
18473   (eval "$ac_link") 2>conftest.er1
18474   ac_status=$?
18475   grep -v '^ *+' conftest.er1 >conftest.err
18476   rm -f conftest.er1
18477   cat conftest.err >&5
18478   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18479   (exit $ac_status); } && {
18480          test -z "$ac_c_werror_flag" ||
18481          test ! -s conftest.err
18482        } && test -s conftest$ac_exeext && {
18483          test "$cross_compiling" = yes ||
18484          $as_test_x conftest$ac_exeext
18485        }; then
18486
18487 cat >>confdefs.h <<\_ACEOF
18488 #define HAVE_KRB5_FREE_UNPARSED_NAME 1
18489 _ACEOF
18490
18491 { $as_echo "$as_me:$LINENO: result: yes" >&5
18492 $as_echo "yes" >&6; }
18493 else
18494   $as_echo "$as_me: failed program was:" >&5
18495 sed 's/^/| /' conftest.$ac_ext >&5
18496
18497         { $as_echo "$as_me:$LINENO: result: no" >&5
18498 $as_echo "no" >&6; }
18499 fi
18500
18501 rm -rf conftest.dSYM
18502 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18503       conftest$ac_exeext conftest.$ac_ext
18504 fi
18505
18506 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
18507 case $host_cpu in
18508   ppc*|powerpc*)
18509     { $as_echo "$as_me:$LINENO: checking whether assembler supports lwarx hint bit" >&5
18510 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
18511     cat >conftest.$ac_ext <<_ACEOF
18512 /* confdefs.h.  */
18513 _ACEOF
18514 cat confdefs.h >>conftest.$ac_ext
18515 cat >>conftest.$ac_ext <<_ACEOF
18516 /* end confdefs.h.  */
18517
18518 int
18519 main ()
18520 {
18521 int a = 0; int *p = &a; int r;
18522          __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
18523   ;
18524   return 0;
18525 }
18526 _ACEOF
18527 rm -f conftest.$ac_objext
18528 if { (ac_try="$ac_compile"
18529 case "(($ac_try" in
18530   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18531   *) ac_try_echo=$ac_try;;
18532 esac
18533 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18534 $as_echo "$ac_try_echo") >&5
18535   (eval "$ac_compile") 2>conftest.er1
18536   ac_status=$?
18537   grep -v '^ *+' conftest.er1 >conftest.err
18538   rm -f conftest.er1
18539   cat conftest.err >&5
18540   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18541   (exit $ac_status); } && {
18542          test -z "$ac_c_werror_flag" ||
18543          test ! -s conftest.err
18544        } && test -s conftest.$ac_objext; then
18545   pgac_cv_have_ppc_mutex_hint=yes
18546 else
18547   $as_echo "$as_me: failed program was:" >&5
18548 sed 's/^/| /' conftest.$ac_ext >&5
18549
18550         pgac_cv_have_ppc_mutex_hint=no
18551 fi
18552
18553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18554     { $as_echo "$as_me:$LINENO: result: $pgac_cv_have_ppc_mutex_hint" >&5
18555 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
18556     if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
18557
18558 cat >>confdefs.h <<\_ACEOF
18559 #define HAVE_PPC_LWARX_MUTEX_HINT 1
18560 _ACEOF
18561
18562     fi
18563   ;;
18564 esac
18565
18566 # Check largefile support.  You might think this is a system service not a
18567 # compiler characteristic, but you'd be wrong.  We must check this before
18568 # probing existence of related functions such as fseeko, since the largefile
18569 # defines can affect what is generated for that.
18570 if test "$PORTNAME" != "win32"; then
18571    # Check whether --enable-largefile was given.
18572 if test "${enable_largefile+set}" = set; then
18573   enableval=$enable_largefile;
18574 fi
18575
18576 if test "$enable_largefile" != no; then
18577
18578   { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
18579 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
18580 if test "${ac_cv_sys_largefile_CC+set}" = set; then
18581   $as_echo_n "(cached) " >&6
18582 else
18583   ac_cv_sys_largefile_CC=no
18584      if test "$GCC" != yes; then
18585        ac_save_CC=$CC
18586        while :; do
18587          # IRIX 6.2 and later do not support large files by default,
18588          # so use the C compiler's -n32 option if that helps.
18589          cat >conftest.$ac_ext <<_ACEOF
18590 /* confdefs.h.  */
18591 _ACEOF
18592 cat confdefs.h >>conftest.$ac_ext
18593 cat >>conftest.$ac_ext <<_ACEOF
18594 /* end confdefs.h.  */
18595 #include <sys/types.h>
18596  /* Check that off_t can represent 2**63 - 1 correctly.
18597     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18598     since some C++ compilers masquerading as C compilers
18599     incorrectly reject 9223372036854775807.  */
18600 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18601   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18602                        && LARGE_OFF_T % 2147483647 == 1)
18603                       ? 1 : -1];
18604 int
18605 main ()
18606 {
18607
18608   ;
18609   return 0;
18610 }
18611 _ACEOF
18612          rm -f conftest.$ac_objext
18613 if { (ac_try="$ac_compile"
18614 case "(($ac_try" in
18615   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18616   *) ac_try_echo=$ac_try;;
18617 esac
18618 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18619 $as_echo "$ac_try_echo") >&5
18620   (eval "$ac_compile") 2>conftest.er1
18621   ac_status=$?
18622   grep -v '^ *+' conftest.er1 >conftest.err
18623   rm -f conftest.er1
18624   cat conftest.err >&5
18625   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18626   (exit $ac_status); } && {
18627          test -z "$ac_c_werror_flag" ||
18628          test ! -s conftest.err
18629        } && test -s conftest.$ac_objext; then
18630   break
18631 else
18632   $as_echo "$as_me: failed program was:" >&5
18633 sed 's/^/| /' conftest.$ac_ext >&5
18634
18635
18636 fi
18637
18638 rm -f core conftest.err conftest.$ac_objext
18639          CC="$CC -n32"
18640          rm -f conftest.$ac_objext
18641 if { (ac_try="$ac_compile"
18642 case "(($ac_try" in
18643   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18644   *) ac_try_echo=$ac_try;;
18645 esac
18646 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18647 $as_echo "$ac_try_echo") >&5
18648   (eval "$ac_compile") 2>conftest.er1
18649   ac_status=$?
18650   grep -v '^ *+' conftest.er1 >conftest.err
18651   rm -f conftest.er1
18652   cat conftest.err >&5
18653   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18654   (exit $ac_status); } && {
18655          test -z "$ac_c_werror_flag" ||
18656          test ! -s conftest.err
18657        } && test -s conftest.$ac_objext; then
18658   ac_cv_sys_largefile_CC=' -n32'; break
18659 else
18660   $as_echo "$as_me: failed program was:" >&5
18661 sed 's/^/| /' conftest.$ac_ext >&5
18662
18663
18664 fi
18665
18666 rm -f core conftest.err conftest.$ac_objext
18667          break
18668        done
18669        CC=$ac_save_CC
18670        rm -f conftest.$ac_ext
18671     fi
18672 fi
18673 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
18674 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
18675   if test "$ac_cv_sys_largefile_CC" != no; then
18676     CC=$CC$ac_cv_sys_largefile_CC
18677   fi
18678
18679   { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
18680 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
18681 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
18682   $as_echo_n "(cached) " >&6
18683 else
18684   while :; do
18685   cat >conftest.$ac_ext <<_ACEOF
18686 /* confdefs.h.  */
18687 _ACEOF
18688 cat confdefs.h >>conftest.$ac_ext
18689 cat >>conftest.$ac_ext <<_ACEOF
18690 /* end confdefs.h.  */
18691 #include <sys/types.h>
18692  /* Check that off_t can represent 2**63 - 1 correctly.
18693     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18694     since some C++ compilers masquerading as C compilers
18695     incorrectly reject 9223372036854775807.  */
18696 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18697   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18698                        && LARGE_OFF_T % 2147483647 == 1)
18699                       ? 1 : -1];
18700 int
18701 main ()
18702 {
18703
18704   ;
18705   return 0;
18706 }
18707 _ACEOF
18708 rm -f conftest.$ac_objext
18709 if { (ac_try="$ac_compile"
18710 case "(($ac_try" in
18711   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18712   *) ac_try_echo=$ac_try;;
18713 esac
18714 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18715 $as_echo "$ac_try_echo") >&5
18716   (eval "$ac_compile") 2>conftest.er1
18717   ac_status=$?
18718   grep -v '^ *+' conftest.er1 >conftest.err
18719   rm -f conftest.er1
18720   cat conftest.err >&5
18721   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18722   (exit $ac_status); } && {
18723          test -z "$ac_c_werror_flag" ||
18724          test ! -s conftest.err
18725        } && test -s conftest.$ac_objext; then
18726   ac_cv_sys_file_offset_bits=no; break
18727 else
18728   $as_echo "$as_me: failed program was:" >&5
18729 sed 's/^/| /' conftest.$ac_ext >&5
18730
18731
18732 fi
18733
18734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18735   cat >conftest.$ac_ext <<_ACEOF
18736 /* confdefs.h.  */
18737 _ACEOF
18738 cat confdefs.h >>conftest.$ac_ext
18739 cat >>conftest.$ac_ext <<_ACEOF
18740 /* end confdefs.h.  */
18741 #define _FILE_OFFSET_BITS 64
18742 #include <sys/types.h>
18743  /* Check that off_t can represent 2**63 - 1 correctly.
18744     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18745     since some C++ compilers masquerading as C compilers
18746     incorrectly reject 9223372036854775807.  */
18747 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18748   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18749                        && LARGE_OFF_T % 2147483647 == 1)
18750                       ? 1 : -1];
18751 int
18752 main ()
18753 {
18754
18755   ;
18756   return 0;
18757 }
18758 _ACEOF
18759 rm -f conftest.$ac_objext
18760 if { (ac_try="$ac_compile"
18761 case "(($ac_try" in
18762   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18763   *) ac_try_echo=$ac_try;;
18764 esac
18765 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18766 $as_echo "$ac_try_echo") >&5
18767   (eval "$ac_compile") 2>conftest.er1
18768   ac_status=$?
18769   grep -v '^ *+' conftest.er1 >conftest.err
18770   rm -f conftest.er1
18771   cat conftest.err >&5
18772   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18773   (exit $ac_status); } && {
18774          test -z "$ac_c_werror_flag" ||
18775          test ! -s conftest.err
18776        } && test -s conftest.$ac_objext; then
18777   ac_cv_sys_file_offset_bits=64; break
18778 else
18779   $as_echo "$as_me: failed program was:" >&5
18780 sed 's/^/| /' conftest.$ac_ext >&5
18781
18782
18783 fi
18784
18785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18786   ac_cv_sys_file_offset_bits=unknown
18787   break
18788 done
18789 fi
18790 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
18791 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
18792 case $ac_cv_sys_file_offset_bits in #(
18793   no | unknown) ;;
18794   *)
18795 cat >>confdefs.h <<_ACEOF
18796 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
18797 _ACEOF
18798 ;;
18799 esac
18800 rm -rf conftest*
18801   if test $ac_cv_sys_file_offset_bits = unknown; then
18802     { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
18803 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
18804 if test "${ac_cv_sys_large_files+set}" = set; then
18805   $as_echo_n "(cached) " >&6
18806 else
18807   while :; do
18808   cat >conftest.$ac_ext <<_ACEOF
18809 /* confdefs.h.  */
18810 _ACEOF
18811 cat confdefs.h >>conftest.$ac_ext
18812 cat >>conftest.$ac_ext <<_ACEOF
18813 /* end confdefs.h.  */
18814 #include <sys/types.h>
18815  /* Check that off_t can represent 2**63 - 1 correctly.
18816     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18817     since some C++ compilers masquerading as C compilers
18818     incorrectly reject 9223372036854775807.  */
18819 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18820   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18821                        && LARGE_OFF_T % 2147483647 == 1)
18822                       ? 1 : -1];
18823 int
18824 main ()
18825 {
18826
18827   ;
18828   return 0;
18829 }
18830 _ACEOF
18831 rm -f conftest.$ac_objext
18832 if { (ac_try="$ac_compile"
18833 case "(($ac_try" in
18834   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18835   *) ac_try_echo=$ac_try;;
18836 esac
18837 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18838 $as_echo "$ac_try_echo") >&5
18839   (eval "$ac_compile") 2>conftest.er1
18840   ac_status=$?
18841   grep -v '^ *+' conftest.er1 >conftest.err
18842   rm -f conftest.er1
18843   cat conftest.err >&5
18844   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18845   (exit $ac_status); } && {
18846          test -z "$ac_c_werror_flag" ||
18847          test ! -s conftest.err
18848        } && test -s conftest.$ac_objext; then
18849   ac_cv_sys_large_files=no; break
18850 else
18851   $as_echo "$as_me: failed program was:" >&5
18852 sed 's/^/| /' conftest.$ac_ext >&5
18853
18854
18855 fi
18856
18857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18858   cat >conftest.$ac_ext <<_ACEOF
18859 /* confdefs.h.  */
18860 _ACEOF
18861 cat confdefs.h >>conftest.$ac_ext
18862 cat >>conftest.$ac_ext <<_ACEOF
18863 /* end confdefs.h.  */
18864 #define _LARGE_FILES 1
18865 #include <sys/types.h>
18866  /* Check that off_t can represent 2**63 - 1 correctly.
18867     We can't simply define LARGE_OFF_T to be 9223372036854775807,
18868     since some C++ compilers masquerading as C compilers
18869     incorrectly reject 9223372036854775807.  */
18870 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
18871   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
18872                        && LARGE_OFF_T % 2147483647 == 1)
18873                       ? 1 : -1];
18874 int
18875 main ()
18876 {
18877
18878   ;
18879   return 0;
18880 }
18881 _ACEOF
18882 rm -f conftest.$ac_objext
18883 if { (ac_try="$ac_compile"
18884 case "(($ac_try" in
18885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18886   *) ac_try_echo=$ac_try;;
18887 esac
18888 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18889 $as_echo "$ac_try_echo") >&5
18890   (eval "$ac_compile") 2>conftest.er1
18891   ac_status=$?
18892   grep -v '^ *+' conftest.er1 >conftest.err
18893   rm -f conftest.er1
18894   cat conftest.err >&5
18895   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18896   (exit $ac_status); } && {
18897          test -z "$ac_c_werror_flag" ||
18898          test ! -s conftest.err
18899        } && test -s conftest.$ac_objext; then
18900   ac_cv_sys_large_files=1; break
18901 else
18902   $as_echo "$as_me: failed program was:" >&5
18903 sed 's/^/| /' conftest.$ac_ext >&5
18904
18905
18906 fi
18907
18908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18909   ac_cv_sys_large_files=unknown
18910   break
18911 done
18912 fi
18913 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
18914 $as_echo "$ac_cv_sys_large_files" >&6; }
18915 case $ac_cv_sys_large_files in #(
18916   no | unknown) ;;
18917   *)
18918 cat >>confdefs.h <<_ACEOF
18919 #define _LARGE_FILES $ac_cv_sys_large_files
18920 _ACEOF
18921 ;;
18922 esac
18923 rm -rf conftest*
18924   fi
18925 fi
18926
18927 fi
18928
18929 # Check for largefile support (must be after AC_SYS_LARGEFILE)
18930 # The cast to long int works around a bug in the HP C Compiler
18931 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18932 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18933 # This bug is HP SR number 8606223364.
18934 { $as_echo "$as_me:$LINENO: checking size of off_t" >&5
18935 $as_echo_n "checking size of off_t... " >&6; }
18936 if test "${ac_cv_sizeof_off_t+set}" = set; then
18937   $as_echo_n "(cached) " >&6
18938 else
18939   if test "$cross_compiling" = yes; then
18940   # Depending upon the size, compute the lo and hi bounds.
18941 cat >conftest.$ac_ext <<_ACEOF
18942 /* confdefs.h.  */
18943 _ACEOF
18944 cat confdefs.h >>conftest.$ac_ext
18945 cat >>conftest.$ac_ext <<_ACEOF
18946 /* end confdefs.h.  */
18947 $ac_includes_default
18948 int
18949 main ()
18950 {
18951 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= 0)];
18952 test_array [0] = 0
18953
18954   ;
18955   return 0;
18956 }
18957 _ACEOF
18958 rm -f conftest.$ac_objext
18959 if { (ac_try="$ac_compile"
18960 case "(($ac_try" in
18961   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18962   *) ac_try_echo=$ac_try;;
18963 esac
18964 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18965 $as_echo "$ac_try_echo") >&5
18966   (eval "$ac_compile") 2>conftest.er1
18967   ac_status=$?
18968   grep -v '^ *+' conftest.er1 >conftest.err
18969   rm -f conftest.er1
18970   cat conftest.err >&5
18971   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18972   (exit $ac_status); } && {
18973          test -z "$ac_c_werror_flag" ||
18974          test ! -s conftest.err
18975        } && test -s conftest.$ac_objext; then
18976   ac_lo=0 ac_mid=0
18977   while :; do
18978     cat >conftest.$ac_ext <<_ACEOF
18979 /* confdefs.h.  */
18980 _ACEOF
18981 cat confdefs.h >>conftest.$ac_ext
18982 cat >>conftest.$ac_ext <<_ACEOF
18983 /* end confdefs.h.  */
18984 $ac_includes_default
18985 int
18986 main ()
18987 {
18988 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
18989 test_array [0] = 0
18990
18991   ;
18992   return 0;
18993 }
18994 _ACEOF
18995 rm -f conftest.$ac_objext
18996 if { (ac_try="$ac_compile"
18997 case "(($ac_try" in
18998   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18999   *) ac_try_echo=$ac_try;;
19000 esac
19001 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19002 $as_echo "$ac_try_echo") >&5
19003   (eval "$ac_compile") 2>conftest.er1
19004   ac_status=$?
19005   grep -v '^ *+' conftest.er1 >conftest.err
19006   rm -f conftest.er1
19007   cat conftest.err >&5
19008   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19009   (exit $ac_status); } && {
19010          test -z "$ac_c_werror_flag" ||
19011          test ! -s conftest.err
19012        } && test -s conftest.$ac_objext; then
19013   ac_hi=$ac_mid; break
19014 else
19015   $as_echo "$as_me: failed program was:" >&5
19016 sed 's/^/| /' conftest.$ac_ext >&5
19017
19018         ac_lo=`expr $ac_mid + 1`
19019                         if test $ac_lo -le $ac_mid; then
19020                           ac_lo= ac_hi=
19021                           break
19022                         fi
19023                         ac_mid=`expr 2 '*' $ac_mid + 1`
19024 fi
19025
19026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19027   done
19028 else
19029   $as_echo "$as_me: failed program was:" >&5
19030 sed 's/^/| /' conftest.$ac_ext >&5
19031
19032         cat >conftest.$ac_ext <<_ACEOF
19033 /* confdefs.h.  */
19034 _ACEOF
19035 cat confdefs.h >>conftest.$ac_ext
19036 cat >>conftest.$ac_ext <<_ACEOF
19037 /* end confdefs.h.  */
19038 $ac_includes_default
19039 int
19040 main ()
19041 {
19042 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) < 0)];
19043 test_array [0] = 0
19044
19045   ;
19046   return 0;
19047 }
19048 _ACEOF
19049 rm -f conftest.$ac_objext
19050 if { (ac_try="$ac_compile"
19051 case "(($ac_try" in
19052   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19053   *) ac_try_echo=$ac_try;;
19054 esac
19055 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19056 $as_echo "$ac_try_echo") >&5
19057   (eval "$ac_compile") 2>conftest.er1
19058   ac_status=$?
19059   grep -v '^ *+' conftest.er1 >conftest.err
19060   rm -f conftest.er1
19061   cat conftest.err >&5
19062   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19063   (exit $ac_status); } && {
19064          test -z "$ac_c_werror_flag" ||
19065          test ! -s conftest.err
19066        } && test -s conftest.$ac_objext; then
19067   ac_hi=-1 ac_mid=-1
19068   while :; do
19069     cat >conftest.$ac_ext <<_ACEOF
19070 /* confdefs.h.  */
19071 _ACEOF
19072 cat confdefs.h >>conftest.$ac_ext
19073 cat >>conftest.$ac_ext <<_ACEOF
19074 /* end confdefs.h.  */
19075 $ac_includes_default
19076 int
19077 main ()
19078 {
19079 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $ac_mid)];
19080 test_array [0] = 0
19081
19082   ;
19083   return 0;
19084 }
19085 _ACEOF
19086 rm -f conftest.$ac_objext
19087 if { (ac_try="$ac_compile"
19088 case "(($ac_try" in
19089   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19090   *) ac_try_echo=$ac_try;;
19091 esac
19092 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19093 $as_echo "$ac_try_echo") >&5
19094   (eval "$ac_compile") 2>conftest.er1
19095   ac_status=$?
19096   grep -v '^ *+' conftest.er1 >conftest.err
19097   rm -f conftest.er1
19098   cat conftest.err >&5
19099   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19100   (exit $ac_status); } && {
19101          test -z "$ac_c_werror_flag" ||
19102          test ! -s conftest.err
19103        } && test -s conftest.$ac_objext; then
19104   ac_lo=$ac_mid; break
19105 else
19106   $as_echo "$as_me: failed program was:" >&5
19107 sed 's/^/| /' conftest.$ac_ext >&5
19108
19109         ac_hi=`expr '(' $ac_mid ')' - 1`
19110                         if test $ac_mid -le $ac_hi; then
19111                           ac_lo= ac_hi=
19112                           break
19113                         fi
19114                         ac_mid=`expr 2 '*' $ac_mid`
19115 fi
19116
19117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19118   done
19119 else
19120   $as_echo "$as_me: failed program was:" >&5
19121 sed 's/^/| /' conftest.$ac_ext >&5
19122
19123         ac_lo= ac_hi=
19124 fi
19125
19126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19127 fi
19128
19129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19130 # Binary search between lo and hi bounds.
19131 while test "x$ac_lo" != "x$ac_hi"; do
19132   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19133   cat >conftest.$ac_ext <<_ACEOF
19134 /* confdefs.h.  */
19135 _ACEOF
19136 cat confdefs.h >>conftest.$ac_ext
19137 cat >>conftest.$ac_ext <<_ACEOF
19138 /* end confdefs.h.  */
19139 $ac_includes_default
19140 int
19141 main ()
19142 {
19143 static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
19144 test_array [0] = 0
19145
19146   ;
19147   return 0;
19148 }
19149 _ACEOF
19150 rm -f conftest.$ac_objext
19151 if { (ac_try="$ac_compile"
19152 case "(($ac_try" in
19153   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19154   *) ac_try_echo=$ac_try;;
19155 esac
19156 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19157 $as_echo "$ac_try_echo") >&5
19158   (eval "$ac_compile") 2>conftest.er1
19159   ac_status=$?
19160   grep -v '^ *+' conftest.er1 >conftest.err
19161   rm -f conftest.er1
19162   cat conftest.err >&5
19163   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19164   (exit $ac_status); } && {
19165          test -z "$ac_c_werror_flag" ||
19166          test ! -s conftest.err
19167        } && test -s conftest.$ac_objext; then
19168   ac_hi=$ac_mid
19169 else
19170   $as_echo "$as_me: failed program was:" >&5
19171 sed 's/^/| /' conftest.$ac_ext >&5
19172
19173         ac_lo=`expr '(' $ac_mid ')' + 1`
19174 fi
19175
19176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19177 done
19178 case $ac_lo in
19179 ?*) ac_cv_sizeof_off_t=$ac_lo;;
19180 '') if test "$ac_cv_type_off_t" = yes; then
19181      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
19182 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19183 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
19184 See \`config.log' for more details." >&5
19185 $as_echo "$as_me: error: cannot compute sizeof (off_t)
19186 See \`config.log' for more details." >&2;}
19187    { (exit 77); exit 77; }; }; }
19188    else
19189      ac_cv_sizeof_off_t=0
19190    fi ;;
19191 esac
19192 else
19193   cat >conftest.$ac_ext <<_ACEOF
19194 /* confdefs.h.  */
19195 _ACEOF
19196 cat confdefs.h >>conftest.$ac_ext
19197 cat >>conftest.$ac_ext <<_ACEOF
19198 /* end confdefs.h.  */
19199 $ac_includes_default
19200 static long int longval () { return (long int) (sizeof (off_t)); }
19201 static unsigned long int ulongval () { return (long int) (sizeof (off_t)); }
19202 #include <stdio.h>
19203 #include <stdlib.h>
19204 int
19205 main ()
19206 {
19207
19208   FILE *f = fopen ("conftest.val", "w");
19209   if (! f)
19210     return 1;
19211   if (((long int) (sizeof (off_t))) < 0)
19212     {
19213       long int i = longval ();
19214       if (i != ((long int) (sizeof (off_t))))
19215         return 1;
19216       fprintf (f, "%ld", i);
19217     }
19218   else
19219     {
19220       unsigned long int i = ulongval ();
19221       if (i != ((long int) (sizeof (off_t))))
19222         return 1;
19223       fprintf (f, "%lu", i);
19224     }
19225   /* Do not output a trailing newline, as this causes \r\n confusion
19226      on some platforms.  */
19227   return ferror (f) || fclose (f) != 0;
19228
19229   ;
19230   return 0;
19231 }
19232 _ACEOF
19233 rm -f 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>&5
19242   ac_status=$?
19243   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19244   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19245   { (case "(($ac_try" in
19246   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19247   *) ac_try_echo=$ac_try;;
19248 esac
19249 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19250 $as_echo "$ac_try_echo") >&5
19251   (eval "$ac_try") 2>&5
19252   ac_status=$?
19253   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19254   (exit $ac_status); }; }; then
19255   ac_cv_sizeof_off_t=`cat conftest.val`
19256 else
19257   $as_echo "$as_me: program exited with status $ac_status" >&5
19258 $as_echo "$as_me: failed program was:" >&5
19259 sed 's/^/| /' conftest.$ac_ext >&5
19260
19261 ( exit $ac_status )
19262 if test "$ac_cv_type_off_t" = yes; then
19263      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
19264 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19265 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
19266 See \`config.log' for more details." >&5
19267 $as_echo "$as_me: error: cannot compute sizeof (off_t)
19268 See \`config.log' for more details." >&2;}
19269    { (exit 77); exit 77; }; }; }
19270    else
19271      ac_cv_sizeof_off_t=0
19272    fi
19273 fi
19274 rm -rf conftest.dSYM
19275 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19276 fi
19277 rm -f conftest.val
19278 fi
19279 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
19280 $as_echo "$ac_cv_sizeof_off_t" >&6; }
19281
19282
19283
19284 cat >>confdefs.h <<_ACEOF
19285 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
19286 _ACEOF
19287
19288
19289
19290 # If we don't have largefile support, can't handle segsize >= 2GB.
19291 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
19292    { { $as_echo "$as_me:$LINENO: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&5
19293 $as_echo "$as_me: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&2;}
19294    { (exit 1); exit 1; }; }
19295 fi
19296
19297
19298 ##
19299 ## Functions, global variables
19300 ##
19301
19302 { $as_echo "$as_me:$LINENO: checking for int timezone" >&5
19303 $as_echo_n "checking for int timezone... " >&6; }
19304 if test "${pgac_cv_var_int_timezone+set}" = set; then
19305   $as_echo_n "(cached) " >&6
19306 else
19307   cat >conftest.$ac_ext <<_ACEOF
19308 /* confdefs.h.  */
19309 _ACEOF
19310 cat confdefs.h >>conftest.$ac_ext
19311 cat >>conftest.$ac_ext <<_ACEOF
19312 /* end confdefs.h.  */
19313 #include <time.h>
19314 int res;
19315 int
19316 main ()
19317 {
19318 #ifndef __CYGWIN__
19319 res = timezone / 60;
19320 #else
19321 res = _timezone / 60;
19322 #endif
19323   ;
19324   return 0;
19325 }
19326 _ACEOF
19327 rm -f conftest.$ac_objext conftest$ac_exeext
19328 if { (ac_try="$ac_link"
19329 case "(($ac_try" in
19330   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19331   *) ac_try_echo=$ac_try;;
19332 esac
19333 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19334 $as_echo "$ac_try_echo") >&5
19335   (eval "$ac_link") 2>conftest.er1
19336   ac_status=$?
19337   grep -v '^ *+' conftest.er1 >conftest.err
19338   rm -f conftest.er1
19339   cat conftest.err >&5
19340   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19341   (exit $ac_status); } && {
19342          test -z "$ac_c_werror_flag" ||
19343          test ! -s conftest.err
19344        } && test -s conftest$ac_exeext && {
19345          test "$cross_compiling" = yes ||
19346          $as_test_x conftest$ac_exeext
19347        }; then
19348   pgac_cv_var_int_timezone=yes
19349 else
19350   $as_echo "$as_me: failed program was:" >&5
19351 sed 's/^/| /' conftest.$ac_ext >&5
19352
19353         pgac_cv_var_int_timezone=no
19354 fi
19355
19356 rm -rf conftest.dSYM
19357 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19358       conftest$ac_exeext conftest.$ac_ext
19359 fi
19360 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
19361 $as_echo "$pgac_cv_var_int_timezone" >&6; }
19362 if test x"$pgac_cv_var_int_timezone" = xyes ; then
19363
19364 cat >>confdefs.h <<\_ACEOF
19365 #define HAVE_INT_TIMEZONE /**/
19366 _ACEOF
19367
19368 fi
19369 { $as_echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
19370 $as_echo_n "checking types of arguments for accept()... " >&6; }
19371  if test "${ac_cv_func_accept_return+set}" = set; then
19372   $as_echo_n "(cached) " >&6
19373 else
19374    if test "${ac_cv_func_accept_arg1+set}" = set; then
19375   $as_echo_n "(cached) " >&6
19376 else
19377     if test "${ac_cv_func_accept_arg2+set}" = set; then
19378   $as_echo_n "(cached) " >&6
19379 else
19380      if test "${ac_cv_func_accept_arg3+set}" = set; then
19381   $as_echo_n "(cached) " >&6
19382 else
19383       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
19384       for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
19385        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
19386         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
19387          cat >conftest.$ac_ext <<_ACEOF
19388 /* confdefs.h.  */
19389 _ACEOF
19390 cat confdefs.h >>conftest.$ac_ext
19391 cat >>conftest.$ac_ext <<_ACEOF
19392 /* end confdefs.h.  */
19393 #ifdef HAVE_SYS_TYPES_H
19394 #include <sys/types.h>
19395 #endif
19396 #ifdef HAVE_SYS_SOCKET_H
19397 #include <sys/socket.h>
19398 #endif
19399 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
19400 int
19401 main ()
19402 {
19403
19404   ;
19405   return 0;
19406 }
19407 _ACEOF
19408 rm -f conftest.$ac_objext
19409 if { (ac_try="$ac_compile"
19410 case "(($ac_try" in
19411   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19412   *) ac_try_echo=$ac_try;;
19413 esac
19414 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19415 $as_echo "$ac_try_echo") >&5
19416   (eval "$ac_compile") 2>conftest.er1
19417   ac_status=$?
19418   grep -v '^ *+' conftest.er1 >conftest.err
19419   rm -f conftest.er1
19420   cat conftest.err >&5
19421   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19422   (exit $ac_status); } && {
19423          test -z "$ac_c_werror_flag" ||
19424          test ! -s conftest.err
19425        } && test -s conftest.$ac_objext; then
19426   ac_not_found=no; break 4
19427 else
19428   $as_echo "$as_me: failed program was:" >&5
19429 sed 's/^/| /' conftest.$ac_ext >&5
19430
19431         ac_not_found=yes
19432 fi
19433
19434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19435        done
19436       done
19437      done
19438     done
19439     if test "$ac_not_found" = yes; then
19440       { { $as_echo "$as_me:$LINENO: error: could not determine argument types" >&5
19441 $as_echo "$as_me: error: could not determine argument types" >&2;}
19442    { (exit 1); exit 1; }; }
19443     fi
19444     if test "$ac_cv_func_accept_arg3" = "void"; then
19445       ac_cv_func_accept_arg3=int
19446     fi
19447
19448 fi
19449
19450 fi
19451
19452 fi
19453
19454 fi
19455  { $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
19456 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
19457
19458 cat >>confdefs.h <<_ACEOF
19459 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
19460 _ACEOF
19461
19462
19463 cat >>confdefs.h <<_ACEOF
19464 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
19465 _ACEOF
19466
19467
19468 cat >>confdefs.h <<_ACEOF
19469 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
19470 _ACEOF
19471
19472
19473 cat >>confdefs.h <<_ACEOF
19474 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
19475 _ACEOF
19476
19477
19478 { $as_echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
19479 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
19480 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
19481   $as_echo_n "(cached) " >&6
19482 else
19483   cat >conftest.$ac_ext <<_ACEOF
19484 /* confdefs.h.  */
19485 _ACEOF
19486 cat confdefs.h >>conftest.$ac_ext
19487 cat >>conftest.$ac_ext <<_ACEOF
19488 /* end confdefs.h.  */
19489 #include <sys/time.h>
19490 int
19491 main ()
19492 {
19493 struct timeval *tp;
19494 struct timezone *tzp;
19495 gettimeofday(tp,tzp);
19496   ;
19497   return 0;
19498 }
19499 _ACEOF
19500 rm -f conftest.$ac_objext
19501 if { (ac_try="$ac_compile"
19502 case "(($ac_try" in
19503   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19504   *) ac_try_echo=$ac_try;;
19505 esac
19506 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19507 $as_echo "$ac_try_echo") >&5
19508   (eval "$ac_compile") 2>conftest.er1
19509   ac_status=$?
19510   grep -v '^ *+' conftest.er1 >conftest.err
19511   rm -f conftest.er1
19512   cat conftest.err >&5
19513   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19514   (exit $ac_status); } && {
19515          test -z "$ac_c_werror_flag" ||
19516          test ! -s conftest.err
19517        } && test -s conftest.$ac_objext; then
19518   pgac_cv_func_gettimeofday_1arg=no
19519 else
19520   $as_echo "$as_me: failed program was:" >&5
19521 sed 's/^/| /' conftest.$ac_ext >&5
19522
19523         pgac_cv_func_gettimeofday_1arg=yes
19524 fi
19525
19526 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19527 fi
19528 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
19529 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
19530 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
19531
19532 cat >>confdefs.h <<\_ACEOF
19533 #define GETTIMEOFDAY_1ARG /**/
19534 _ACEOF
19535
19536 fi
19537
19538
19539
19540 # Some versions of libedit contain strlcpy(), setproctitle(), and other
19541 # symbols that that library has no business exposing to the world.  Pending
19542 # acquisition of a clue by those developers, ignore libedit (including its
19543 # possible alias of libreadline) while checking for everything else.
19544 LIBS_including_readline="$LIBS"
19545 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568 for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat readlink setproctitle setsid sigprocmask symlink sync_file_range towlower utime utimes wcstombs wcstombs_l
19569 do
19570 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19571 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19572 $as_echo_n "checking for $ac_func... " >&6; }
19573 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19574   $as_echo_n "(cached) " >&6
19575 else
19576   cat >conftest.$ac_ext <<_ACEOF
19577 /* confdefs.h.  */
19578 _ACEOF
19579 cat confdefs.h >>conftest.$ac_ext
19580 cat >>conftest.$ac_ext <<_ACEOF
19581 /* end confdefs.h.  */
19582 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19583    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19584 #define $ac_func innocuous_$ac_func
19585
19586 /* System header to define __stub macros and hopefully few prototypes,
19587     which can conflict with char $ac_func (); below.
19588     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19589     <limits.h> exists even on freestanding compilers.  */
19590
19591 #ifdef __STDC__
19592 # include <limits.h>
19593 #else
19594 # include <assert.h>
19595 #endif
19596
19597 #undef $ac_func
19598
19599 /* Override any GCC internal prototype to avoid an error.
19600    Use char because int might match the return type of a GCC
19601    builtin and then its argument prototype would still apply.  */
19602 #ifdef __cplusplus
19603 extern "C"
19604 #endif
19605 char $ac_func ();
19606 /* The GNU C library defines this for functions which it implements
19607     to always fail with ENOSYS.  Some functions are actually named
19608     something starting with __ and the normal name is an alias.  */
19609 #if defined __stub_$ac_func || defined __stub___$ac_func
19610 choke me
19611 #endif
19612
19613 int
19614 main ()
19615 {
19616 return $ac_func ();
19617   ;
19618   return 0;
19619 }
19620 _ACEOF
19621 rm -f conftest.$ac_objext conftest$ac_exeext
19622 if { (ac_try="$ac_link"
19623 case "(($ac_try" in
19624   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19625   *) ac_try_echo=$ac_try;;
19626 esac
19627 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19628 $as_echo "$ac_try_echo") >&5
19629   (eval "$ac_link") 2>conftest.er1
19630   ac_status=$?
19631   grep -v '^ *+' conftest.er1 >conftest.err
19632   rm -f conftest.er1
19633   cat conftest.err >&5
19634   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19635   (exit $ac_status); } && {
19636          test -z "$ac_c_werror_flag" ||
19637          test ! -s conftest.err
19638        } && test -s conftest$ac_exeext && {
19639          test "$cross_compiling" = yes ||
19640          $as_test_x conftest$ac_exeext
19641        }; then
19642   eval "$as_ac_var=yes"
19643 else
19644   $as_echo "$as_me: failed program was:" >&5
19645 sed 's/^/| /' conftest.$ac_ext >&5
19646
19647         eval "$as_ac_var=no"
19648 fi
19649
19650 rm -rf conftest.dSYM
19651 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19652       conftest$ac_exeext conftest.$ac_ext
19653 fi
19654 ac_res=`eval 'as_val=${'$as_ac_var'}
19655                  $as_echo "$as_val"'`
19656                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19657 $as_echo "$ac_res" >&6; }
19658 as_val=`eval 'as_val=${'$as_ac_var'}
19659                  $as_echo "$as_val"'`
19660    if test "x$as_val" = x""yes; then
19661   cat >>confdefs.h <<_ACEOF
19662 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19663 _ACEOF
19664
19665 fi
19666 done
19667
19668
19669
19670 for ac_func in fseeko
19671 do
19672 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19673 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19674 $as_echo_n "checking for $ac_func... " >&6; }
19675 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19676   $as_echo_n "(cached) " >&6
19677 else
19678   cat >conftest.$ac_ext <<_ACEOF
19679 /* confdefs.h.  */
19680 _ACEOF
19681 cat confdefs.h >>conftest.$ac_ext
19682 cat >>conftest.$ac_ext <<_ACEOF
19683 /* end confdefs.h.  */
19684 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19685    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19686 #define $ac_func innocuous_$ac_func
19687
19688 /* System header to define __stub macros and hopefully few prototypes,
19689     which can conflict with char $ac_func (); below.
19690     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19691     <limits.h> exists even on freestanding compilers.  */
19692
19693 #ifdef __STDC__
19694 # include <limits.h>
19695 #else
19696 # include <assert.h>
19697 #endif
19698
19699 #undef $ac_func
19700
19701 /* Override any GCC internal prototype to avoid an error.
19702    Use char because int might match the return type of a GCC
19703    builtin and then its argument prototype would still apply.  */
19704 #ifdef __cplusplus
19705 extern "C"
19706 #endif
19707 char $ac_func ();
19708 /* The GNU C library defines this for functions which it implements
19709     to always fail with ENOSYS.  Some functions are actually named
19710     something starting with __ and the normal name is an alias.  */
19711 #if defined __stub_$ac_func || defined __stub___$ac_func
19712 choke me
19713 #endif
19714
19715 int
19716 main ()
19717 {
19718 return $ac_func ();
19719   ;
19720   return 0;
19721 }
19722 _ACEOF
19723 rm -f conftest.$ac_objext conftest$ac_exeext
19724 if { (ac_try="$ac_link"
19725 case "(($ac_try" in
19726   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19727   *) ac_try_echo=$ac_try;;
19728 esac
19729 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19730 $as_echo "$ac_try_echo") >&5
19731   (eval "$ac_link") 2>conftest.er1
19732   ac_status=$?
19733   grep -v '^ *+' conftest.er1 >conftest.err
19734   rm -f conftest.er1
19735   cat conftest.err >&5
19736   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19737   (exit $ac_status); } && {
19738          test -z "$ac_c_werror_flag" ||
19739          test ! -s conftest.err
19740        } && test -s conftest$ac_exeext && {
19741          test "$cross_compiling" = yes ||
19742          $as_test_x conftest$ac_exeext
19743        }; then
19744   eval "$as_ac_var=yes"
19745 else
19746   $as_echo "$as_me: failed program was:" >&5
19747 sed 's/^/| /' conftest.$ac_ext >&5
19748
19749         eval "$as_ac_var=no"
19750 fi
19751
19752 rm -rf conftest.dSYM
19753 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19754       conftest$ac_exeext conftest.$ac_ext
19755 fi
19756 ac_res=`eval 'as_val=${'$as_ac_var'}
19757                  $as_echo "$as_val"'`
19758                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19759 $as_echo "$ac_res" >&6; }
19760 as_val=`eval 'as_val=${'$as_ac_var'}
19761                  $as_echo "$as_val"'`
19762    if test "x$as_val" = x""yes; then
19763   cat >>confdefs.h <<_ACEOF
19764 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19765 _ACEOF
19766
19767 else
19768   case " $LIBOBJS " in
19769   *" $ac_func.$ac_objext "* ) ;;
19770   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19771  ;;
19772 esac
19773
19774 fi
19775 done
19776
19777
19778 case $host_os in
19779         # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
19780         # Mingw uses macros to access Win32 API calls
19781         netbsd*|mingw*)
19782
19783 cat >>confdefs.h <<\_ACEOF
19784 #define HAVE_FSEEKO 1
19785 _ACEOF
19786
19787                 ac_cv_func_fseeko=yes;;
19788         *)
19789                 { $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
19790 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
19791 if test "${ac_cv_sys_largefile_source+set}" = set; then
19792   $as_echo_n "(cached) " >&6
19793 else
19794   while :; do
19795   cat >conftest.$ac_ext <<_ACEOF
19796 /* confdefs.h.  */
19797 _ACEOF
19798 cat confdefs.h >>conftest.$ac_ext
19799 cat >>conftest.$ac_ext <<_ACEOF
19800 /* end confdefs.h.  */
19801 #include <sys/types.h> /* for off_t */
19802      #include <stdio.h>
19803 int
19804 main ()
19805 {
19806 int (*fp) (FILE *, off_t, int) = fseeko;
19807      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
19808   ;
19809   return 0;
19810 }
19811 _ACEOF
19812 rm -f conftest.$ac_objext conftest$ac_exeext
19813 if { (ac_try="$ac_link"
19814 case "(($ac_try" in
19815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19816   *) ac_try_echo=$ac_try;;
19817 esac
19818 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19819 $as_echo "$ac_try_echo") >&5
19820   (eval "$ac_link") 2>conftest.er1
19821   ac_status=$?
19822   grep -v '^ *+' conftest.er1 >conftest.err
19823   rm -f conftest.er1
19824   cat conftest.err >&5
19825   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19826   (exit $ac_status); } && {
19827          test -z "$ac_c_werror_flag" ||
19828          test ! -s conftest.err
19829        } && test -s conftest$ac_exeext && {
19830          test "$cross_compiling" = yes ||
19831          $as_test_x conftest$ac_exeext
19832        }; then
19833   ac_cv_sys_largefile_source=no; break
19834 else
19835   $as_echo "$as_me: failed program was:" >&5
19836 sed 's/^/| /' conftest.$ac_ext >&5
19837
19838
19839 fi
19840
19841 rm -rf conftest.dSYM
19842 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19843       conftest$ac_exeext conftest.$ac_ext
19844   cat >conftest.$ac_ext <<_ACEOF
19845 /* confdefs.h.  */
19846 _ACEOF
19847 cat confdefs.h >>conftest.$ac_ext
19848 cat >>conftest.$ac_ext <<_ACEOF
19849 /* end confdefs.h.  */
19850 #define _LARGEFILE_SOURCE 1
19851 #include <sys/types.h> /* for off_t */
19852      #include <stdio.h>
19853 int
19854 main ()
19855 {
19856 int (*fp) (FILE *, off_t, int) = fseeko;
19857      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
19858   ;
19859   return 0;
19860 }
19861 _ACEOF
19862 rm -f conftest.$ac_objext conftest$ac_exeext
19863 if { (ac_try="$ac_link"
19864 case "(($ac_try" in
19865   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19866   *) ac_try_echo=$ac_try;;
19867 esac
19868 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19869 $as_echo "$ac_try_echo") >&5
19870   (eval "$ac_link") 2>conftest.er1
19871   ac_status=$?
19872   grep -v '^ *+' conftest.er1 >conftest.err
19873   rm -f conftest.er1
19874   cat conftest.err >&5
19875   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19876   (exit $ac_status); } && {
19877          test -z "$ac_c_werror_flag" ||
19878          test ! -s conftest.err
19879        } && test -s conftest$ac_exeext && {
19880          test "$cross_compiling" = yes ||
19881          $as_test_x conftest$ac_exeext
19882        }; then
19883   ac_cv_sys_largefile_source=1; break
19884 else
19885   $as_echo "$as_me: failed program was:" >&5
19886 sed 's/^/| /' conftest.$ac_ext >&5
19887
19888
19889 fi
19890
19891 rm -rf conftest.dSYM
19892 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19893       conftest$ac_exeext conftest.$ac_ext
19894   ac_cv_sys_largefile_source=unknown
19895   break
19896 done
19897 fi
19898 { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
19899 $as_echo "$ac_cv_sys_largefile_source" >&6; }
19900 case $ac_cv_sys_largefile_source in #(
19901   no | unknown) ;;
19902   *)
19903 cat >>confdefs.h <<_ACEOF
19904 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
19905 _ACEOF
19906 ;;
19907 esac
19908 rm -rf conftest*
19909
19910 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
19911 # in glibc 2.1.3, but that breaks too many other things.
19912 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
19913 if test $ac_cv_sys_largefile_source != unknown; then
19914
19915 cat >>confdefs.h <<\_ACEOF
19916 #define HAVE_FSEEKO 1
19917 _ACEOF
19918
19919 fi
19920 ;;
19921 esac
19922
19923 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
19924 # by calling it, 2009-04-02
19925 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
19926 if test "$PORTNAME" != "solaris"; then
19927
19928 for ac_func in posix_fadvise
19929 do
19930 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19931 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19932 $as_echo_n "checking for $ac_func... " >&6; }
19933 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19934   $as_echo_n "(cached) " >&6
19935 else
19936   cat >conftest.$ac_ext <<_ACEOF
19937 /* confdefs.h.  */
19938 _ACEOF
19939 cat confdefs.h >>conftest.$ac_ext
19940 cat >>conftest.$ac_ext <<_ACEOF
19941 /* end confdefs.h.  */
19942 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19943    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19944 #define $ac_func innocuous_$ac_func
19945
19946 /* System header to define __stub macros and hopefully few prototypes,
19947     which can conflict with char $ac_func (); below.
19948     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19949     <limits.h> exists even on freestanding compilers.  */
19950
19951 #ifdef __STDC__
19952 # include <limits.h>
19953 #else
19954 # include <assert.h>
19955 #endif
19956
19957 #undef $ac_func
19958
19959 /* Override any GCC internal prototype to avoid an error.
19960    Use char because int might match the return type of a GCC
19961    builtin and then its argument prototype would still apply.  */
19962 #ifdef __cplusplus
19963 extern "C"
19964 #endif
19965 char $ac_func ();
19966 /* The GNU C library defines this for functions which it implements
19967     to always fail with ENOSYS.  Some functions are actually named
19968     something starting with __ and the normal name is an alias.  */
19969 #if defined __stub_$ac_func || defined __stub___$ac_func
19970 choke me
19971 #endif
19972
19973 int
19974 main ()
19975 {
19976 return $ac_func ();
19977   ;
19978   return 0;
19979 }
19980 _ACEOF
19981 rm -f conftest.$ac_objext conftest$ac_exeext
19982 if { (ac_try="$ac_link"
19983 case "(($ac_try" in
19984   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19985   *) ac_try_echo=$ac_try;;
19986 esac
19987 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19988 $as_echo "$ac_try_echo") >&5
19989   (eval "$ac_link") 2>conftest.er1
19990   ac_status=$?
19991   grep -v '^ *+' conftest.er1 >conftest.err
19992   rm -f conftest.er1
19993   cat conftest.err >&5
19994   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19995   (exit $ac_status); } && {
19996          test -z "$ac_c_werror_flag" ||
19997          test ! -s conftest.err
19998        } && test -s conftest$ac_exeext && {
19999          test "$cross_compiling" = yes ||
20000          $as_test_x conftest$ac_exeext
20001        }; then
20002   eval "$as_ac_var=yes"
20003 else
20004   $as_echo "$as_me: failed program was:" >&5
20005 sed 's/^/| /' conftest.$ac_ext >&5
20006
20007         eval "$as_ac_var=no"
20008 fi
20009
20010 rm -rf conftest.dSYM
20011 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20012       conftest$ac_exeext conftest.$ac_ext
20013 fi
20014 ac_res=`eval 'as_val=${'$as_ac_var'}
20015                  $as_echo "$as_val"'`
20016                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20017 $as_echo "$ac_res" >&6; }
20018 as_val=`eval 'as_val=${'$as_ac_var'}
20019                  $as_echo "$as_val"'`
20020    if test "x$as_val" = x""yes; then
20021   cat >>confdefs.h <<_ACEOF
20022 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20023 _ACEOF
20024
20025 fi
20026 done
20027
20028 { $as_echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
20029 $as_echo_n "checking whether posix_fadvise is declared... " >&6; }
20030 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
20031   $as_echo_n "(cached) " >&6
20032 else
20033   cat >conftest.$ac_ext <<_ACEOF
20034 /* confdefs.h.  */
20035 _ACEOF
20036 cat confdefs.h >>conftest.$ac_ext
20037 cat >>conftest.$ac_ext <<_ACEOF
20038 /* end confdefs.h.  */
20039 #include <fcntl.h>
20040
20041 int
20042 main ()
20043 {
20044 #ifndef posix_fadvise
20045   (void) posix_fadvise;
20046 #endif
20047
20048   ;
20049   return 0;
20050 }
20051 _ACEOF
20052 rm -f conftest.$ac_objext
20053 if { (ac_try="$ac_compile"
20054 case "(($ac_try" in
20055   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20056   *) ac_try_echo=$ac_try;;
20057 esac
20058 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20059 $as_echo "$ac_try_echo") >&5
20060   (eval "$ac_compile") 2>conftest.er1
20061   ac_status=$?
20062   grep -v '^ *+' conftest.er1 >conftest.err
20063   rm -f conftest.er1
20064   cat conftest.err >&5
20065   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20066   (exit $ac_status); } && {
20067          test -z "$ac_c_werror_flag" ||
20068          test ! -s conftest.err
20069        } && test -s conftest.$ac_objext; then
20070   ac_cv_have_decl_posix_fadvise=yes
20071 else
20072   $as_echo "$as_me: failed program was:" >&5
20073 sed 's/^/| /' conftest.$ac_ext >&5
20074
20075         ac_cv_have_decl_posix_fadvise=no
20076 fi
20077
20078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20079 fi
20080 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
20081 $as_echo "$ac_cv_have_decl_posix_fadvise" >&6; }
20082 if test "x$ac_cv_have_decl_posix_fadvise" = x""yes; then
20083
20084 cat >>confdefs.h <<_ACEOF
20085 #define HAVE_DECL_POSIX_FADVISE 1
20086 _ACEOF
20087
20088
20089 else
20090   cat >>confdefs.h <<_ACEOF
20091 #define HAVE_DECL_POSIX_FADVISE 0
20092 _ACEOF
20093
20094
20095 fi
20096
20097
20098 fi
20099
20100 { $as_echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
20101 $as_echo_n "checking whether fdatasync is declared... " >&6; }
20102 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
20103   $as_echo_n "(cached) " >&6
20104 else
20105   cat >conftest.$ac_ext <<_ACEOF
20106 /* confdefs.h.  */
20107 _ACEOF
20108 cat confdefs.h >>conftest.$ac_ext
20109 cat >>conftest.$ac_ext <<_ACEOF
20110 /* end confdefs.h.  */
20111 #include <unistd.h>
20112
20113 int
20114 main ()
20115 {
20116 #ifndef fdatasync
20117   (void) fdatasync;
20118 #endif
20119
20120   ;
20121   return 0;
20122 }
20123 _ACEOF
20124 rm -f conftest.$ac_objext
20125 if { (ac_try="$ac_compile"
20126 case "(($ac_try" in
20127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20128   *) ac_try_echo=$ac_try;;
20129 esac
20130 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20131 $as_echo "$ac_try_echo") >&5
20132   (eval "$ac_compile") 2>conftest.er1
20133   ac_status=$?
20134   grep -v '^ *+' conftest.er1 >conftest.err
20135   rm -f conftest.er1
20136   cat conftest.err >&5
20137   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20138   (exit $ac_status); } && {
20139          test -z "$ac_c_werror_flag" ||
20140          test ! -s conftest.err
20141        } && test -s conftest.$ac_objext; then
20142   ac_cv_have_decl_fdatasync=yes
20143 else
20144   $as_echo "$as_me: failed program was:" >&5
20145 sed 's/^/| /' conftest.$ac_ext >&5
20146
20147         ac_cv_have_decl_fdatasync=no
20148 fi
20149
20150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20151 fi
20152 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
20153 $as_echo "$ac_cv_have_decl_fdatasync" >&6; }
20154 if test "x$ac_cv_have_decl_fdatasync" = x""yes; then
20155
20156 cat >>confdefs.h <<_ACEOF
20157 #define HAVE_DECL_FDATASYNC 1
20158 _ACEOF
20159
20160
20161 else
20162   cat >>confdefs.h <<_ACEOF
20163 #define HAVE_DECL_FDATASYNC 0
20164 _ACEOF
20165
20166
20167 fi
20168
20169
20170 { $as_echo "$as_me:$LINENO: checking whether strlcat is declared" >&5
20171 $as_echo_n "checking whether strlcat is declared... " >&6; }
20172 if test "${ac_cv_have_decl_strlcat+set}" = set; then
20173   $as_echo_n "(cached) " >&6
20174 else
20175   cat >conftest.$ac_ext <<_ACEOF
20176 /* confdefs.h.  */
20177 _ACEOF
20178 cat confdefs.h >>conftest.$ac_ext
20179 cat >>conftest.$ac_ext <<_ACEOF
20180 /* end confdefs.h.  */
20181 $ac_includes_default
20182 int
20183 main ()
20184 {
20185 #ifndef strlcat
20186   (void) strlcat;
20187 #endif
20188
20189   ;
20190   return 0;
20191 }
20192 _ACEOF
20193 rm -f conftest.$ac_objext
20194 if { (ac_try="$ac_compile"
20195 case "(($ac_try" in
20196   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20197   *) ac_try_echo=$ac_try;;
20198 esac
20199 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20200 $as_echo "$ac_try_echo") >&5
20201   (eval "$ac_compile") 2>conftest.er1
20202   ac_status=$?
20203   grep -v '^ *+' conftest.er1 >conftest.err
20204   rm -f conftest.er1
20205   cat conftest.err >&5
20206   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20207   (exit $ac_status); } && {
20208          test -z "$ac_c_werror_flag" ||
20209          test ! -s conftest.err
20210        } && test -s conftest.$ac_objext; then
20211   ac_cv_have_decl_strlcat=yes
20212 else
20213   $as_echo "$as_me: failed program was:" >&5
20214 sed 's/^/| /' conftest.$ac_ext >&5
20215
20216         ac_cv_have_decl_strlcat=no
20217 fi
20218
20219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20220 fi
20221 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcat" >&5
20222 $as_echo "$ac_cv_have_decl_strlcat" >&6; }
20223 if test "x$ac_cv_have_decl_strlcat" = x""yes; then
20224
20225 cat >>confdefs.h <<_ACEOF
20226 #define HAVE_DECL_STRLCAT 1
20227 _ACEOF
20228
20229
20230 else
20231   cat >>confdefs.h <<_ACEOF
20232 #define HAVE_DECL_STRLCAT 0
20233 _ACEOF
20234
20235
20236 fi
20237 { $as_echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
20238 $as_echo_n "checking whether strlcpy is declared... " >&6; }
20239 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
20240   $as_echo_n "(cached) " >&6
20241 else
20242   cat >conftest.$ac_ext <<_ACEOF
20243 /* confdefs.h.  */
20244 _ACEOF
20245 cat confdefs.h >>conftest.$ac_ext
20246 cat >>conftest.$ac_ext <<_ACEOF
20247 /* end confdefs.h.  */
20248 $ac_includes_default
20249 int
20250 main ()
20251 {
20252 #ifndef strlcpy
20253   (void) strlcpy;
20254 #endif
20255
20256   ;
20257   return 0;
20258 }
20259 _ACEOF
20260 rm -f conftest.$ac_objext
20261 if { (ac_try="$ac_compile"
20262 case "(($ac_try" in
20263   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20264   *) ac_try_echo=$ac_try;;
20265 esac
20266 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20267 $as_echo "$ac_try_echo") >&5
20268   (eval "$ac_compile") 2>conftest.er1
20269   ac_status=$?
20270   grep -v '^ *+' conftest.er1 >conftest.err
20271   rm -f conftest.er1
20272   cat conftest.err >&5
20273   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20274   (exit $ac_status); } && {
20275          test -z "$ac_c_werror_flag" ||
20276          test ! -s conftest.err
20277        } && test -s conftest.$ac_objext; then
20278   ac_cv_have_decl_strlcpy=yes
20279 else
20280   $as_echo "$as_me: failed program was:" >&5
20281 sed 's/^/| /' conftest.$ac_ext >&5
20282
20283         ac_cv_have_decl_strlcpy=no
20284 fi
20285
20286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20287 fi
20288 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
20289 $as_echo "$ac_cv_have_decl_strlcpy" >&6; }
20290 if test "x$ac_cv_have_decl_strlcpy" = x""yes; then
20291
20292 cat >>confdefs.h <<_ACEOF
20293 #define HAVE_DECL_STRLCPY 1
20294 _ACEOF
20295
20296
20297 else
20298   cat >>confdefs.h <<_ACEOF
20299 #define HAVE_DECL_STRLCPY 0
20300 _ACEOF
20301
20302
20303 fi
20304
20305
20306 # This is probably only present on Darwin, but may as well check always
20307 { $as_echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
20308 $as_echo_n "checking whether F_FULLFSYNC is declared... " >&6; }
20309 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
20310   $as_echo_n "(cached) " >&6
20311 else
20312   cat >conftest.$ac_ext <<_ACEOF
20313 /* confdefs.h.  */
20314 _ACEOF
20315 cat confdefs.h >>conftest.$ac_ext
20316 cat >>conftest.$ac_ext <<_ACEOF
20317 /* end confdefs.h.  */
20318 #include <fcntl.h>
20319
20320 int
20321 main ()
20322 {
20323 #ifndef F_FULLFSYNC
20324   (void) F_FULLFSYNC;
20325 #endif
20326
20327   ;
20328   return 0;
20329 }
20330 _ACEOF
20331 rm -f conftest.$ac_objext
20332 if { (ac_try="$ac_compile"
20333 case "(($ac_try" in
20334   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20335   *) ac_try_echo=$ac_try;;
20336 esac
20337 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20338 $as_echo "$ac_try_echo") >&5
20339   (eval "$ac_compile") 2>conftest.er1
20340   ac_status=$?
20341   grep -v '^ *+' conftest.er1 >conftest.err
20342   rm -f conftest.er1
20343   cat conftest.err >&5
20344   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20345   (exit $ac_status); } && {
20346          test -z "$ac_c_werror_flag" ||
20347          test ! -s conftest.err
20348        } && test -s conftest.$ac_objext; then
20349   ac_cv_have_decl_F_FULLFSYNC=yes
20350 else
20351   $as_echo "$as_me: failed program was:" >&5
20352 sed 's/^/| /' conftest.$ac_ext >&5
20353
20354         ac_cv_have_decl_F_FULLFSYNC=no
20355 fi
20356
20357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20358 fi
20359 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
20360 $as_echo "$ac_cv_have_decl_F_FULLFSYNC" >&6; }
20361 if test "x$ac_cv_have_decl_F_FULLFSYNC" = x""yes; then
20362
20363 cat >>confdefs.h <<_ACEOF
20364 #define HAVE_DECL_F_FULLFSYNC 1
20365 _ACEOF
20366
20367
20368 else
20369   cat >>confdefs.h <<_ACEOF
20370 #define HAVE_DECL_F_FULLFSYNC 0
20371 _ACEOF
20372
20373
20374 fi
20375
20376
20377
20378 HAVE_IPV6=no
20379 { $as_echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
20380 $as_echo_n "checking for struct sockaddr_in6... " >&6; }
20381 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
20382   $as_echo_n "(cached) " >&6
20383 else
20384   ac_cv_type_struct_sockaddr_in6=no
20385 cat >conftest.$ac_ext <<_ACEOF
20386 /* confdefs.h.  */
20387 _ACEOF
20388 cat confdefs.h >>conftest.$ac_ext
20389 cat >>conftest.$ac_ext <<_ACEOF
20390 /* end confdefs.h.  */
20391 $ac_includes_default
20392 #include <netinet/in.h>
20393
20394 int
20395 main ()
20396 {
20397 if (sizeof (struct sockaddr_in6))
20398        return 0;
20399   ;
20400   return 0;
20401 }
20402 _ACEOF
20403 rm -f conftest.$ac_objext
20404 if { (ac_try="$ac_compile"
20405 case "(($ac_try" in
20406   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20407   *) ac_try_echo=$ac_try;;
20408 esac
20409 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20410 $as_echo "$ac_try_echo") >&5
20411   (eval "$ac_compile") 2>conftest.er1
20412   ac_status=$?
20413   grep -v '^ *+' conftest.er1 >conftest.err
20414   rm -f conftest.er1
20415   cat conftest.err >&5
20416   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20417   (exit $ac_status); } && {
20418          test -z "$ac_c_werror_flag" ||
20419          test ! -s conftest.err
20420        } && test -s conftest.$ac_objext; then
20421   cat >conftest.$ac_ext <<_ACEOF
20422 /* confdefs.h.  */
20423 _ACEOF
20424 cat confdefs.h >>conftest.$ac_ext
20425 cat >>conftest.$ac_ext <<_ACEOF
20426 /* end confdefs.h.  */
20427 $ac_includes_default
20428 #include <netinet/in.h>
20429
20430 int
20431 main ()
20432 {
20433 if (sizeof ((struct sockaddr_in6)))
20434           return 0;
20435   ;
20436   return 0;
20437 }
20438 _ACEOF
20439 rm -f conftest.$ac_objext
20440 if { (ac_try="$ac_compile"
20441 case "(($ac_try" in
20442   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20443   *) ac_try_echo=$ac_try;;
20444 esac
20445 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20446 $as_echo "$ac_try_echo") >&5
20447   (eval "$ac_compile") 2>conftest.er1
20448   ac_status=$?
20449   grep -v '^ *+' conftest.er1 >conftest.err
20450   rm -f conftest.er1
20451   cat conftest.err >&5
20452   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20453   (exit $ac_status); } && {
20454          test -z "$ac_c_werror_flag" ||
20455          test ! -s conftest.err
20456        } && test -s conftest.$ac_objext; then
20457   :
20458 else
20459   $as_echo "$as_me: failed program was:" >&5
20460 sed 's/^/| /' conftest.$ac_ext >&5
20461
20462         ac_cv_type_struct_sockaddr_in6=yes
20463 fi
20464
20465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20466 else
20467   $as_echo "$as_me: failed program was:" >&5
20468 sed 's/^/| /' conftest.$ac_ext >&5
20469
20470
20471 fi
20472
20473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20474 fi
20475 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
20476 $as_echo "$ac_cv_type_struct_sockaddr_in6" >&6; }
20477 if test "x$ac_cv_type_struct_sockaddr_in6" = x""yes; then
20478
20479 cat >>confdefs.h <<\_ACEOF
20480 #define HAVE_IPV6 1
20481 _ACEOF
20482
20483          HAVE_IPV6=yes
20484 fi
20485
20486
20487
20488 { $as_echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
20489 $as_echo_n "checking for PS_STRINGS... " >&6; }
20490 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
20491   $as_echo_n "(cached) " >&6
20492 else
20493   cat >conftest.$ac_ext <<_ACEOF
20494 /* confdefs.h.  */
20495 _ACEOF
20496 cat confdefs.h >>conftest.$ac_ext
20497 cat >>conftest.$ac_ext <<_ACEOF
20498 /* end confdefs.h.  */
20499 #include <machine/vmparam.h>
20500 #include <sys/exec.h>
20501
20502 int
20503 main ()
20504 {
20505 PS_STRINGS->ps_nargvstr = 1;
20506 PS_STRINGS->ps_argvstr = "foo";
20507   ;
20508   return 0;
20509 }
20510 _ACEOF
20511 rm -f conftest.$ac_objext conftest$ac_exeext
20512 if { (ac_try="$ac_link"
20513 case "(($ac_try" in
20514   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20515   *) ac_try_echo=$ac_try;;
20516 esac
20517 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20518 $as_echo "$ac_try_echo") >&5
20519   (eval "$ac_link") 2>conftest.er1
20520   ac_status=$?
20521   grep -v '^ *+' conftest.er1 >conftest.err
20522   rm -f conftest.er1
20523   cat conftest.err >&5
20524   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20525   (exit $ac_status); } && {
20526          test -z "$ac_c_werror_flag" ||
20527          test ! -s conftest.err
20528        } && test -s conftest$ac_exeext && {
20529          test "$cross_compiling" = yes ||
20530          $as_test_x conftest$ac_exeext
20531        }; then
20532   pgac_cv_var_PS_STRINGS=yes
20533 else
20534   $as_echo "$as_me: failed program was:" >&5
20535 sed 's/^/| /' conftest.$ac_ext >&5
20536
20537         pgac_cv_var_PS_STRINGS=no
20538 fi
20539
20540 rm -rf conftest.dSYM
20541 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20542       conftest$ac_exeext conftest.$ac_ext
20543 fi
20544 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
20545 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
20546 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
20547
20548 cat >>confdefs.h <<\_ACEOF
20549 #define HAVE_PS_STRINGS /**/
20550 _ACEOF
20551
20552 fi
20553
20554
20555 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
20556 # is missing.  Yes, there are machines that have only one.  We may
20557 # also decide to use snprintf.c if snprintf() is present but does not
20558 # have all the features we need --- see below.
20559
20560 if test "$PORTNAME" = "win32"; then
20561   # Win32 gets snprintf.c built unconditionally.
20562   #
20563   # To properly translate all NLS languages strings, we must support the
20564   # *printf() %$ format, which allows *printf() arguments to be selected
20565   # by position in the translated string.
20566   #
20567   # libintl versions < 0.13 use the native *printf() functions, and Win32
20568   # *printf() doesn't understand %$, so we must use our /port versions,
20569   # which do understand %$. libintl versions >= 0.13 include their own
20570   # *printf versions on Win32.  The libintl 0.13 release note text is:
20571   #
20572   #   C format strings with positions, as they arise when a translator
20573   #   needs to reorder a sentence, are now supported on all platforms.
20574   #   On those few platforms (NetBSD and Woe32) for which the native
20575   #   printf()/fprintf()/... functions don't support such format
20576   #   strings, replacements are provided through <libintl.h>.
20577   #
20578   # We could use libintl >= 0.13's *printf() if we were sure that we had
20579   # a litint >= 0.13 at runtime, but seeing that there is no clean way
20580   # to guarantee that, it is best to just use our own, so we are sure to
20581   # get %$ support. In include/port.h we disable the *printf() macros
20582   # that might have been defined by libintl.
20583   #
20584   # We do this unconditionally whether NLS is used or not so we are sure
20585   # that all Win32 libraries and binaries behave the same.
20586   pgac_need_repl_snprintf=yes
20587 else
20588   pgac_need_repl_snprintf=no
20589
20590 for ac_func in snprintf
20591 do
20592 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20593 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20594 $as_echo_n "checking for $ac_func... " >&6; }
20595 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20596   $as_echo_n "(cached) " >&6
20597 else
20598   cat >conftest.$ac_ext <<_ACEOF
20599 /* confdefs.h.  */
20600 _ACEOF
20601 cat confdefs.h >>conftest.$ac_ext
20602 cat >>conftest.$ac_ext <<_ACEOF
20603 /* end confdefs.h.  */
20604 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20605    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20606 #define $ac_func innocuous_$ac_func
20607
20608 /* System header to define __stub macros and hopefully few prototypes,
20609     which can conflict with char $ac_func (); below.
20610     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20611     <limits.h> exists even on freestanding compilers.  */
20612
20613 #ifdef __STDC__
20614 # include <limits.h>
20615 #else
20616 # include <assert.h>
20617 #endif
20618
20619 #undef $ac_func
20620
20621 /* Override any GCC internal prototype to avoid an error.
20622    Use char because int might match the return type of a GCC
20623    builtin and then its argument prototype would still apply.  */
20624 #ifdef __cplusplus
20625 extern "C"
20626 #endif
20627 char $ac_func ();
20628 /* The GNU C library defines this for functions which it implements
20629     to always fail with ENOSYS.  Some functions are actually named
20630     something starting with __ and the normal name is an alias.  */
20631 #if defined __stub_$ac_func || defined __stub___$ac_func
20632 choke me
20633 #endif
20634
20635 int
20636 main ()
20637 {
20638 return $ac_func ();
20639   ;
20640   return 0;
20641 }
20642 _ACEOF
20643 rm -f conftest.$ac_objext conftest$ac_exeext
20644 if { (ac_try="$ac_link"
20645 case "(($ac_try" in
20646   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20647   *) ac_try_echo=$ac_try;;
20648 esac
20649 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20650 $as_echo "$ac_try_echo") >&5
20651   (eval "$ac_link") 2>conftest.er1
20652   ac_status=$?
20653   grep -v '^ *+' conftest.er1 >conftest.err
20654   rm -f conftest.er1
20655   cat conftest.err >&5
20656   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20657   (exit $ac_status); } && {
20658          test -z "$ac_c_werror_flag" ||
20659          test ! -s conftest.err
20660        } && test -s conftest$ac_exeext && {
20661          test "$cross_compiling" = yes ||
20662          $as_test_x conftest$ac_exeext
20663        }; then
20664   eval "$as_ac_var=yes"
20665 else
20666   $as_echo "$as_me: failed program was:" >&5
20667 sed 's/^/| /' conftest.$ac_ext >&5
20668
20669         eval "$as_ac_var=no"
20670 fi
20671
20672 rm -rf conftest.dSYM
20673 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20674       conftest$ac_exeext conftest.$ac_ext
20675 fi
20676 ac_res=`eval 'as_val=${'$as_ac_var'}
20677                  $as_echo "$as_val"'`
20678                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20679 $as_echo "$ac_res" >&6; }
20680 as_val=`eval 'as_val=${'$as_ac_var'}
20681                  $as_echo "$as_val"'`
20682    if test "x$as_val" = x""yes; then
20683   cat >>confdefs.h <<_ACEOF
20684 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20685 _ACEOF
20686
20687 else
20688   pgac_need_repl_snprintf=yes
20689 fi
20690 done
20691
20692
20693 for ac_func in vsnprintf
20694 do
20695 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20696 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20697 $as_echo_n "checking for $ac_func... " >&6; }
20698 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20699   $as_echo_n "(cached) " >&6
20700 else
20701   cat >conftest.$ac_ext <<_ACEOF
20702 /* confdefs.h.  */
20703 _ACEOF
20704 cat confdefs.h >>conftest.$ac_ext
20705 cat >>conftest.$ac_ext <<_ACEOF
20706 /* end confdefs.h.  */
20707 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20708    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20709 #define $ac_func innocuous_$ac_func
20710
20711 /* System header to define __stub macros and hopefully few prototypes,
20712     which can conflict with char $ac_func (); below.
20713     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20714     <limits.h> exists even on freestanding compilers.  */
20715
20716 #ifdef __STDC__
20717 # include <limits.h>
20718 #else
20719 # include <assert.h>
20720 #endif
20721
20722 #undef $ac_func
20723
20724 /* Override any GCC internal prototype to avoid an error.
20725    Use char because int might match the return type of a GCC
20726    builtin and then its argument prototype would still apply.  */
20727 #ifdef __cplusplus
20728 extern "C"
20729 #endif
20730 char $ac_func ();
20731 /* The GNU C library defines this for functions which it implements
20732     to always fail with ENOSYS.  Some functions are actually named
20733     something starting with __ and the normal name is an alias.  */
20734 #if defined __stub_$ac_func || defined __stub___$ac_func
20735 choke me
20736 #endif
20737
20738 int
20739 main ()
20740 {
20741 return $ac_func ();
20742   ;
20743   return 0;
20744 }
20745 _ACEOF
20746 rm -f conftest.$ac_objext conftest$ac_exeext
20747 if { (ac_try="$ac_link"
20748 case "(($ac_try" in
20749   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20750   *) ac_try_echo=$ac_try;;
20751 esac
20752 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20753 $as_echo "$ac_try_echo") >&5
20754   (eval "$ac_link") 2>conftest.er1
20755   ac_status=$?
20756   grep -v '^ *+' conftest.er1 >conftest.err
20757   rm -f conftest.er1
20758   cat conftest.err >&5
20759   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20760   (exit $ac_status); } && {
20761          test -z "$ac_c_werror_flag" ||
20762          test ! -s conftest.err
20763        } && test -s conftest$ac_exeext && {
20764          test "$cross_compiling" = yes ||
20765          $as_test_x conftest$ac_exeext
20766        }; then
20767   eval "$as_ac_var=yes"
20768 else
20769   $as_echo "$as_me: failed program was:" >&5
20770 sed 's/^/| /' conftest.$ac_ext >&5
20771
20772         eval "$as_ac_var=no"
20773 fi
20774
20775 rm -rf conftest.dSYM
20776 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20777       conftest$ac_exeext conftest.$ac_ext
20778 fi
20779 ac_res=`eval 'as_val=${'$as_ac_var'}
20780                  $as_echo "$as_val"'`
20781                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20782 $as_echo "$ac_res" >&6; }
20783 as_val=`eval 'as_val=${'$as_ac_var'}
20784                  $as_echo "$as_val"'`
20785    if test "x$as_val" = x""yes; then
20786   cat >>confdefs.h <<_ACEOF
20787 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20788 _ACEOF
20789
20790 else
20791   pgac_need_repl_snprintf=yes
20792 fi
20793 done
20794
20795 fi
20796
20797
20798 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
20799 # include/c.h will provide declarations.  Note this is a separate test
20800 # from whether the functions exist in the C library --- there are
20801 # systems that have the functions but don't bother to declare them :-(
20802
20803 { $as_echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
20804 $as_echo_n "checking whether snprintf is declared... " >&6; }
20805 if test "${ac_cv_have_decl_snprintf+set}" = set; then
20806   $as_echo_n "(cached) " >&6
20807 else
20808   cat >conftest.$ac_ext <<_ACEOF
20809 /* confdefs.h.  */
20810 _ACEOF
20811 cat confdefs.h >>conftest.$ac_ext
20812 cat >>conftest.$ac_ext <<_ACEOF
20813 /* end confdefs.h.  */
20814 $ac_includes_default
20815 int
20816 main ()
20817 {
20818 #ifndef snprintf
20819   (void) snprintf;
20820 #endif
20821
20822   ;
20823   return 0;
20824 }
20825 _ACEOF
20826 rm -f conftest.$ac_objext
20827 if { (ac_try="$ac_compile"
20828 case "(($ac_try" in
20829   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20830   *) ac_try_echo=$ac_try;;
20831 esac
20832 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20833 $as_echo "$ac_try_echo") >&5
20834   (eval "$ac_compile") 2>conftest.er1
20835   ac_status=$?
20836   grep -v '^ *+' conftest.er1 >conftest.err
20837   rm -f conftest.er1
20838   cat conftest.err >&5
20839   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20840   (exit $ac_status); } && {
20841          test -z "$ac_c_werror_flag" ||
20842          test ! -s conftest.err
20843        } && test -s conftest.$ac_objext; then
20844   ac_cv_have_decl_snprintf=yes
20845 else
20846   $as_echo "$as_me: failed program was:" >&5
20847 sed 's/^/| /' conftest.$ac_ext >&5
20848
20849         ac_cv_have_decl_snprintf=no
20850 fi
20851
20852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20853 fi
20854 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
20855 $as_echo "$ac_cv_have_decl_snprintf" >&6; }
20856 if test "x$ac_cv_have_decl_snprintf" = x""yes; then
20857
20858 cat >>confdefs.h <<_ACEOF
20859 #define HAVE_DECL_SNPRINTF 1
20860 _ACEOF
20861
20862
20863 else
20864   cat >>confdefs.h <<_ACEOF
20865 #define HAVE_DECL_SNPRINTF 0
20866 _ACEOF
20867
20868
20869 fi
20870 { $as_echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
20871 $as_echo_n "checking whether vsnprintf is declared... " >&6; }
20872 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
20873   $as_echo_n "(cached) " >&6
20874 else
20875   cat >conftest.$ac_ext <<_ACEOF
20876 /* confdefs.h.  */
20877 _ACEOF
20878 cat confdefs.h >>conftest.$ac_ext
20879 cat >>conftest.$ac_ext <<_ACEOF
20880 /* end confdefs.h.  */
20881 $ac_includes_default
20882 int
20883 main ()
20884 {
20885 #ifndef vsnprintf
20886   (void) vsnprintf;
20887 #endif
20888
20889   ;
20890   return 0;
20891 }
20892 _ACEOF
20893 rm -f conftest.$ac_objext
20894 if { (ac_try="$ac_compile"
20895 case "(($ac_try" in
20896   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20897   *) ac_try_echo=$ac_try;;
20898 esac
20899 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20900 $as_echo "$ac_try_echo") >&5
20901   (eval "$ac_compile") 2>conftest.er1
20902   ac_status=$?
20903   grep -v '^ *+' conftest.er1 >conftest.err
20904   rm -f conftest.er1
20905   cat conftest.err >&5
20906   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20907   (exit $ac_status); } && {
20908          test -z "$ac_c_werror_flag" ||
20909          test ! -s conftest.err
20910        } && test -s conftest.$ac_objext; then
20911   ac_cv_have_decl_vsnprintf=yes
20912 else
20913   $as_echo "$as_me: failed program was:" >&5
20914 sed 's/^/| /' conftest.$ac_ext >&5
20915
20916         ac_cv_have_decl_vsnprintf=no
20917 fi
20918
20919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20920 fi
20921 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
20922 $as_echo "$ac_cv_have_decl_vsnprintf" >&6; }
20923 if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then
20924
20925 cat >>confdefs.h <<_ACEOF
20926 #define HAVE_DECL_VSNPRINTF 1
20927 _ACEOF
20928
20929
20930 else
20931   cat >>confdefs.h <<_ACEOF
20932 #define HAVE_DECL_VSNPRINTF 0
20933 _ACEOF
20934
20935
20936 fi
20937
20938
20939
20940
20941 { $as_echo "$as_me:$LINENO: checking for isinf" >&5
20942 $as_echo_n "checking for isinf... " >&6; }
20943 if test "${ac_cv_func_isinf+set}" = set; then
20944   $as_echo_n "(cached) " >&6
20945 else
20946   cat >conftest.$ac_ext <<_ACEOF
20947 /* confdefs.h.  */
20948 _ACEOF
20949 cat confdefs.h >>conftest.$ac_ext
20950 cat >>conftest.$ac_ext <<_ACEOF
20951 /* end confdefs.h.  */
20952
20953 #include <math.h>
20954 double glob_double;
20955
20956 int
20957 main ()
20958 {
20959 return isinf(glob_double) ? 0 : 1;
20960   ;
20961   return 0;
20962 }
20963 _ACEOF
20964 rm -f conftest.$ac_objext conftest$ac_exeext
20965 if { (ac_try="$ac_link"
20966 case "(($ac_try" in
20967   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20968   *) ac_try_echo=$ac_try;;
20969 esac
20970 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20971 $as_echo "$ac_try_echo") >&5
20972   (eval "$ac_link") 2>conftest.er1
20973   ac_status=$?
20974   grep -v '^ *+' conftest.er1 >conftest.err
20975   rm -f conftest.er1
20976   cat conftest.err >&5
20977   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20978   (exit $ac_status); } && {
20979          test -z "$ac_c_werror_flag" ||
20980          test ! -s conftest.err
20981        } && test -s conftest$ac_exeext && {
20982          test "$cross_compiling" = yes ||
20983          $as_test_x conftest$ac_exeext
20984        }; then
20985   ac_cv_func_isinf=yes
20986 else
20987   $as_echo "$as_me: failed program was:" >&5
20988 sed 's/^/| /' conftest.$ac_ext >&5
20989
20990         ac_cv_func_isinf=no
20991 fi
20992
20993 rm -rf conftest.dSYM
20994 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20995       conftest$ac_exeext conftest.$ac_ext
20996 fi
20997 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
20998 $as_echo "$ac_cv_func_isinf" >&6; }
20999
21000 if test $ac_cv_func_isinf = yes ; then
21001
21002 cat >>confdefs.h <<\_ACEOF
21003 #define HAVE_ISINF 1
21004 _ACEOF
21005
21006 else
21007   case " $LIBOBJS " in
21008   *" isinf.$ac_objext "* ) ;;
21009   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
21010  ;;
21011 esac
21012
21013   # Look for a way to implement a substitute for isinf()
21014
21015
21016
21017
21018 for ac_func in fpclass fp_class fp_class_d class
21019 do
21020 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21021 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21022 $as_echo_n "checking for $ac_func... " >&6; }
21023 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21024   $as_echo_n "(cached) " >&6
21025 else
21026   cat >conftest.$ac_ext <<_ACEOF
21027 /* confdefs.h.  */
21028 _ACEOF
21029 cat confdefs.h >>conftest.$ac_ext
21030 cat >>conftest.$ac_ext <<_ACEOF
21031 /* end confdefs.h.  */
21032 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21033    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21034 #define $ac_func innocuous_$ac_func
21035
21036 /* System header to define __stub macros and hopefully few prototypes,
21037     which can conflict with char $ac_func (); below.
21038     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21039     <limits.h> exists even on freestanding compilers.  */
21040
21041 #ifdef __STDC__
21042 # include <limits.h>
21043 #else
21044 # include <assert.h>
21045 #endif
21046
21047 #undef $ac_func
21048
21049 /* Override any GCC internal prototype to avoid an error.
21050    Use char because int might match the return type of a GCC
21051    builtin and then its argument prototype would still apply.  */
21052 #ifdef __cplusplus
21053 extern "C"
21054 #endif
21055 char $ac_func ();
21056 /* The GNU C library defines this for functions which it implements
21057     to always fail with ENOSYS.  Some functions are actually named
21058     something starting with __ and the normal name is an alias.  */
21059 #if defined __stub_$ac_func || defined __stub___$ac_func
21060 choke me
21061 #endif
21062
21063 int
21064 main ()
21065 {
21066 return $ac_func ();
21067   ;
21068   return 0;
21069 }
21070 _ACEOF
21071 rm -f conftest.$ac_objext conftest$ac_exeext
21072 if { (ac_try="$ac_link"
21073 case "(($ac_try" in
21074   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21075   *) ac_try_echo=$ac_try;;
21076 esac
21077 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21078 $as_echo "$ac_try_echo") >&5
21079   (eval "$ac_link") 2>conftest.er1
21080   ac_status=$?
21081   grep -v '^ *+' conftest.er1 >conftest.err
21082   rm -f conftest.er1
21083   cat conftest.err >&5
21084   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21085   (exit $ac_status); } && {
21086          test -z "$ac_c_werror_flag" ||
21087          test ! -s conftest.err
21088        } && test -s conftest$ac_exeext && {
21089          test "$cross_compiling" = yes ||
21090          $as_test_x conftest$ac_exeext
21091        }; then
21092   eval "$as_ac_var=yes"
21093 else
21094   $as_echo "$as_me: failed program was:" >&5
21095 sed 's/^/| /' conftest.$ac_ext >&5
21096
21097         eval "$as_ac_var=no"
21098 fi
21099
21100 rm -rf conftest.dSYM
21101 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21102       conftest$ac_exeext conftest.$ac_ext
21103 fi
21104 ac_res=`eval 'as_val=${'$as_ac_var'}
21105                  $as_echo "$as_val"'`
21106                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21107 $as_echo "$ac_res" >&6; }
21108 as_val=`eval 'as_val=${'$as_ac_var'}
21109                  $as_echo "$as_val"'`
21110    if test "x$as_val" = x""yes; then
21111   cat >>confdefs.h <<_ACEOF
21112 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21113 _ACEOF
21114  break
21115 fi
21116 done
21117
21118 fi
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131 for ac_func in crypt fls getopt getrusage inet_aton random rint srandom strerror strlcat strlcpy
21132 do
21133 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21134 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21135 $as_echo_n "checking for $ac_func... " >&6; }
21136 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21137   $as_echo_n "(cached) " >&6
21138 else
21139   cat >conftest.$ac_ext <<_ACEOF
21140 /* confdefs.h.  */
21141 _ACEOF
21142 cat confdefs.h >>conftest.$ac_ext
21143 cat >>conftest.$ac_ext <<_ACEOF
21144 /* end confdefs.h.  */
21145 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21146    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21147 #define $ac_func innocuous_$ac_func
21148
21149 /* System header to define __stub macros and hopefully few prototypes,
21150     which can conflict with char $ac_func (); below.
21151     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21152     <limits.h> exists even on freestanding compilers.  */
21153
21154 #ifdef __STDC__
21155 # include <limits.h>
21156 #else
21157 # include <assert.h>
21158 #endif
21159
21160 #undef $ac_func
21161
21162 /* Override any GCC internal prototype to avoid an error.
21163    Use char because int might match the return type of a GCC
21164    builtin and then its argument prototype would still apply.  */
21165 #ifdef __cplusplus
21166 extern "C"
21167 #endif
21168 char $ac_func ();
21169 /* The GNU C library defines this for functions which it implements
21170     to always fail with ENOSYS.  Some functions are actually named
21171     something starting with __ and the normal name is an alias.  */
21172 #if defined __stub_$ac_func || defined __stub___$ac_func
21173 choke me
21174 #endif
21175
21176 int
21177 main ()
21178 {
21179 return $ac_func ();
21180   ;
21181   return 0;
21182 }
21183 _ACEOF
21184 rm -f conftest.$ac_objext conftest$ac_exeext
21185 if { (ac_try="$ac_link"
21186 case "(($ac_try" in
21187   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21188   *) ac_try_echo=$ac_try;;
21189 esac
21190 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21191 $as_echo "$ac_try_echo") >&5
21192   (eval "$ac_link") 2>conftest.er1
21193   ac_status=$?
21194   grep -v '^ *+' conftest.er1 >conftest.err
21195   rm -f conftest.er1
21196   cat conftest.err >&5
21197   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21198   (exit $ac_status); } && {
21199          test -z "$ac_c_werror_flag" ||
21200          test ! -s conftest.err
21201        } && test -s conftest$ac_exeext && {
21202          test "$cross_compiling" = yes ||
21203          $as_test_x conftest$ac_exeext
21204        }; then
21205   eval "$as_ac_var=yes"
21206 else
21207   $as_echo "$as_me: failed program was:" >&5
21208 sed 's/^/| /' conftest.$ac_ext >&5
21209
21210         eval "$as_ac_var=no"
21211 fi
21212
21213 rm -rf conftest.dSYM
21214 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21215       conftest$ac_exeext conftest.$ac_ext
21216 fi
21217 ac_res=`eval 'as_val=${'$as_ac_var'}
21218                  $as_echo "$as_val"'`
21219                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21220 $as_echo "$ac_res" >&6; }
21221 as_val=`eval 'as_val=${'$as_ac_var'}
21222                  $as_echo "$as_val"'`
21223    if test "x$as_val" = x""yes; then
21224   cat >>confdefs.h <<_ACEOF
21225 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21226 _ACEOF
21227
21228 else
21229   case " $LIBOBJS " in
21230   *" $ac_func.$ac_objext "* ) ;;
21231   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21232  ;;
21233 esac
21234
21235 fi
21236 done
21237
21238
21239
21240 case $host_os in
21241
21242         # Windows uses a specialised env handler
21243         # and doesn't need a replacement getpeereid because it doesn't use
21244         # Unix sockets.
21245         mingw*)
21246
21247 cat >>confdefs.h <<\_ACEOF
21248 #define HAVE_UNSETENV 1
21249 _ACEOF
21250
21251
21252 cat >>confdefs.h <<\_ACEOF
21253 #define HAVE_GETPEEREID 1
21254 _ACEOF
21255
21256                 ac_cv_func_unsetenv=yes
21257                 ac_cv_func_getpeereid=yes;;
21258         *)
21259
21260
21261 for ac_func in unsetenv getpeereid
21262 do
21263 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21264 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21265 $as_echo_n "checking for $ac_func... " >&6; }
21266 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21267   $as_echo_n "(cached) " >&6
21268 else
21269   cat >conftest.$ac_ext <<_ACEOF
21270 /* confdefs.h.  */
21271 _ACEOF
21272 cat confdefs.h >>conftest.$ac_ext
21273 cat >>conftest.$ac_ext <<_ACEOF
21274 /* end confdefs.h.  */
21275 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21276    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21277 #define $ac_func innocuous_$ac_func
21278
21279 /* System header to define __stub macros and hopefully few prototypes,
21280     which can conflict with char $ac_func (); below.
21281     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21282     <limits.h> exists even on freestanding compilers.  */
21283
21284 #ifdef __STDC__
21285 # include <limits.h>
21286 #else
21287 # include <assert.h>
21288 #endif
21289
21290 #undef $ac_func
21291
21292 /* Override any GCC internal prototype to avoid an error.
21293    Use char because int might match the return type of a GCC
21294    builtin and then its argument prototype would still apply.  */
21295 #ifdef __cplusplus
21296 extern "C"
21297 #endif
21298 char $ac_func ();
21299 /* The GNU C library defines this for functions which it implements
21300     to always fail with ENOSYS.  Some functions are actually named
21301     something starting with __ and the normal name is an alias.  */
21302 #if defined __stub_$ac_func || defined __stub___$ac_func
21303 choke me
21304 #endif
21305
21306 int
21307 main ()
21308 {
21309 return $ac_func ();
21310   ;
21311   return 0;
21312 }
21313 _ACEOF
21314 rm -f conftest.$ac_objext conftest$ac_exeext
21315 if { (ac_try="$ac_link"
21316 case "(($ac_try" in
21317   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21318   *) ac_try_echo=$ac_try;;
21319 esac
21320 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21321 $as_echo "$ac_try_echo") >&5
21322   (eval "$ac_link") 2>conftest.er1
21323   ac_status=$?
21324   grep -v '^ *+' conftest.er1 >conftest.err
21325   rm -f conftest.er1
21326   cat conftest.err >&5
21327   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21328   (exit $ac_status); } && {
21329          test -z "$ac_c_werror_flag" ||
21330          test ! -s conftest.err
21331        } && test -s conftest$ac_exeext && {
21332          test "$cross_compiling" = yes ||
21333          $as_test_x conftest$ac_exeext
21334        }; then
21335   eval "$as_ac_var=yes"
21336 else
21337   $as_echo "$as_me: failed program was:" >&5
21338 sed 's/^/| /' conftest.$ac_ext >&5
21339
21340         eval "$as_ac_var=no"
21341 fi
21342
21343 rm -rf conftest.dSYM
21344 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21345       conftest$ac_exeext conftest.$ac_ext
21346 fi
21347 ac_res=`eval 'as_val=${'$as_ac_var'}
21348                  $as_echo "$as_val"'`
21349                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21350 $as_echo "$ac_res" >&6; }
21351 as_val=`eval 'as_val=${'$as_ac_var'}
21352                  $as_echo "$as_val"'`
21353    if test "x$as_val" = x""yes; then
21354   cat >>confdefs.h <<_ACEOF
21355 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21356 _ACEOF
21357
21358 else
21359   case " $LIBOBJS " in
21360   *" $ac_func.$ac_objext "* ) ;;
21361   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21362  ;;
21363 esac
21364
21365 fi
21366 done
21367
21368
21369                 ;;
21370 esac
21371
21372 # System's version of getaddrinfo(), if any, may be used only if we found
21373 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
21374 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
21375 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
21376 # because we want to use our own getaddrinfo.c on Windows anyway.)
21377 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
21378
21379 for ac_func in getaddrinfo
21380 do
21381 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21382 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21383 $as_echo_n "checking for $ac_func... " >&6; }
21384 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21385   $as_echo_n "(cached) " >&6
21386 else
21387   cat >conftest.$ac_ext <<_ACEOF
21388 /* confdefs.h.  */
21389 _ACEOF
21390 cat confdefs.h >>conftest.$ac_ext
21391 cat >>conftest.$ac_ext <<_ACEOF
21392 /* end confdefs.h.  */
21393 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21394    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21395 #define $ac_func innocuous_$ac_func
21396
21397 /* System header to define __stub macros and hopefully few prototypes,
21398     which can conflict with char $ac_func (); below.
21399     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21400     <limits.h> exists even on freestanding compilers.  */
21401
21402 #ifdef __STDC__
21403 # include <limits.h>
21404 #else
21405 # include <assert.h>
21406 #endif
21407
21408 #undef $ac_func
21409
21410 /* Override any GCC internal prototype to avoid an error.
21411    Use char because int might match the return type of a GCC
21412    builtin and then its argument prototype would still apply.  */
21413 #ifdef __cplusplus
21414 extern "C"
21415 #endif
21416 char $ac_func ();
21417 /* The GNU C library defines this for functions which it implements
21418     to always fail with ENOSYS.  Some functions are actually named
21419     something starting with __ and the normal name is an alias.  */
21420 #if defined __stub_$ac_func || defined __stub___$ac_func
21421 choke me
21422 #endif
21423
21424 int
21425 main ()
21426 {
21427 return $ac_func ();
21428   ;
21429   return 0;
21430 }
21431 _ACEOF
21432 rm -f conftest.$ac_objext conftest$ac_exeext
21433 if { (ac_try="$ac_link"
21434 case "(($ac_try" in
21435   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21436   *) ac_try_echo=$ac_try;;
21437 esac
21438 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21439 $as_echo "$ac_try_echo") >&5
21440   (eval "$ac_link") 2>conftest.er1
21441   ac_status=$?
21442   grep -v '^ *+' conftest.er1 >conftest.err
21443   rm -f conftest.er1
21444   cat conftest.err >&5
21445   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21446   (exit $ac_status); } && {
21447          test -z "$ac_c_werror_flag" ||
21448          test ! -s conftest.err
21449        } && test -s conftest$ac_exeext && {
21450          test "$cross_compiling" = yes ||
21451          $as_test_x conftest$ac_exeext
21452        }; then
21453   eval "$as_ac_var=yes"
21454 else
21455   $as_echo "$as_me: failed program was:" >&5
21456 sed 's/^/| /' conftest.$ac_ext >&5
21457
21458         eval "$as_ac_var=no"
21459 fi
21460
21461 rm -rf conftest.dSYM
21462 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21463       conftest$ac_exeext conftest.$ac_ext
21464 fi
21465 ac_res=`eval 'as_val=${'$as_ac_var'}
21466                  $as_echo "$as_val"'`
21467                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21468 $as_echo "$ac_res" >&6; }
21469 as_val=`eval 'as_val=${'$as_ac_var'}
21470                  $as_echo "$as_val"'`
21471    if test "x$as_val" = x""yes; then
21472   cat >>confdefs.h <<_ACEOF
21473 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21474 _ACEOF
21475
21476 else
21477   case " $LIBOBJS " in
21478   *" $ac_func.$ac_objext "* ) ;;
21479   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21480  ;;
21481 esac
21482
21483 fi
21484 done
21485
21486
21487 else
21488   case " $LIBOBJS " in
21489   *" getaddrinfo.$ac_objext "* ) ;;
21490   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
21491  ;;
21492 esac
21493
21494 fi
21495
21496 # Similarly, use system's getopt_long() only if system provides struct option.
21497 if test x"$ac_cv_type_struct_option" = xyes ; then
21498
21499 for ac_func in getopt_long
21500 do
21501 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21502 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21503 $as_echo_n "checking for $ac_func... " >&6; }
21504 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21505   $as_echo_n "(cached) " >&6
21506 else
21507   cat >conftest.$ac_ext <<_ACEOF
21508 /* confdefs.h.  */
21509 _ACEOF
21510 cat confdefs.h >>conftest.$ac_ext
21511 cat >>conftest.$ac_ext <<_ACEOF
21512 /* end confdefs.h.  */
21513 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21514    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21515 #define $ac_func innocuous_$ac_func
21516
21517 /* System header to define __stub macros and hopefully few prototypes,
21518     which can conflict with char $ac_func (); below.
21519     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21520     <limits.h> exists even on freestanding compilers.  */
21521
21522 #ifdef __STDC__
21523 # include <limits.h>
21524 #else
21525 # include <assert.h>
21526 #endif
21527
21528 #undef $ac_func
21529
21530 /* Override any GCC internal prototype to avoid an error.
21531    Use char because int might match the return type of a GCC
21532    builtin and then its argument prototype would still apply.  */
21533 #ifdef __cplusplus
21534 extern "C"
21535 #endif
21536 char $ac_func ();
21537 /* The GNU C library defines this for functions which it implements
21538     to always fail with ENOSYS.  Some functions are actually named
21539     something starting with __ and the normal name is an alias.  */
21540 #if defined __stub_$ac_func || defined __stub___$ac_func
21541 choke me
21542 #endif
21543
21544 int
21545 main ()
21546 {
21547 return $ac_func ();
21548   ;
21549   return 0;
21550 }
21551 _ACEOF
21552 rm -f conftest.$ac_objext conftest$ac_exeext
21553 if { (ac_try="$ac_link"
21554 case "(($ac_try" in
21555   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21556   *) ac_try_echo=$ac_try;;
21557 esac
21558 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21559 $as_echo "$ac_try_echo") >&5
21560   (eval "$ac_link") 2>conftest.er1
21561   ac_status=$?
21562   grep -v '^ *+' conftest.er1 >conftest.err
21563   rm -f conftest.er1
21564   cat conftest.err >&5
21565   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21566   (exit $ac_status); } && {
21567          test -z "$ac_c_werror_flag" ||
21568          test ! -s conftest.err
21569        } && test -s conftest$ac_exeext && {
21570          test "$cross_compiling" = yes ||
21571          $as_test_x conftest$ac_exeext
21572        }; then
21573   eval "$as_ac_var=yes"
21574 else
21575   $as_echo "$as_me: failed program was:" >&5
21576 sed 's/^/| /' conftest.$ac_ext >&5
21577
21578         eval "$as_ac_var=no"
21579 fi
21580
21581 rm -rf conftest.dSYM
21582 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21583       conftest$ac_exeext conftest.$ac_ext
21584 fi
21585 ac_res=`eval 'as_val=${'$as_ac_var'}
21586                  $as_echo "$as_val"'`
21587                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21588 $as_echo "$ac_res" >&6; }
21589 as_val=`eval 'as_val=${'$as_ac_var'}
21590                  $as_echo "$as_val"'`
21591    if test "x$as_val" = x""yes; then
21592   cat >>confdefs.h <<_ACEOF
21593 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21594 _ACEOF
21595
21596 else
21597   case " $LIBOBJS " in
21598   *" $ac_func.$ac_objext "* ) ;;
21599   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21600  ;;
21601 esac
21602
21603 fi
21604 done
21605
21606
21607 else
21608   case " $LIBOBJS " in
21609   *" getopt_long.$ac_objext "* ) ;;
21610   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
21611  ;;
21612 esac
21613
21614 fi
21615
21616 # Solaris' getopt() doesn't do what we want for long options, so always use
21617 # our version on that platform.
21618 if test "$PORTNAME" = "solaris"; then
21619   case " $LIBOBJS " in
21620   *" getopt.$ac_objext "* ) ;;
21621   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
21622  ;;
21623 esac
21624
21625 fi
21626
21627 # mingw has adopted a GNU-centric interpretation of optind/optreset,
21628 # so always use our version on Windows.
21629 if test "$PORTNAME" = "win32"; then
21630   case " $LIBOBJS " in
21631   *" getopt.$ac_objext "* ) ;;
21632   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
21633  ;;
21634 esac
21635
21636   case " $LIBOBJS " in
21637   *" getopt_long.$ac_objext "* ) ;;
21638   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
21639  ;;
21640 esac
21641
21642 fi
21643
21644 # Win32 support
21645 if test "$PORTNAME" = "win32"; then
21646
21647 for ac_func in gettimeofday
21648 do
21649 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21650 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21651 $as_echo_n "checking for $ac_func... " >&6; }
21652 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21653   $as_echo_n "(cached) " >&6
21654 else
21655   cat >conftest.$ac_ext <<_ACEOF
21656 /* confdefs.h.  */
21657 _ACEOF
21658 cat confdefs.h >>conftest.$ac_ext
21659 cat >>conftest.$ac_ext <<_ACEOF
21660 /* end confdefs.h.  */
21661 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21662    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
21663 #define $ac_func innocuous_$ac_func
21664
21665 /* System header to define __stub macros and hopefully few prototypes,
21666     which can conflict with char $ac_func (); below.
21667     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21668     <limits.h> exists even on freestanding compilers.  */
21669
21670 #ifdef __STDC__
21671 # include <limits.h>
21672 #else
21673 # include <assert.h>
21674 #endif
21675
21676 #undef $ac_func
21677
21678 /* Override any GCC internal prototype to avoid an error.
21679    Use char because int might match the return type of a GCC
21680    builtin and then its argument prototype would still apply.  */
21681 #ifdef __cplusplus
21682 extern "C"
21683 #endif
21684 char $ac_func ();
21685 /* The GNU C library defines this for functions which it implements
21686     to always fail with ENOSYS.  Some functions are actually named
21687     something starting with __ and the normal name is an alias.  */
21688 #if defined __stub_$ac_func || defined __stub___$ac_func
21689 choke me
21690 #endif
21691
21692 int
21693 main ()
21694 {
21695 return $ac_func ();
21696   ;
21697   return 0;
21698 }
21699 _ACEOF
21700 rm -f conftest.$ac_objext conftest$ac_exeext
21701 if { (ac_try="$ac_link"
21702 case "(($ac_try" in
21703   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21704   *) ac_try_echo=$ac_try;;
21705 esac
21706 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21707 $as_echo "$ac_try_echo") >&5
21708   (eval "$ac_link") 2>conftest.er1
21709   ac_status=$?
21710   grep -v '^ *+' conftest.er1 >conftest.err
21711   rm -f conftest.er1
21712   cat conftest.err >&5
21713   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21714   (exit $ac_status); } && {
21715          test -z "$ac_c_werror_flag" ||
21716          test ! -s conftest.err
21717        } && test -s conftest$ac_exeext && {
21718          test "$cross_compiling" = yes ||
21719          $as_test_x conftest$ac_exeext
21720        }; then
21721   eval "$as_ac_var=yes"
21722 else
21723   $as_echo "$as_me: failed program was:" >&5
21724 sed 's/^/| /' conftest.$ac_ext >&5
21725
21726         eval "$as_ac_var=no"
21727 fi
21728
21729 rm -rf conftest.dSYM
21730 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21731       conftest$ac_exeext conftest.$ac_ext
21732 fi
21733 ac_res=`eval 'as_val=${'$as_ac_var'}
21734                  $as_echo "$as_val"'`
21735                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21736 $as_echo "$ac_res" >&6; }
21737 as_val=`eval 'as_val=${'$as_ac_var'}
21738                  $as_echo "$as_val"'`
21739    if test "x$as_val" = x""yes; then
21740   cat >>confdefs.h <<_ACEOF
21741 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21742 _ACEOF
21743
21744 else
21745   case " $LIBOBJS " in
21746   *" $ac_func.$ac_objext "* ) ;;
21747   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21748  ;;
21749 esac
21750
21751 fi
21752 done
21753
21754
21755   case " $LIBOBJS " in
21756   *" kill.$ac_objext "* ) ;;
21757   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
21758  ;;
21759 esac
21760
21761   case " $LIBOBJS " in
21762   *" open.$ac_objext "* ) ;;
21763   *) LIBOBJS="$LIBOBJS open.$ac_objext"
21764  ;;
21765 esac
21766
21767   case " $LIBOBJS " in
21768   *" win32env.$ac_objext "* ) ;;
21769   *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
21770  ;;
21771 esac
21772
21773   case " $LIBOBJS " in
21774   *" win32error.$ac_objext "* ) ;;
21775   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
21776  ;;
21777 esac
21778
21779   case " $LIBOBJS " in
21780   *" win32setlocale.$ac_objext "* ) ;;
21781   *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
21782  ;;
21783 esac
21784
21785
21786 cat >>confdefs.h <<\_ACEOF
21787 #define HAVE_SYMLINK 1
21788 _ACEOF
21789
21790   { $as_echo "$as_me:$LINENO: checking for MINIDUMP_TYPE" >&5
21791 $as_echo_n "checking for MINIDUMP_TYPE... " >&6; }
21792 if test "${ac_cv_type_MINIDUMP_TYPE+set}" = set; then
21793   $as_echo_n "(cached) " >&6
21794 else
21795   ac_cv_type_MINIDUMP_TYPE=no
21796 cat >conftest.$ac_ext <<_ACEOF
21797 /* confdefs.h.  */
21798 _ACEOF
21799 cat confdefs.h >>conftest.$ac_ext
21800 cat >>conftest.$ac_ext <<_ACEOF
21801 /* end confdefs.h.  */
21802
21803 #define WIN32_LEAN_AND_MEAN
21804 #include <windows.h>
21805 #include <string.h>
21806 #include <dbghelp.h>
21807
21808 int
21809 main ()
21810 {
21811 if (sizeof (MINIDUMP_TYPE))
21812        return 0;
21813   ;
21814   return 0;
21815 }
21816 _ACEOF
21817 rm -f conftest.$ac_objext
21818 if { (ac_try="$ac_compile"
21819 case "(($ac_try" in
21820   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21821   *) ac_try_echo=$ac_try;;
21822 esac
21823 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21824 $as_echo "$ac_try_echo") >&5
21825   (eval "$ac_compile") 2>conftest.er1
21826   ac_status=$?
21827   grep -v '^ *+' conftest.er1 >conftest.err
21828   rm -f conftest.er1
21829   cat conftest.err >&5
21830   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21831   (exit $ac_status); } && {
21832          test -z "$ac_c_werror_flag" ||
21833          test ! -s conftest.err
21834        } && test -s conftest.$ac_objext; then
21835   cat >conftest.$ac_ext <<_ACEOF
21836 /* confdefs.h.  */
21837 _ACEOF
21838 cat confdefs.h >>conftest.$ac_ext
21839 cat >>conftest.$ac_ext <<_ACEOF
21840 /* end confdefs.h.  */
21841
21842 #define WIN32_LEAN_AND_MEAN
21843 #include <windows.h>
21844 #include <string.h>
21845 #include <dbghelp.h>
21846
21847 int
21848 main ()
21849 {
21850 if (sizeof ((MINIDUMP_TYPE)))
21851           return 0;
21852   ;
21853   return 0;
21854 }
21855 _ACEOF
21856 rm -f conftest.$ac_objext
21857 if { (ac_try="$ac_compile"
21858 case "(($ac_try" in
21859   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21860   *) ac_try_echo=$ac_try;;
21861 esac
21862 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21863 $as_echo "$ac_try_echo") >&5
21864   (eval "$ac_compile") 2>conftest.er1
21865   ac_status=$?
21866   grep -v '^ *+' conftest.er1 >conftest.err
21867   rm -f conftest.er1
21868   cat conftest.err >&5
21869   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21870   (exit $ac_status); } && {
21871          test -z "$ac_c_werror_flag" ||
21872          test ! -s conftest.err
21873        } && test -s conftest.$ac_objext; then
21874   :
21875 else
21876   $as_echo "$as_me: failed program was:" >&5
21877 sed 's/^/| /' conftest.$ac_ext >&5
21878
21879         ac_cv_type_MINIDUMP_TYPE=yes
21880 fi
21881
21882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21883 else
21884   $as_echo "$as_me: failed program was:" >&5
21885 sed 's/^/| /' conftest.$ac_ext >&5
21886
21887
21888 fi
21889
21890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21891 fi
21892 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_MINIDUMP_TYPE" >&5
21893 $as_echo "$ac_cv_type_MINIDUMP_TYPE" >&6; }
21894 if test "x$ac_cv_type_MINIDUMP_TYPE" = x""yes; then
21895
21896 cat >>confdefs.h <<_ACEOF
21897 #define HAVE_MINIDUMP_TYPE 1
21898 _ACEOF
21899
21900 pgac_minidump_type=yes
21901 else
21902   pgac_minidump_type=no
21903 fi
21904
21905 fi
21906 if test x"$pgac_minidump_type" = x"yes" ; then
21907   have_win32_dbghelp=yes
21908
21909 else
21910   have_win32_dbghelp=no
21911
21912 fi
21913
21914 { $as_echo "$as_me:$LINENO: checking for sigsetjmp" >&5
21915 $as_echo_n "checking for sigsetjmp... " >&6; }
21916 if test "${pgac_cv_func_sigsetjmp+set}" = set; then
21917   $as_echo_n "(cached) " >&6
21918 else
21919   cat >conftest.$ac_ext <<_ACEOF
21920 /* confdefs.h.  */
21921 _ACEOF
21922 cat confdefs.h >>conftest.$ac_ext
21923 cat >>conftest.$ac_ext <<_ACEOF
21924 /* end confdefs.h.  */
21925 #include <setjmp.h>
21926 int
21927 main ()
21928 {
21929 sigjmp_buf x; sigsetjmp(x, 1);
21930   ;
21931   return 0;
21932 }
21933 _ACEOF
21934 rm -f conftest.$ac_objext conftest$ac_exeext
21935 if { (ac_try="$ac_link"
21936 case "(($ac_try" in
21937   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21938   *) ac_try_echo=$ac_try;;
21939 esac
21940 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21941 $as_echo "$ac_try_echo") >&5
21942   (eval "$ac_link") 2>conftest.er1
21943   ac_status=$?
21944   grep -v '^ *+' conftest.er1 >conftest.err
21945   rm -f conftest.er1
21946   cat conftest.err >&5
21947   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21948   (exit $ac_status); } && {
21949          test -z "$ac_c_werror_flag" ||
21950          test ! -s conftest.err
21951        } && test -s conftest$ac_exeext && {
21952          test "$cross_compiling" = yes ||
21953          $as_test_x conftest$ac_exeext
21954        }; then
21955   pgac_cv_func_sigsetjmp=yes
21956 else
21957   $as_echo "$as_me: failed program was:" >&5
21958 sed 's/^/| /' conftest.$ac_ext >&5
21959
21960         pgac_cv_func_sigsetjmp=no
21961 fi
21962
21963 rm -rf conftest.dSYM
21964 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21965       conftest$ac_exeext conftest.$ac_ext
21966 fi
21967 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_sigsetjmp" >&5
21968 $as_echo "$pgac_cv_func_sigsetjmp" >&6; }
21969 if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
21970
21971 cat >>confdefs.h <<\_ACEOF
21972 #define HAVE_SIGSETJMP 1
21973 _ACEOF
21974
21975 fi
21976
21977 { $as_echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
21978 $as_echo_n "checking whether sys_siglist is declared... " >&6; }
21979 if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
21980   $as_echo_n "(cached) " >&6
21981 else
21982   cat >conftest.$ac_ext <<_ACEOF
21983 /* confdefs.h.  */
21984 _ACEOF
21985 cat confdefs.h >>conftest.$ac_ext
21986 cat >>conftest.$ac_ext <<_ACEOF
21987 /* end confdefs.h.  */
21988 #include <signal.h>
21989 /* NetBSD declares sys_siglist in unistd.h.  */
21990 #ifdef HAVE_UNISTD_H
21991 # include <unistd.h>
21992 #endif
21993
21994
21995 int
21996 main ()
21997 {
21998 #ifndef sys_siglist
21999   (void) sys_siglist;
22000 #endif
22001
22002   ;
22003   return 0;
22004 }
22005 _ACEOF
22006 rm -f conftest.$ac_objext
22007 if { (ac_try="$ac_compile"
22008 case "(($ac_try" in
22009   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22010   *) ac_try_echo=$ac_try;;
22011 esac
22012 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22013 $as_echo "$ac_try_echo") >&5
22014   (eval "$ac_compile") 2>conftest.er1
22015   ac_status=$?
22016   grep -v '^ *+' conftest.er1 >conftest.err
22017   rm -f conftest.er1
22018   cat conftest.err >&5
22019   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22020   (exit $ac_status); } && {
22021          test -z "$ac_c_werror_flag" ||
22022          test ! -s conftest.err
22023        } && test -s conftest.$ac_objext; then
22024   ac_cv_have_decl_sys_siglist=yes
22025 else
22026   $as_echo "$as_me: failed program was:" >&5
22027 sed 's/^/| /' conftest.$ac_ext >&5
22028
22029         ac_cv_have_decl_sys_siglist=no
22030 fi
22031
22032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22033 fi
22034 { $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
22035 $as_echo "$ac_cv_have_decl_sys_siglist" >&6; }
22036 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then
22037
22038 cat >>confdefs.h <<_ACEOF
22039 #define HAVE_DECL_SYS_SIGLIST 1
22040 _ACEOF
22041
22042
22043 else
22044   cat >>confdefs.h <<_ACEOF
22045 #define HAVE_DECL_SYS_SIGLIST 0
22046 _ACEOF
22047
22048
22049 fi
22050
22051
22052
22053
22054 { $as_echo "$as_me:$LINENO: checking for syslog" >&5
22055 $as_echo_n "checking for syslog... " >&6; }
22056 if test "${ac_cv_func_syslog+set}" = set; then
22057   $as_echo_n "(cached) " >&6
22058 else
22059   cat >conftest.$ac_ext <<_ACEOF
22060 /* confdefs.h.  */
22061 _ACEOF
22062 cat confdefs.h >>conftest.$ac_ext
22063 cat >>conftest.$ac_ext <<_ACEOF
22064 /* end confdefs.h.  */
22065 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
22066    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22067 #define syslog innocuous_syslog
22068
22069 /* System header to define __stub macros and hopefully few prototypes,
22070     which can conflict with char syslog (); below.
22071     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22072     <limits.h> exists even on freestanding compilers.  */
22073
22074 #ifdef __STDC__
22075 # include <limits.h>
22076 #else
22077 # include <assert.h>
22078 #endif
22079
22080 #undef syslog
22081
22082 /* Override any GCC internal prototype to avoid an error.
22083    Use char because int might match the return type of a GCC
22084    builtin and then its argument prototype would still apply.  */
22085 #ifdef __cplusplus
22086 extern "C"
22087 #endif
22088 char syslog ();
22089 /* The GNU C library defines this for functions which it implements
22090     to always fail with ENOSYS.  Some functions are actually named
22091     something starting with __ and the normal name is an alias.  */
22092 #if defined __stub_syslog || defined __stub___syslog
22093 choke me
22094 #endif
22095
22096 int
22097 main ()
22098 {
22099 return syslog ();
22100   ;
22101   return 0;
22102 }
22103 _ACEOF
22104 rm -f conftest.$ac_objext conftest$ac_exeext
22105 if { (ac_try="$ac_link"
22106 case "(($ac_try" in
22107   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22108   *) ac_try_echo=$ac_try;;
22109 esac
22110 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22111 $as_echo "$ac_try_echo") >&5
22112   (eval "$ac_link") 2>conftest.er1
22113   ac_status=$?
22114   grep -v '^ *+' conftest.er1 >conftest.err
22115   rm -f conftest.er1
22116   cat conftest.err >&5
22117   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22118   (exit $ac_status); } && {
22119          test -z "$ac_c_werror_flag" ||
22120          test ! -s conftest.err
22121        } && test -s conftest$ac_exeext && {
22122          test "$cross_compiling" = yes ||
22123          $as_test_x conftest$ac_exeext
22124        }; then
22125   ac_cv_func_syslog=yes
22126 else
22127   $as_echo "$as_me: failed program was:" >&5
22128 sed 's/^/| /' conftest.$ac_ext >&5
22129
22130         ac_cv_func_syslog=no
22131 fi
22132
22133 rm -rf conftest.dSYM
22134 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22135       conftest$ac_exeext conftest.$ac_ext
22136 fi
22137 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
22138 $as_echo "$ac_cv_func_syslog" >&6; }
22139 if test "x$ac_cv_func_syslog" = x""yes; then
22140   if test "${ac_cv_header_syslog_h+set}" = set; then
22141   { $as_echo "$as_me:$LINENO: checking for syslog.h" >&5
22142 $as_echo_n "checking for syslog.h... " >&6; }
22143 if test "${ac_cv_header_syslog_h+set}" = set; then
22144   $as_echo_n "(cached) " >&6
22145 fi
22146 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
22147 $as_echo "$ac_cv_header_syslog_h" >&6; }
22148 else
22149   # Is the header compilable?
22150 { $as_echo "$as_me:$LINENO: checking syslog.h usability" >&5
22151 $as_echo_n "checking syslog.h usability... " >&6; }
22152 cat >conftest.$ac_ext <<_ACEOF
22153 /* confdefs.h.  */
22154 _ACEOF
22155 cat confdefs.h >>conftest.$ac_ext
22156 cat >>conftest.$ac_ext <<_ACEOF
22157 /* end confdefs.h.  */
22158 $ac_includes_default
22159 #include <syslog.h>
22160 _ACEOF
22161 rm -f conftest.$ac_objext
22162 if { (ac_try="$ac_compile"
22163 case "(($ac_try" in
22164   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22165   *) ac_try_echo=$ac_try;;
22166 esac
22167 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22168 $as_echo "$ac_try_echo") >&5
22169   (eval "$ac_compile") 2>conftest.er1
22170   ac_status=$?
22171   grep -v '^ *+' conftest.er1 >conftest.err
22172   rm -f conftest.er1
22173   cat conftest.err >&5
22174   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22175   (exit $ac_status); } && {
22176          test -z "$ac_c_werror_flag" ||
22177          test ! -s conftest.err
22178        } && test -s conftest.$ac_objext; then
22179   ac_header_compiler=yes
22180 else
22181   $as_echo "$as_me: failed program was:" >&5
22182 sed 's/^/| /' conftest.$ac_ext >&5
22183
22184         ac_header_compiler=no
22185 fi
22186
22187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22188 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22189 $as_echo "$ac_header_compiler" >&6; }
22190
22191 # Is the header present?
22192 { $as_echo "$as_me:$LINENO: checking syslog.h presence" >&5
22193 $as_echo_n "checking syslog.h presence... " >&6; }
22194 cat >conftest.$ac_ext <<_ACEOF
22195 /* confdefs.h.  */
22196 _ACEOF
22197 cat confdefs.h >>conftest.$ac_ext
22198 cat >>conftest.$ac_ext <<_ACEOF
22199 /* end confdefs.h.  */
22200 #include <syslog.h>
22201 _ACEOF
22202 if { (ac_try="$ac_cpp conftest.$ac_ext"
22203 case "(($ac_try" in
22204   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22205   *) ac_try_echo=$ac_try;;
22206 esac
22207 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22208 $as_echo "$ac_try_echo") >&5
22209   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22210   ac_status=$?
22211   grep -v '^ *+' conftest.er1 >conftest.err
22212   rm -f conftest.er1
22213   cat conftest.err >&5
22214   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22215   (exit $ac_status); } >/dev/null && {
22216          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22217          test ! -s conftest.err
22218        }; then
22219   ac_header_preproc=yes
22220 else
22221   $as_echo "$as_me: failed program was:" >&5
22222 sed 's/^/| /' conftest.$ac_ext >&5
22223
22224   ac_header_preproc=no
22225 fi
22226
22227 rm -f conftest.err conftest.$ac_ext
22228 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22229 $as_echo "$ac_header_preproc" >&6; }
22230
22231 # So?  What about this header?
22232 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22233   yes:no: )
22234     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
22235 $as_echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22236     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
22237 $as_echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
22238     ac_header_preproc=yes
22239     ;;
22240   no:yes:* )
22241     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
22242 $as_echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
22243     { $as_echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
22244 $as_echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
22245     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
22246 $as_echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
22247     { $as_echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
22248 $as_echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22249     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
22250 $as_echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
22251     { $as_echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
22252 $as_echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
22253     ( cat <<\_ASBOX
22254 ## ---------------------------------------- ##
22255 ## Report this to pgsql-bugs@postgresql.org ##
22256 ## ---------------------------------------- ##
22257 _ASBOX
22258      ) | sed "s/^/$as_me: WARNING:     /" >&2
22259     ;;
22260 esac
22261 { $as_echo "$as_me:$LINENO: checking for syslog.h" >&5
22262 $as_echo_n "checking for syslog.h... " >&6; }
22263 if test "${ac_cv_header_syslog_h+set}" = set; then
22264   $as_echo_n "(cached) " >&6
22265 else
22266   ac_cv_header_syslog_h=$ac_header_preproc
22267 fi
22268 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
22269 $as_echo "$ac_cv_header_syslog_h" >&6; }
22270
22271 fi
22272 if test "x$ac_cv_header_syslog_h" = x""yes; then
22273
22274 cat >>confdefs.h <<\_ACEOF
22275 #define HAVE_SYSLOG 1
22276 _ACEOF
22277
22278 fi
22279
22280
22281 fi
22282
22283
22284 { $as_echo "$as_me:$LINENO: checking for opterr" >&5
22285 $as_echo_n "checking for opterr... " >&6; }
22286 if test "${pgac_cv_var_int_opterr+set}" = set; then
22287   $as_echo_n "(cached) " >&6
22288 else
22289   cat >conftest.$ac_ext <<_ACEOF
22290 /* confdefs.h.  */
22291 _ACEOF
22292 cat confdefs.h >>conftest.$ac_ext
22293 cat >>conftest.$ac_ext <<_ACEOF
22294 /* end confdefs.h.  */
22295 #include <unistd.h>
22296 int
22297 main ()
22298 {
22299 extern int opterr; opterr = 1;
22300   ;
22301   return 0;
22302 }
22303 _ACEOF
22304 rm -f conftest.$ac_objext conftest$ac_exeext
22305 if { (ac_try="$ac_link"
22306 case "(($ac_try" in
22307   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22308   *) ac_try_echo=$ac_try;;
22309 esac
22310 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22311 $as_echo "$ac_try_echo") >&5
22312   (eval "$ac_link") 2>conftest.er1
22313   ac_status=$?
22314   grep -v '^ *+' conftest.er1 >conftest.err
22315   rm -f conftest.er1
22316   cat conftest.err >&5
22317   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22318   (exit $ac_status); } && {
22319          test -z "$ac_c_werror_flag" ||
22320          test ! -s conftest.err
22321        } && test -s conftest$ac_exeext && {
22322          test "$cross_compiling" = yes ||
22323          $as_test_x conftest$ac_exeext
22324        }; then
22325   pgac_cv_var_int_opterr=yes
22326 else
22327   $as_echo "$as_me: failed program was:" >&5
22328 sed 's/^/| /' conftest.$ac_ext >&5
22329
22330         pgac_cv_var_int_opterr=no
22331 fi
22332
22333 rm -rf conftest.dSYM
22334 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22335       conftest$ac_exeext conftest.$ac_ext
22336 fi
22337 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_opterr" >&5
22338 $as_echo "$pgac_cv_var_int_opterr" >&6; }
22339 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
22340
22341 cat >>confdefs.h <<\_ACEOF
22342 #define HAVE_INT_OPTERR 1
22343 _ACEOF
22344
22345 fi
22346
22347 { $as_echo "$as_me:$LINENO: checking for optreset" >&5
22348 $as_echo_n "checking for optreset... " >&6; }
22349 if test "${pgac_cv_var_int_optreset+set}" = set; then
22350   $as_echo_n "(cached) " >&6
22351 else
22352   cat >conftest.$ac_ext <<_ACEOF
22353 /* confdefs.h.  */
22354 _ACEOF
22355 cat confdefs.h >>conftest.$ac_ext
22356 cat >>conftest.$ac_ext <<_ACEOF
22357 /* end confdefs.h.  */
22358 #include <unistd.h>
22359 int
22360 main ()
22361 {
22362 extern int optreset; optreset = 1;
22363   ;
22364   return 0;
22365 }
22366 _ACEOF
22367 rm -f conftest.$ac_objext conftest$ac_exeext
22368 if { (ac_try="$ac_link"
22369 case "(($ac_try" in
22370   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22371   *) ac_try_echo=$ac_try;;
22372 esac
22373 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22374 $as_echo "$ac_try_echo") >&5
22375   (eval "$ac_link") 2>conftest.er1
22376   ac_status=$?
22377   grep -v '^ *+' conftest.er1 >conftest.err
22378   rm -f conftest.er1
22379   cat conftest.err >&5
22380   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22381   (exit $ac_status); } && {
22382          test -z "$ac_c_werror_flag" ||
22383          test ! -s conftest.err
22384        } && test -s conftest$ac_exeext && {
22385          test "$cross_compiling" = yes ||
22386          $as_test_x conftest$ac_exeext
22387        }; then
22388   pgac_cv_var_int_optreset=yes
22389 else
22390   $as_echo "$as_me: failed program was:" >&5
22391 sed 's/^/| /' conftest.$ac_ext >&5
22392
22393         pgac_cv_var_int_optreset=no
22394 fi
22395
22396 rm -rf conftest.dSYM
22397 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22398       conftest$ac_exeext conftest.$ac_ext
22399 fi
22400 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
22401 $as_echo "$pgac_cv_var_int_optreset" >&6; }
22402 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
22403
22404 cat >>confdefs.h <<\_ACEOF
22405 #define HAVE_INT_OPTRESET 1
22406 _ACEOF
22407
22408 fi
22409
22410
22411
22412 for ac_func in strtoll strtoq
22413 do
22414 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22415 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22416 $as_echo_n "checking for $ac_func... " >&6; }
22417 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22418   $as_echo_n "(cached) " >&6
22419 else
22420   cat >conftest.$ac_ext <<_ACEOF
22421 /* confdefs.h.  */
22422 _ACEOF
22423 cat confdefs.h >>conftest.$ac_ext
22424 cat >>conftest.$ac_ext <<_ACEOF
22425 /* end confdefs.h.  */
22426 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22427    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22428 #define $ac_func innocuous_$ac_func
22429
22430 /* System header to define __stub macros and hopefully few prototypes,
22431     which can conflict with char $ac_func (); below.
22432     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22433     <limits.h> exists even on freestanding compilers.  */
22434
22435 #ifdef __STDC__
22436 # include <limits.h>
22437 #else
22438 # include <assert.h>
22439 #endif
22440
22441 #undef $ac_func
22442
22443 /* Override any GCC internal prototype to avoid an error.
22444    Use char because int might match the return type of a GCC
22445    builtin and then its argument prototype would still apply.  */
22446 #ifdef __cplusplus
22447 extern "C"
22448 #endif
22449 char $ac_func ();
22450 /* The GNU C library defines this for functions which it implements
22451     to always fail with ENOSYS.  Some functions are actually named
22452     something starting with __ and the normal name is an alias.  */
22453 #if defined __stub_$ac_func || defined __stub___$ac_func
22454 choke me
22455 #endif
22456
22457 int
22458 main ()
22459 {
22460 return $ac_func ();
22461   ;
22462   return 0;
22463 }
22464 _ACEOF
22465 rm -f conftest.$ac_objext conftest$ac_exeext
22466 if { (ac_try="$ac_link"
22467 case "(($ac_try" in
22468   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22469   *) ac_try_echo=$ac_try;;
22470 esac
22471 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22472 $as_echo "$ac_try_echo") >&5
22473   (eval "$ac_link") 2>conftest.er1
22474   ac_status=$?
22475   grep -v '^ *+' conftest.er1 >conftest.err
22476   rm -f conftest.er1
22477   cat conftest.err >&5
22478   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22479   (exit $ac_status); } && {
22480          test -z "$ac_c_werror_flag" ||
22481          test ! -s conftest.err
22482        } && test -s conftest$ac_exeext && {
22483          test "$cross_compiling" = yes ||
22484          $as_test_x conftest$ac_exeext
22485        }; then
22486   eval "$as_ac_var=yes"
22487 else
22488   $as_echo "$as_me: failed program was:" >&5
22489 sed 's/^/| /' conftest.$ac_ext >&5
22490
22491         eval "$as_ac_var=no"
22492 fi
22493
22494 rm -rf conftest.dSYM
22495 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22496       conftest$ac_exeext conftest.$ac_ext
22497 fi
22498 ac_res=`eval 'as_val=${'$as_ac_var'}
22499                  $as_echo "$as_val"'`
22500                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22501 $as_echo "$ac_res" >&6; }
22502 as_val=`eval 'as_val=${'$as_ac_var'}
22503                  $as_echo "$as_val"'`
22504    if test "x$as_val" = x""yes; then
22505   cat >>confdefs.h <<_ACEOF
22506 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22507 _ACEOF
22508  break
22509 fi
22510 done
22511
22512
22513
22514 for ac_func in strtoull strtouq
22515 do
22516 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22517 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22518 $as_echo_n "checking for $ac_func... " >&6; }
22519 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22520   $as_echo_n "(cached) " >&6
22521 else
22522   cat >conftest.$ac_ext <<_ACEOF
22523 /* confdefs.h.  */
22524 _ACEOF
22525 cat confdefs.h >>conftest.$ac_ext
22526 cat >>conftest.$ac_ext <<_ACEOF
22527 /* end confdefs.h.  */
22528 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22529    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22530 #define $ac_func innocuous_$ac_func
22531
22532 /* System header to define __stub macros and hopefully few prototypes,
22533     which can conflict with char $ac_func (); below.
22534     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22535     <limits.h> exists even on freestanding compilers.  */
22536
22537 #ifdef __STDC__
22538 # include <limits.h>
22539 #else
22540 # include <assert.h>
22541 #endif
22542
22543 #undef $ac_func
22544
22545 /* Override any GCC internal prototype to avoid an error.
22546    Use char because int might match the return type of a GCC
22547    builtin and then its argument prototype would still apply.  */
22548 #ifdef __cplusplus
22549 extern "C"
22550 #endif
22551 char $ac_func ();
22552 /* The GNU C library defines this for functions which it implements
22553     to always fail with ENOSYS.  Some functions are actually named
22554     something starting with __ and the normal name is an alias.  */
22555 #if defined __stub_$ac_func || defined __stub___$ac_func
22556 choke me
22557 #endif
22558
22559 int
22560 main ()
22561 {
22562 return $ac_func ();
22563   ;
22564   return 0;
22565 }
22566 _ACEOF
22567 rm -f conftest.$ac_objext conftest$ac_exeext
22568 if { (ac_try="$ac_link"
22569 case "(($ac_try" in
22570   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22571   *) ac_try_echo=$ac_try;;
22572 esac
22573 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22574 $as_echo "$ac_try_echo") >&5
22575   (eval "$ac_link") 2>conftest.er1
22576   ac_status=$?
22577   grep -v '^ *+' conftest.er1 >conftest.err
22578   rm -f conftest.er1
22579   cat conftest.err >&5
22580   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22581   (exit $ac_status); } && {
22582          test -z "$ac_c_werror_flag" ||
22583          test ! -s conftest.err
22584        } && test -s conftest$ac_exeext && {
22585          test "$cross_compiling" = yes ||
22586          $as_test_x conftest$ac_exeext
22587        }; then
22588   eval "$as_ac_var=yes"
22589 else
22590   $as_echo "$as_me: failed program was:" >&5
22591 sed 's/^/| /' conftest.$ac_ext >&5
22592
22593         eval "$as_ac_var=no"
22594 fi
22595
22596 rm -rf conftest.dSYM
22597 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22598       conftest$ac_exeext conftest.$ac_ext
22599 fi
22600 ac_res=`eval 'as_val=${'$as_ac_var'}
22601                  $as_echo "$as_val"'`
22602                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22603 $as_echo "$ac_res" >&6; }
22604 as_val=`eval 'as_val=${'$as_ac_var'}
22605                  $as_echo "$as_val"'`
22606    if test "x$as_val" = x""yes; then
22607   cat >>confdefs.h <<_ACEOF
22608 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22609 _ACEOF
22610  break
22611 fi
22612 done
22613
22614
22615 { $as_echo "$as_me:$LINENO: checking for builtin locking functions" >&5
22616 $as_echo_n "checking for builtin locking functions... " >&6; }
22617 if test "${pgac_cv_gcc_int_atomics+set}" = set; then
22618   $as_echo_n "(cached) " >&6
22619 else
22620   cat >conftest.$ac_ext <<_ACEOF
22621 /* confdefs.h.  */
22622 _ACEOF
22623 cat confdefs.h >>conftest.$ac_ext
22624 cat >>conftest.$ac_ext <<_ACEOF
22625 /* end confdefs.h.  */
22626
22627 int
22628 main ()
22629 {
22630 int lock = 0;
22631    __sync_lock_test_and_set(&lock, 1);
22632    __sync_lock_release(&lock);
22633   ;
22634   return 0;
22635 }
22636 _ACEOF
22637 rm -f conftest.$ac_objext conftest$ac_exeext
22638 if { (ac_try="$ac_link"
22639 case "(($ac_try" in
22640   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22641   *) ac_try_echo=$ac_try;;
22642 esac
22643 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22644 $as_echo "$ac_try_echo") >&5
22645   (eval "$ac_link") 2>conftest.er1
22646   ac_status=$?
22647   grep -v '^ *+' conftest.er1 >conftest.err
22648   rm -f conftest.er1
22649   cat conftest.err >&5
22650   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22651   (exit $ac_status); } && {
22652          test -z "$ac_c_werror_flag" ||
22653          test ! -s conftest.err
22654        } && test -s conftest$ac_exeext && {
22655          test "$cross_compiling" = yes ||
22656          $as_test_x conftest$ac_exeext
22657        }; then
22658   pgac_cv_gcc_int_atomics="yes"
22659 else
22660   $as_echo "$as_me: failed program was:" >&5
22661 sed 's/^/| /' conftest.$ac_ext >&5
22662
22663         pgac_cv_gcc_int_atomics="no"
22664 fi
22665
22666 rm -rf conftest.dSYM
22667 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22668       conftest$ac_exeext conftest.$ac_ext
22669 fi
22670 { $as_echo "$as_me:$LINENO: result: $pgac_cv_gcc_int_atomics" >&5
22671 $as_echo "$pgac_cv_gcc_int_atomics" >&6; }
22672 if test x"$pgac_cv_gcc_int_atomics" = x"yes"; then
22673
22674 cat >>confdefs.h <<\_ACEOF
22675 #define HAVE_GCC_INT_ATOMICS 1
22676 _ACEOF
22677
22678 fi
22679
22680 # Lastly, restore full LIBS list and check for readline/libedit symbols
22681 LIBS="$LIBS_including_readline"
22682
22683 if test "$with_readline" = yes; then
22684   { $as_echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
22685 $as_echo_n "checking for rl_completion_append_character... " >&6; }
22686 if test "${pgac_cv_var_rl_completion_append_character+set}" = set; then
22687   $as_echo_n "(cached) " >&6
22688 else
22689   cat >conftest.$ac_ext <<_ACEOF
22690 /* confdefs.h.  */
22691 _ACEOF
22692 cat confdefs.h >>conftest.$ac_ext
22693 cat >>conftest.$ac_ext <<_ACEOF
22694 /* end confdefs.h.  */
22695 #include <stdio.h>
22696 #ifdef HAVE_READLINE_READLINE_H
22697 # include <readline/readline.h>
22698 #elif defined(HAVE_READLINE_H)
22699 # include <readline.h>
22700 #endif
22701
22702 int
22703 main ()
22704 {
22705 rl_completion_append_character = 'x';
22706   ;
22707   return 0;
22708 }
22709 _ACEOF
22710 rm -f conftest.$ac_objext conftest$ac_exeext
22711 if { (ac_try="$ac_link"
22712 case "(($ac_try" in
22713   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22714   *) ac_try_echo=$ac_try;;
22715 esac
22716 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22717 $as_echo "$ac_try_echo") >&5
22718   (eval "$ac_link") 2>conftest.er1
22719   ac_status=$?
22720   grep -v '^ *+' conftest.er1 >conftest.err
22721   rm -f conftest.er1
22722   cat conftest.err >&5
22723   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22724   (exit $ac_status); } && {
22725          test -z "$ac_c_werror_flag" ||
22726          test ! -s conftest.err
22727        } && test -s conftest$ac_exeext && {
22728          test "$cross_compiling" = yes ||
22729          $as_test_x conftest$ac_exeext
22730        }; then
22731   pgac_cv_var_rl_completion_append_character=yes
22732 else
22733   $as_echo "$as_me: failed program was:" >&5
22734 sed 's/^/| /' conftest.$ac_ext >&5
22735
22736         pgac_cv_var_rl_completion_append_character=no
22737 fi
22738
22739 rm -rf conftest.dSYM
22740 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22741       conftest$ac_exeext conftest.$ac_ext
22742 fi
22743 { $as_echo "$as_me:$LINENO: result: $pgac_cv_var_rl_completion_append_character" >&5
22744 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
22745 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
22746
22747 cat >>confdefs.h <<\_ACEOF
22748 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22749 _ACEOF
22750
22751 fi
22752
22753
22754 for ac_func in rl_completion_matches rl_filename_completion_function
22755 do
22756 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22757 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22758 $as_echo_n "checking for $ac_func... " >&6; }
22759 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22760   $as_echo_n "(cached) " >&6
22761 else
22762   cat >conftest.$ac_ext <<_ACEOF
22763 /* confdefs.h.  */
22764 _ACEOF
22765 cat confdefs.h >>conftest.$ac_ext
22766 cat >>conftest.$ac_ext <<_ACEOF
22767 /* end confdefs.h.  */
22768 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22769    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22770 #define $ac_func innocuous_$ac_func
22771
22772 /* System header to define __stub macros and hopefully few prototypes,
22773     which can conflict with char $ac_func (); below.
22774     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22775     <limits.h> exists even on freestanding compilers.  */
22776
22777 #ifdef __STDC__
22778 # include <limits.h>
22779 #else
22780 # include <assert.h>
22781 #endif
22782
22783 #undef $ac_func
22784
22785 /* Override any GCC internal prototype to avoid an error.
22786    Use char because int might match the return type of a GCC
22787    builtin and then its argument prototype would still apply.  */
22788 #ifdef __cplusplus
22789 extern "C"
22790 #endif
22791 char $ac_func ();
22792 /* The GNU C library defines this for functions which it implements
22793     to always fail with ENOSYS.  Some functions are actually named
22794     something starting with __ and the normal name is an alias.  */
22795 #if defined __stub_$ac_func || defined __stub___$ac_func
22796 choke me
22797 #endif
22798
22799 int
22800 main ()
22801 {
22802 return $ac_func ();
22803   ;
22804   return 0;
22805 }
22806 _ACEOF
22807 rm -f conftest.$ac_objext conftest$ac_exeext
22808 if { (ac_try="$ac_link"
22809 case "(($ac_try" in
22810   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22811   *) ac_try_echo=$ac_try;;
22812 esac
22813 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22814 $as_echo "$ac_try_echo") >&5
22815   (eval "$ac_link") 2>conftest.er1
22816   ac_status=$?
22817   grep -v '^ *+' conftest.er1 >conftest.err
22818   rm -f conftest.er1
22819   cat conftest.err >&5
22820   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22821   (exit $ac_status); } && {
22822          test -z "$ac_c_werror_flag" ||
22823          test ! -s conftest.err
22824        } && test -s conftest$ac_exeext && {
22825          test "$cross_compiling" = yes ||
22826          $as_test_x conftest$ac_exeext
22827        }; then
22828   eval "$as_ac_var=yes"
22829 else
22830   $as_echo "$as_me: failed program was:" >&5
22831 sed 's/^/| /' conftest.$ac_ext >&5
22832
22833         eval "$as_ac_var=no"
22834 fi
22835
22836 rm -rf conftest.dSYM
22837 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22838       conftest$ac_exeext conftest.$ac_ext
22839 fi
22840 ac_res=`eval 'as_val=${'$as_ac_var'}
22841                  $as_echo "$as_val"'`
22842                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22843 $as_echo "$ac_res" >&6; }
22844 as_val=`eval 'as_val=${'$as_ac_var'}
22845                  $as_echo "$as_val"'`
22846    if test "x$as_val" = x""yes; then
22847   cat >>confdefs.h <<_ACEOF
22848 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22849 _ACEOF
22850
22851 fi
22852 done
22853
22854
22855
22856 for ac_func in append_history history_truncate_file
22857 do
22858 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22859 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22860 $as_echo_n "checking for $ac_func... " >&6; }
22861 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22862   $as_echo_n "(cached) " >&6
22863 else
22864   cat >conftest.$ac_ext <<_ACEOF
22865 /* confdefs.h.  */
22866 _ACEOF
22867 cat confdefs.h >>conftest.$ac_ext
22868 cat >>conftest.$ac_ext <<_ACEOF
22869 /* end confdefs.h.  */
22870 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22871    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
22872 #define $ac_func innocuous_$ac_func
22873
22874 /* System header to define __stub macros and hopefully few prototypes,
22875     which can conflict with char $ac_func (); below.
22876     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22877     <limits.h> exists even on freestanding compilers.  */
22878
22879 #ifdef __STDC__
22880 # include <limits.h>
22881 #else
22882 # include <assert.h>
22883 #endif
22884
22885 #undef $ac_func
22886
22887 /* Override any GCC internal prototype to avoid an error.
22888    Use char because int might match the return type of a GCC
22889    builtin and then its argument prototype would still apply.  */
22890 #ifdef __cplusplus
22891 extern "C"
22892 #endif
22893 char $ac_func ();
22894 /* The GNU C library defines this for functions which it implements
22895     to always fail with ENOSYS.  Some functions are actually named
22896     something starting with __ and the normal name is an alias.  */
22897 #if defined __stub_$ac_func || defined __stub___$ac_func
22898 choke me
22899 #endif
22900
22901 int
22902 main ()
22903 {
22904 return $ac_func ();
22905   ;
22906   return 0;
22907 }
22908 _ACEOF
22909 rm -f conftest.$ac_objext conftest$ac_exeext
22910 if { (ac_try="$ac_link"
22911 case "(($ac_try" in
22912   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22913   *) ac_try_echo=$ac_try;;
22914 esac
22915 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22916 $as_echo "$ac_try_echo") >&5
22917   (eval "$ac_link") 2>conftest.er1
22918   ac_status=$?
22919   grep -v '^ *+' conftest.er1 >conftest.err
22920   rm -f conftest.er1
22921   cat conftest.err >&5
22922   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22923   (exit $ac_status); } && {
22924          test -z "$ac_c_werror_flag" ||
22925          test ! -s conftest.err
22926        } && test -s conftest$ac_exeext && {
22927          test "$cross_compiling" = yes ||
22928          $as_test_x conftest$ac_exeext
22929        }; then
22930   eval "$as_ac_var=yes"
22931 else
22932   $as_echo "$as_me: failed program was:" >&5
22933 sed 's/^/| /' conftest.$ac_ext >&5
22934
22935         eval "$as_ac_var=no"
22936 fi
22937
22938 rm -rf conftest.dSYM
22939 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22940       conftest$ac_exeext conftest.$ac_ext
22941 fi
22942 ac_res=`eval 'as_val=${'$as_ac_var'}
22943                  $as_echo "$as_val"'`
22944                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22945 $as_echo "$ac_res" >&6; }
22946 as_val=`eval 'as_val=${'$as_ac_var'}
22947                  $as_echo "$as_val"'`
22948    if test "x$as_val" = x""yes; then
22949   cat >>confdefs.h <<_ACEOF
22950 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22951 _ACEOF
22952
22953 fi
22954 done
22955
22956 fi
22957
22958
22959 #
22960 # Pthreads
22961 #
22962 # For each platform, we need to know about any special compile and link
22963 # libraries, and whether the normal C function names are thread-safe.
22964 # See the comment at the top of src/port/thread.c for more information.
22965 # WIN32 doesn't need the pthread tests;  it always uses threads
22966 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
22967
22968
22969
22970 ac_ext=c
22971 ac_cpp='$CPP $CPPFLAGS'
22972 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22973 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22974 ac_compiler_gnu=$ac_cv_c_compiler_gnu
22975
22976 acx_pthread_ok=no
22977
22978 # We used to check for pthread.h first, but this fails if pthread.h
22979 # requires special compiler flags (e.g. on True64 or Sequent).
22980 # It gets checked for in the link test anyway.
22981
22982 # First of all, check if the user has set any of the PTHREAD_LIBS,
22983 # etcetera environment variables, and if threads linking works using
22984 # them:
22985 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
22986         save_CFLAGS="$CFLAGS"
22987         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
22988         save_LIBS="$LIBS"
22989         LIBS="$PTHREAD_LIBS $LIBS"
22990         { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
22991 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
22992         cat >conftest.$ac_ext <<_ACEOF
22993 /* confdefs.h.  */
22994 _ACEOF
22995 cat confdefs.h >>conftest.$ac_ext
22996 cat >>conftest.$ac_ext <<_ACEOF
22997 /* end confdefs.h.  */
22998
22999 /* Override any GCC internal prototype to avoid an error.
23000    Use char because int might match the return type of a GCC
23001    builtin and then its argument prototype would still apply.  */
23002 #ifdef __cplusplus
23003 extern "C"
23004 #endif
23005 char pthread_join ();
23006 int
23007 main ()
23008 {
23009 return pthread_join ();
23010   ;
23011   return 0;
23012 }
23013 _ACEOF
23014 rm -f conftest.$ac_objext conftest$ac_exeext
23015 if { (ac_try="$ac_link"
23016 case "(($ac_try" in
23017   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23018   *) ac_try_echo=$ac_try;;
23019 esac
23020 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23021 $as_echo "$ac_try_echo") >&5
23022   (eval "$ac_link") 2>conftest.er1
23023   ac_status=$?
23024   grep -v '^ *+' conftest.er1 >conftest.err
23025   rm -f conftest.er1
23026   cat conftest.err >&5
23027   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23028   (exit $ac_status); } && {
23029          test -z "$ac_c_werror_flag" ||
23030          test ! -s conftest.err
23031        } && test -s conftest$ac_exeext && {
23032          test "$cross_compiling" = yes ||
23033          $as_test_x conftest$ac_exeext
23034        }; then
23035   acx_pthread_ok=yes
23036 else
23037   $as_echo "$as_me: failed program was:" >&5
23038 sed 's/^/| /' conftest.$ac_ext >&5
23039
23040
23041 fi
23042
23043 rm -rf conftest.dSYM
23044 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23045       conftest$ac_exeext conftest.$ac_ext
23046         { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
23047 $as_echo "$acx_pthread_ok" >&6; }
23048         if test x"$acx_pthread_ok" = xno; then
23049                 PTHREAD_LIBS=""
23050                 PTHREAD_CFLAGS=""
23051         fi
23052         LIBS="$save_LIBS"
23053         CFLAGS="$save_CFLAGS"
23054 fi
23055
23056 # We must check for the threads library under a number of different
23057 # names; the ordering is very important because some systems
23058 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
23059 # libraries is broken (non-POSIX).
23060
23061 # Create a list of thread flags to try.  Items starting with a "-" are
23062 # C compiler flags, and other items are library names, except for "none"
23063 # which indicates that we try without any flags at all, and "pthread-config"
23064 # which is a program returning the flags for the Pth emulation library.
23065
23066 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
23067
23068 # The ordering *is* (sometimes) important.  Some notes on the
23069 # individual items follow:
23070
23071 # pthreads: AIX (must check this before -lpthread)
23072 # none: in case threads are in libc; should be tried before -Kthread and
23073 #       other compiler flags to prevent continual compiler warnings
23074 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
23075 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
23076 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
23077 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
23078 # -pthreads: Solaris/gcc
23079 # -mthreads: Mingw32/gcc, Lynx/gcc
23080 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
23081 #      doesn't hurt to check since this sometimes defines pthreads too;
23082 #      also defines -D_REENTRANT)
23083 # pthread: Linux, etcetera
23084 # --thread-safe: KAI C++
23085 # pthread-config: use pthread-config program (for GNU Pth library)
23086
23087 case "${host_cpu}-${host_os}" in
23088         *solaris*)
23089
23090         # On Solaris (at least, for some versions), libc contains stubbed
23091         # (non-functional) versions of the pthreads routines, so link-based
23092         # tests will erroneously succeed.  (We need to link with -pthread or
23093         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
23094         # a function called by this macro, so we could check for that, but
23095         # who knows whether they'll stub that too in a future libc.)  So,
23096         # we'll just look for -pthreads and -lpthread first:
23097
23098         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
23099         ;;
23100 esac
23101
23102 if test x"$acx_pthread_ok" = xno; then
23103 for flag in $acx_pthread_flags; do
23104
23105         tryPTHREAD_CFLAGS=""
23106         tryPTHREAD_LIBS=""
23107         case $flag in
23108                 none)
23109                 { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
23110 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
23111                 ;;
23112
23113                 -*)
23114                 { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
23115 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
23116                 tryPTHREAD_CFLAGS="$flag"
23117                 ;;
23118
23119                 pthread-config)
23120                 # skip this if we already have flags defined, for PostgreSQL
23121                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
23122                 # Extract the first word of "pthread-config", so it can be a program name with args.
23123 set dummy pthread-config; ac_word=$2
23124 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
23125 $as_echo_n "checking for $ac_word... " >&6; }
23126 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
23127   $as_echo_n "(cached) " >&6
23128 else
23129   if test -n "$acx_pthread_config"; then
23130   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
23131 else
23132 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23133 for as_dir in $PATH
23134 do
23135   IFS=$as_save_IFS
23136   test -z "$as_dir" && as_dir=.
23137   for ac_exec_ext in '' $ac_executable_extensions; do
23138   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23139     ac_cv_prog_acx_pthread_config="yes"
23140     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23141     break 2
23142   fi
23143 done
23144 done
23145 IFS=$as_save_IFS
23146
23147   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
23148 fi
23149 fi
23150 acx_pthread_config=$ac_cv_prog_acx_pthread_config
23151 if test -n "$acx_pthread_config"; then
23152   { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
23153 $as_echo "$acx_pthread_config" >&6; }
23154 else
23155   { $as_echo "$as_me:$LINENO: result: no" >&5
23156 $as_echo "no" >&6; }
23157 fi
23158
23159
23160                 if test x"$acx_pthread_config" = xno; then continue; fi
23161                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
23162                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
23163                 ;;
23164
23165                 *)
23166                 { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
23167 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
23168                 tryPTHREAD_LIBS="-l$flag"
23169                 ;;
23170         esac
23171
23172         save_LIBS="$LIBS"
23173         save_CFLAGS="$CFLAGS"
23174         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
23175         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
23176
23177         # Check for various functions.  We must include pthread.h,
23178         # since some functions may be macros.  (On the Sequent, we
23179         # need a special flag -Kthread to make this header compile.)
23180         # We check for pthread_join because it is in -lpthread on IRIX
23181         # while pthread_create is in libc.  We check for pthread_attr_init
23182         # due to DEC craziness with -lpthreads.  We check for
23183         # pthread_cleanup_push because it is one of the few pthread
23184         # functions on Solaris that doesn't have a non-functional libc stub.
23185         # We try pthread_create on general principles.
23186         cat >conftest.$ac_ext <<_ACEOF
23187 /* confdefs.h.  */
23188 _ACEOF
23189 cat confdefs.h >>conftest.$ac_ext
23190 cat >>conftest.$ac_ext <<_ACEOF
23191 /* end confdefs.h.  */
23192 #include <pthread.h>
23193 int
23194 main ()
23195 {
23196 pthread_t th; pthread_join(th, 0);
23197                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
23198                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
23199   ;
23200   return 0;
23201 }
23202 _ACEOF
23203 rm -f conftest.$ac_objext conftest$ac_exeext
23204 if { (ac_try="$ac_link"
23205 case "(($ac_try" in
23206   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23207   *) ac_try_echo=$ac_try;;
23208 esac
23209 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23210 $as_echo "$ac_try_echo") >&5
23211   (eval "$ac_link") 2>conftest.er1
23212   ac_status=$?
23213   grep -v '^ *+' conftest.er1 >conftest.err
23214   rm -f conftest.er1
23215   cat conftest.err >&5
23216   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23217   (exit $ac_status); } && {
23218          test -z "$ac_c_werror_flag" ||
23219          test ! -s conftest.err
23220        } && test -s conftest$ac_exeext && {
23221          test "$cross_compiling" = yes ||
23222          $as_test_x conftest$ac_exeext
23223        }; then
23224   acx_pthread_ok=yes
23225 else
23226   $as_echo "$as_me: failed program was:" >&5
23227 sed 's/^/| /' conftest.$ac_ext >&5
23228
23229         acx_pthread_ok=no
23230 fi
23231
23232 rm -rf conftest.dSYM
23233 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23234       conftest$ac_exeext conftest.$ac_ext
23235
23236         if test "x$acx_pthread_ok" = xyes; then
23237             # Don't use options that are ignored by the compiler.
23238             # We find them by checking stderror.
23239             cat >conftest.$ac_ext <<_ACEOF
23240 int
23241 main (int argc, char **argv)
23242 {
23243   (void) argc;
23244   (void) argv;
23245   return 0;
23246 }
23247 _ACEOF
23248             rm -f conftest.$ac_objext conftest$ac_exeext
23249             # Check both linking and compiling, because they might tolerate different options.
23250             if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
23251                 # we continue with more flags because Linux needs -lpthread
23252                 # for libpq builds on PostgreSQL.  The test above only
23253                 # tests for building binaries, not shared libraries.
23254                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
23255                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
23256             else   acx_pthread_ok=no
23257             fi
23258         fi
23259
23260         LIBS="$save_LIBS"
23261         CFLAGS="$save_CFLAGS"
23262
23263         { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
23264 $as_echo "$acx_pthread_ok" >&6; }
23265 done
23266 fi
23267
23268 # Various other checks:
23269 if test "x$acx_pthread_ok" = xyes; then
23270         save_LIBS="$LIBS"
23271         LIBS="$PTHREAD_LIBS $LIBS"
23272         save_CFLAGS="$CFLAGS"
23273         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
23274
23275         # Detect AIX lossage: threads are created detached by default
23276         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
23277         { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
23278 $as_echo_n "checking for joinable pthread attribute... " >&6; }
23279         cat >conftest.$ac_ext <<_ACEOF
23280 /* confdefs.h.  */
23281 _ACEOF
23282 cat confdefs.h >>conftest.$ac_ext
23283 cat >>conftest.$ac_ext <<_ACEOF
23284 /* end confdefs.h.  */
23285 #include <pthread.h>
23286 int
23287 main ()
23288 {
23289 int attr=PTHREAD_CREATE_JOINABLE;
23290   ;
23291   return 0;
23292 }
23293 _ACEOF
23294 rm -f conftest.$ac_objext conftest$ac_exeext
23295 if { (ac_try="$ac_link"
23296 case "(($ac_try" in
23297   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23298   *) ac_try_echo=$ac_try;;
23299 esac
23300 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23301 $as_echo "$ac_try_echo") >&5
23302   (eval "$ac_link") 2>conftest.er1
23303   ac_status=$?
23304   grep -v '^ *+' conftest.er1 >conftest.err
23305   rm -f conftest.er1
23306   cat conftest.err >&5
23307   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23308   (exit $ac_status); } && {
23309          test -z "$ac_c_werror_flag" ||
23310          test ! -s conftest.err
23311        } && test -s conftest$ac_exeext && {
23312          test "$cross_compiling" = yes ||
23313          $as_test_x conftest$ac_exeext
23314        }; then
23315   ok=PTHREAD_CREATE_JOINABLE
23316 else
23317   $as_echo "$as_me: failed program was:" >&5
23318 sed 's/^/| /' conftest.$ac_ext >&5
23319
23320         ok=unknown
23321 fi
23322
23323 rm -rf conftest.dSYM
23324 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23325       conftest$ac_exeext conftest.$ac_ext
23326         if test x"$ok" = xunknown; then
23327                 cat >conftest.$ac_ext <<_ACEOF
23328 /* confdefs.h.  */
23329 _ACEOF
23330 cat confdefs.h >>conftest.$ac_ext
23331 cat >>conftest.$ac_ext <<_ACEOF
23332 /* end confdefs.h.  */
23333 #include <pthread.h>
23334 int
23335 main ()
23336 {
23337 int attr=PTHREAD_CREATE_UNDETACHED;
23338   ;
23339   return 0;
23340 }
23341 _ACEOF
23342 rm -f conftest.$ac_objext conftest$ac_exeext
23343 if { (ac_try="$ac_link"
23344 case "(($ac_try" in
23345   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23346   *) ac_try_echo=$ac_try;;
23347 esac
23348 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23349 $as_echo "$ac_try_echo") >&5
23350   (eval "$ac_link") 2>conftest.er1
23351   ac_status=$?
23352   grep -v '^ *+' conftest.er1 >conftest.err
23353   rm -f conftest.er1
23354   cat conftest.err >&5
23355   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23356   (exit $ac_status); } && {
23357          test -z "$ac_c_werror_flag" ||
23358          test ! -s conftest.err
23359        } && test -s conftest$ac_exeext && {
23360          test "$cross_compiling" = yes ||
23361          $as_test_x conftest$ac_exeext
23362        }; then
23363   ok=PTHREAD_CREATE_UNDETACHED
23364 else
23365   $as_echo "$as_me: failed program was:" >&5
23366 sed 's/^/| /' conftest.$ac_ext >&5
23367
23368         ok=unknown
23369 fi
23370
23371 rm -rf conftest.dSYM
23372 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23373       conftest$ac_exeext conftest.$ac_ext
23374         fi
23375         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
23376
23377 cat >>confdefs.h <<\_ACEOF
23378 #define PTHREAD_CREATE_JOINABLE $ok
23379 _ACEOF
23380
23381         fi
23382         { $as_echo "$as_me:$LINENO: result: ${ok}" >&5
23383 $as_echo "${ok}" >&6; }
23384         if test x"$ok" = xunknown; then
23385                 { $as_echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
23386 $as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
23387         fi
23388
23389         { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
23390 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
23391         flag=no
23392 # We always add these in PostgreSQL
23393 #       case "${host_cpu}-${host_os}" in
23394 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
23395 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
23396 #       esac
23397         { $as_echo "$as_me:$LINENO: result: ${flag}" >&5
23398 $as_echo "${flag}" >&6; }
23399         if test "x$flag" != xno; then
23400                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
23401         fi
23402
23403         LIBS="$save_LIBS"
23404         CFLAGS="$save_CFLAGS"
23405
23406 # Supporting cc_r would require a special CC in all places that
23407 # use libpq, and that is ugly, so we don't do it.  Users can still
23408 # define their compiler as cc_r to do thread builds of everything.
23409         # More AIX lossage: must compile with cc_r
23410         # Extract the first word of "cc_r", so it can be a program name with args.
23411 set dummy cc_r; ac_word=$2
23412 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
23413 $as_echo_n "checking for $ac_word... " >&6; }
23414 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
23415   $as_echo_n "(cached) " >&6
23416 else
23417   if test -n "$PTHREAD_CC"; then
23418   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
23419 else
23420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23421 for as_dir in $PATH
23422 do
23423   IFS=$as_save_IFS
23424   test -z "$as_dir" && as_dir=.
23425   for ac_exec_ext in '' $ac_executable_extensions; do
23426   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23427     ac_cv_prog_PTHREAD_CC="cc_r"
23428     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23429     break 2
23430   fi
23431 done
23432 done
23433 IFS=$as_save_IFS
23434
23435   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
23436 fi
23437 fi
23438 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
23439 if test -n "$PTHREAD_CC"; then
23440   { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
23441 $as_echo "$PTHREAD_CC" >&6; }
23442 else
23443   { $as_echo "$as_me:$LINENO: result: no" >&5
23444 $as_echo "no" >&6; }
23445 fi
23446
23447
23448 else
23449         PTHREAD_CC="$CC"
23450 fi
23451
23452
23453
23454
23455
23456 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
23457 if test x"$acx_pthread_ok" = xyes; then
23458
23459 cat >>confdefs.h <<\_ACEOF
23460 #define HAVE_PTHREAD 1
23461 _ACEOF
23462
23463         :
23464 else
23465         acx_pthread_ok=no
23466
23467 fi
23468 ac_ext=c
23469 ac_cpp='$CPP $CPPFLAGS'
23470 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23471 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23472 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23473
23474         # set thread flags
23475
23476 # Some platforms use these, so just define them.  They can't hurt if they
23477 # are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
23478 # enables 5-arg getpwuid_r, among other things.
23479 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
23480
23481
23482 # At this point, we don't want to muck with the compiler name for threading.
23483 # Let's see who fails, perhaps AIX.  2004-04-23
23484 if test "$PTHREAD_CC" != "$CC"; then
23485 { { $as_echo "$as_me:$LINENO: error:
23486 PostgreSQL does not support platforms that require a special compiler
23487 for thread safety;  use --disable-thread-safety to disable thread safety." >&5
23488 $as_echo "$as_me: error:
23489 PostgreSQL does not support platforms that require a special compiler
23490 for thread safety;  use --disable-thread-safety to disable thread safety." >&2;}
23491    { (exit 1); exit 1; }; }
23492 fi
23493
23494 # Check for *_r functions
23495 _CFLAGS="$CFLAGS"
23496 _LIBS="$LIBS"
23497 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
23498 LIBS="$LIBS $PTHREAD_LIBS"
23499
23500 if test "$PORTNAME" != "win32"; then
23501 if test "${ac_cv_header_pthread_h+set}" = set; then
23502   { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
23503 $as_echo_n "checking for pthread.h... " >&6; }
23504 if test "${ac_cv_header_pthread_h+set}" = set; then
23505   $as_echo_n "(cached) " >&6
23506 fi
23507 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
23508 $as_echo "$ac_cv_header_pthread_h" >&6; }
23509 else
23510   # Is the header compilable?
23511 { $as_echo "$as_me:$LINENO: checking pthread.h usability" >&5
23512 $as_echo_n "checking pthread.h usability... " >&6; }
23513 cat >conftest.$ac_ext <<_ACEOF
23514 /* confdefs.h.  */
23515 _ACEOF
23516 cat confdefs.h >>conftest.$ac_ext
23517 cat >>conftest.$ac_ext <<_ACEOF
23518 /* end confdefs.h.  */
23519 $ac_includes_default
23520 #include <pthread.h>
23521 _ACEOF
23522 rm -f conftest.$ac_objext
23523 if { (ac_try="$ac_compile"
23524 case "(($ac_try" in
23525   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23526   *) ac_try_echo=$ac_try;;
23527 esac
23528 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23529 $as_echo "$ac_try_echo") >&5
23530   (eval "$ac_compile") 2>conftest.er1
23531   ac_status=$?
23532   grep -v '^ *+' conftest.er1 >conftest.err
23533   rm -f conftest.er1
23534   cat conftest.err >&5
23535   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23536   (exit $ac_status); } && {
23537          test -z "$ac_c_werror_flag" ||
23538          test ! -s conftest.err
23539        } && test -s conftest.$ac_objext; then
23540   ac_header_compiler=yes
23541 else
23542   $as_echo "$as_me: failed program was:" >&5
23543 sed 's/^/| /' conftest.$ac_ext >&5
23544
23545         ac_header_compiler=no
23546 fi
23547
23548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23549 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23550 $as_echo "$ac_header_compiler" >&6; }
23551
23552 # Is the header present?
23553 { $as_echo "$as_me:$LINENO: checking pthread.h presence" >&5
23554 $as_echo_n "checking pthread.h presence... " >&6; }
23555 cat >conftest.$ac_ext <<_ACEOF
23556 /* confdefs.h.  */
23557 _ACEOF
23558 cat confdefs.h >>conftest.$ac_ext
23559 cat >>conftest.$ac_ext <<_ACEOF
23560 /* end confdefs.h.  */
23561 #include <pthread.h>
23562 _ACEOF
23563 if { (ac_try="$ac_cpp conftest.$ac_ext"
23564 case "(($ac_try" in
23565   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23566   *) ac_try_echo=$ac_try;;
23567 esac
23568 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23569 $as_echo "$ac_try_echo") >&5
23570   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
23571   ac_status=$?
23572   grep -v '^ *+' conftest.er1 >conftest.err
23573   rm -f conftest.er1
23574   cat conftest.err >&5
23575   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23576   (exit $ac_status); } >/dev/null && {
23577          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23578          test ! -s conftest.err
23579        }; then
23580   ac_header_preproc=yes
23581 else
23582   $as_echo "$as_me: failed program was:" >&5
23583 sed 's/^/| /' conftest.$ac_ext >&5
23584
23585   ac_header_preproc=no
23586 fi
23587
23588 rm -f conftest.err conftest.$ac_ext
23589 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23590 $as_echo "$ac_header_preproc" >&6; }
23591
23592 # So?  What about this header?
23593 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23594   yes:no: )
23595     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
23596 $as_echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23597     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
23598 $as_echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
23599     ac_header_preproc=yes
23600     ;;
23601   no:yes:* )
23602     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
23603 $as_echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
23604     { $as_echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
23605 $as_echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
23606     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
23607 $as_echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
23608     { $as_echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
23609 $as_echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
23610     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
23611 $as_echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
23612     { $as_echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
23613 $as_echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
23614     ( cat <<\_ASBOX
23615 ## ---------------------------------------- ##
23616 ## Report this to pgsql-bugs@postgresql.org ##
23617 ## ---------------------------------------- ##
23618 _ASBOX
23619      ) | sed "s/^/$as_me: WARNING:     /" >&2
23620     ;;
23621 esac
23622 { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
23623 $as_echo_n "checking for pthread.h... " >&6; }
23624 if test "${ac_cv_header_pthread_h+set}" = set; then
23625   $as_echo_n "(cached) " >&6
23626 else
23627   ac_cv_header_pthread_h=$ac_header_preproc
23628 fi
23629 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
23630 $as_echo "$ac_cv_header_pthread_h" >&6; }
23631
23632 fi
23633 if test "x$ac_cv_header_pthread_h" = x""yes; then
23634   :
23635 else
23636   { { $as_echo "$as_me:$LINENO: error:
23637 pthread.h not found;  use --disable-thread-safety to disable thread safety" >&5
23638 $as_echo "$as_me: error:
23639 pthread.h not found;  use --disable-thread-safety to disable thread safety" >&2;}
23640    { (exit 1); exit 1; }; }
23641 fi
23642
23643
23644 fi
23645
23646
23647
23648
23649 for ac_func in strerror_r getpwuid_r gethostbyname_r
23650 do
23651 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23652 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
23653 $as_echo_n "checking for $ac_func... " >&6; }
23654 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23655   $as_echo_n "(cached) " >&6
23656 else
23657   cat >conftest.$ac_ext <<_ACEOF
23658 /* confdefs.h.  */
23659 _ACEOF
23660 cat confdefs.h >>conftest.$ac_ext
23661 cat >>conftest.$ac_ext <<_ACEOF
23662 /* end confdefs.h.  */
23663 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23664    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
23665 #define $ac_func innocuous_$ac_func
23666
23667 /* System header to define __stub macros and hopefully few prototypes,
23668     which can conflict with char $ac_func (); below.
23669     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23670     <limits.h> exists even on freestanding compilers.  */
23671
23672 #ifdef __STDC__
23673 # include <limits.h>
23674 #else
23675 # include <assert.h>
23676 #endif
23677
23678 #undef $ac_func
23679
23680 /* Override any GCC internal prototype to avoid an error.
23681    Use char because int might match the return type of a GCC
23682    builtin and then its argument prototype would still apply.  */
23683 #ifdef __cplusplus
23684 extern "C"
23685 #endif
23686 char $ac_func ();
23687 /* The GNU C library defines this for functions which it implements
23688     to always fail with ENOSYS.  Some functions are actually named
23689     something starting with __ and the normal name is an alias.  */
23690 #if defined __stub_$ac_func || defined __stub___$ac_func
23691 choke me
23692 #endif
23693
23694 int
23695 main ()
23696 {
23697 return $ac_func ();
23698   ;
23699   return 0;
23700 }
23701 _ACEOF
23702 rm -f conftest.$ac_objext conftest$ac_exeext
23703 if { (ac_try="$ac_link"
23704 case "(($ac_try" in
23705   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23706   *) ac_try_echo=$ac_try;;
23707 esac
23708 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23709 $as_echo "$ac_try_echo") >&5
23710   (eval "$ac_link") 2>conftest.er1
23711   ac_status=$?
23712   grep -v '^ *+' conftest.er1 >conftest.err
23713   rm -f conftest.er1
23714   cat conftest.err >&5
23715   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23716   (exit $ac_status); } && {
23717          test -z "$ac_c_werror_flag" ||
23718          test ! -s conftest.err
23719        } && test -s conftest$ac_exeext && {
23720          test "$cross_compiling" = yes ||
23721          $as_test_x conftest$ac_exeext
23722        }; then
23723   eval "$as_ac_var=yes"
23724 else
23725   $as_echo "$as_me: failed program was:" >&5
23726 sed 's/^/| /' conftest.$ac_ext >&5
23727
23728         eval "$as_ac_var=no"
23729 fi
23730
23731 rm -rf conftest.dSYM
23732 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23733       conftest$ac_exeext conftest.$ac_ext
23734 fi
23735 ac_res=`eval 'as_val=${'$as_ac_var'}
23736                  $as_echo "$as_val"'`
23737                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
23738 $as_echo "$ac_res" >&6; }
23739 as_val=`eval 'as_val=${'$as_ac_var'}
23740                  $as_echo "$as_val"'`
23741    if test "x$as_val" = x""yes; then
23742   cat >>confdefs.h <<_ACEOF
23743 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23744 _ACEOF
23745
23746 fi
23747 done
23748
23749
23750 # Do test here with the proper thread flags
23751 { $as_echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
23752 $as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
23753 if test "${pgac_cv_func_getpwuid_r_5arg+set}" = set; then
23754   $as_echo_n "(cached) " >&6
23755 else
23756   cat >conftest.$ac_ext <<_ACEOF
23757 /* confdefs.h.  */
23758 _ACEOF
23759 cat confdefs.h >>conftest.$ac_ext
23760 cat >>conftest.$ac_ext <<_ACEOF
23761 /* end confdefs.h.  */
23762 #include <sys/types.h>
23763 #include <pwd.h>
23764 int
23765 main ()
23766 {
23767 uid_t uid;
23768 struct passwd *space;
23769 char *buf;
23770 size_t bufsize;
23771 struct passwd **result;
23772 getpwuid_r(uid, space, buf, bufsize, result);
23773   ;
23774   return 0;
23775 }
23776 _ACEOF
23777 rm -f conftest.$ac_objext
23778 if { (ac_try="$ac_compile"
23779 case "(($ac_try" in
23780   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23781   *) ac_try_echo=$ac_try;;
23782 esac
23783 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23784 $as_echo "$ac_try_echo") >&5
23785   (eval "$ac_compile") 2>conftest.er1
23786   ac_status=$?
23787   grep -v '^ *+' conftest.er1 >conftest.err
23788   rm -f conftest.er1
23789   cat conftest.err >&5
23790   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23791   (exit $ac_status); } && {
23792          test -z "$ac_c_werror_flag" ||
23793          test ! -s conftest.err
23794        } && test -s conftest.$ac_objext; then
23795   pgac_cv_func_getpwuid_r_5arg=yes
23796 else
23797   $as_echo "$as_me: failed program was:" >&5
23798 sed 's/^/| /' conftest.$ac_ext >&5
23799
23800         pgac_cv_func_getpwuid_r_5arg=no
23801 fi
23802
23803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23804 fi
23805 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_getpwuid_r_5arg" >&5
23806 $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
23807 if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
23808
23809 cat >>confdefs.h <<\_ACEOF
23810 #define GETPWUID_R_5ARG /**/
23811 _ACEOF
23812
23813 fi
23814
23815 { $as_echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
23816 $as_echo_n "checking whether strerror_r returns int... " >&6; }
23817 if test "${pgac_cv_func_strerror_r_int+set}" = set; then
23818   $as_echo_n "(cached) " >&6
23819 else
23820   cat >conftest.$ac_ext <<_ACEOF
23821 /* confdefs.h.  */
23822 _ACEOF
23823 cat confdefs.h >>conftest.$ac_ext
23824 cat >>conftest.$ac_ext <<_ACEOF
23825 /* end confdefs.h.  */
23826 #include <string.h>
23827 int
23828 main ()
23829 {
23830 #ifndef _AIX
23831 int strerror_r(int, char *, size_t);
23832 #else
23833 /* Older AIX has 'int' for the third argument so we don't test the args. */
23834 int strerror_r();
23835 #endif
23836   ;
23837   return 0;
23838 }
23839 _ACEOF
23840 rm -f conftest.$ac_objext
23841 if { (ac_try="$ac_compile"
23842 case "(($ac_try" in
23843   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23844   *) ac_try_echo=$ac_try;;
23845 esac
23846 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23847 $as_echo "$ac_try_echo") >&5
23848   (eval "$ac_compile") 2>conftest.er1
23849   ac_status=$?
23850   grep -v '^ *+' conftest.er1 >conftest.err
23851   rm -f conftest.er1
23852   cat conftest.err >&5
23853   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23854   (exit $ac_status); } && {
23855          test -z "$ac_c_werror_flag" ||
23856          test ! -s conftest.err
23857        } && test -s conftest.$ac_objext; then
23858   pgac_cv_func_strerror_r_int=yes
23859 else
23860   $as_echo "$as_me: failed program was:" >&5
23861 sed 's/^/| /' conftest.$ac_ext >&5
23862
23863         pgac_cv_func_strerror_r_int=no
23864 fi
23865
23866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23867 fi
23868 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_strerror_r_int" >&5
23869 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
23870 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
23871
23872 cat >>confdefs.h <<\_ACEOF
23873 #define STRERROR_R_INT /**/
23874 _ACEOF
23875
23876 fi
23877
23878
23879 CFLAGS="$_CFLAGS"
23880 LIBS="$_LIBS"
23881
23882 else
23883 # do not use values from template file
23884 PTHREAD_CFLAGS=
23885 PTHREAD_LIBS=
23886 fi
23887
23888
23889
23890
23891
23892 # We can test for libldap_r only after we know PTHREAD_LIBS
23893 if test "$with_ldap" = yes ; then
23894   _LIBS="$LIBS"
23895   if test "$PORTNAME" != "win32"; then
23896
23897 { $as_echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
23898 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
23899 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
23900   $as_echo_n "(cached) " >&6
23901 else
23902   ac_check_lib_save_LIBS=$LIBS
23903 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
23904 cat >conftest.$ac_ext <<_ACEOF
23905 /* confdefs.h.  */
23906 _ACEOF
23907 cat confdefs.h >>conftest.$ac_ext
23908 cat >>conftest.$ac_ext <<_ACEOF
23909 /* end confdefs.h.  */
23910
23911 /* Override any GCC internal prototype to avoid an error.
23912    Use char because int might match the return type of a GCC
23913    builtin and then its argument prototype would still apply.  */
23914 #ifdef __cplusplus
23915 extern "C"
23916 #endif
23917 char ldap_bind ();
23918 int
23919 main ()
23920 {
23921 return ldap_bind ();
23922   ;
23923   return 0;
23924 }
23925 _ACEOF
23926 rm -f conftest.$ac_objext conftest$ac_exeext
23927 if { (ac_try="$ac_link"
23928 case "(($ac_try" in
23929   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23930   *) ac_try_echo=$ac_try;;
23931 esac
23932 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23933 $as_echo "$ac_try_echo") >&5
23934   (eval "$ac_link") 2>conftest.er1
23935   ac_status=$?
23936   grep -v '^ *+' conftest.er1 >conftest.err
23937   rm -f conftest.er1
23938   cat conftest.err >&5
23939   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23940   (exit $ac_status); } && {
23941          test -z "$ac_c_werror_flag" ||
23942          test ! -s conftest.err
23943        } && test -s conftest$ac_exeext && {
23944          test "$cross_compiling" = yes ||
23945          $as_test_x conftest$ac_exeext
23946        }; then
23947   ac_cv_lib_ldap_ldap_bind=yes
23948 else
23949   $as_echo "$as_me: failed program was:" >&5
23950 sed 's/^/| /' conftest.$ac_ext >&5
23951
23952         ac_cv_lib_ldap_ldap_bind=no
23953 fi
23954
23955 rm -rf conftest.dSYM
23956 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23957       conftest$ac_exeext conftest.$ac_ext
23958 LIBS=$ac_check_lib_save_LIBS
23959 fi
23960 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
23961 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
23962 if test "x$ac_cv_lib_ldap_ldap_bind" = x""yes; then
23963   cat >>confdefs.h <<_ACEOF
23964 #define HAVE_LIBLDAP 1
23965 _ACEOF
23966
23967   LIBS="-lldap $LIBS"
23968
23969 else
23970   { { $as_echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
23971 $as_echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
23972    { (exit 1); exit 1; }; }
23973 fi
23974
23975     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
23976     if test "$enable_thread_safety" = yes; then
23977       # on some platforms ldap_r fails to link without PTHREAD_LIBS
23978
23979 { $as_echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
23980 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
23981 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
23982   $as_echo_n "(cached) " >&6
23983 else
23984   ac_check_lib_save_LIBS=$LIBS
23985 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
23986 cat >conftest.$ac_ext <<_ACEOF
23987 /* confdefs.h.  */
23988 _ACEOF
23989 cat confdefs.h >>conftest.$ac_ext
23990 cat >>conftest.$ac_ext <<_ACEOF
23991 /* end confdefs.h.  */
23992
23993 /* Override any GCC internal prototype to avoid an error.
23994    Use char because int might match the return type of a GCC
23995    builtin and then its argument prototype would still apply.  */
23996 #ifdef __cplusplus
23997 extern "C"
23998 #endif
23999 char ldap_simple_bind ();
24000 int
24001 main ()
24002 {
24003 return ldap_simple_bind ();
24004   ;
24005   return 0;
24006 }
24007 _ACEOF
24008 rm -f conftest.$ac_objext conftest$ac_exeext
24009 if { (ac_try="$ac_link"
24010 case "(($ac_try" in
24011   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24012   *) ac_try_echo=$ac_try;;
24013 esac
24014 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24015 $as_echo "$ac_try_echo") >&5
24016   (eval "$ac_link") 2>conftest.er1
24017   ac_status=$?
24018   grep -v '^ *+' conftest.er1 >conftest.err
24019   rm -f conftest.er1
24020   cat conftest.err >&5
24021   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24022   (exit $ac_status); } && {
24023          test -z "$ac_c_werror_flag" ||
24024          test ! -s conftest.err
24025        } && test -s conftest$ac_exeext && {
24026          test "$cross_compiling" = yes ||
24027          $as_test_x conftest$ac_exeext
24028        }; then
24029   ac_cv_lib_ldap_r_ldap_simple_bind=yes
24030 else
24031   $as_echo "$as_me: failed program was:" >&5
24032 sed 's/^/| /' conftest.$ac_ext >&5
24033
24034         ac_cv_lib_ldap_r_ldap_simple_bind=no
24035 fi
24036
24037 rm -rf conftest.dSYM
24038 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24039       conftest$ac_exeext conftest.$ac_ext
24040 LIBS=$ac_check_lib_save_LIBS
24041 fi
24042 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
24043 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
24044 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = x""yes; then
24045   cat >>confdefs.h <<_ACEOF
24046 #define HAVE_LIBLDAP_R 1
24047 _ACEOF
24048
24049   LIBS="-lldap_r $LIBS"
24050
24051 else
24052   { { $as_echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
24053 $as_echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
24054    { (exit 1); exit 1; }; }
24055 fi
24056
24057       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
24058     else
24059       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
24060     fi
24061   else
24062
24063 { $as_echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
24064 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
24065 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
24066   $as_echo_n "(cached) " >&6
24067 else
24068   ac_check_lib_save_LIBS=$LIBS
24069 LIBS="-lwldap32  $LIBS"
24070 cat >conftest.$ac_ext <<_ACEOF
24071 /* confdefs.h.  */
24072 _ACEOF
24073 cat confdefs.h >>conftest.$ac_ext
24074 cat >>conftest.$ac_ext <<_ACEOF
24075 /* end confdefs.h.  */
24076
24077 /* Override any GCC internal prototype to avoid an error.
24078    Use char because int might match the return type of a GCC
24079    builtin and then its argument prototype would still apply.  */
24080 #ifdef __cplusplus
24081 extern "C"
24082 #endif
24083 char ldap_bind ();
24084 int
24085 main ()
24086 {
24087 return ldap_bind ();
24088   ;
24089   return 0;
24090 }
24091 _ACEOF
24092 rm -f conftest.$ac_objext conftest$ac_exeext
24093 if { (ac_try="$ac_link"
24094 case "(($ac_try" in
24095   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24096   *) ac_try_echo=$ac_try;;
24097 esac
24098 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24099 $as_echo "$ac_try_echo") >&5
24100   (eval "$ac_link") 2>conftest.er1
24101   ac_status=$?
24102   grep -v '^ *+' conftest.er1 >conftest.err
24103   rm -f conftest.er1
24104   cat conftest.err >&5
24105   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24106   (exit $ac_status); } && {
24107          test -z "$ac_c_werror_flag" ||
24108          test ! -s conftest.err
24109        } && test -s conftest$ac_exeext && {
24110          test "$cross_compiling" = yes ||
24111          $as_test_x conftest$ac_exeext
24112        }; then
24113   ac_cv_lib_wldap32_ldap_bind=yes
24114 else
24115   $as_echo "$as_me: failed program was:" >&5
24116 sed 's/^/| /' conftest.$ac_ext >&5
24117
24118         ac_cv_lib_wldap32_ldap_bind=no
24119 fi
24120
24121 rm -rf conftest.dSYM
24122 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24123       conftest$ac_exeext conftest.$ac_ext
24124 LIBS=$ac_check_lib_save_LIBS
24125 fi
24126 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
24127 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
24128 if test "x$ac_cv_lib_wldap32_ldap_bind" = x""yes; then
24129   cat >>confdefs.h <<_ACEOF
24130 #define HAVE_LIBWLDAP32 1
24131 _ACEOF
24132
24133   LIBS="-lwldap32 $LIBS"
24134
24135 else
24136   { { $as_echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
24137 $as_echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
24138    { (exit 1); exit 1; }; }
24139 fi
24140
24141     LDAP_LIBS_FE="-lwldap32"
24142     LDAP_LIBS_BE="-lwldap32"
24143   fi
24144   LIBS="$_LIBS"
24145 fi
24146
24147
24148
24149
24150 # This test makes sure that run tests work at all.  Sometimes a shared
24151 # library is found by the linker, but the runtime linker can't find it.
24152 # This check should come after all modifications of compiler or linker
24153 # variables, and before any other run tests.
24154 { $as_echo "$as_me:$LINENO: checking test program" >&5
24155 $as_echo_n "checking test program... " >&6; }
24156 if test "$cross_compiling" = yes; then
24157   { $as_echo "$as_me:$LINENO: result: cross-compiling" >&5
24158 $as_echo "cross-compiling" >&6; }
24159 else
24160   cat >conftest.$ac_ext <<_ACEOF
24161 /* confdefs.h.  */
24162 _ACEOF
24163 cat confdefs.h >>conftest.$ac_ext
24164 cat >>conftest.$ac_ext <<_ACEOF
24165 /* end confdefs.h.  */
24166 int main() { return 0; }
24167 _ACEOF
24168 rm -f conftest$ac_exeext
24169 if { (ac_try="$ac_link"
24170 case "(($ac_try" in
24171   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24172   *) ac_try_echo=$ac_try;;
24173 esac
24174 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24175 $as_echo "$ac_try_echo") >&5
24176   (eval "$ac_link") 2>&5
24177   ac_status=$?
24178   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24179   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24180   { (case "(($ac_try" in
24181   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24182   *) ac_try_echo=$ac_try;;
24183 esac
24184 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24185 $as_echo "$ac_try_echo") >&5
24186   (eval "$ac_try") 2>&5
24187   ac_status=$?
24188   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24189   (exit $ac_status); }; }; then
24190   { $as_echo "$as_me:$LINENO: result: ok" >&5
24191 $as_echo "ok" >&6; }
24192 else
24193   $as_echo "$as_me: program exited with status $ac_status" >&5
24194 $as_echo "$as_me: failed program was:" >&5
24195 sed 's/^/| /' conftest.$ac_ext >&5
24196
24197 ( exit $ac_status )
24198 { $as_echo "$as_me:$LINENO: result: failed" >&5
24199 $as_echo "failed" >&6; }
24200 { { $as_echo "$as_me:$LINENO: error:
24201 Could not execute a simple test program.  This may be a problem
24202 related to locating shared libraries.  Check the file 'config.log'
24203 for the exact reason." >&5
24204 $as_echo "$as_me: error:
24205 Could not execute a simple test program.  This may be a problem
24206 related to locating shared libraries.  Check the file 'config.log'
24207 for the exact reason." >&2;}
24208    { (exit 1); exit 1; }; }
24209 fi
24210 rm -rf conftest.dSYM
24211 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24212 fi
24213
24214
24215
24216 # --------------------
24217 # Run tests below here
24218 # --------------------
24219
24220 # Force use of our snprintf if system's doesn't do arg control
24221 # See comment above at snprintf test for details.
24222 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
24223   { $as_echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
24224 $as_echo_n "checking whether printf supports argument control... " >&6; }
24225 if test "${pgac_cv_printf_arg_control+set}" = set; then
24226   $as_echo_n "(cached) " >&6
24227 else
24228   if test "$cross_compiling" = yes; then
24229   pgac_cv_printf_arg_control=cross
24230 else
24231   cat >conftest.$ac_ext <<_ACEOF
24232 /* confdefs.h.  */
24233 _ACEOF
24234 cat confdefs.h >>conftest.$ac_ext
24235 cat >>conftest.$ac_ext <<_ACEOF
24236 /* end confdefs.h.  */
24237 #include <stdio.h>
24238 #include <string.h>
24239
24240 int main()
24241 {
24242   char buf[100];
24243
24244   /* can it swap arguments? */
24245   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
24246   if (strcmp(buf, "4 3") != 0)
24247     return 1;
24248   return 0;
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_printf_arg_control=yes
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 ( exit $ac_status )
24280 pgac_cv_printf_arg_control=no
24281 fi
24282 rm -rf conftest.dSYM
24283 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24284 fi
24285
24286
24287
24288 fi
24289 { $as_echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
24290 $as_echo "$pgac_cv_printf_arg_control" >&6; }
24291
24292   if test $pgac_cv_printf_arg_control != yes ; then
24293     pgac_need_repl_snprintf=yes
24294   fi
24295 fi
24296
24297
24298
24299
24300 { $as_echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
24301 $as_echo_n "checking whether long int is 64 bits... " >&6; }
24302 if test "${pgac_cv_type_long_int_64+set}" = set; then
24303   $as_echo_n "(cached) " >&6
24304 else
24305   if test "$cross_compiling" = yes; then
24306   # If cross-compiling, check the size reported by the compiler and
24307 # trust that the arithmetic works.
24308 cat >conftest.$ac_ext <<_ACEOF
24309 /* confdefs.h.  */
24310 _ACEOF
24311 cat confdefs.h >>conftest.$ac_ext
24312 cat >>conftest.$ac_ext <<_ACEOF
24313 /* end confdefs.h.  */
24314
24315 int
24316 main ()
24317 {
24318 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
24319 test_array [0] = 0
24320
24321   ;
24322   return 0;
24323 }
24324 _ACEOF
24325 rm -f conftest.$ac_objext
24326 if { (ac_try="$ac_compile"
24327 case "(($ac_try" in
24328   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24329   *) ac_try_echo=$ac_try;;
24330 esac
24331 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24332 $as_echo "$ac_try_echo") >&5
24333   (eval "$ac_compile") 2>conftest.er1
24334   ac_status=$?
24335   grep -v '^ *+' conftest.er1 >conftest.err
24336   rm -f conftest.er1
24337   cat conftest.err >&5
24338   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24339   (exit $ac_status); } && {
24340          test -z "$ac_c_werror_flag" ||
24341          test ! -s conftest.err
24342        } && test -s conftest.$ac_objext; then
24343   pgac_cv_type_long_int_64=yes
24344 else
24345   $as_echo "$as_me: failed program was:" >&5
24346 sed 's/^/| /' conftest.$ac_ext >&5
24347
24348         pgac_cv_type_long_int_64=no
24349 fi
24350
24351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24352 else
24353   cat >conftest.$ac_ext <<_ACEOF
24354 /* confdefs.h.  */
24355 _ACEOF
24356 cat confdefs.h >>conftest.$ac_ext
24357 cat >>conftest.$ac_ext <<_ACEOF
24358 /* end confdefs.h.  */
24359 typedef long int ac_int64;
24360
24361 /*
24362  * These are globals to discourage the compiler from folding all the
24363  * arithmetic tests down to compile-time constants.
24364  */
24365 ac_int64 a = 20000001;
24366 ac_int64 b = 40000005;
24367
24368 int does_int64_work()
24369 {
24370   ac_int64 c,d;
24371
24372   if (sizeof(ac_int64) != 8)
24373     return 0;                   /* definitely not the right size */
24374
24375   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
24376   c = a * b;
24377   d = (c + b) / b;
24378   if (d != a+1)
24379     return 0;
24380   return 1;
24381 }
24382 main() {
24383   exit(! does_int64_work());
24384 }
24385 _ACEOF
24386 rm -f conftest$ac_exeext
24387 if { (ac_try="$ac_link"
24388 case "(($ac_try" in
24389   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24390   *) ac_try_echo=$ac_try;;
24391 esac
24392 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24393 $as_echo "$ac_try_echo") >&5
24394   (eval "$ac_link") 2>&5
24395   ac_status=$?
24396   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24397   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24398   { (case "(($ac_try" in
24399   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24400   *) ac_try_echo=$ac_try;;
24401 esac
24402 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24403 $as_echo "$ac_try_echo") >&5
24404   (eval "$ac_try") 2>&5
24405   ac_status=$?
24406   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24407   (exit $ac_status); }; }; then
24408   pgac_cv_type_long_int_64=yes
24409 else
24410   $as_echo "$as_me: program exited with status $ac_status" >&5
24411 $as_echo "$as_me: failed program was:" >&5
24412 sed 's/^/| /' conftest.$ac_ext >&5
24413
24414 ( exit $ac_status )
24415 pgac_cv_type_long_int_64=no
24416 fi
24417 rm -rf conftest.dSYM
24418 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24419 fi
24420
24421
24422 fi
24423 { $as_echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
24424 $as_echo "$pgac_cv_type_long_int_64" >&6; }
24425
24426 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
24427 if test x"$pgac_cv_type_long_int_64" = xyes ; then
24428
24429 cat >>confdefs.h <<\_ACEOF
24430 #define HAVE_LONG_INT_64 1
24431 _ACEOF
24432
24433 fi
24434
24435
24436 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
24437   pg_int64_type="long int"
24438 else
24439   { $as_echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
24440 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
24441 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
24442   $as_echo_n "(cached) " >&6
24443 else
24444   if test "$cross_compiling" = yes; then
24445   # If cross-compiling, check the size reported by the compiler and
24446 # trust that the arithmetic works.
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
24454 int
24455 main ()
24456 {
24457 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
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   pgac_cv_type_long_long_int_64=yes
24483 else
24484   $as_echo "$as_me: failed program was:" >&5
24485 sed 's/^/| /' conftest.$ac_ext >&5
24486
24487         pgac_cv_type_long_long_int_64=no
24488 fi
24489
24490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24491 else
24492   cat >conftest.$ac_ext <<_ACEOF
24493 /* confdefs.h.  */
24494 _ACEOF
24495 cat confdefs.h >>conftest.$ac_ext
24496 cat >>conftest.$ac_ext <<_ACEOF
24497 /* end confdefs.h.  */
24498 typedef long long int ac_int64;
24499
24500 /*
24501  * These are globals to discourage the compiler from folding all the
24502  * arithmetic tests down to compile-time constants.
24503  */
24504 ac_int64 a = 20000001;
24505 ac_int64 b = 40000005;
24506
24507 int does_int64_work()
24508 {
24509   ac_int64 c,d;
24510
24511   if (sizeof(ac_int64) != 8)
24512     return 0;                   /* definitely not the right size */
24513
24514   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
24515   c = a * b;
24516   d = (c + b) / b;
24517   if (d != a+1)
24518     return 0;
24519   return 1;
24520 }
24521 main() {
24522   exit(! does_int64_work());
24523 }
24524 _ACEOF
24525 rm -f conftest$ac_exeext
24526 if { (ac_try="$ac_link"
24527 case "(($ac_try" in
24528   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24529   *) ac_try_echo=$ac_try;;
24530 esac
24531 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24532 $as_echo "$ac_try_echo") >&5
24533   (eval "$ac_link") 2>&5
24534   ac_status=$?
24535   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24536   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24537   { (case "(($ac_try" in
24538   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24539   *) ac_try_echo=$ac_try;;
24540 esac
24541 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24542 $as_echo "$ac_try_echo") >&5
24543   (eval "$ac_try") 2>&5
24544   ac_status=$?
24545   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24546   (exit $ac_status); }; }; then
24547   pgac_cv_type_long_long_int_64=yes
24548 else
24549   $as_echo "$as_me: program exited with status $ac_status" >&5
24550 $as_echo "$as_me: failed program was:" >&5
24551 sed 's/^/| /' conftest.$ac_ext >&5
24552
24553 ( exit $ac_status )
24554 pgac_cv_type_long_long_int_64=no
24555 fi
24556 rm -rf conftest.dSYM
24557 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24558 fi
24559
24560
24561 fi
24562 { $as_echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
24563 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
24564
24565 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
24566 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
24567
24568 cat >>confdefs.h <<\_ACEOF
24569 #define HAVE_LONG_LONG_INT_64 1
24570 _ACEOF
24571
24572 fi
24573
24574   if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
24575     pg_int64_type="long long int"
24576   else
24577     { { $as_echo "$as_me:$LINENO: error: Cannot find a working 64-bit integer type." >&5
24578 $as_echo "$as_me: error: Cannot find a working 64-bit integer type." >&2;}
24579    { (exit 1); exit 1; }; }
24580   fi
24581 fi
24582
24583
24584 cat >>confdefs.h <<_ACEOF
24585 #define PG_INT64_TYPE $pg_int64_type
24586 _ACEOF
24587
24588
24589
24590 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
24591   cat >conftest.$ac_ext <<_ACEOF
24592 /* confdefs.h.  */
24593 _ACEOF
24594 cat confdefs.h >>conftest.$ac_ext
24595 cat >>conftest.$ac_ext <<_ACEOF
24596 /* end confdefs.h.  */
24597
24598 #define INT64CONST(x)  x##LL
24599 long long int foo = INT64CONST(0x1234567890123456);
24600
24601 int
24602 main ()
24603 {
24604
24605   ;
24606   return 0;
24607 }
24608 _ACEOF
24609 rm -f conftest.$ac_objext
24610 if { (ac_try="$ac_compile"
24611 case "(($ac_try" in
24612   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24613   *) ac_try_echo=$ac_try;;
24614 esac
24615 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24616 $as_echo "$ac_try_echo") >&5
24617   (eval "$ac_compile") 2>conftest.er1
24618   ac_status=$?
24619   grep -v '^ *+' conftest.er1 >conftest.err
24620   rm -f conftest.er1
24621   cat conftest.err >&5
24622   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24623   (exit $ac_status); } && {
24624          test -z "$ac_c_werror_flag" ||
24625          test ! -s conftest.err
24626        } && test -s conftest.$ac_objext; then
24627
24628 cat >>confdefs.h <<\_ACEOF
24629 #define HAVE_LL_CONSTANTS 1
24630 _ACEOF
24631
24632 else
24633   $as_echo "$as_me: failed program was:" >&5
24634 sed 's/^/| /' conftest.$ac_ext >&5
24635
24636
24637 fi
24638
24639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24640 fi
24641
24642
24643 # If we found "long int" is 64 bits, assume snprintf handles it.  If
24644 # we found we need to use "long long int", better check.  We cope with
24645 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
24646 # work, fall back to our own snprintf emulation (which we know uses %lld).
24647
24648 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
24649   if test $pgac_need_repl_snprintf = no; then
24650     { $as_echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
24651 $as_echo_n "checking snprintf format for long long int... " >&6; }
24652 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
24653   $as_echo_n "(cached) " >&6
24654 else
24655   for pgac_format in '%lld' '%qd' '%I64d'; do
24656 if test "$cross_compiling" = yes; then
24657   pgac_cv_snprintf_long_long_int_format=cross; break
24658 else
24659   cat >conftest.$ac_ext <<_ACEOF
24660 /* confdefs.h.  */
24661 _ACEOF
24662 cat confdefs.h >>conftest.$ac_ext
24663 cat >>conftest.$ac_ext <<_ACEOF
24664 /* end confdefs.h.  */
24665 #include <stdio.h>
24666 typedef long long int ac_int64;
24667 #define INT64_FORMAT "$pgac_format"
24668
24669 ac_int64 a = 20000001;
24670 ac_int64 b = 40000005;
24671
24672 int does_int64_snprintf_work()
24673 {
24674   ac_int64 c;
24675   char buf[100];
24676
24677   if (sizeof(ac_int64) != 8)
24678     return 0;                   /* doesn't look like the right size */
24679
24680   c = a * b;
24681   snprintf(buf, 100, INT64_FORMAT, c);
24682   if (strcmp(buf, "800000140000005") != 0)
24683     return 0;                   /* either multiply or snprintf is busted */
24684   return 1;
24685 }
24686 main() {
24687   exit(! does_int64_snprintf_work());
24688 }
24689 _ACEOF
24690 rm -f conftest$ac_exeext
24691 if { (ac_try="$ac_link"
24692 case "(($ac_try" in
24693   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24694   *) ac_try_echo=$ac_try;;
24695 esac
24696 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24697 $as_echo "$ac_try_echo") >&5
24698   (eval "$ac_link") 2>&5
24699   ac_status=$?
24700   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24701   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24702   { (case "(($ac_try" in
24703   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24704   *) ac_try_echo=$ac_try;;
24705 esac
24706 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24707 $as_echo "$ac_try_echo") >&5
24708   (eval "$ac_try") 2>&5
24709   ac_status=$?
24710   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24711   (exit $ac_status); }; }; then
24712   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
24713 else
24714   $as_echo "$as_me: program exited with status $ac_status" >&5
24715 $as_echo "$as_me: failed program was:" >&5
24716 sed 's/^/| /' conftest.$ac_ext >&5
24717
24718 fi
24719 rm -rf conftest.dSYM
24720 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24721 fi
24722
24723
24724 done
24725 fi
24726
24727 LONG_LONG_INT_FORMAT=''
24728
24729 case $pgac_cv_snprintf_long_long_int_format in
24730   cross) { $as_echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
24731 $as_echo "cannot test (not on host machine)" >&6; };;
24732   ?*)    { $as_echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
24733 $as_echo "$pgac_cv_snprintf_long_long_int_format" >&6; }
24734          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
24735   *)     { $as_echo "$as_me:$LINENO: result: none" >&5
24736 $as_echo "none" >&6; };;
24737 esac
24738     if test "$LONG_LONG_INT_FORMAT" = ""; then
24739       # Force usage of our own snprintf, since system snprintf is broken
24740       pgac_need_repl_snprintf=yes
24741       LONG_LONG_INT_FORMAT='%lld'
24742     fi
24743   else
24744     # Here if we previously decided we needed to use our own snprintf
24745     LONG_LONG_INT_FORMAT='%lld'
24746   fi
24747   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
24748   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
24749   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
24750 else
24751   # Here if we are not using 'long long int' at all
24752   INT64_FORMAT='"%ld"'
24753   UINT64_FORMAT='"%lu"'
24754 fi
24755
24756
24757 cat >>confdefs.h <<_ACEOF
24758 #define INT64_FORMAT $INT64_FORMAT
24759 _ACEOF
24760
24761
24762
24763 cat >>confdefs.h <<_ACEOF
24764 #define UINT64_FORMAT $UINT64_FORMAT
24765 _ACEOF
24766
24767
24768 # Now we have checked all the reasons to replace snprintf
24769 if test $pgac_need_repl_snprintf = yes; then
24770
24771 cat >>confdefs.h <<\_ACEOF
24772 #define USE_REPL_SNPRINTF 1
24773 _ACEOF
24774
24775   case " $LIBOBJS " in
24776   *" snprintf.$ac_objext "* ) ;;
24777   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
24778  ;;
24779 esac
24780
24781 fi
24782
24783 # Check size of void *, size_t (enables tweaks for > 32bit address space)
24784 # The cast to long int works around a bug in the HP C Compiler
24785 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24786 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24787 # This bug is HP SR number 8606223364.
24788 { $as_echo "$as_me:$LINENO: checking size of void *" >&5
24789 $as_echo_n "checking size of void *... " >&6; }
24790 if test "${ac_cv_sizeof_void_p+set}" = set; then
24791   $as_echo_n "(cached) " >&6
24792 else
24793   if test "$cross_compiling" = yes; then
24794   # Depending upon the size, compute the lo and hi bounds.
24795 cat >conftest.$ac_ext <<_ACEOF
24796 /* confdefs.h.  */
24797 _ACEOF
24798 cat confdefs.h >>conftest.$ac_ext
24799 cat >>conftest.$ac_ext <<_ACEOF
24800 /* end confdefs.h.  */
24801 $ac_includes_default
24802 int
24803 main ()
24804 {
24805 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
24806 test_array [0] = 0
24807
24808   ;
24809   return 0;
24810 }
24811 _ACEOF
24812 rm -f conftest.$ac_objext
24813 if { (ac_try="$ac_compile"
24814 case "(($ac_try" in
24815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24816   *) ac_try_echo=$ac_try;;
24817 esac
24818 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24819 $as_echo "$ac_try_echo") >&5
24820   (eval "$ac_compile") 2>conftest.er1
24821   ac_status=$?
24822   grep -v '^ *+' conftest.er1 >conftest.err
24823   rm -f conftest.er1
24824   cat conftest.err >&5
24825   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24826   (exit $ac_status); } && {
24827          test -z "$ac_c_werror_flag" ||
24828          test ! -s conftest.err
24829        } && test -s conftest.$ac_objext; then
24830   ac_lo=0 ac_mid=0
24831   while :; do
24832     cat >conftest.$ac_ext <<_ACEOF
24833 /* confdefs.h.  */
24834 _ACEOF
24835 cat confdefs.h >>conftest.$ac_ext
24836 cat >>conftest.$ac_ext <<_ACEOF
24837 /* end confdefs.h.  */
24838 $ac_includes_default
24839 int
24840 main ()
24841 {
24842 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
24843 test_array [0] = 0
24844
24845   ;
24846   return 0;
24847 }
24848 _ACEOF
24849 rm -f conftest.$ac_objext
24850 if { (ac_try="$ac_compile"
24851 case "(($ac_try" in
24852   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24853   *) ac_try_echo=$ac_try;;
24854 esac
24855 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24856 $as_echo "$ac_try_echo") >&5
24857   (eval "$ac_compile") 2>conftest.er1
24858   ac_status=$?
24859   grep -v '^ *+' conftest.er1 >conftest.err
24860   rm -f conftest.er1
24861   cat conftest.err >&5
24862   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24863   (exit $ac_status); } && {
24864          test -z "$ac_c_werror_flag" ||
24865          test ! -s conftest.err
24866        } && test -s conftest.$ac_objext; then
24867   ac_hi=$ac_mid; break
24868 else
24869   $as_echo "$as_me: failed program was:" >&5
24870 sed 's/^/| /' conftest.$ac_ext >&5
24871
24872         ac_lo=`expr $ac_mid + 1`
24873                         if test $ac_lo -le $ac_mid; then
24874                           ac_lo= ac_hi=
24875                           break
24876                         fi
24877                         ac_mid=`expr 2 '*' $ac_mid + 1`
24878 fi
24879
24880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24881   done
24882 else
24883   $as_echo "$as_me: failed program was:" >&5
24884 sed 's/^/| /' conftest.$ac_ext >&5
24885
24886         cat >conftest.$ac_ext <<_ACEOF
24887 /* confdefs.h.  */
24888 _ACEOF
24889 cat confdefs.h >>conftest.$ac_ext
24890 cat >>conftest.$ac_ext <<_ACEOF
24891 /* end confdefs.h.  */
24892 $ac_includes_default
24893 int
24894 main ()
24895 {
24896 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
24897 test_array [0] = 0
24898
24899   ;
24900   return 0;
24901 }
24902 _ACEOF
24903 rm -f conftest.$ac_objext
24904 if { (ac_try="$ac_compile"
24905 case "(($ac_try" in
24906   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24907   *) ac_try_echo=$ac_try;;
24908 esac
24909 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24910 $as_echo "$ac_try_echo") >&5
24911   (eval "$ac_compile") 2>conftest.er1
24912   ac_status=$?
24913   grep -v '^ *+' conftest.er1 >conftest.err
24914   rm -f conftest.er1
24915   cat conftest.err >&5
24916   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24917   (exit $ac_status); } && {
24918          test -z "$ac_c_werror_flag" ||
24919          test ! -s conftest.err
24920        } && test -s conftest.$ac_objext; then
24921   ac_hi=-1 ac_mid=-1
24922   while :; do
24923     cat >conftest.$ac_ext <<_ACEOF
24924 /* confdefs.h.  */
24925 _ACEOF
24926 cat confdefs.h >>conftest.$ac_ext
24927 cat >>conftest.$ac_ext <<_ACEOF
24928 /* end confdefs.h.  */
24929 $ac_includes_default
24930 int
24931 main ()
24932 {
24933 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
24934 test_array [0] = 0
24935
24936   ;
24937   return 0;
24938 }
24939 _ACEOF
24940 rm -f conftest.$ac_objext
24941 if { (ac_try="$ac_compile"
24942 case "(($ac_try" in
24943   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24944   *) ac_try_echo=$ac_try;;
24945 esac
24946 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24947 $as_echo "$ac_try_echo") >&5
24948   (eval "$ac_compile") 2>conftest.er1
24949   ac_status=$?
24950   grep -v '^ *+' conftest.er1 >conftest.err
24951   rm -f conftest.er1
24952   cat conftest.err >&5
24953   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24954   (exit $ac_status); } && {
24955          test -z "$ac_c_werror_flag" ||
24956          test ! -s conftest.err
24957        } && test -s conftest.$ac_objext; then
24958   ac_lo=$ac_mid; break
24959 else
24960   $as_echo "$as_me: failed program was:" >&5
24961 sed 's/^/| /' conftest.$ac_ext >&5
24962
24963         ac_hi=`expr '(' $ac_mid ')' - 1`
24964                         if test $ac_mid -le $ac_hi; then
24965                           ac_lo= ac_hi=
24966                           break
24967                         fi
24968                         ac_mid=`expr 2 '*' $ac_mid`
24969 fi
24970
24971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24972   done
24973 else
24974   $as_echo "$as_me: failed program was:" >&5
24975 sed 's/^/| /' conftest.$ac_ext >&5
24976
24977         ac_lo= ac_hi=
24978 fi
24979
24980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24981 fi
24982
24983 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24984 # Binary search between lo and hi bounds.
24985 while test "x$ac_lo" != "x$ac_hi"; do
24986   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24987   cat >conftest.$ac_ext <<_ACEOF
24988 /* confdefs.h.  */
24989 _ACEOF
24990 cat confdefs.h >>conftest.$ac_ext
24991 cat >>conftest.$ac_ext <<_ACEOF
24992 /* end confdefs.h.  */
24993 $ac_includes_default
24994 int
24995 main ()
24996 {
24997 static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
24998 test_array [0] = 0
24999
25000   ;
25001   return 0;
25002 }
25003 _ACEOF
25004 rm -f conftest.$ac_objext
25005 if { (ac_try="$ac_compile"
25006 case "(($ac_try" in
25007   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25008   *) ac_try_echo=$ac_try;;
25009 esac
25010 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25011 $as_echo "$ac_try_echo") >&5
25012   (eval "$ac_compile") 2>conftest.er1
25013   ac_status=$?
25014   grep -v '^ *+' conftest.er1 >conftest.err
25015   rm -f conftest.er1
25016   cat conftest.err >&5
25017   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25018   (exit $ac_status); } && {
25019          test -z "$ac_c_werror_flag" ||
25020          test ! -s conftest.err
25021        } && test -s conftest.$ac_objext; then
25022   ac_hi=$ac_mid
25023 else
25024   $as_echo "$as_me: failed program was:" >&5
25025 sed 's/^/| /' conftest.$ac_ext >&5
25026
25027         ac_lo=`expr '(' $ac_mid ')' + 1`
25028 fi
25029
25030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25031 done
25032 case $ac_lo in
25033 ?*) ac_cv_sizeof_void_p=$ac_lo;;
25034 '') if test "$ac_cv_type_void_p" = yes; then
25035      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25036 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25037 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
25038 See \`config.log' for more details." >&5
25039 $as_echo "$as_me: error: cannot compute sizeof (void *)
25040 See \`config.log' for more details." >&2;}
25041    { (exit 77); exit 77; }; }; }
25042    else
25043      ac_cv_sizeof_void_p=0
25044    fi ;;
25045 esac
25046 else
25047   cat >conftest.$ac_ext <<_ACEOF
25048 /* confdefs.h.  */
25049 _ACEOF
25050 cat confdefs.h >>conftest.$ac_ext
25051 cat >>conftest.$ac_ext <<_ACEOF
25052 /* end confdefs.h.  */
25053 $ac_includes_default
25054 static long int longval () { return (long int) (sizeof (void *)); }
25055 static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
25056 #include <stdio.h>
25057 #include <stdlib.h>
25058 int
25059 main ()
25060 {
25061
25062   FILE *f = fopen ("conftest.val", "w");
25063   if (! f)
25064     return 1;
25065   if (((long int) (sizeof (void *))) < 0)
25066     {
25067       long int i = longval ();
25068       if (i != ((long int) (sizeof (void *))))
25069         return 1;
25070       fprintf (f, "%ld", i);
25071     }
25072   else
25073     {
25074       unsigned long int i = ulongval ();
25075       if (i != ((long int) (sizeof (void *))))
25076         return 1;
25077       fprintf (f, "%lu", i);
25078     }
25079   /* Do not output a trailing newline, as this causes \r\n confusion
25080      on some platforms.  */
25081   return ferror (f) || fclose (f) != 0;
25082
25083   ;
25084   return 0;
25085 }
25086 _ACEOF
25087 rm -f conftest$ac_exeext
25088 if { (ac_try="$ac_link"
25089 case "(($ac_try" in
25090   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25091   *) ac_try_echo=$ac_try;;
25092 esac
25093 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25094 $as_echo "$ac_try_echo") >&5
25095   (eval "$ac_link") 2>&5
25096   ac_status=$?
25097   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25098   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25099   { (case "(($ac_try" in
25100   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25101   *) ac_try_echo=$ac_try;;
25102 esac
25103 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25104 $as_echo "$ac_try_echo") >&5
25105   (eval "$ac_try") 2>&5
25106   ac_status=$?
25107   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25108   (exit $ac_status); }; }; then
25109   ac_cv_sizeof_void_p=`cat conftest.val`
25110 else
25111   $as_echo "$as_me: program exited with status $ac_status" >&5
25112 $as_echo "$as_me: failed program was:" >&5
25113 sed 's/^/| /' conftest.$ac_ext >&5
25114
25115 ( exit $ac_status )
25116 if test "$ac_cv_type_void_p" = yes; then
25117      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25118 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25119 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
25120 See \`config.log' for more details." >&5
25121 $as_echo "$as_me: error: cannot compute sizeof (void *)
25122 See \`config.log' for more details." >&2;}
25123    { (exit 77); exit 77; }; }; }
25124    else
25125      ac_cv_sizeof_void_p=0
25126    fi
25127 fi
25128 rm -rf conftest.dSYM
25129 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25130 fi
25131 rm -f conftest.val
25132 fi
25133 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
25134 $as_echo "$ac_cv_sizeof_void_p" >&6; }
25135
25136
25137
25138 cat >>confdefs.h <<_ACEOF
25139 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
25140 _ACEOF
25141
25142
25143 # The cast to long int works around a bug in the HP C Compiler
25144 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25145 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25146 # This bug is HP SR number 8606223364.
25147 { $as_echo "$as_me:$LINENO: checking size of size_t" >&5
25148 $as_echo_n "checking size of size_t... " >&6; }
25149 if test "${ac_cv_sizeof_size_t+set}" = set; then
25150   $as_echo_n "(cached) " >&6
25151 else
25152   if test "$cross_compiling" = yes; then
25153   # Depending upon the size, compute the lo and hi bounds.
25154 cat >conftest.$ac_ext <<_ACEOF
25155 /* confdefs.h.  */
25156 _ACEOF
25157 cat confdefs.h >>conftest.$ac_ext
25158 cat >>conftest.$ac_ext <<_ACEOF
25159 /* end confdefs.h.  */
25160 $ac_includes_default
25161 int
25162 main ()
25163 {
25164 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
25165 test_array [0] = 0
25166
25167   ;
25168   return 0;
25169 }
25170 _ACEOF
25171 rm -f conftest.$ac_objext
25172 if { (ac_try="$ac_compile"
25173 case "(($ac_try" in
25174   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25175   *) ac_try_echo=$ac_try;;
25176 esac
25177 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25178 $as_echo "$ac_try_echo") >&5
25179   (eval "$ac_compile") 2>conftest.er1
25180   ac_status=$?
25181   grep -v '^ *+' conftest.er1 >conftest.err
25182   rm -f conftest.er1
25183   cat conftest.err >&5
25184   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25185   (exit $ac_status); } && {
25186          test -z "$ac_c_werror_flag" ||
25187          test ! -s conftest.err
25188        } && test -s conftest.$ac_objext; then
25189   ac_lo=0 ac_mid=0
25190   while :; do
25191     cat >conftest.$ac_ext <<_ACEOF
25192 /* confdefs.h.  */
25193 _ACEOF
25194 cat confdefs.h >>conftest.$ac_ext
25195 cat >>conftest.$ac_ext <<_ACEOF
25196 /* end confdefs.h.  */
25197 $ac_includes_default
25198 int
25199 main ()
25200 {
25201 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
25202 test_array [0] = 0
25203
25204   ;
25205   return 0;
25206 }
25207 _ACEOF
25208 rm -f conftest.$ac_objext
25209 if { (ac_try="$ac_compile"
25210 case "(($ac_try" in
25211   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25212   *) ac_try_echo=$ac_try;;
25213 esac
25214 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25215 $as_echo "$ac_try_echo") >&5
25216   (eval "$ac_compile") 2>conftest.er1
25217   ac_status=$?
25218   grep -v '^ *+' conftest.er1 >conftest.err
25219   rm -f conftest.er1
25220   cat conftest.err >&5
25221   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25222   (exit $ac_status); } && {
25223          test -z "$ac_c_werror_flag" ||
25224          test ! -s conftest.err
25225        } && test -s conftest.$ac_objext; then
25226   ac_hi=$ac_mid; break
25227 else
25228   $as_echo "$as_me: failed program was:" >&5
25229 sed 's/^/| /' conftest.$ac_ext >&5
25230
25231         ac_lo=`expr $ac_mid + 1`
25232                         if test $ac_lo -le $ac_mid; then
25233                           ac_lo= ac_hi=
25234                           break
25235                         fi
25236                         ac_mid=`expr 2 '*' $ac_mid + 1`
25237 fi
25238
25239 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25240   done
25241 else
25242   $as_echo "$as_me: failed program was:" >&5
25243 sed 's/^/| /' conftest.$ac_ext >&5
25244
25245         cat >conftest.$ac_ext <<_ACEOF
25246 /* confdefs.h.  */
25247 _ACEOF
25248 cat confdefs.h >>conftest.$ac_ext
25249 cat >>conftest.$ac_ext <<_ACEOF
25250 /* end confdefs.h.  */
25251 $ac_includes_default
25252 int
25253 main ()
25254 {
25255 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
25256 test_array [0] = 0
25257
25258   ;
25259   return 0;
25260 }
25261 _ACEOF
25262 rm -f conftest.$ac_objext
25263 if { (ac_try="$ac_compile"
25264 case "(($ac_try" in
25265   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25266   *) ac_try_echo=$ac_try;;
25267 esac
25268 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25269 $as_echo "$ac_try_echo") >&5
25270   (eval "$ac_compile") 2>conftest.er1
25271   ac_status=$?
25272   grep -v '^ *+' conftest.er1 >conftest.err
25273   rm -f conftest.er1
25274   cat conftest.err >&5
25275   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25276   (exit $ac_status); } && {
25277          test -z "$ac_c_werror_flag" ||
25278          test ! -s conftest.err
25279        } && test -s conftest.$ac_objext; then
25280   ac_hi=-1 ac_mid=-1
25281   while :; do
25282     cat >conftest.$ac_ext <<_ACEOF
25283 /* confdefs.h.  */
25284 _ACEOF
25285 cat confdefs.h >>conftest.$ac_ext
25286 cat >>conftest.$ac_ext <<_ACEOF
25287 /* end confdefs.h.  */
25288 $ac_includes_default
25289 int
25290 main ()
25291 {
25292 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
25293 test_array [0] = 0
25294
25295   ;
25296   return 0;
25297 }
25298 _ACEOF
25299 rm -f conftest.$ac_objext
25300 if { (ac_try="$ac_compile"
25301 case "(($ac_try" in
25302   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25303   *) ac_try_echo=$ac_try;;
25304 esac
25305 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25306 $as_echo "$ac_try_echo") >&5
25307   (eval "$ac_compile") 2>conftest.er1
25308   ac_status=$?
25309   grep -v '^ *+' conftest.er1 >conftest.err
25310   rm -f conftest.er1
25311   cat conftest.err >&5
25312   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25313   (exit $ac_status); } && {
25314          test -z "$ac_c_werror_flag" ||
25315          test ! -s conftest.err
25316        } && test -s conftest.$ac_objext; then
25317   ac_lo=$ac_mid; break
25318 else
25319   $as_echo "$as_me: failed program was:" >&5
25320 sed 's/^/| /' conftest.$ac_ext >&5
25321
25322         ac_hi=`expr '(' $ac_mid ')' - 1`
25323                         if test $ac_mid -le $ac_hi; then
25324                           ac_lo= ac_hi=
25325                           break
25326                         fi
25327                         ac_mid=`expr 2 '*' $ac_mid`
25328 fi
25329
25330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25331   done
25332 else
25333   $as_echo "$as_me: failed program was:" >&5
25334 sed 's/^/| /' conftest.$ac_ext >&5
25335
25336         ac_lo= ac_hi=
25337 fi
25338
25339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25340 fi
25341
25342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25343 # Binary search between lo and hi bounds.
25344 while test "x$ac_lo" != "x$ac_hi"; do
25345   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25346   cat >conftest.$ac_ext <<_ACEOF
25347 /* confdefs.h.  */
25348 _ACEOF
25349 cat confdefs.h >>conftest.$ac_ext
25350 cat >>conftest.$ac_ext <<_ACEOF
25351 /* end confdefs.h.  */
25352 $ac_includes_default
25353 int
25354 main ()
25355 {
25356 static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
25357 test_array [0] = 0
25358
25359   ;
25360   return 0;
25361 }
25362 _ACEOF
25363 rm -f conftest.$ac_objext
25364 if { (ac_try="$ac_compile"
25365 case "(($ac_try" in
25366   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25367   *) ac_try_echo=$ac_try;;
25368 esac
25369 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25370 $as_echo "$ac_try_echo") >&5
25371   (eval "$ac_compile") 2>conftest.er1
25372   ac_status=$?
25373   grep -v '^ *+' conftest.er1 >conftest.err
25374   rm -f conftest.er1
25375   cat conftest.err >&5
25376   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25377   (exit $ac_status); } && {
25378          test -z "$ac_c_werror_flag" ||
25379          test ! -s conftest.err
25380        } && test -s conftest.$ac_objext; then
25381   ac_hi=$ac_mid
25382 else
25383   $as_echo "$as_me: failed program was:" >&5
25384 sed 's/^/| /' conftest.$ac_ext >&5
25385
25386         ac_lo=`expr '(' $ac_mid ')' + 1`
25387 fi
25388
25389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25390 done
25391 case $ac_lo in
25392 ?*) ac_cv_sizeof_size_t=$ac_lo;;
25393 '') if test "$ac_cv_type_size_t" = yes; then
25394      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25395 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25396 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
25397 See \`config.log' for more details." >&5
25398 $as_echo "$as_me: error: cannot compute sizeof (size_t)
25399 See \`config.log' for more details." >&2;}
25400    { (exit 77); exit 77; }; }; }
25401    else
25402      ac_cv_sizeof_size_t=0
25403    fi ;;
25404 esac
25405 else
25406   cat >conftest.$ac_ext <<_ACEOF
25407 /* confdefs.h.  */
25408 _ACEOF
25409 cat confdefs.h >>conftest.$ac_ext
25410 cat >>conftest.$ac_ext <<_ACEOF
25411 /* end confdefs.h.  */
25412 $ac_includes_default
25413 static long int longval () { return (long int) (sizeof (size_t)); }
25414 static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
25415 #include <stdio.h>
25416 #include <stdlib.h>
25417 int
25418 main ()
25419 {
25420
25421   FILE *f = fopen ("conftest.val", "w");
25422   if (! f)
25423     return 1;
25424   if (((long int) (sizeof (size_t))) < 0)
25425     {
25426       long int i = longval ();
25427       if (i != ((long int) (sizeof (size_t))))
25428         return 1;
25429       fprintf (f, "%ld", i);
25430     }
25431   else
25432     {
25433       unsigned long int i = ulongval ();
25434       if (i != ((long int) (sizeof (size_t))))
25435         return 1;
25436       fprintf (f, "%lu", i);
25437     }
25438   /* Do not output a trailing newline, as this causes \r\n confusion
25439      on some platforms.  */
25440   return ferror (f) || fclose (f) != 0;
25441
25442   ;
25443   return 0;
25444 }
25445 _ACEOF
25446 rm -f conftest$ac_exeext
25447 if { (ac_try="$ac_link"
25448 case "(($ac_try" in
25449   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25450   *) ac_try_echo=$ac_try;;
25451 esac
25452 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25453 $as_echo "$ac_try_echo") >&5
25454   (eval "$ac_link") 2>&5
25455   ac_status=$?
25456   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25457   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25458   { (case "(($ac_try" in
25459   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25460   *) ac_try_echo=$ac_try;;
25461 esac
25462 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25463 $as_echo "$ac_try_echo") >&5
25464   (eval "$ac_try") 2>&5
25465   ac_status=$?
25466   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25467   (exit $ac_status); }; }; then
25468   ac_cv_sizeof_size_t=`cat conftest.val`
25469 else
25470   $as_echo "$as_me: program exited with status $ac_status" >&5
25471 $as_echo "$as_me: failed program was:" >&5
25472 sed 's/^/| /' conftest.$ac_ext >&5
25473
25474 ( exit $ac_status )
25475 if test "$ac_cv_type_size_t" = yes; then
25476      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25477 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25478 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
25479 See \`config.log' for more details." >&5
25480 $as_echo "$as_me: error: cannot compute sizeof (size_t)
25481 See \`config.log' for more details." >&2;}
25482    { (exit 77); exit 77; }; }; }
25483    else
25484      ac_cv_sizeof_size_t=0
25485    fi
25486 fi
25487 rm -rf conftest.dSYM
25488 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25489 fi
25490 rm -f conftest.val
25491 fi
25492 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
25493 $as_echo "$ac_cv_sizeof_size_t" >&6; }
25494
25495
25496
25497 cat >>confdefs.h <<_ACEOF
25498 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
25499 _ACEOF
25500
25501
25502 # The cast to long int works around a bug in the HP C Compiler
25503 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25504 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25505 # This bug is HP SR number 8606223364.
25506 { $as_echo "$as_me:$LINENO: checking size of long" >&5
25507 $as_echo_n "checking size of long... " >&6; }
25508 if test "${ac_cv_sizeof_long+set}" = set; then
25509   $as_echo_n "(cached) " >&6
25510 else
25511   if test "$cross_compiling" = yes; then
25512   # Depending upon the size, compute the lo and hi bounds.
25513 cat >conftest.$ac_ext <<_ACEOF
25514 /* confdefs.h.  */
25515 _ACEOF
25516 cat confdefs.h >>conftest.$ac_ext
25517 cat >>conftest.$ac_ext <<_ACEOF
25518 /* end confdefs.h.  */
25519 $ac_includes_default
25520 int
25521 main ()
25522 {
25523 static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
25524 test_array [0] = 0
25525
25526   ;
25527   return 0;
25528 }
25529 _ACEOF
25530 rm -f conftest.$ac_objext
25531 if { (ac_try="$ac_compile"
25532 case "(($ac_try" in
25533   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25534   *) ac_try_echo=$ac_try;;
25535 esac
25536 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25537 $as_echo "$ac_try_echo") >&5
25538   (eval "$ac_compile") 2>conftest.er1
25539   ac_status=$?
25540   grep -v '^ *+' conftest.er1 >conftest.err
25541   rm -f conftest.er1
25542   cat conftest.err >&5
25543   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25544   (exit $ac_status); } && {
25545          test -z "$ac_c_werror_flag" ||
25546          test ! -s conftest.err
25547        } && test -s conftest.$ac_objext; then
25548   ac_lo=0 ac_mid=0
25549   while :; do
25550     cat >conftest.$ac_ext <<_ACEOF
25551 /* confdefs.h.  */
25552 _ACEOF
25553 cat confdefs.h >>conftest.$ac_ext
25554 cat >>conftest.$ac_ext <<_ACEOF
25555 /* end confdefs.h.  */
25556 $ac_includes_default
25557 int
25558 main ()
25559 {
25560 static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
25561 test_array [0] = 0
25562
25563   ;
25564   return 0;
25565 }
25566 _ACEOF
25567 rm -f conftest.$ac_objext
25568 if { (ac_try="$ac_compile"
25569 case "(($ac_try" in
25570   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25571   *) ac_try_echo=$ac_try;;
25572 esac
25573 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25574 $as_echo "$ac_try_echo") >&5
25575   (eval "$ac_compile") 2>conftest.er1
25576   ac_status=$?
25577   grep -v '^ *+' conftest.er1 >conftest.err
25578   rm -f conftest.er1
25579   cat conftest.err >&5
25580   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25581   (exit $ac_status); } && {
25582          test -z "$ac_c_werror_flag" ||
25583          test ! -s conftest.err
25584        } && test -s conftest.$ac_objext; then
25585   ac_hi=$ac_mid; break
25586 else
25587   $as_echo "$as_me: failed program was:" >&5
25588 sed 's/^/| /' conftest.$ac_ext >&5
25589
25590         ac_lo=`expr $ac_mid + 1`
25591                         if test $ac_lo -le $ac_mid; then
25592                           ac_lo= ac_hi=
25593                           break
25594                         fi
25595                         ac_mid=`expr 2 '*' $ac_mid + 1`
25596 fi
25597
25598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25599   done
25600 else
25601   $as_echo "$as_me: failed program was:" >&5
25602 sed 's/^/| /' conftest.$ac_ext >&5
25603
25604         cat >conftest.$ac_ext <<_ACEOF
25605 /* confdefs.h.  */
25606 _ACEOF
25607 cat confdefs.h >>conftest.$ac_ext
25608 cat >>conftest.$ac_ext <<_ACEOF
25609 /* end confdefs.h.  */
25610 $ac_includes_default
25611 int
25612 main ()
25613 {
25614 static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
25615 test_array [0] = 0
25616
25617   ;
25618   return 0;
25619 }
25620 _ACEOF
25621 rm -f conftest.$ac_objext
25622 if { (ac_try="$ac_compile"
25623 case "(($ac_try" in
25624   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25625   *) ac_try_echo=$ac_try;;
25626 esac
25627 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25628 $as_echo "$ac_try_echo") >&5
25629   (eval "$ac_compile") 2>conftest.er1
25630   ac_status=$?
25631   grep -v '^ *+' conftest.er1 >conftest.err
25632   rm -f conftest.er1
25633   cat conftest.err >&5
25634   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25635   (exit $ac_status); } && {
25636          test -z "$ac_c_werror_flag" ||
25637          test ! -s conftest.err
25638        } && test -s conftest.$ac_objext; then
25639   ac_hi=-1 ac_mid=-1
25640   while :; do
25641     cat >conftest.$ac_ext <<_ACEOF
25642 /* confdefs.h.  */
25643 _ACEOF
25644 cat confdefs.h >>conftest.$ac_ext
25645 cat >>conftest.$ac_ext <<_ACEOF
25646 /* end confdefs.h.  */
25647 $ac_includes_default
25648 int
25649 main ()
25650 {
25651 static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
25652 test_array [0] = 0
25653
25654   ;
25655   return 0;
25656 }
25657 _ACEOF
25658 rm -f conftest.$ac_objext
25659 if { (ac_try="$ac_compile"
25660 case "(($ac_try" in
25661   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25662   *) ac_try_echo=$ac_try;;
25663 esac
25664 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25665 $as_echo "$ac_try_echo") >&5
25666   (eval "$ac_compile") 2>conftest.er1
25667   ac_status=$?
25668   grep -v '^ *+' conftest.er1 >conftest.err
25669   rm -f conftest.er1
25670   cat conftest.err >&5
25671   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25672   (exit $ac_status); } && {
25673          test -z "$ac_c_werror_flag" ||
25674          test ! -s conftest.err
25675        } && test -s conftest.$ac_objext; then
25676   ac_lo=$ac_mid; break
25677 else
25678   $as_echo "$as_me: failed program was:" >&5
25679 sed 's/^/| /' conftest.$ac_ext >&5
25680
25681         ac_hi=`expr '(' $ac_mid ')' - 1`
25682                         if test $ac_mid -le $ac_hi; then
25683                           ac_lo= ac_hi=
25684                           break
25685                         fi
25686                         ac_mid=`expr 2 '*' $ac_mid`
25687 fi
25688
25689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25690   done
25691 else
25692   $as_echo "$as_me: failed program was:" >&5
25693 sed 's/^/| /' conftest.$ac_ext >&5
25694
25695         ac_lo= ac_hi=
25696 fi
25697
25698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25699 fi
25700
25701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25702 # Binary search between lo and hi bounds.
25703 while test "x$ac_lo" != "x$ac_hi"; do
25704   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25705   cat >conftest.$ac_ext <<_ACEOF
25706 /* confdefs.h.  */
25707 _ACEOF
25708 cat confdefs.h >>conftest.$ac_ext
25709 cat >>conftest.$ac_ext <<_ACEOF
25710 /* end confdefs.h.  */
25711 $ac_includes_default
25712 int
25713 main ()
25714 {
25715 static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
25716 test_array [0] = 0
25717
25718   ;
25719   return 0;
25720 }
25721 _ACEOF
25722 rm -f conftest.$ac_objext
25723 if { (ac_try="$ac_compile"
25724 case "(($ac_try" in
25725   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25726   *) ac_try_echo=$ac_try;;
25727 esac
25728 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25729 $as_echo "$ac_try_echo") >&5
25730   (eval "$ac_compile") 2>conftest.er1
25731   ac_status=$?
25732   grep -v '^ *+' conftest.er1 >conftest.err
25733   rm -f conftest.er1
25734   cat conftest.err >&5
25735   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25736   (exit $ac_status); } && {
25737          test -z "$ac_c_werror_flag" ||
25738          test ! -s conftest.err
25739        } && test -s conftest.$ac_objext; then
25740   ac_hi=$ac_mid
25741 else
25742   $as_echo "$as_me: failed program was:" >&5
25743 sed 's/^/| /' conftest.$ac_ext >&5
25744
25745         ac_lo=`expr '(' $ac_mid ')' + 1`
25746 fi
25747
25748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25749 done
25750 case $ac_lo in
25751 ?*) ac_cv_sizeof_long=$ac_lo;;
25752 '') if test "$ac_cv_type_long" = yes; then
25753      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25754 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25755 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
25756 See \`config.log' for more details." >&5
25757 $as_echo "$as_me: error: cannot compute sizeof (long)
25758 See \`config.log' for more details." >&2;}
25759    { (exit 77); exit 77; }; }; }
25760    else
25761      ac_cv_sizeof_long=0
25762    fi ;;
25763 esac
25764 else
25765   cat >conftest.$ac_ext <<_ACEOF
25766 /* confdefs.h.  */
25767 _ACEOF
25768 cat confdefs.h >>conftest.$ac_ext
25769 cat >>conftest.$ac_ext <<_ACEOF
25770 /* end confdefs.h.  */
25771 $ac_includes_default
25772 static long int longval () { return (long int) (sizeof (long)); }
25773 static unsigned long int ulongval () { return (long int) (sizeof (long)); }
25774 #include <stdio.h>
25775 #include <stdlib.h>
25776 int
25777 main ()
25778 {
25779
25780   FILE *f = fopen ("conftest.val", "w");
25781   if (! f)
25782     return 1;
25783   if (((long int) (sizeof (long))) < 0)
25784     {
25785       long int i = longval ();
25786       if (i != ((long int) (sizeof (long))))
25787         return 1;
25788       fprintf (f, "%ld", i);
25789     }
25790   else
25791     {
25792       unsigned long int i = ulongval ();
25793       if (i != ((long int) (sizeof (long))))
25794         return 1;
25795       fprintf (f, "%lu", i);
25796     }
25797   /* Do not output a trailing newline, as this causes \r\n confusion
25798      on some platforms.  */
25799   return ferror (f) || fclose (f) != 0;
25800
25801   ;
25802   return 0;
25803 }
25804 _ACEOF
25805 rm -f conftest$ac_exeext
25806 if { (ac_try="$ac_link"
25807 case "(($ac_try" in
25808   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25809   *) ac_try_echo=$ac_try;;
25810 esac
25811 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25812 $as_echo "$ac_try_echo") >&5
25813   (eval "$ac_link") 2>&5
25814   ac_status=$?
25815   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25816   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25817   { (case "(($ac_try" in
25818   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25819   *) ac_try_echo=$ac_try;;
25820 esac
25821 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25822 $as_echo "$ac_try_echo") >&5
25823   (eval "$ac_try") 2>&5
25824   ac_status=$?
25825   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25826   (exit $ac_status); }; }; then
25827   ac_cv_sizeof_long=`cat conftest.val`
25828 else
25829   $as_echo "$as_me: program exited with status $ac_status" >&5
25830 $as_echo "$as_me: failed program was:" >&5
25831 sed 's/^/| /' conftest.$ac_ext >&5
25832
25833 ( exit $ac_status )
25834 if test "$ac_cv_type_long" = yes; then
25835      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25836 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25837 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
25838 See \`config.log' for more details." >&5
25839 $as_echo "$as_me: error: cannot compute sizeof (long)
25840 See \`config.log' for more details." >&2;}
25841    { (exit 77); exit 77; }; }; }
25842    else
25843      ac_cv_sizeof_long=0
25844    fi
25845 fi
25846 rm -rf conftest.dSYM
25847 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25848 fi
25849 rm -f conftest.val
25850 fi
25851 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
25852 $as_echo "$ac_cv_sizeof_long" >&6; }
25853
25854
25855
25856 cat >>confdefs.h <<_ACEOF
25857 #define SIZEOF_LONG $ac_cv_sizeof_long
25858 _ACEOF
25859
25860
25861
25862 # Decide whether float4 is passed by value: user-selectable, enabled by default
25863 { $as_echo "$as_me:$LINENO: checking whether to build with float4 passed by value" >&5
25864 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
25865
25866
25867 # Check whether --enable-float4-byval was given.
25868 if test "${enable_float4_byval+set}" = set; then
25869   enableval=$enable_float4_byval;
25870   case $enableval in
25871     yes)
25872
25873 cat >>confdefs.h <<\_ACEOF
25874 #define USE_FLOAT4_BYVAL 1
25875 _ACEOF
25876
25877                float4passbyval=true
25878       ;;
25879     no)
25880       float4passbyval=false
25881       ;;
25882     *)
25883       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float4-byval option" >&5
25884 $as_echo "$as_me: error: no argument expected for --enable-float4-byval option" >&2;}
25885    { (exit 1); exit 1; }; }
25886       ;;
25887   esac
25888
25889 else
25890   enable_float4_byval=yes
25891
25892 cat >>confdefs.h <<\_ACEOF
25893 #define USE_FLOAT4_BYVAL 1
25894 _ACEOF
25895
25896                float4passbyval=true
25897 fi
25898
25899
25900 { $as_echo "$as_me:$LINENO: result: $enable_float4_byval" >&5
25901 $as_echo "$enable_float4_byval" >&6; }
25902
25903 cat >>confdefs.h <<_ACEOF
25904 #define FLOAT4PASSBYVAL $float4passbyval
25905 _ACEOF
25906
25907
25908 # Decide whether float8 is passed by value.
25909 # Note: this setting also controls int8 and related types such as timestamp.
25910 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
25911 # If not, trying to select it is an error.
25912 { $as_echo "$as_me:$LINENO: checking whether to build with float8 passed by value" >&5
25913 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
25914 if test $ac_cv_sizeof_void_p -ge 8 ; then
25915
25916
25917 # Check whether --enable-float8-byval was given.
25918 if test "${enable_float8_byval+set}" = set; then
25919   enableval=$enable_float8_byval;
25920   case $enableval in
25921     yes)
25922       :
25923       ;;
25924     no)
25925       :
25926       ;;
25927     *)
25928       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
25929 $as_echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
25930    { (exit 1); exit 1; }; }
25931       ;;
25932   esac
25933
25934 else
25935   enable_float8_byval=yes
25936
25937 fi
25938
25939
25940 else
25941
25942
25943 # Check whether --enable-float8-byval was given.
25944 if test "${enable_float8_byval+set}" = set; then
25945   enableval=$enable_float8_byval;
25946   case $enableval in
25947     yes)
25948       :
25949       ;;
25950     no)
25951       :
25952       ;;
25953     *)
25954       { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
25955 $as_echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
25956    { (exit 1); exit 1; }; }
25957       ;;
25958   esac
25959
25960 else
25961   enable_float8_byval=no
25962
25963 fi
25964
25965
25966   if test "$enable_float8_byval" = yes ; then
25967     { { $as_echo "$as_me:$LINENO: error: --enable-float8-byval is not supported on 32-bit platforms." >&5
25968 $as_echo "$as_me: error: --enable-float8-byval is not supported on 32-bit platforms." >&2;}
25969    { (exit 1); exit 1; }; }
25970   fi
25971 fi
25972 if test "$enable_float8_byval" = yes ; then
25973
25974 cat >>confdefs.h <<\_ACEOF
25975 #define USE_FLOAT8_BYVAL 1
25976 _ACEOF
25977
25978   float8passbyval=true
25979 else
25980   float8passbyval=false
25981 fi
25982 { $as_echo "$as_me:$LINENO: result: $enable_float8_byval" >&5
25983 $as_echo "$enable_float8_byval" >&6; }
25984
25985 cat >>confdefs.h <<_ACEOF
25986 #define FLOAT8PASSBYVAL $float8passbyval
25987 _ACEOF
25988
25989
25990 # Determine memory alignment requirements for the basic C data types.
25991
25992 # The cast to long int works around a bug in the HP C Compiler,
25993 # see AC_CHECK_SIZEOF for more information.
25994 { $as_echo "$as_me:$LINENO: checking alignment of short" >&5
25995 $as_echo_n "checking alignment of short... " >&6; }
25996 if test "${ac_cv_alignof_short+set}" = set; then
25997   $as_echo_n "(cached) " >&6
25998 else
25999   if test "$cross_compiling" = yes; then
26000   # Depending upon the size, compute the lo and hi bounds.
26001 cat >conftest.$ac_ext <<_ACEOF
26002 /* confdefs.h.  */
26003 _ACEOF
26004 cat confdefs.h >>conftest.$ac_ext
26005 cat >>conftest.$ac_ext <<_ACEOF
26006 /* end confdefs.h.  */
26007 $ac_includes_default
26008 #ifndef offsetof
26009 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26010 #endif
26011 typedef struct { char x; short y; } ac__type_alignof_;
26012 int
26013 main ()
26014 {
26015 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
26016 test_array [0] = 0
26017
26018   ;
26019   return 0;
26020 }
26021 _ACEOF
26022 rm -f conftest.$ac_objext
26023 if { (ac_try="$ac_compile"
26024 case "(($ac_try" in
26025   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26026   *) ac_try_echo=$ac_try;;
26027 esac
26028 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26029 $as_echo "$ac_try_echo") >&5
26030   (eval "$ac_compile") 2>conftest.er1
26031   ac_status=$?
26032   grep -v '^ *+' conftest.er1 >conftest.err
26033   rm -f conftest.er1
26034   cat conftest.err >&5
26035   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26036   (exit $ac_status); } && {
26037          test -z "$ac_c_werror_flag" ||
26038          test ! -s conftest.err
26039        } && test -s conftest.$ac_objext; then
26040   ac_lo=0 ac_mid=0
26041   while :; do
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; short y; } ac__type_alignof_;
26053 int
26054 main ()
26055 {
26056 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
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=$ac_mid; break
26082 else
26083   $as_echo "$as_me: failed program was:" >&5
26084 sed 's/^/| /' conftest.$ac_ext >&5
26085
26086         ac_lo=`expr $ac_mid + 1`
26087                         if test $ac_lo -le $ac_mid; then
26088                           ac_lo= ac_hi=
26089                           break
26090                         fi
26091                         ac_mid=`expr 2 '*' $ac_mid + 1`
26092 fi
26093
26094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26095   done
26096 else
26097   $as_echo "$as_me: failed program was:" >&5
26098 sed 's/^/| /' conftest.$ac_ext >&5
26099
26100         cat >conftest.$ac_ext <<_ACEOF
26101 /* confdefs.h.  */
26102 _ACEOF
26103 cat confdefs.h >>conftest.$ac_ext
26104 cat >>conftest.$ac_ext <<_ACEOF
26105 /* end confdefs.h.  */
26106 $ac_includes_default
26107 #ifndef offsetof
26108 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26109 #endif
26110 typedef struct { char x; short y; } ac__type_alignof_;
26111 int
26112 main ()
26113 {
26114 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
26115 test_array [0] = 0
26116
26117   ;
26118   return 0;
26119 }
26120 _ACEOF
26121 rm -f conftest.$ac_objext
26122 if { (ac_try="$ac_compile"
26123 case "(($ac_try" in
26124   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26125   *) ac_try_echo=$ac_try;;
26126 esac
26127 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26128 $as_echo "$ac_try_echo") >&5
26129   (eval "$ac_compile") 2>conftest.er1
26130   ac_status=$?
26131   grep -v '^ *+' conftest.er1 >conftest.err
26132   rm -f conftest.er1
26133   cat conftest.err >&5
26134   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26135   (exit $ac_status); } && {
26136          test -z "$ac_c_werror_flag" ||
26137          test ! -s conftest.err
26138        } && test -s conftest.$ac_objext; then
26139   ac_hi=-1 ac_mid=-1
26140   while :; do
26141     cat >conftest.$ac_ext <<_ACEOF
26142 /* confdefs.h.  */
26143 _ACEOF
26144 cat confdefs.h >>conftest.$ac_ext
26145 cat >>conftest.$ac_ext <<_ACEOF
26146 /* end confdefs.h.  */
26147 $ac_includes_default
26148 #ifndef offsetof
26149 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26150 #endif
26151 typedef struct { char x; short y; } ac__type_alignof_;
26152 int
26153 main ()
26154 {
26155 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
26156 test_array [0] = 0
26157
26158   ;
26159   return 0;
26160 }
26161 _ACEOF
26162 rm -f conftest.$ac_objext
26163 if { (ac_try="$ac_compile"
26164 case "(($ac_try" in
26165   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26166   *) ac_try_echo=$ac_try;;
26167 esac
26168 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26169 $as_echo "$ac_try_echo") >&5
26170   (eval "$ac_compile") 2>conftest.er1
26171   ac_status=$?
26172   grep -v '^ *+' conftest.er1 >conftest.err
26173   rm -f conftest.er1
26174   cat conftest.err >&5
26175   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26176   (exit $ac_status); } && {
26177          test -z "$ac_c_werror_flag" ||
26178          test ! -s conftest.err
26179        } && test -s conftest.$ac_objext; then
26180   ac_lo=$ac_mid; break
26181 else
26182   $as_echo "$as_me: failed program was:" >&5
26183 sed 's/^/| /' conftest.$ac_ext >&5
26184
26185         ac_hi=`expr '(' $ac_mid ')' - 1`
26186                         if test $ac_mid -le $ac_hi; then
26187                           ac_lo= ac_hi=
26188                           break
26189                         fi
26190                         ac_mid=`expr 2 '*' $ac_mid`
26191 fi
26192
26193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26194   done
26195 else
26196   $as_echo "$as_me: failed program was:" >&5
26197 sed 's/^/| /' conftest.$ac_ext >&5
26198
26199         ac_lo= ac_hi=
26200 fi
26201
26202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26203 fi
26204
26205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26206 # Binary search between lo and hi bounds.
26207 while test "x$ac_lo" != "x$ac_hi"; do
26208   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26209   cat >conftest.$ac_ext <<_ACEOF
26210 /* confdefs.h.  */
26211 _ACEOF
26212 cat confdefs.h >>conftest.$ac_ext
26213 cat >>conftest.$ac_ext <<_ACEOF
26214 /* end confdefs.h.  */
26215 $ac_includes_default
26216 #ifndef offsetof
26217 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26218 #endif
26219 typedef struct { char x; short y; } ac__type_alignof_;
26220 int
26221 main ()
26222 {
26223 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26224 test_array [0] = 0
26225
26226   ;
26227   return 0;
26228 }
26229 _ACEOF
26230 rm -f conftest.$ac_objext
26231 if { (ac_try="$ac_compile"
26232 case "(($ac_try" in
26233   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26234   *) ac_try_echo=$ac_try;;
26235 esac
26236 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26237 $as_echo "$ac_try_echo") >&5
26238   (eval "$ac_compile") 2>conftest.er1
26239   ac_status=$?
26240   grep -v '^ *+' conftest.er1 >conftest.err
26241   rm -f conftest.er1
26242   cat conftest.err >&5
26243   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26244   (exit $ac_status); } && {
26245          test -z "$ac_c_werror_flag" ||
26246          test ! -s conftest.err
26247        } && test -s conftest.$ac_objext; then
26248   ac_hi=$ac_mid
26249 else
26250   $as_echo "$as_me: failed program was:" >&5
26251 sed 's/^/| /' conftest.$ac_ext >&5
26252
26253         ac_lo=`expr '(' $ac_mid ')' + 1`
26254 fi
26255
26256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26257 done
26258 case $ac_lo in
26259 ?*) ac_cv_alignof_short=$ac_lo;;
26260 '') if test "$ac_cv_type_short" = yes; then
26261      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26262 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26263 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of short
26264 See \`config.log' for more details." >&5
26265 $as_echo "$as_me: error: cannot compute alignment of short
26266 See \`config.log' for more details." >&2;}
26267    { (exit 77); exit 77; }; }; }
26268    else
26269      ac_cv_alignof_short=0
26270    fi ;;
26271 esac
26272 else
26273   cat >conftest.$ac_ext <<_ACEOF
26274 /* confdefs.h.  */
26275 _ACEOF
26276 cat confdefs.h >>conftest.$ac_ext
26277 cat >>conftest.$ac_ext <<_ACEOF
26278 /* end confdefs.h.  */
26279 $ac_includes_default
26280 #ifndef offsetof
26281 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26282 #endif
26283 typedef struct { char x; short y; } ac__type_alignof_;
26284 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
26285 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
26286 #include <stdio.h>
26287 #include <stdlib.h>
26288 int
26289 main ()
26290 {
26291
26292   FILE *f = fopen ("conftest.val", "w");
26293   if (! f)
26294     return 1;
26295   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
26296     {
26297       long int i = longval ();
26298       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26299         return 1;
26300       fprintf (f, "%ld", i);
26301     }
26302   else
26303     {
26304       unsigned long int i = ulongval ();
26305       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26306         return 1;
26307       fprintf (f, "%lu", i);
26308     }
26309   /* Do not output a trailing newline, as this causes \r\n confusion
26310      on some platforms.  */
26311   return ferror (f) || fclose (f) != 0;
26312
26313   ;
26314   return 0;
26315 }
26316 _ACEOF
26317 rm -f conftest$ac_exeext
26318 if { (ac_try="$ac_link"
26319 case "(($ac_try" in
26320   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26321   *) ac_try_echo=$ac_try;;
26322 esac
26323 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26324 $as_echo "$ac_try_echo") >&5
26325   (eval "$ac_link") 2>&5
26326   ac_status=$?
26327   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26328   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26329   { (case "(($ac_try" in
26330   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26331   *) ac_try_echo=$ac_try;;
26332 esac
26333 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26334 $as_echo "$ac_try_echo") >&5
26335   (eval "$ac_try") 2>&5
26336   ac_status=$?
26337   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26338   (exit $ac_status); }; }; then
26339   ac_cv_alignof_short=`cat conftest.val`
26340 else
26341   $as_echo "$as_me: program exited with status $ac_status" >&5
26342 $as_echo "$as_me: failed program was:" >&5
26343 sed 's/^/| /' conftest.$ac_ext >&5
26344
26345 ( exit $ac_status )
26346 if test "$ac_cv_type_short" = yes; then
26347      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26348 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26349 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of short
26350 See \`config.log' for more details." >&5
26351 $as_echo "$as_me: error: cannot compute alignment of short
26352 See \`config.log' for more details." >&2;}
26353    { (exit 77); exit 77; }; }; }
26354    else
26355      ac_cv_alignof_short=0
26356    fi
26357 fi
26358 rm -rf conftest.dSYM
26359 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26360 fi
26361 rm -f conftest.val
26362 fi
26363 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_short" >&5
26364 $as_echo "$ac_cv_alignof_short" >&6; }
26365
26366
26367
26368 cat >>confdefs.h <<_ACEOF
26369 #define ALIGNOF_SHORT $ac_cv_alignof_short
26370 _ACEOF
26371
26372
26373 # The cast to long int works around a bug in the HP C Compiler,
26374 # see AC_CHECK_SIZEOF for more information.
26375 { $as_echo "$as_me:$LINENO: checking alignment of int" >&5
26376 $as_echo_n "checking alignment of int... " >&6; }
26377 if test "${ac_cv_alignof_int+set}" = set; then
26378   $as_echo_n "(cached) " >&6
26379 else
26380   if test "$cross_compiling" = yes; then
26381   # Depending upon the size, compute the lo and hi bounds.
26382 cat >conftest.$ac_ext <<_ACEOF
26383 /* confdefs.h.  */
26384 _ACEOF
26385 cat confdefs.h >>conftest.$ac_ext
26386 cat >>conftest.$ac_ext <<_ACEOF
26387 /* end confdefs.h.  */
26388 $ac_includes_default
26389 #ifndef offsetof
26390 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26391 #endif
26392 typedef struct { char x; int y; } ac__type_alignof_;
26393 int
26394 main ()
26395 {
26396 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
26397 test_array [0] = 0
26398
26399   ;
26400   return 0;
26401 }
26402 _ACEOF
26403 rm -f conftest.$ac_objext
26404 if { (ac_try="$ac_compile"
26405 case "(($ac_try" in
26406   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26407   *) ac_try_echo=$ac_try;;
26408 esac
26409 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26410 $as_echo "$ac_try_echo") >&5
26411   (eval "$ac_compile") 2>conftest.er1
26412   ac_status=$?
26413   grep -v '^ *+' conftest.er1 >conftest.err
26414   rm -f conftest.er1
26415   cat conftest.err >&5
26416   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26417   (exit $ac_status); } && {
26418          test -z "$ac_c_werror_flag" ||
26419          test ! -s conftest.err
26420        } && test -s conftest.$ac_objext; then
26421   ac_lo=0 ac_mid=0
26422   while :; do
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; int y; } ac__type_alignof_;
26434 int
26435 main ()
26436 {
26437 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
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=$ac_mid; break
26463 else
26464   $as_echo "$as_me: failed program was:" >&5
26465 sed 's/^/| /' conftest.$ac_ext >&5
26466
26467         ac_lo=`expr $ac_mid + 1`
26468                         if test $ac_lo -le $ac_mid; then
26469                           ac_lo= ac_hi=
26470                           break
26471                         fi
26472                         ac_mid=`expr 2 '*' $ac_mid + 1`
26473 fi
26474
26475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26476   done
26477 else
26478   $as_echo "$as_me: failed program was:" >&5
26479 sed 's/^/| /' conftest.$ac_ext >&5
26480
26481         cat >conftest.$ac_ext <<_ACEOF
26482 /* confdefs.h.  */
26483 _ACEOF
26484 cat confdefs.h >>conftest.$ac_ext
26485 cat >>conftest.$ac_ext <<_ACEOF
26486 /* end confdefs.h.  */
26487 $ac_includes_default
26488 #ifndef offsetof
26489 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26490 #endif
26491 typedef struct { char x; int y; } ac__type_alignof_;
26492 int
26493 main ()
26494 {
26495 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
26496 test_array [0] = 0
26497
26498   ;
26499   return 0;
26500 }
26501 _ACEOF
26502 rm -f conftest.$ac_objext
26503 if { (ac_try="$ac_compile"
26504 case "(($ac_try" in
26505   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26506   *) ac_try_echo=$ac_try;;
26507 esac
26508 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26509 $as_echo "$ac_try_echo") >&5
26510   (eval "$ac_compile") 2>conftest.er1
26511   ac_status=$?
26512   grep -v '^ *+' conftest.er1 >conftest.err
26513   rm -f conftest.er1
26514   cat conftest.err >&5
26515   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26516   (exit $ac_status); } && {
26517          test -z "$ac_c_werror_flag" ||
26518          test ! -s conftest.err
26519        } && test -s conftest.$ac_objext; then
26520   ac_hi=-1 ac_mid=-1
26521   while :; do
26522     cat >conftest.$ac_ext <<_ACEOF
26523 /* confdefs.h.  */
26524 _ACEOF
26525 cat confdefs.h >>conftest.$ac_ext
26526 cat >>conftest.$ac_ext <<_ACEOF
26527 /* end confdefs.h.  */
26528 $ac_includes_default
26529 #ifndef offsetof
26530 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26531 #endif
26532 typedef struct { char x; int y; } ac__type_alignof_;
26533 int
26534 main ()
26535 {
26536 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
26537 test_array [0] = 0
26538
26539   ;
26540   return 0;
26541 }
26542 _ACEOF
26543 rm -f conftest.$ac_objext
26544 if { (ac_try="$ac_compile"
26545 case "(($ac_try" in
26546   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26547   *) ac_try_echo=$ac_try;;
26548 esac
26549 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26550 $as_echo "$ac_try_echo") >&5
26551   (eval "$ac_compile") 2>conftest.er1
26552   ac_status=$?
26553   grep -v '^ *+' conftest.er1 >conftest.err
26554   rm -f conftest.er1
26555   cat conftest.err >&5
26556   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26557   (exit $ac_status); } && {
26558          test -z "$ac_c_werror_flag" ||
26559          test ! -s conftest.err
26560        } && test -s conftest.$ac_objext; then
26561   ac_lo=$ac_mid; break
26562 else
26563   $as_echo "$as_me: failed program was:" >&5
26564 sed 's/^/| /' conftest.$ac_ext >&5
26565
26566         ac_hi=`expr '(' $ac_mid ')' - 1`
26567                         if test $ac_mid -le $ac_hi; then
26568                           ac_lo= ac_hi=
26569                           break
26570                         fi
26571                         ac_mid=`expr 2 '*' $ac_mid`
26572 fi
26573
26574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26575   done
26576 else
26577   $as_echo "$as_me: failed program was:" >&5
26578 sed 's/^/| /' conftest.$ac_ext >&5
26579
26580         ac_lo= ac_hi=
26581 fi
26582
26583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26584 fi
26585
26586 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26587 # Binary search between lo and hi bounds.
26588 while test "x$ac_lo" != "x$ac_hi"; do
26589   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26590   cat >conftest.$ac_ext <<_ACEOF
26591 /* confdefs.h.  */
26592 _ACEOF
26593 cat confdefs.h >>conftest.$ac_ext
26594 cat >>conftest.$ac_ext <<_ACEOF
26595 /* end confdefs.h.  */
26596 $ac_includes_default
26597 #ifndef offsetof
26598 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26599 #endif
26600 typedef struct { char x; int y; } ac__type_alignof_;
26601 int
26602 main ()
26603 {
26604 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26605 test_array [0] = 0
26606
26607   ;
26608   return 0;
26609 }
26610 _ACEOF
26611 rm -f conftest.$ac_objext
26612 if { (ac_try="$ac_compile"
26613 case "(($ac_try" in
26614   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26615   *) ac_try_echo=$ac_try;;
26616 esac
26617 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26618 $as_echo "$ac_try_echo") >&5
26619   (eval "$ac_compile") 2>conftest.er1
26620   ac_status=$?
26621   grep -v '^ *+' conftest.er1 >conftest.err
26622   rm -f conftest.er1
26623   cat conftest.err >&5
26624   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26625   (exit $ac_status); } && {
26626          test -z "$ac_c_werror_flag" ||
26627          test ! -s conftest.err
26628        } && test -s conftest.$ac_objext; then
26629   ac_hi=$ac_mid
26630 else
26631   $as_echo "$as_me: failed program was:" >&5
26632 sed 's/^/| /' conftest.$ac_ext >&5
26633
26634         ac_lo=`expr '(' $ac_mid ')' + 1`
26635 fi
26636
26637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26638 done
26639 case $ac_lo in
26640 ?*) ac_cv_alignof_int=$ac_lo;;
26641 '') if test "$ac_cv_type_int" = yes; then
26642      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26643 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26644 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of int
26645 See \`config.log' for more details." >&5
26646 $as_echo "$as_me: error: cannot compute alignment of int
26647 See \`config.log' for more details." >&2;}
26648    { (exit 77); exit 77; }; }; }
26649    else
26650      ac_cv_alignof_int=0
26651    fi ;;
26652 esac
26653 else
26654   cat >conftest.$ac_ext <<_ACEOF
26655 /* confdefs.h.  */
26656 _ACEOF
26657 cat confdefs.h >>conftest.$ac_ext
26658 cat >>conftest.$ac_ext <<_ACEOF
26659 /* end confdefs.h.  */
26660 $ac_includes_default
26661 #ifndef offsetof
26662 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26663 #endif
26664 typedef struct { char x; int y; } ac__type_alignof_;
26665 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
26666 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
26667 #include <stdio.h>
26668 #include <stdlib.h>
26669 int
26670 main ()
26671 {
26672
26673   FILE *f = fopen ("conftest.val", "w");
26674   if (! f)
26675     return 1;
26676   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
26677     {
26678       long int i = longval ();
26679       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26680         return 1;
26681       fprintf (f, "%ld", i);
26682     }
26683   else
26684     {
26685       unsigned long int i = ulongval ();
26686       if (i != ((long int) offsetof (ac__type_alignof_, y)))
26687         return 1;
26688       fprintf (f, "%lu", i);
26689     }
26690   /* Do not output a trailing newline, as this causes \r\n confusion
26691      on some platforms.  */
26692   return ferror (f) || fclose (f) != 0;
26693
26694   ;
26695   return 0;
26696 }
26697 _ACEOF
26698 rm -f conftest$ac_exeext
26699 if { (ac_try="$ac_link"
26700 case "(($ac_try" in
26701   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26702   *) ac_try_echo=$ac_try;;
26703 esac
26704 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26705 $as_echo "$ac_try_echo") >&5
26706   (eval "$ac_link") 2>&5
26707   ac_status=$?
26708   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26709   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26710   { (case "(($ac_try" in
26711   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26712   *) ac_try_echo=$ac_try;;
26713 esac
26714 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26715 $as_echo "$ac_try_echo") >&5
26716   (eval "$ac_try") 2>&5
26717   ac_status=$?
26718   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26719   (exit $ac_status); }; }; then
26720   ac_cv_alignof_int=`cat conftest.val`
26721 else
26722   $as_echo "$as_me: program exited with status $ac_status" >&5
26723 $as_echo "$as_me: failed program was:" >&5
26724 sed 's/^/| /' conftest.$ac_ext >&5
26725
26726 ( exit $ac_status )
26727 if test "$ac_cv_type_int" = yes; then
26728      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26729 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26730 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of int
26731 See \`config.log' for more details." >&5
26732 $as_echo "$as_me: error: cannot compute alignment of int
26733 See \`config.log' for more details." >&2;}
26734    { (exit 77); exit 77; }; }; }
26735    else
26736      ac_cv_alignof_int=0
26737    fi
26738 fi
26739 rm -rf conftest.dSYM
26740 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26741 fi
26742 rm -f conftest.val
26743 fi
26744 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_int" >&5
26745 $as_echo "$ac_cv_alignof_int" >&6; }
26746
26747
26748
26749 cat >>confdefs.h <<_ACEOF
26750 #define ALIGNOF_INT $ac_cv_alignof_int
26751 _ACEOF
26752
26753
26754 # The cast to long int works around a bug in the HP C Compiler,
26755 # see AC_CHECK_SIZEOF for more information.
26756 { $as_echo "$as_me:$LINENO: checking alignment of long" >&5
26757 $as_echo_n "checking alignment of long... " >&6; }
26758 if test "${ac_cv_alignof_long+set}" = set; then
26759   $as_echo_n "(cached) " >&6
26760 else
26761   if test "$cross_compiling" = yes; then
26762   # Depending upon the size, compute the lo and hi bounds.
26763 cat >conftest.$ac_ext <<_ACEOF
26764 /* confdefs.h.  */
26765 _ACEOF
26766 cat confdefs.h >>conftest.$ac_ext
26767 cat >>conftest.$ac_ext <<_ACEOF
26768 /* end confdefs.h.  */
26769 $ac_includes_default
26770 #ifndef offsetof
26771 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26772 #endif
26773 typedef struct { char x; long y; } ac__type_alignof_;
26774 int
26775 main ()
26776 {
26777 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
26778 test_array [0] = 0
26779
26780   ;
26781   return 0;
26782 }
26783 _ACEOF
26784 rm -f conftest.$ac_objext
26785 if { (ac_try="$ac_compile"
26786 case "(($ac_try" in
26787   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26788   *) ac_try_echo=$ac_try;;
26789 esac
26790 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26791 $as_echo "$ac_try_echo") >&5
26792   (eval "$ac_compile") 2>conftest.er1
26793   ac_status=$?
26794   grep -v '^ *+' conftest.er1 >conftest.err
26795   rm -f conftest.er1
26796   cat conftest.err >&5
26797   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26798   (exit $ac_status); } && {
26799          test -z "$ac_c_werror_flag" ||
26800          test ! -s conftest.err
26801        } && test -s conftest.$ac_objext; then
26802   ac_lo=0 ac_mid=0
26803   while :; do
26804     cat >conftest.$ac_ext <<_ACEOF
26805 /* confdefs.h.  */
26806 _ACEOF
26807 cat confdefs.h >>conftest.$ac_ext
26808 cat >>conftest.$ac_ext <<_ACEOF
26809 /* end confdefs.h.  */
26810 $ac_includes_default
26811 #ifndef offsetof
26812 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26813 #endif
26814 typedef struct { char x; long y; } ac__type_alignof_;
26815 int
26816 main ()
26817 {
26818 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26819 test_array [0] = 0
26820
26821   ;
26822   return 0;
26823 }
26824 _ACEOF
26825 rm -f conftest.$ac_objext
26826 if { (ac_try="$ac_compile"
26827 case "(($ac_try" in
26828   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26829   *) ac_try_echo=$ac_try;;
26830 esac
26831 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26832 $as_echo "$ac_try_echo") >&5
26833   (eval "$ac_compile") 2>conftest.er1
26834   ac_status=$?
26835   grep -v '^ *+' conftest.er1 >conftest.err
26836   rm -f conftest.er1
26837   cat conftest.err >&5
26838   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26839   (exit $ac_status); } && {
26840          test -z "$ac_c_werror_flag" ||
26841          test ! -s conftest.err
26842        } && test -s conftest.$ac_objext; then
26843   ac_hi=$ac_mid; break
26844 else
26845   $as_echo "$as_me: failed program was:" >&5
26846 sed 's/^/| /' conftest.$ac_ext >&5
26847
26848         ac_lo=`expr $ac_mid + 1`
26849                         if test $ac_lo -le $ac_mid; then
26850                           ac_lo= ac_hi=
26851                           break
26852                         fi
26853                         ac_mid=`expr 2 '*' $ac_mid + 1`
26854 fi
26855
26856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26857   done
26858 else
26859   $as_echo "$as_me: failed program was:" >&5
26860 sed 's/^/| /' conftest.$ac_ext >&5
26861
26862         cat >conftest.$ac_ext <<_ACEOF
26863 /* confdefs.h.  */
26864 _ACEOF
26865 cat confdefs.h >>conftest.$ac_ext
26866 cat >>conftest.$ac_ext <<_ACEOF
26867 /* end confdefs.h.  */
26868 $ac_includes_default
26869 #ifndef offsetof
26870 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26871 #endif
26872 typedef struct { char x; long y; } ac__type_alignof_;
26873 int
26874 main ()
26875 {
26876 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
26877 test_array [0] = 0
26878
26879   ;
26880   return 0;
26881 }
26882 _ACEOF
26883 rm -f conftest.$ac_objext
26884 if { (ac_try="$ac_compile"
26885 case "(($ac_try" in
26886   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26887   *) ac_try_echo=$ac_try;;
26888 esac
26889 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26890 $as_echo "$ac_try_echo") >&5
26891   (eval "$ac_compile") 2>conftest.er1
26892   ac_status=$?
26893   grep -v '^ *+' conftest.er1 >conftest.err
26894   rm -f conftest.er1
26895   cat conftest.err >&5
26896   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26897   (exit $ac_status); } && {
26898          test -z "$ac_c_werror_flag" ||
26899          test ! -s conftest.err
26900        } && test -s conftest.$ac_objext; then
26901   ac_hi=-1 ac_mid=-1
26902   while :; do
26903     cat >conftest.$ac_ext <<_ACEOF
26904 /* confdefs.h.  */
26905 _ACEOF
26906 cat confdefs.h >>conftest.$ac_ext
26907 cat >>conftest.$ac_ext <<_ACEOF
26908 /* end confdefs.h.  */
26909 $ac_includes_default
26910 #ifndef offsetof
26911 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26912 #endif
26913 typedef struct { char x; long y; } ac__type_alignof_;
26914 int
26915 main ()
26916 {
26917 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
26918 test_array [0] = 0
26919
26920   ;
26921   return 0;
26922 }
26923 _ACEOF
26924 rm -f conftest.$ac_objext
26925 if { (ac_try="$ac_compile"
26926 case "(($ac_try" in
26927   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26928   *) ac_try_echo=$ac_try;;
26929 esac
26930 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26931 $as_echo "$ac_try_echo") >&5
26932   (eval "$ac_compile") 2>conftest.er1
26933   ac_status=$?
26934   grep -v '^ *+' conftest.er1 >conftest.err
26935   rm -f conftest.er1
26936   cat conftest.err >&5
26937   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26938   (exit $ac_status); } && {
26939          test -z "$ac_c_werror_flag" ||
26940          test ! -s conftest.err
26941        } && test -s conftest.$ac_objext; then
26942   ac_lo=$ac_mid; break
26943 else
26944   $as_echo "$as_me: failed program was:" >&5
26945 sed 's/^/| /' conftest.$ac_ext >&5
26946
26947         ac_hi=`expr '(' $ac_mid ')' - 1`
26948                         if test $ac_mid -le $ac_hi; then
26949                           ac_lo= ac_hi=
26950                           break
26951                         fi
26952                         ac_mid=`expr 2 '*' $ac_mid`
26953 fi
26954
26955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26956   done
26957 else
26958   $as_echo "$as_me: failed program was:" >&5
26959 sed 's/^/| /' conftest.$ac_ext >&5
26960
26961         ac_lo= ac_hi=
26962 fi
26963
26964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26965 fi
26966
26967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26968 # Binary search between lo and hi bounds.
26969 while test "x$ac_lo" != "x$ac_hi"; do
26970   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26971   cat >conftest.$ac_ext <<_ACEOF
26972 /* confdefs.h.  */
26973 _ACEOF
26974 cat confdefs.h >>conftest.$ac_ext
26975 cat >>conftest.$ac_ext <<_ACEOF
26976 /* end confdefs.h.  */
26977 $ac_includes_default
26978 #ifndef offsetof
26979 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
26980 #endif
26981 typedef struct { char x; long y; } ac__type_alignof_;
26982 int
26983 main ()
26984 {
26985 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
26986 test_array [0] = 0
26987
26988   ;
26989   return 0;
26990 }
26991 _ACEOF
26992 rm -f conftest.$ac_objext
26993 if { (ac_try="$ac_compile"
26994 case "(($ac_try" in
26995   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26996   *) ac_try_echo=$ac_try;;
26997 esac
26998 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26999 $as_echo "$ac_try_echo") >&5
27000   (eval "$ac_compile") 2>conftest.er1
27001   ac_status=$?
27002   grep -v '^ *+' conftest.er1 >conftest.err
27003   rm -f conftest.er1
27004   cat conftest.err >&5
27005   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27006   (exit $ac_status); } && {
27007          test -z "$ac_c_werror_flag" ||
27008          test ! -s conftest.err
27009        } && test -s conftest.$ac_objext; then
27010   ac_hi=$ac_mid
27011 else
27012   $as_echo "$as_me: failed program was:" >&5
27013 sed 's/^/| /' conftest.$ac_ext >&5
27014
27015         ac_lo=`expr '(' $ac_mid ')' + 1`
27016 fi
27017
27018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27019 done
27020 case $ac_lo in
27021 ?*) ac_cv_alignof_long=$ac_lo;;
27022 '') if test "$ac_cv_type_long" = yes; then
27023      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27024 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27025 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long
27026 See \`config.log' for more details." >&5
27027 $as_echo "$as_me: error: cannot compute alignment of long
27028 See \`config.log' for more details." >&2;}
27029    { (exit 77); exit 77; }; }; }
27030    else
27031      ac_cv_alignof_long=0
27032    fi ;;
27033 esac
27034 else
27035   cat >conftest.$ac_ext <<_ACEOF
27036 /* confdefs.h.  */
27037 _ACEOF
27038 cat confdefs.h >>conftest.$ac_ext
27039 cat >>conftest.$ac_ext <<_ACEOF
27040 /* end confdefs.h.  */
27041 $ac_includes_default
27042 #ifndef offsetof
27043 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27044 #endif
27045 typedef struct { char x; long y; } ac__type_alignof_;
27046 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
27047 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
27048 #include <stdio.h>
27049 #include <stdlib.h>
27050 int
27051 main ()
27052 {
27053
27054   FILE *f = fopen ("conftest.val", "w");
27055   if (! f)
27056     return 1;
27057   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
27058     {
27059       long int i = longval ();
27060       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27061         return 1;
27062       fprintf (f, "%ld", i);
27063     }
27064   else
27065     {
27066       unsigned long int i = ulongval ();
27067       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27068         return 1;
27069       fprintf (f, "%lu", i);
27070     }
27071   /* Do not output a trailing newline, as this causes \r\n confusion
27072      on some platforms.  */
27073   return ferror (f) || fclose (f) != 0;
27074
27075   ;
27076   return 0;
27077 }
27078 _ACEOF
27079 rm -f conftest$ac_exeext
27080 if { (ac_try="$ac_link"
27081 case "(($ac_try" in
27082   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27083   *) ac_try_echo=$ac_try;;
27084 esac
27085 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27086 $as_echo "$ac_try_echo") >&5
27087   (eval "$ac_link") 2>&5
27088   ac_status=$?
27089   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27090   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27091   { (case "(($ac_try" in
27092   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27093   *) ac_try_echo=$ac_try;;
27094 esac
27095 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27096 $as_echo "$ac_try_echo") >&5
27097   (eval "$ac_try") 2>&5
27098   ac_status=$?
27099   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27100   (exit $ac_status); }; }; then
27101   ac_cv_alignof_long=`cat conftest.val`
27102 else
27103   $as_echo "$as_me: program exited with status $ac_status" >&5
27104 $as_echo "$as_me: failed program was:" >&5
27105 sed 's/^/| /' conftest.$ac_ext >&5
27106
27107 ( exit $ac_status )
27108 if test "$ac_cv_type_long" = yes; then
27109      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27110 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27111 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long
27112 See \`config.log' for more details." >&5
27113 $as_echo "$as_me: error: cannot compute alignment of long
27114 See \`config.log' for more details." >&2;}
27115    { (exit 77); exit 77; }; }; }
27116    else
27117      ac_cv_alignof_long=0
27118    fi
27119 fi
27120 rm -rf conftest.dSYM
27121 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27122 fi
27123 rm -f conftest.val
27124 fi
27125 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_long" >&5
27126 $as_echo "$ac_cv_alignof_long" >&6; }
27127
27128
27129
27130 cat >>confdefs.h <<_ACEOF
27131 #define ALIGNOF_LONG $ac_cv_alignof_long
27132 _ACEOF
27133
27134
27135 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
27136   # The cast to long int works around a bug in the HP C Compiler,
27137 # see AC_CHECK_SIZEOF for more information.
27138 { $as_echo "$as_me:$LINENO: checking alignment of long long int" >&5
27139 $as_echo_n "checking alignment of long long int... " >&6; }
27140 if test "${ac_cv_alignof_long_long_int+set}" = set; then
27141   $as_echo_n "(cached) " >&6
27142 else
27143   if test "$cross_compiling" = yes; then
27144   # Depending upon the size, compute the lo and hi bounds.
27145 cat >conftest.$ac_ext <<_ACEOF
27146 /* confdefs.h.  */
27147 _ACEOF
27148 cat confdefs.h >>conftest.$ac_ext
27149 cat >>conftest.$ac_ext <<_ACEOF
27150 /* end confdefs.h.  */
27151 $ac_includes_default
27152 #ifndef offsetof
27153 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27154 #endif
27155 typedef struct { char x; long long int y; } ac__type_alignof_;
27156 int
27157 main ()
27158 {
27159 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
27160 test_array [0] = 0
27161
27162   ;
27163   return 0;
27164 }
27165 _ACEOF
27166 rm -f conftest.$ac_objext
27167 if { (ac_try="$ac_compile"
27168 case "(($ac_try" in
27169   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27170   *) ac_try_echo=$ac_try;;
27171 esac
27172 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27173 $as_echo "$ac_try_echo") >&5
27174   (eval "$ac_compile") 2>conftest.er1
27175   ac_status=$?
27176   grep -v '^ *+' conftest.er1 >conftest.err
27177   rm -f conftest.er1
27178   cat conftest.err >&5
27179   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27180   (exit $ac_status); } && {
27181          test -z "$ac_c_werror_flag" ||
27182          test ! -s conftest.err
27183        } && test -s conftest.$ac_objext; then
27184   ac_lo=0 ac_mid=0
27185   while :; do
27186     cat >conftest.$ac_ext <<_ACEOF
27187 /* confdefs.h.  */
27188 _ACEOF
27189 cat confdefs.h >>conftest.$ac_ext
27190 cat >>conftest.$ac_ext <<_ACEOF
27191 /* end confdefs.h.  */
27192 $ac_includes_default
27193 #ifndef offsetof
27194 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27195 #endif
27196 typedef struct { char x; long long int y; } ac__type_alignof_;
27197 int
27198 main ()
27199 {
27200 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27201 test_array [0] = 0
27202
27203   ;
27204   return 0;
27205 }
27206 _ACEOF
27207 rm -f conftest.$ac_objext
27208 if { (ac_try="$ac_compile"
27209 case "(($ac_try" in
27210   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27211   *) ac_try_echo=$ac_try;;
27212 esac
27213 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27214 $as_echo "$ac_try_echo") >&5
27215   (eval "$ac_compile") 2>conftest.er1
27216   ac_status=$?
27217   grep -v '^ *+' conftest.er1 >conftest.err
27218   rm -f conftest.er1
27219   cat conftest.err >&5
27220   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27221   (exit $ac_status); } && {
27222          test -z "$ac_c_werror_flag" ||
27223          test ! -s conftest.err
27224        } && test -s conftest.$ac_objext; then
27225   ac_hi=$ac_mid; break
27226 else
27227   $as_echo "$as_me: failed program was:" >&5
27228 sed 's/^/| /' conftest.$ac_ext >&5
27229
27230         ac_lo=`expr $ac_mid + 1`
27231                         if test $ac_lo -le $ac_mid; then
27232                           ac_lo= ac_hi=
27233                           break
27234                         fi
27235                         ac_mid=`expr 2 '*' $ac_mid + 1`
27236 fi
27237
27238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27239   done
27240 else
27241   $as_echo "$as_me: failed program was:" >&5
27242 sed 's/^/| /' conftest.$ac_ext >&5
27243
27244         cat >conftest.$ac_ext <<_ACEOF
27245 /* confdefs.h.  */
27246 _ACEOF
27247 cat confdefs.h >>conftest.$ac_ext
27248 cat >>conftest.$ac_ext <<_ACEOF
27249 /* end confdefs.h.  */
27250 $ac_includes_default
27251 #ifndef offsetof
27252 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27253 #endif
27254 typedef struct { char x; long long int y; } ac__type_alignof_;
27255 int
27256 main ()
27257 {
27258 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
27259 test_array [0] = 0
27260
27261   ;
27262   return 0;
27263 }
27264 _ACEOF
27265 rm -f conftest.$ac_objext
27266 if { (ac_try="$ac_compile"
27267 case "(($ac_try" in
27268   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27269   *) ac_try_echo=$ac_try;;
27270 esac
27271 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27272 $as_echo "$ac_try_echo") >&5
27273   (eval "$ac_compile") 2>conftest.er1
27274   ac_status=$?
27275   grep -v '^ *+' conftest.er1 >conftest.err
27276   rm -f conftest.er1
27277   cat conftest.err >&5
27278   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27279   (exit $ac_status); } && {
27280          test -z "$ac_c_werror_flag" ||
27281          test ! -s conftest.err
27282        } && test -s conftest.$ac_objext; then
27283   ac_hi=-1 ac_mid=-1
27284   while :; do
27285     cat >conftest.$ac_ext <<_ACEOF
27286 /* confdefs.h.  */
27287 _ACEOF
27288 cat confdefs.h >>conftest.$ac_ext
27289 cat >>conftest.$ac_ext <<_ACEOF
27290 /* end confdefs.h.  */
27291 $ac_includes_default
27292 #ifndef offsetof
27293 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27294 #endif
27295 typedef struct { char x; long long int y; } ac__type_alignof_;
27296 int
27297 main ()
27298 {
27299 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
27300 test_array [0] = 0
27301
27302   ;
27303   return 0;
27304 }
27305 _ACEOF
27306 rm -f conftest.$ac_objext
27307 if { (ac_try="$ac_compile"
27308 case "(($ac_try" in
27309   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27310   *) ac_try_echo=$ac_try;;
27311 esac
27312 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27313 $as_echo "$ac_try_echo") >&5
27314   (eval "$ac_compile") 2>conftest.er1
27315   ac_status=$?
27316   grep -v '^ *+' conftest.er1 >conftest.err
27317   rm -f conftest.er1
27318   cat conftest.err >&5
27319   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27320   (exit $ac_status); } && {
27321          test -z "$ac_c_werror_flag" ||
27322          test ! -s conftest.err
27323        } && test -s conftest.$ac_objext; then
27324   ac_lo=$ac_mid; break
27325 else
27326   $as_echo "$as_me: failed program was:" >&5
27327 sed 's/^/| /' conftest.$ac_ext >&5
27328
27329         ac_hi=`expr '(' $ac_mid ')' - 1`
27330                         if test $ac_mid -le $ac_hi; then
27331                           ac_lo= ac_hi=
27332                           break
27333                         fi
27334                         ac_mid=`expr 2 '*' $ac_mid`
27335 fi
27336
27337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27338   done
27339 else
27340   $as_echo "$as_me: failed program was:" >&5
27341 sed 's/^/| /' conftest.$ac_ext >&5
27342
27343         ac_lo= ac_hi=
27344 fi
27345
27346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27347 fi
27348
27349 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27350 # Binary search between lo and hi bounds.
27351 while test "x$ac_lo" != "x$ac_hi"; do
27352   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
27353   cat >conftest.$ac_ext <<_ACEOF
27354 /* confdefs.h.  */
27355 _ACEOF
27356 cat confdefs.h >>conftest.$ac_ext
27357 cat >>conftest.$ac_ext <<_ACEOF
27358 /* end confdefs.h.  */
27359 $ac_includes_default
27360 #ifndef offsetof
27361 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27362 #endif
27363 typedef struct { char x; long long int y; } ac__type_alignof_;
27364 int
27365 main ()
27366 {
27367 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27368 test_array [0] = 0
27369
27370   ;
27371   return 0;
27372 }
27373 _ACEOF
27374 rm -f conftest.$ac_objext
27375 if { (ac_try="$ac_compile"
27376 case "(($ac_try" in
27377   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27378   *) ac_try_echo=$ac_try;;
27379 esac
27380 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27381 $as_echo "$ac_try_echo") >&5
27382   (eval "$ac_compile") 2>conftest.er1
27383   ac_status=$?
27384   grep -v '^ *+' conftest.er1 >conftest.err
27385   rm -f conftest.er1
27386   cat conftest.err >&5
27387   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27388   (exit $ac_status); } && {
27389          test -z "$ac_c_werror_flag" ||
27390          test ! -s conftest.err
27391        } && test -s conftest.$ac_objext; then
27392   ac_hi=$ac_mid
27393 else
27394   $as_echo "$as_me: failed program was:" >&5
27395 sed 's/^/| /' conftest.$ac_ext >&5
27396
27397         ac_lo=`expr '(' $ac_mid ')' + 1`
27398 fi
27399
27400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27401 done
27402 case $ac_lo in
27403 ?*) ac_cv_alignof_long_long_int=$ac_lo;;
27404 '') if test "$ac_cv_type_long_long_int" = yes; then
27405      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27406 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27407 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long long int
27408 See \`config.log' for more details." >&5
27409 $as_echo "$as_me: error: cannot compute alignment of long long int
27410 See \`config.log' for more details." >&2;}
27411    { (exit 77); exit 77; }; }; }
27412    else
27413      ac_cv_alignof_long_long_int=0
27414    fi ;;
27415 esac
27416 else
27417   cat >conftest.$ac_ext <<_ACEOF
27418 /* confdefs.h.  */
27419 _ACEOF
27420 cat confdefs.h >>conftest.$ac_ext
27421 cat >>conftest.$ac_ext <<_ACEOF
27422 /* end confdefs.h.  */
27423 $ac_includes_default
27424 #ifndef offsetof
27425 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27426 #endif
27427 typedef struct { char x; long long int y; } ac__type_alignof_;
27428 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
27429 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
27430 #include <stdio.h>
27431 #include <stdlib.h>
27432 int
27433 main ()
27434 {
27435
27436   FILE *f = fopen ("conftest.val", "w");
27437   if (! f)
27438     return 1;
27439   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
27440     {
27441       long int i = longval ();
27442       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27443         return 1;
27444       fprintf (f, "%ld", i);
27445     }
27446   else
27447     {
27448       unsigned long int i = ulongval ();
27449       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27450         return 1;
27451       fprintf (f, "%lu", i);
27452     }
27453   /* Do not output a trailing newline, as this causes \r\n confusion
27454      on some platforms.  */
27455   return ferror (f) || fclose (f) != 0;
27456
27457   ;
27458   return 0;
27459 }
27460 _ACEOF
27461 rm -f conftest$ac_exeext
27462 if { (ac_try="$ac_link"
27463 case "(($ac_try" in
27464   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27465   *) ac_try_echo=$ac_try;;
27466 esac
27467 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27468 $as_echo "$ac_try_echo") >&5
27469   (eval "$ac_link") 2>&5
27470   ac_status=$?
27471   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27472   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27473   { (case "(($ac_try" in
27474   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27475   *) ac_try_echo=$ac_try;;
27476 esac
27477 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27478 $as_echo "$ac_try_echo") >&5
27479   (eval "$ac_try") 2>&5
27480   ac_status=$?
27481   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27482   (exit $ac_status); }; }; then
27483   ac_cv_alignof_long_long_int=`cat conftest.val`
27484 else
27485   $as_echo "$as_me: program exited with status $ac_status" >&5
27486 $as_echo "$as_me: failed program was:" >&5
27487 sed 's/^/| /' conftest.$ac_ext >&5
27488
27489 ( exit $ac_status )
27490 if test "$ac_cv_type_long_long_int" = yes; then
27491      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27492 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27493 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long long int
27494 See \`config.log' for more details." >&5
27495 $as_echo "$as_me: error: cannot compute alignment of long long int
27496 See \`config.log' for more details." >&2;}
27497    { (exit 77); exit 77; }; }; }
27498    else
27499      ac_cv_alignof_long_long_int=0
27500    fi
27501 fi
27502 rm -rf conftest.dSYM
27503 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27504 fi
27505 rm -f conftest.val
27506 fi
27507 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_long_long_int" >&5
27508 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
27509
27510
27511
27512 cat >>confdefs.h <<_ACEOF
27513 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
27514 _ACEOF
27515
27516
27517 fi
27518 # The cast to long int works around a bug in the HP C Compiler,
27519 # see AC_CHECK_SIZEOF for more information.
27520 { $as_echo "$as_me:$LINENO: checking alignment of double" >&5
27521 $as_echo_n "checking alignment of double... " >&6; }
27522 if test "${ac_cv_alignof_double+set}" = set; then
27523   $as_echo_n "(cached) " >&6
27524 else
27525   if test "$cross_compiling" = yes; then
27526   # Depending upon the size, compute the lo and hi bounds.
27527 cat >conftest.$ac_ext <<_ACEOF
27528 /* confdefs.h.  */
27529 _ACEOF
27530 cat confdefs.h >>conftest.$ac_ext
27531 cat >>conftest.$ac_ext <<_ACEOF
27532 /* end confdefs.h.  */
27533 $ac_includes_default
27534 #ifndef offsetof
27535 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27536 #endif
27537 typedef struct { char x; double y; } ac__type_alignof_;
27538 int
27539 main ()
27540 {
27541 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
27542 test_array [0] = 0
27543
27544   ;
27545   return 0;
27546 }
27547 _ACEOF
27548 rm -f conftest.$ac_objext
27549 if { (ac_try="$ac_compile"
27550 case "(($ac_try" in
27551   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27552   *) ac_try_echo=$ac_try;;
27553 esac
27554 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27555 $as_echo "$ac_try_echo") >&5
27556   (eval "$ac_compile") 2>conftest.er1
27557   ac_status=$?
27558   grep -v '^ *+' conftest.er1 >conftest.err
27559   rm -f conftest.er1
27560   cat conftest.err >&5
27561   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27562   (exit $ac_status); } && {
27563          test -z "$ac_c_werror_flag" ||
27564          test ! -s conftest.err
27565        } && test -s conftest.$ac_objext; then
27566   ac_lo=0 ac_mid=0
27567   while :; do
27568     cat >conftest.$ac_ext <<_ACEOF
27569 /* confdefs.h.  */
27570 _ACEOF
27571 cat confdefs.h >>conftest.$ac_ext
27572 cat >>conftest.$ac_ext <<_ACEOF
27573 /* end confdefs.h.  */
27574 $ac_includes_default
27575 #ifndef offsetof
27576 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27577 #endif
27578 typedef struct { char x; double y; } ac__type_alignof_;
27579 int
27580 main ()
27581 {
27582 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27583 test_array [0] = 0
27584
27585   ;
27586   return 0;
27587 }
27588 _ACEOF
27589 rm -f conftest.$ac_objext
27590 if { (ac_try="$ac_compile"
27591 case "(($ac_try" in
27592   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27593   *) ac_try_echo=$ac_try;;
27594 esac
27595 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27596 $as_echo "$ac_try_echo") >&5
27597   (eval "$ac_compile") 2>conftest.er1
27598   ac_status=$?
27599   grep -v '^ *+' conftest.er1 >conftest.err
27600   rm -f conftest.er1
27601   cat conftest.err >&5
27602   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27603   (exit $ac_status); } && {
27604          test -z "$ac_c_werror_flag" ||
27605          test ! -s conftest.err
27606        } && test -s conftest.$ac_objext; then
27607   ac_hi=$ac_mid; break
27608 else
27609   $as_echo "$as_me: failed program was:" >&5
27610 sed 's/^/| /' conftest.$ac_ext >&5
27611
27612         ac_lo=`expr $ac_mid + 1`
27613                         if test $ac_lo -le $ac_mid; then
27614                           ac_lo= ac_hi=
27615                           break
27616                         fi
27617                         ac_mid=`expr 2 '*' $ac_mid + 1`
27618 fi
27619
27620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27621   done
27622 else
27623   $as_echo "$as_me: failed program was:" >&5
27624 sed 's/^/| /' conftest.$ac_ext >&5
27625
27626         cat >conftest.$ac_ext <<_ACEOF
27627 /* confdefs.h.  */
27628 _ACEOF
27629 cat confdefs.h >>conftest.$ac_ext
27630 cat >>conftest.$ac_ext <<_ACEOF
27631 /* end confdefs.h.  */
27632 $ac_includes_default
27633 #ifndef offsetof
27634 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27635 #endif
27636 typedef struct { char x; double y; } ac__type_alignof_;
27637 int
27638 main ()
27639 {
27640 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
27641 test_array [0] = 0
27642
27643   ;
27644   return 0;
27645 }
27646 _ACEOF
27647 rm -f conftest.$ac_objext
27648 if { (ac_try="$ac_compile"
27649 case "(($ac_try" in
27650   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27651   *) ac_try_echo=$ac_try;;
27652 esac
27653 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27654 $as_echo "$ac_try_echo") >&5
27655   (eval "$ac_compile") 2>conftest.er1
27656   ac_status=$?
27657   grep -v '^ *+' conftest.er1 >conftest.err
27658   rm -f conftest.er1
27659   cat conftest.err >&5
27660   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27661   (exit $ac_status); } && {
27662          test -z "$ac_c_werror_flag" ||
27663          test ! -s conftest.err
27664        } && test -s conftest.$ac_objext; then
27665   ac_hi=-1 ac_mid=-1
27666   while :; do
27667     cat >conftest.$ac_ext <<_ACEOF
27668 /* confdefs.h.  */
27669 _ACEOF
27670 cat confdefs.h >>conftest.$ac_ext
27671 cat >>conftest.$ac_ext <<_ACEOF
27672 /* end confdefs.h.  */
27673 $ac_includes_default
27674 #ifndef offsetof
27675 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27676 #endif
27677 typedef struct { char x; double y; } ac__type_alignof_;
27678 int
27679 main ()
27680 {
27681 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
27682 test_array [0] = 0
27683
27684   ;
27685   return 0;
27686 }
27687 _ACEOF
27688 rm -f conftest.$ac_objext
27689 if { (ac_try="$ac_compile"
27690 case "(($ac_try" in
27691   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27692   *) ac_try_echo=$ac_try;;
27693 esac
27694 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27695 $as_echo "$ac_try_echo") >&5
27696   (eval "$ac_compile") 2>conftest.er1
27697   ac_status=$?
27698   grep -v '^ *+' conftest.er1 >conftest.err
27699   rm -f conftest.er1
27700   cat conftest.err >&5
27701   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27702   (exit $ac_status); } && {
27703          test -z "$ac_c_werror_flag" ||
27704          test ! -s conftest.err
27705        } && test -s conftest.$ac_objext; then
27706   ac_lo=$ac_mid; break
27707 else
27708   $as_echo "$as_me: failed program was:" >&5
27709 sed 's/^/| /' conftest.$ac_ext >&5
27710
27711         ac_hi=`expr '(' $ac_mid ')' - 1`
27712                         if test $ac_mid -le $ac_hi; then
27713                           ac_lo= ac_hi=
27714                           break
27715                         fi
27716                         ac_mid=`expr 2 '*' $ac_mid`
27717 fi
27718
27719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27720   done
27721 else
27722   $as_echo "$as_me: failed program was:" >&5
27723 sed 's/^/| /' conftest.$ac_ext >&5
27724
27725         ac_lo= ac_hi=
27726 fi
27727
27728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27729 fi
27730
27731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27732 # Binary search between lo and hi bounds.
27733 while test "x$ac_lo" != "x$ac_hi"; do
27734   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
27735   cat >conftest.$ac_ext <<_ACEOF
27736 /* confdefs.h.  */
27737 _ACEOF
27738 cat confdefs.h >>conftest.$ac_ext
27739 cat >>conftest.$ac_ext <<_ACEOF
27740 /* end confdefs.h.  */
27741 $ac_includes_default
27742 #ifndef offsetof
27743 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27744 #endif
27745 typedef struct { char x; double y; } ac__type_alignof_;
27746 int
27747 main ()
27748 {
27749 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
27750 test_array [0] = 0
27751
27752   ;
27753   return 0;
27754 }
27755 _ACEOF
27756 rm -f conftest.$ac_objext
27757 if { (ac_try="$ac_compile"
27758 case "(($ac_try" in
27759   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27760   *) ac_try_echo=$ac_try;;
27761 esac
27762 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27763 $as_echo "$ac_try_echo") >&5
27764   (eval "$ac_compile") 2>conftest.er1
27765   ac_status=$?
27766   grep -v '^ *+' conftest.er1 >conftest.err
27767   rm -f conftest.er1
27768   cat conftest.err >&5
27769   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27770   (exit $ac_status); } && {
27771          test -z "$ac_c_werror_flag" ||
27772          test ! -s conftest.err
27773        } && test -s conftest.$ac_objext; then
27774   ac_hi=$ac_mid
27775 else
27776   $as_echo "$as_me: failed program was:" >&5
27777 sed 's/^/| /' conftest.$ac_ext >&5
27778
27779         ac_lo=`expr '(' $ac_mid ')' + 1`
27780 fi
27781
27782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27783 done
27784 case $ac_lo in
27785 ?*) ac_cv_alignof_double=$ac_lo;;
27786 '') if test "$ac_cv_type_double" = yes; then
27787      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27788 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27789 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of double
27790 See \`config.log' for more details." >&5
27791 $as_echo "$as_me: error: cannot compute alignment of double
27792 See \`config.log' for more details." >&2;}
27793    { (exit 77); exit 77; }; }; }
27794    else
27795      ac_cv_alignof_double=0
27796    fi ;;
27797 esac
27798 else
27799   cat >conftest.$ac_ext <<_ACEOF
27800 /* confdefs.h.  */
27801 _ACEOF
27802 cat confdefs.h >>conftest.$ac_ext
27803 cat >>conftest.$ac_ext <<_ACEOF
27804 /* end confdefs.h.  */
27805 $ac_includes_default
27806 #ifndef offsetof
27807 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
27808 #endif
27809 typedef struct { char x; double y; } ac__type_alignof_;
27810 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
27811 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
27812 #include <stdio.h>
27813 #include <stdlib.h>
27814 int
27815 main ()
27816 {
27817
27818   FILE *f = fopen ("conftest.val", "w");
27819   if (! f)
27820     return 1;
27821   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
27822     {
27823       long int i = longval ();
27824       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27825         return 1;
27826       fprintf (f, "%ld", i);
27827     }
27828   else
27829     {
27830       unsigned long int i = ulongval ();
27831       if (i != ((long int) offsetof (ac__type_alignof_, y)))
27832         return 1;
27833       fprintf (f, "%lu", i);
27834     }
27835   /* Do not output a trailing newline, as this causes \r\n confusion
27836      on some platforms.  */
27837   return ferror (f) || fclose (f) != 0;
27838
27839   ;
27840   return 0;
27841 }
27842 _ACEOF
27843 rm -f conftest$ac_exeext
27844 if { (ac_try="$ac_link"
27845 case "(($ac_try" in
27846   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27847   *) ac_try_echo=$ac_try;;
27848 esac
27849 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27850 $as_echo "$ac_try_echo") >&5
27851   (eval "$ac_link") 2>&5
27852   ac_status=$?
27853   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27854   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27855   { (case "(($ac_try" in
27856   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27857   *) ac_try_echo=$ac_try;;
27858 esac
27859 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27860 $as_echo "$ac_try_echo") >&5
27861   (eval "$ac_try") 2>&5
27862   ac_status=$?
27863   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27864   (exit $ac_status); }; }; then
27865   ac_cv_alignof_double=`cat conftest.val`
27866 else
27867   $as_echo "$as_me: program exited with status $ac_status" >&5
27868 $as_echo "$as_me: failed program was:" >&5
27869 sed 's/^/| /' conftest.$ac_ext >&5
27870
27871 ( exit $ac_status )
27872 if test "$ac_cv_type_double" = yes; then
27873      { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
27874 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27875 { { $as_echo "$as_me:$LINENO: error: cannot compute alignment of double
27876 See \`config.log' for more details." >&5
27877 $as_echo "$as_me: error: cannot compute alignment of double
27878 See \`config.log' for more details." >&2;}
27879    { (exit 77); exit 77; }; }; }
27880    else
27881      ac_cv_alignof_double=0
27882    fi
27883 fi
27884 rm -rf conftest.dSYM
27885 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27886 fi
27887 rm -f conftest.val
27888 fi
27889 { $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_double" >&5
27890 $as_echo "$ac_cv_alignof_double" >&6; }
27891
27892
27893
27894 cat >>confdefs.h <<_ACEOF
27895 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
27896 _ACEOF
27897
27898
27899
27900 # Compute maximum alignment of any basic type.
27901 # We assume long's alignment is at least as strong as char, short, or int;
27902 # but we must check long long (if it exists) and double.
27903
27904 MAX_ALIGNOF=$ac_cv_alignof_long
27905 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
27906   MAX_ALIGNOF=$ac_cv_alignof_double
27907 fi
27908 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
27909   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
27910 fi
27911
27912 cat >>confdefs.h <<_ACEOF
27913 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
27914 _ACEOF
27915
27916
27917
27918 # Some platforms predefine the types int8, int16, etc.  Only check
27919 # a (hopefully) representative subset.
27920 { $as_echo "$as_me:$LINENO: checking for int8" >&5
27921 $as_echo_n "checking for int8... " >&6; }
27922 if test "${ac_cv_type_int8+set}" = set; then
27923   $as_echo_n "(cached) " >&6
27924 else
27925   ac_cv_type_int8=no
27926 cat >conftest.$ac_ext <<_ACEOF
27927 /* confdefs.h.  */
27928 _ACEOF
27929 cat confdefs.h >>conftest.$ac_ext
27930 cat >>conftest.$ac_ext <<_ACEOF
27931 /* end confdefs.h.  */
27932 #include <stdio.h>
27933
27934 int
27935 main ()
27936 {
27937 if (sizeof (int8))
27938        return 0;
27939   ;
27940   return 0;
27941 }
27942 _ACEOF
27943 rm -f conftest.$ac_objext
27944 if { (ac_try="$ac_compile"
27945 case "(($ac_try" in
27946   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27947   *) ac_try_echo=$ac_try;;
27948 esac
27949 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27950 $as_echo "$ac_try_echo") >&5
27951   (eval "$ac_compile") 2>conftest.er1
27952   ac_status=$?
27953   grep -v '^ *+' conftest.er1 >conftest.err
27954   rm -f conftest.er1
27955   cat conftest.err >&5
27956   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27957   (exit $ac_status); } && {
27958          test -z "$ac_c_werror_flag" ||
27959          test ! -s conftest.err
27960        } && test -s conftest.$ac_objext; then
27961   cat >conftest.$ac_ext <<_ACEOF
27962 /* confdefs.h.  */
27963 _ACEOF
27964 cat confdefs.h >>conftest.$ac_ext
27965 cat >>conftest.$ac_ext <<_ACEOF
27966 /* end confdefs.h.  */
27967 #include <stdio.h>
27968
27969 int
27970 main ()
27971 {
27972 if (sizeof ((int8)))
27973           return 0;
27974   ;
27975   return 0;
27976 }
27977 _ACEOF
27978 rm -f conftest.$ac_objext
27979 if { (ac_try="$ac_compile"
27980 case "(($ac_try" in
27981   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27982   *) ac_try_echo=$ac_try;;
27983 esac
27984 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27985 $as_echo "$ac_try_echo") >&5
27986   (eval "$ac_compile") 2>conftest.er1
27987   ac_status=$?
27988   grep -v '^ *+' conftest.er1 >conftest.err
27989   rm -f conftest.er1
27990   cat conftest.err >&5
27991   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27992   (exit $ac_status); } && {
27993          test -z "$ac_c_werror_flag" ||
27994          test ! -s conftest.err
27995        } && test -s conftest.$ac_objext; then
27996   :
27997 else
27998   $as_echo "$as_me: failed program was:" >&5
27999 sed 's/^/| /' conftest.$ac_ext >&5
28000
28001         ac_cv_type_int8=yes
28002 fi
28003
28004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28005 else
28006   $as_echo "$as_me: failed program was:" >&5
28007 sed 's/^/| /' conftest.$ac_ext >&5
28008
28009
28010 fi
28011
28012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28013 fi
28014 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
28015 $as_echo "$ac_cv_type_int8" >&6; }
28016 if test "x$ac_cv_type_int8" = x""yes; then
28017
28018 cat >>confdefs.h <<_ACEOF
28019 #define HAVE_INT8 1
28020 _ACEOF
28021
28022
28023 fi
28024 { $as_echo "$as_me:$LINENO: checking for uint8" >&5
28025 $as_echo_n "checking for uint8... " >&6; }
28026 if test "${ac_cv_type_uint8+set}" = set; then
28027   $as_echo_n "(cached) " >&6
28028 else
28029   ac_cv_type_uint8=no
28030 cat >conftest.$ac_ext <<_ACEOF
28031 /* confdefs.h.  */
28032 _ACEOF
28033 cat confdefs.h >>conftest.$ac_ext
28034 cat >>conftest.$ac_ext <<_ACEOF
28035 /* end confdefs.h.  */
28036 #include <stdio.h>
28037
28038 int
28039 main ()
28040 {
28041 if (sizeof (uint8))
28042        return 0;
28043   ;
28044   return 0;
28045 }
28046 _ACEOF
28047 rm -f conftest.$ac_objext
28048 if { (ac_try="$ac_compile"
28049 case "(($ac_try" in
28050   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28051   *) ac_try_echo=$ac_try;;
28052 esac
28053 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28054 $as_echo "$ac_try_echo") >&5
28055   (eval "$ac_compile") 2>conftest.er1
28056   ac_status=$?
28057   grep -v '^ *+' conftest.er1 >conftest.err
28058   rm -f conftest.er1
28059   cat conftest.err >&5
28060   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28061   (exit $ac_status); } && {
28062          test -z "$ac_c_werror_flag" ||
28063          test ! -s conftest.err
28064        } && test -s conftest.$ac_objext; then
28065   cat >conftest.$ac_ext <<_ACEOF
28066 /* confdefs.h.  */
28067 _ACEOF
28068 cat confdefs.h >>conftest.$ac_ext
28069 cat >>conftest.$ac_ext <<_ACEOF
28070 /* end confdefs.h.  */
28071 #include <stdio.h>
28072
28073 int
28074 main ()
28075 {
28076 if (sizeof ((uint8)))
28077           return 0;
28078   ;
28079   return 0;
28080 }
28081 _ACEOF
28082 rm -f conftest.$ac_objext
28083 if { (ac_try="$ac_compile"
28084 case "(($ac_try" in
28085   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28086   *) ac_try_echo=$ac_try;;
28087 esac
28088 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28089 $as_echo "$ac_try_echo") >&5
28090   (eval "$ac_compile") 2>conftest.er1
28091   ac_status=$?
28092   grep -v '^ *+' conftest.er1 >conftest.err
28093   rm -f conftest.er1
28094   cat conftest.err >&5
28095   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28096   (exit $ac_status); } && {
28097          test -z "$ac_c_werror_flag" ||
28098          test ! -s conftest.err
28099        } && test -s conftest.$ac_objext; then
28100   :
28101 else
28102   $as_echo "$as_me: failed program was:" >&5
28103 sed 's/^/| /' conftest.$ac_ext >&5
28104
28105         ac_cv_type_uint8=yes
28106 fi
28107
28108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28109 else
28110   $as_echo "$as_me: failed program was:" >&5
28111 sed 's/^/| /' conftest.$ac_ext >&5
28112
28113
28114 fi
28115
28116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28117 fi
28118 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
28119 $as_echo "$ac_cv_type_uint8" >&6; }
28120 if test "x$ac_cv_type_uint8" = x""yes; then
28121
28122 cat >>confdefs.h <<_ACEOF
28123 #define HAVE_UINT8 1
28124 _ACEOF
28125
28126
28127 fi
28128 { $as_echo "$as_me:$LINENO: checking for int64" >&5
28129 $as_echo_n "checking for int64... " >&6; }
28130 if test "${ac_cv_type_int64+set}" = set; then
28131   $as_echo_n "(cached) " >&6
28132 else
28133   ac_cv_type_int64=no
28134 cat >conftest.$ac_ext <<_ACEOF
28135 /* confdefs.h.  */
28136 _ACEOF
28137 cat confdefs.h >>conftest.$ac_ext
28138 cat >>conftest.$ac_ext <<_ACEOF
28139 /* end confdefs.h.  */
28140 #include <stdio.h>
28141
28142 int
28143 main ()
28144 {
28145 if (sizeof (int64))
28146        return 0;
28147   ;
28148   return 0;
28149 }
28150 _ACEOF
28151 rm -f conftest.$ac_objext
28152 if { (ac_try="$ac_compile"
28153 case "(($ac_try" in
28154   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28155   *) ac_try_echo=$ac_try;;
28156 esac
28157 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28158 $as_echo "$ac_try_echo") >&5
28159   (eval "$ac_compile") 2>conftest.er1
28160   ac_status=$?
28161   grep -v '^ *+' conftest.er1 >conftest.err
28162   rm -f conftest.er1
28163   cat conftest.err >&5
28164   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28165   (exit $ac_status); } && {
28166          test -z "$ac_c_werror_flag" ||
28167          test ! -s conftest.err
28168        } && test -s conftest.$ac_objext; then
28169   cat >conftest.$ac_ext <<_ACEOF
28170 /* confdefs.h.  */
28171 _ACEOF
28172 cat confdefs.h >>conftest.$ac_ext
28173 cat >>conftest.$ac_ext <<_ACEOF
28174 /* end confdefs.h.  */
28175 #include <stdio.h>
28176
28177 int
28178 main ()
28179 {
28180 if (sizeof ((int64)))
28181           return 0;
28182   ;
28183   return 0;
28184 }
28185 _ACEOF
28186 rm -f conftest.$ac_objext
28187 if { (ac_try="$ac_compile"
28188 case "(($ac_try" in
28189   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28190   *) ac_try_echo=$ac_try;;
28191 esac
28192 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28193 $as_echo "$ac_try_echo") >&5
28194   (eval "$ac_compile") 2>conftest.er1
28195   ac_status=$?
28196   grep -v '^ *+' conftest.er1 >conftest.err
28197   rm -f conftest.er1
28198   cat conftest.err >&5
28199   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28200   (exit $ac_status); } && {
28201          test -z "$ac_c_werror_flag" ||
28202          test ! -s conftest.err
28203        } && test -s conftest.$ac_objext; then
28204   :
28205 else
28206   $as_echo "$as_me: failed program was:" >&5
28207 sed 's/^/| /' conftest.$ac_ext >&5
28208
28209         ac_cv_type_int64=yes
28210 fi
28211
28212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28213 else
28214   $as_echo "$as_me: failed program was:" >&5
28215 sed 's/^/| /' conftest.$ac_ext >&5
28216
28217
28218 fi
28219
28220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28221 fi
28222 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
28223 $as_echo "$ac_cv_type_int64" >&6; }
28224 if test "x$ac_cv_type_int64" = x""yes; then
28225
28226 cat >>confdefs.h <<_ACEOF
28227 #define HAVE_INT64 1
28228 _ACEOF
28229
28230
28231 fi
28232 { $as_echo "$as_me:$LINENO: checking for uint64" >&5
28233 $as_echo_n "checking for uint64... " >&6; }
28234 if test "${ac_cv_type_uint64+set}" = set; then
28235   $as_echo_n "(cached) " >&6
28236 else
28237   ac_cv_type_uint64=no
28238 cat >conftest.$ac_ext <<_ACEOF
28239 /* confdefs.h.  */
28240 _ACEOF
28241 cat confdefs.h >>conftest.$ac_ext
28242 cat >>conftest.$ac_ext <<_ACEOF
28243 /* end confdefs.h.  */
28244 #include <stdio.h>
28245
28246 int
28247 main ()
28248 {
28249 if (sizeof (uint64))
28250        return 0;
28251   ;
28252   return 0;
28253 }
28254 _ACEOF
28255 rm -f conftest.$ac_objext
28256 if { (ac_try="$ac_compile"
28257 case "(($ac_try" in
28258   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28259   *) ac_try_echo=$ac_try;;
28260 esac
28261 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28262 $as_echo "$ac_try_echo") >&5
28263   (eval "$ac_compile") 2>conftest.er1
28264   ac_status=$?
28265   grep -v '^ *+' conftest.er1 >conftest.err
28266   rm -f conftest.er1
28267   cat conftest.err >&5
28268   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28269   (exit $ac_status); } && {
28270          test -z "$ac_c_werror_flag" ||
28271          test ! -s conftest.err
28272        } && test -s conftest.$ac_objext; then
28273   cat >conftest.$ac_ext <<_ACEOF
28274 /* confdefs.h.  */
28275 _ACEOF
28276 cat confdefs.h >>conftest.$ac_ext
28277 cat >>conftest.$ac_ext <<_ACEOF
28278 /* end confdefs.h.  */
28279 #include <stdio.h>
28280
28281 int
28282 main ()
28283 {
28284 if (sizeof ((uint64)))
28285           return 0;
28286   ;
28287   return 0;
28288 }
28289 _ACEOF
28290 rm -f conftest.$ac_objext
28291 if { (ac_try="$ac_compile"
28292 case "(($ac_try" in
28293   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28294   *) ac_try_echo=$ac_try;;
28295 esac
28296 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28297 $as_echo "$ac_try_echo") >&5
28298   (eval "$ac_compile") 2>conftest.er1
28299   ac_status=$?
28300   grep -v '^ *+' conftest.er1 >conftest.err
28301   rm -f conftest.er1
28302   cat conftest.err >&5
28303   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28304   (exit $ac_status); } && {
28305          test -z "$ac_c_werror_flag" ||
28306          test ! -s conftest.err
28307        } && test -s conftest.$ac_objext; then
28308   :
28309 else
28310   $as_echo "$as_me: failed program was:" >&5
28311 sed 's/^/| /' conftest.$ac_ext >&5
28312
28313         ac_cv_type_uint64=yes
28314 fi
28315
28316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28317 else
28318   $as_echo "$as_me: failed program was:" >&5
28319 sed 's/^/| /' conftest.$ac_ext >&5
28320
28321
28322 fi
28323
28324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28325 fi
28326 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
28327 $as_echo "$ac_cv_type_uint64" >&6; }
28328 if test "x$ac_cv_type_uint64" = x""yes; then
28329
28330 cat >>confdefs.h <<_ACEOF
28331 #define HAVE_UINT64 1
28332 _ACEOF
28333
28334
28335 fi
28336
28337
28338 # We also check for sig_atomic_t, which *should* be defined per ANSI
28339 # C, but is missing on some old platforms.
28340 { $as_echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
28341 $as_echo_n "checking for sig_atomic_t... " >&6; }
28342 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
28343   $as_echo_n "(cached) " >&6
28344 else
28345   ac_cv_type_sig_atomic_t=no
28346 cat >conftest.$ac_ext <<_ACEOF
28347 /* confdefs.h.  */
28348 _ACEOF
28349 cat confdefs.h >>conftest.$ac_ext
28350 cat >>conftest.$ac_ext <<_ACEOF
28351 /* end confdefs.h.  */
28352 #include <signal.h>
28353
28354 int
28355 main ()
28356 {
28357 if (sizeof (sig_atomic_t))
28358        return 0;
28359   ;
28360   return 0;
28361 }
28362 _ACEOF
28363 rm -f conftest.$ac_objext
28364 if { (ac_try="$ac_compile"
28365 case "(($ac_try" in
28366   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28367   *) ac_try_echo=$ac_try;;
28368 esac
28369 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28370 $as_echo "$ac_try_echo") >&5
28371   (eval "$ac_compile") 2>conftest.er1
28372   ac_status=$?
28373   grep -v '^ *+' conftest.er1 >conftest.err
28374   rm -f conftest.er1
28375   cat conftest.err >&5
28376   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28377   (exit $ac_status); } && {
28378          test -z "$ac_c_werror_flag" ||
28379          test ! -s conftest.err
28380        } && test -s conftest.$ac_objext; then
28381   cat >conftest.$ac_ext <<_ACEOF
28382 /* confdefs.h.  */
28383 _ACEOF
28384 cat confdefs.h >>conftest.$ac_ext
28385 cat >>conftest.$ac_ext <<_ACEOF
28386 /* end confdefs.h.  */
28387 #include <signal.h>
28388
28389 int
28390 main ()
28391 {
28392 if (sizeof ((sig_atomic_t)))
28393           return 0;
28394   ;
28395   return 0;
28396 }
28397 _ACEOF
28398 rm -f conftest.$ac_objext
28399 if { (ac_try="$ac_compile"
28400 case "(($ac_try" in
28401   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28402   *) ac_try_echo=$ac_try;;
28403 esac
28404 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28405 $as_echo "$ac_try_echo") >&5
28406   (eval "$ac_compile") 2>conftest.er1
28407   ac_status=$?
28408   grep -v '^ *+' conftest.er1 >conftest.err
28409   rm -f conftest.er1
28410   cat conftest.err >&5
28411   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28412   (exit $ac_status); } && {
28413          test -z "$ac_c_werror_flag" ||
28414          test ! -s conftest.err
28415        } && test -s conftest.$ac_objext; then
28416   :
28417 else
28418   $as_echo "$as_me: failed program was:" >&5
28419 sed 's/^/| /' conftest.$ac_ext >&5
28420
28421         ac_cv_type_sig_atomic_t=yes
28422 fi
28423
28424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28425 else
28426   $as_echo "$as_me: failed program was:" >&5
28427 sed 's/^/| /' conftest.$ac_ext >&5
28428
28429
28430 fi
28431
28432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28433 fi
28434 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
28435 $as_echo "$ac_cv_type_sig_atomic_t" >&6; }
28436 if test "x$ac_cv_type_sig_atomic_t" = x""yes; then
28437
28438 cat >>confdefs.h <<_ACEOF
28439 #define HAVE_SIG_ATOMIC_T 1
28440 _ACEOF
28441
28442
28443 fi
28444
28445
28446
28447 if test "$PORTNAME" != "win32"
28448 then
28449 { $as_echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
28450 $as_echo_n "checking for POSIX signal interface... " >&6; }
28451 if test "${pgac_cv_func_posix_signals+set}" = set; then
28452   $as_echo_n "(cached) " >&6
28453 else
28454   cat >conftest.$ac_ext <<_ACEOF
28455 /* confdefs.h.  */
28456 _ACEOF
28457 cat confdefs.h >>conftest.$ac_ext
28458 cat >>conftest.$ac_ext <<_ACEOF
28459 /* end confdefs.h.  */
28460 #include <signal.h>
28461
28462 int
28463 main ()
28464 {
28465 struct sigaction act, oact;
28466 sigemptyset(&act.sa_mask);
28467 act.sa_flags = SA_RESTART;
28468 sigaction(0, &act, &oact);
28469   ;
28470   return 0;
28471 }
28472 _ACEOF
28473 rm -f conftest.$ac_objext conftest$ac_exeext
28474 if { (ac_try="$ac_link"
28475 case "(($ac_try" in
28476   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28477   *) ac_try_echo=$ac_try;;
28478 esac
28479 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28480 $as_echo "$ac_try_echo") >&5
28481   (eval "$ac_link") 2>conftest.er1
28482   ac_status=$?
28483   grep -v '^ *+' conftest.er1 >conftest.err
28484   rm -f conftest.er1
28485   cat conftest.err >&5
28486   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28487   (exit $ac_status); } && {
28488          test -z "$ac_c_werror_flag" ||
28489          test ! -s conftest.err
28490        } && test -s conftest$ac_exeext && {
28491          test "$cross_compiling" = yes ||
28492          $as_test_x conftest$ac_exeext
28493        }; then
28494   pgac_cv_func_posix_signals=yes
28495 else
28496   $as_echo "$as_me: failed program was:" >&5
28497 sed 's/^/| /' conftest.$ac_ext >&5
28498
28499         pgac_cv_func_posix_signals=no
28500 fi
28501
28502 rm -rf conftest.dSYM
28503 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28504       conftest$ac_exeext conftest.$ac_ext
28505 fi
28506 { $as_echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
28507 $as_echo "$pgac_cv_func_posix_signals" >&6; }
28508 if test x"$pgac_cv_func_posix_signals" = xyes ; then
28509
28510 cat >>confdefs.h <<\_ACEOF
28511 #define HAVE_POSIX_SIGNALS /**/
28512 _ACEOF
28513
28514 fi
28515 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
28516
28517 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
28518   { { $as_echo "$as_me:$LINENO: error:
28519 Thread-safety requires POSIX signals, which are not supported by this
28520 operating system;  use --disable-thread-safety to disable thread safety." >&5
28521 $as_echo "$as_me: error:
28522 Thread-safety requires POSIX signals, which are not supported by this
28523 operating system;  use --disable-thread-safety to disable thread safety." >&2;}
28524    { (exit 1); exit 1; }; }
28525 fi
28526 fi
28527
28528 # SunOS doesn't handle negative byte comparisons properly with +/- return
28529 { $as_echo "$as_me:$LINENO: checking for working memcmp" >&5
28530 $as_echo_n "checking for working memcmp... " >&6; }
28531 if test "${ac_cv_func_memcmp_working+set}" = set; then
28532   $as_echo_n "(cached) " >&6
28533 else
28534   if test "$cross_compiling" = yes; then
28535   ac_cv_func_memcmp_working=no
28536 else
28537   cat >conftest.$ac_ext <<_ACEOF
28538 /* confdefs.h.  */
28539 _ACEOF
28540 cat confdefs.h >>conftest.$ac_ext
28541 cat >>conftest.$ac_ext <<_ACEOF
28542 /* end confdefs.h.  */
28543 $ac_includes_default
28544 int
28545 main ()
28546 {
28547
28548   /* Some versions of memcmp are not 8-bit clean.  */
28549   char c0 = '\100', c1 = '\200', c2 = '\201';
28550   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
28551     return 1;
28552
28553   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
28554      or more and with at least one buffer not starting on a 4-byte boundary.
28555      William Lewis provided this test program.   */
28556   {
28557     char foo[21];
28558     char bar[21];
28559     int i;
28560     for (i = 0; i < 4; i++)
28561       {
28562         char *a = foo + i;
28563         char *b = bar + i;
28564         strcpy (a, "--------01111111");
28565         strcpy (b, "--------10000000");
28566         if (memcmp (a, b, 16) >= 0)
28567           return 1;
28568       }
28569     return 0;
28570   }
28571
28572   ;
28573   return 0;
28574 }
28575 _ACEOF
28576 rm -f conftest$ac_exeext
28577 if { (ac_try="$ac_link"
28578 case "(($ac_try" in
28579   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28580   *) ac_try_echo=$ac_try;;
28581 esac
28582 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28583 $as_echo "$ac_try_echo") >&5
28584   (eval "$ac_link") 2>&5
28585   ac_status=$?
28586   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28587   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28588   { (case "(($ac_try" in
28589   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28590   *) ac_try_echo=$ac_try;;
28591 esac
28592 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28593 $as_echo "$ac_try_echo") >&5
28594   (eval "$ac_try") 2>&5
28595   ac_status=$?
28596   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28597   (exit $ac_status); }; }; then
28598   ac_cv_func_memcmp_working=yes
28599 else
28600   $as_echo "$as_me: program exited with status $ac_status" >&5
28601 $as_echo "$as_me: failed program was:" >&5
28602 sed 's/^/| /' conftest.$ac_ext >&5
28603
28604 ( exit $ac_status )
28605 ac_cv_func_memcmp_working=no
28606 fi
28607 rm -rf conftest.dSYM
28608 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28609 fi
28610
28611
28612 fi
28613 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
28614 $as_echo "$ac_cv_func_memcmp_working" >&6; }
28615 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
28616   *" memcmp.$ac_objext "* ) ;;
28617   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
28618  ;;
28619 esac
28620
28621
28622
28623
28624 # Select semaphore implementation type.
28625 if test "$PORTNAME" != "win32"; then
28626   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
28627
28628 cat >>confdefs.h <<\_ACEOF
28629 #define USE_NAMED_POSIX_SEMAPHORES 1
28630 _ACEOF
28631
28632     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
28633   else
28634     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
28635
28636 cat >>confdefs.h <<\_ACEOF
28637 #define USE_UNNAMED_POSIX_SEMAPHORES 1
28638 _ACEOF
28639
28640       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
28641     else
28642
28643 cat >>confdefs.h <<\_ACEOF
28644 #define USE_SYSV_SEMAPHORES 1
28645 _ACEOF
28646
28647       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
28648     fi
28649   fi
28650 else
28651
28652 cat >>confdefs.h <<\_ACEOF
28653 #define USE_WIN32_SEMAPHORES 1
28654 _ACEOF
28655
28656   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
28657 fi
28658
28659
28660 # Select shared-memory implementation type.
28661 if test "$PORTNAME" != "win32"; then
28662
28663 cat >>confdefs.h <<\_ACEOF
28664 #define USE_SYSV_SHARED_MEMORY 1
28665 _ACEOF
28666
28667   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
28668 else
28669
28670 cat >>confdefs.h <<\_ACEOF
28671 #define USE_WIN32_SHARED_MEMORY 1
28672 _ACEOF
28673
28674   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
28675 fi
28676
28677 # Select latch implementation type.
28678 if test "$PORTNAME" != "win32"; then
28679   LATCH_IMPLEMENTATION="src/backend/port/unix_latch.c"
28680 else
28681   LATCH_IMPLEMENTATION="src/backend/port/win32_latch.c"
28682 fi
28683
28684 # If not set in template file, set bytes to use libc memset()
28685 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
28686   MEMSET_LOOP_LIMIT=1024
28687 fi
28688
28689 cat >>confdefs.h <<_ACEOF
28690 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
28691 _ACEOF
28692
28693
28694
28695 if test "$enable_nls" = yes ; then
28696
28697   { $as_echo "$as_me:$LINENO: checking for library containing bind_textdomain_codeset" >&5
28698 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
28699 if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
28700   $as_echo_n "(cached) " >&6
28701 else
28702   ac_func_search_save_LIBS=$LIBS
28703 cat >conftest.$ac_ext <<_ACEOF
28704 /* confdefs.h.  */
28705 _ACEOF
28706 cat confdefs.h >>conftest.$ac_ext
28707 cat >>conftest.$ac_ext <<_ACEOF
28708 /* end confdefs.h.  */
28709
28710 /* Override any GCC internal prototype to avoid an error.
28711    Use char because int might match the return type of a GCC
28712    builtin and then its argument prototype would still apply.  */
28713 #ifdef __cplusplus
28714 extern "C"
28715 #endif
28716 char bind_textdomain_codeset ();
28717 int
28718 main ()
28719 {
28720 return bind_textdomain_codeset ();
28721   ;
28722   return 0;
28723 }
28724 _ACEOF
28725 for ac_lib in '' intl; do
28726   if test -z "$ac_lib"; then
28727     ac_res="none required"
28728   else
28729     ac_res=-l$ac_lib
28730     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28731   fi
28732   rm -f conftest.$ac_objext conftest$ac_exeext
28733 if { (ac_try="$ac_link"
28734 case "(($ac_try" in
28735   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28736   *) ac_try_echo=$ac_try;;
28737 esac
28738 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28739 $as_echo "$ac_try_echo") >&5
28740   (eval "$ac_link") 2>conftest.er1
28741   ac_status=$?
28742   grep -v '^ *+' conftest.er1 >conftest.err
28743   rm -f conftest.er1
28744   cat conftest.err >&5
28745   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28746   (exit $ac_status); } && {
28747          test -z "$ac_c_werror_flag" ||
28748          test ! -s conftest.err
28749        } && test -s conftest$ac_exeext && {
28750          test "$cross_compiling" = yes ||
28751          $as_test_x conftest$ac_exeext
28752        }; then
28753   ac_cv_search_bind_textdomain_codeset=$ac_res
28754 else
28755   $as_echo "$as_me: failed program was:" >&5
28756 sed 's/^/| /' conftest.$ac_ext >&5
28757
28758
28759 fi
28760
28761 rm -rf conftest.dSYM
28762 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28763       conftest$ac_exeext
28764   if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
28765   break
28766 fi
28767 done
28768 if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
28769   :
28770 else
28771   ac_cv_search_bind_textdomain_codeset=no
28772 fi
28773 rm conftest.$ac_ext
28774 LIBS=$ac_func_search_save_LIBS
28775 fi
28776 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_bind_textdomain_codeset" >&5
28777 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
28778 ac_res=$ac_cv_search_bind_textdomain_codeset
28779 if test "$ac_res" != no; then
28780   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28781
28782 else
28783   { { $as_echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
28784 $as_echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
28785    { (exit 1); exit 1; }; }
28786 fi
28787
28788   if test "${ac_cv_header_libintl_h+set}" = set; then
28789   { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
28790 $as_echo_n "checking for libintl.h... " >&6; }
28791 if test "${ac_cv_header_libintl_h+set}" = set; then
28792   $as_echo_n "(cached) " >&6
28793 fi
28794 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
28795 $as_echo "$ac_cv_header_libintl_h" >&6; }
28796 else
28797   # Is the header compilable?
28798 { $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5
28799 $as_echo_n "checking libintl.h usability... " >&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 $ac_includes_default
28807 #include <libintl.h>
28808 _ACEOF
28809 rm -f conftest.$ac_objext
28810 if { (ac_try="$ac_compile"
28811 case "(($ac_try" in
28812   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28813   *) ac_try_echo=$ac_try;;
28814 esac
28815 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28816 $as_echo "$ac_try_echo") >&5
28817   (eval "$ac_compile") 2>conftest.er1
28818   ac_status=$?
28819   grep -v '^ *+' conftest.er1 >conftest.err
28820   rm -f conftest.er1
28821   cat conftest.err >&5
28822   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28823   (exit $ac_status); } && {
28824          test -z "$ac_c_werror_flag" ||
28825          test ! -s conftest.err
28826        } && test -s conftest.$ac_objext; then
28827   ac_header_compiler=yes
28828 else
28829   $as_echo "$as_me: failed program was:" >&5
28830 sed 's/^/| /' conftest.$ac_ext >&5
28831
28832         ac_header_compiler=no
28833 fi
28834
28835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28836 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28837 $as_echo "$ac_header_compiler" >&6; }
28838
28839 # Is the header present?
28840 { $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5
28841 $as_echo_n "checking libintl.h presence... " >&6; }
28842 cat >conftest.$ac_ext <<_ACEOF
28843 /* confdefs.h.  */
28844 _ACEOF
28845 cat confdefs.h >>conftest.$ac_ext
28846 cat >>conftest.$ac_ext <<_ACEOF
28847 /* end confdefs.h.  */
28848 #include <libintl.h>
28849 _ACEOF
28850 if { (ac_try="$ac_cpp conftest.$ac_ext"
28851 case "(($ac_try" in
28852   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28853   *) ac_try_echo=$ac_try;;
28854 esac
28855 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
28856 $as_echo "$ac_try_echo") >&5
28857   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28858   ac_status=$?
28859   grep -v '^ *+' conftest.er1 >conftest.err
28860   rm -f conftest.er1
28861   cat conftest.err >&5
28862   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28863   (exit $ac_status); } >/dev/null && {
28864          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28865          test ! -s conftest.err
28866        }; then
28867   ac_header_preproc=yes
28868 else
28869   $as_echo "$as_me: failed program was:" >&5
28870 sed 's/^/| /' conftest.$ac_ext >&5
28871
28872   ac_header_preproc=no
28873 fi
28874
28875 rm -f conftest.err conftest.$ac_ext
28876 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28877 $as_echo "$ac_header_preproc" >&6; }
28878
28879 # So?  What about this header?
28880 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
28881   yes:no: )
28882     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
28883 $as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
28884     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
28885 $as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
28886     ac_header_preproc=yes
28887     ;;
28888   no:yes:* )
28889     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
28890 $as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
28891     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
28892 $as_echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
28893     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
28894 $as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
28895     { $as_echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
28896 $as_echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
28897     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
28898 $as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
28899     { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
28900 $as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
28901     ( cat <<\_ASBOX
28902 ## ---------------------------------------- ##
28903 ## Report this to pgsql-bugs@postgresql.org ##
28904 ## ---------------------------------------- ##
28905 _ASBOX
28906      ) | sed "s/^/$as_me: WARNING:     /" >&2
28907     ;;
28908 esac
28909 { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5
28910 $as_echo_n "checking for libintl.h... " >&6; }
28911 if test "${ac_cv_header_libintl_h+set}" = set; then
28912   $as_echo_n "(cached) " >&6
28913 else
28914   ac_cv_header_libintl_h=$ac_header_preproc
28915 fi
28916 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
28917 $as_echo "$ac_cv_header_libintl_h" >&6; }
28918
28919 fi
28920 if test "x$ac_cv_header_libintl_h" = x""yes; then
28921   :
28922 else
28923   { { $as_echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
28924 $as_echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
28925    { (exit 1); exit 1; }; }
28926 fi
28927
28928
28929   for ac_prog in msgfmt
28930 do
28931   # Extract the first word of "$ac_prog", so it can be a program name with args.
28932 set dummy $ac_prog; ac_word=$2
28933 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28934 $as_echo_n "checking for $ac_word... " >&6; }
28935 if test "${ac_cv_prog_MSGFMT+set}" = set; then
28936   $as_echo_n "(cached) " >&6
28937 else
28938   if test -n "$MSGFMT"; then
28939   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
28940 else
28941 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28942 for as_dir in $PATH
28943 do
28944   IFS=$as_save_IFS
28945   test -z "$as_dir" && as_dir=.
28946   for ac_exec_ext in '' $ac_executable_extensions; do
28947   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28948     ac_cv_prog_MSGFMT="$ac_prog"
28949     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28950     break 2
28951   fi
28952 done
28953 done
28954 IFS=$as_save_IFS
28955
28956 fi
28957 fi
28958 MSGFMT=$ac_cv_prog_MSGFMT
28959 if test -n "$MSGFMT"; then
28960   { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
28961 $as_echo "$MSGFMT" >&6; }
28962 else
28963   { $as_echo "$as_me:$LINENO: result: no" >&5
28964 $as_echo "no" >&6; }
28965 fi
28966
28967
28968   test -n "$MSGFMT" && break
28969 done
28970
28971   if test -z "$MSGFMT"; then
28972     { { $as_echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
28973 $as_echo "$as_me: error: msgfmt is required for NLS" >&2;}
28974    { (exit 1); exit 1; }; }
28975   fi
28976   for ac_prog in msgmerge
28977 do
28978   # Extract the first word of "$ac_prog", so it can be a program name with args.
28979 set dummy $ac_prog; ac_word=$2
28980 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
28981 $as_echo_n "checking for $ac_word... " >&6; }
28982 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
28983   $as_echo_n "(cached) " >&6
28984 else
28985   if test -n "$MSGMERGE"; then
28986   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
28987 else
28988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28989 for as_dir in $PATH
28990 do
28991   IFS=$as_save_IFS
28992   test -z "$as_dir" && as_dir=.
28993   for ac_exec_ext in '' $ac_executable_extensions; do
28994   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28995     ac_cv_prog_MSGMERGE="$ac_prog"
28996     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
28997     break 2
28998   fi
28999 done
29000 done
29001 IFS=$as_save_IFS
29002
29003 fi
29004 fi
29005 MSGMERGE=$ac_cv_prog_MSGMERGE
29006 if test -n "$MSGMERGE"; then
29007   { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5
29008 $as_echo "$MSGMERGE" >&6; }
29009 else
29010   { $as_echo "$as_me:$LINENO: result: no" >&5
29011 $as_echo "no" >&6; }
29012 fi
29013
29014
29015   test -n "$MSGMERGE" && break
29016 done
29017
29018   for ac_prog in xgettext
29019 do
29020   # Extract the first word of "$ac_prog", so it can be a program name with args.
29021 set dummy $ac_prog; ac_word=$2
29022 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29023 $as_echo_n "checking for $ac_word... " >&6; }
29024 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
29025   $as_echo_n "(cached) " >&6
29026 else
29027   if test -n "$XGETTEXT"; then
29028   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
29029 else
29030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29031 for as_dir in $PATH
29032 do
29033   IFS=$as_save_IFS
29034   test -z "$as_dir" && as_dir=.
29035   for ac_exec_ext in '' $ac_executable_extensions; do
29036   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29037     ac_cv_prog_XGETTEXT="$ac_prog"
29038     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29039     break 2
29040   fi
29041 done
29042 done
29043 IFS=$as_save_IFS
29044
29045 fi
29046 fi
29047 XGETTEXT=$ac_cv_prog_XGETTEXT
29048 if test -n "$XGETTEXT"; then
29049   { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
29050 $as_echo "$XGETTEXT" >&6; }
29051 else
29052   { $as_echo "$as_me:$LINENO: result: no" >&5
29053 $as_echo "no" >&6; }
29054 fi
29055
29056
29057   test -n "$XGETTEXT" && break
29058 done
29059
29060
29061 fi
29062
29063 # Check for Tcl configuration script tclConfig.sh
29064 if test "$with_tcl" = yes; then
29065     for ac_prog in tclsh tcl tclsh8.5 tclsh85 tclsh8.4 tclsh84 tclsh8.3 tclsh83
29066 do
29067   # Extract the first word of "$ac_prog", so it can be a program name with args.
29068 set dummy $ac_prog; ac_word=$2
29069 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29070 $as_echo_n "checking for $ac_word... " >&6; }
29071 if test "${ac_cv_path_TCLSH+set}" = set; then
29072   $as_echo_n "(cached) " >&6
29073 else
29074   case $TCLSH in
29075   [\\/]* | ?:[\\/]*)
29076   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
29077   ;;
29078   *)
29079   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29080 for as_dir in $PATH
29081 do
29082   IFS=$as_save_IFS
29083   test -z "$as_dir" && as_dir=.
29084   for ac_exec_ext in '' $ac_executable_extensions; do
29085   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29086     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
29087     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29088     break 2
29089   fi
29090 done
29091 done
29092 IFS=$as_save_IFS
29093
29094   ;;
29095 esac
29096 fi
29097 TCLSH=$ac_cv_path_TCLSH
29098 if test -n "$TCLSH"; then
29099   { $as_echo "$as_me:$LINENO: result: $TCLSH" >&5
29100 $as_echo "$TCLSH" >&6; }
29101 else
29102   { $as_echo "$as_me:$LINENO: result: no" >&5
29103 $as_echo "no" >&6; }
29104 fi
29105
29106
29107   test -n "$TCLSH" && break
29108 done
29109
29110 if test x"$TCLSH" = x""; then
29111   { { $as_echo "$as_me:$LINENO: error: Tcl shell not found" >&5
29112 $as_echo "$as_me: error: Tcl shell not found" >&2;}
29113    { (exit 1); exit 1; }; }
29114 fi
29115
29116 { $as_echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
29117 $as_echo_n "checking for tclConfig.sh... " >&6; }
29118 # Let user override test
29119 if test -z "$TCL_CONFIG_SH"; then
29120     pgac_test_dirs="$with_tclconfig"
29121
29122     set X $pgac_test_dirs; shift
29123     if test $# -eq 0; then
29124         test -z "$TCLSH" && { { $as_echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
29125 $as_echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
29126    { (exit 1); exit 1; }; }
29127         set X `echo 'puts $auto_path' | $TCLSH`; shift
29128     fi
29129
29130     for pgac_dir do
29131         if test -r "$pgac_dir/tclConfig.sh"; then
29132             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
29133             break
29134         fi
29135     done
29136 fi
29137
29138 if test -z "$TCL_CONFIG_SH"; then
29139     { $as_echo "$as_me:$LINENO: result: no" >&5
29140 $as_echo "no" >&6; }
29141     { { $as_echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
29142 $as_echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
29143    { (exit 1); exit 1; }; }
29144 else
29145     { $as_echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
29146 $as_echo "$TCL_CONFIG_SH" >&6; }
29147 fi
29148
29149
29150
29151     . "$TCL_CONFIG_SH"
29152 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
29153 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
29154 eval TCL_LIBS=\"$TCL_LIBS\"
29155 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
29156 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
29157
29158         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
29159     ac_save_CPPFLAGS=$CPPFLAGS
29160     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
29161     if test "${ac_cv_header_tcl_h+set}" = set; then
29162   { $as_echo "$as_me:$LINENO: checking for tcl.h" >&5
29163 $as_echo_n "checking for tcl.h... " >&6; }
29164 if test "${ac_cv_header_tcl_h+set}" = set; then
29165   $as_echo_n "(cached) " >&6
29166 fi
29167 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
29168 $as_echo "$ac_cv_header_tcl_h" >&6; }
29169 else
29170   # Is the header compilable?
29171 { $as_echo "$as_me:$LINENO: checking tcl.h usability" >&5
29172 $as_echo_n "checking tcl.h usability... " >&6; }
29173 cat >conftest.$ac_ext <<_ACEOF
29174 /* confdefs.h.  */
29175 _ACEOF
29176 cat confdefs.h >>conftest.$ac_ext
29177 cat >>conftest.$ac_ext <<_ACEOF
29178 /* end confdefs.h.  */
29179 $ac_includes_default
29180 #include <tcl.h>
29181 _ACEOF
29182 rm -f conftest.$ac_objext
29183 if { (ac_try="$ac_compile"
29184 case "(($ac_try" in
29185   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29186   *) ac_try_echo=$ac_try;;
29187 esac
29188 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29189 $as_echo "$ac_try_echo") >&5
29190   (eval "$ac_compile") 2>conftest.er1
29191   ac_status=$?
29192   grep -v '^ *+' conftest.er1 >conftest.err
29193   rm -f conftest.er1
29194   cat conftest.err >&5
29195   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29196   (exit $ac_status); } && {
29197          test -z "$ac_c_werror_flag" ||
29198          test ! -s conftest.err
29199        } && test -s conftest.$ac_objext; then
29200   ac_header_compiler=yes
29201 else
29202   $as_echo "$as_me: failed program was:" >&5
29203 sed 's/^/| /' conftest.$ac_ext >&5
29204
29205         ac_header_compiler=no
29206 fi
29207
29208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29209 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29210 $as_echo "$ac_header_compiler" >&6; }
29211
29212 # Is the header present?
29213 { $as_echo "$as_me:$LINENO: checking tcl.h presence" >&5
29214 $as_echo_n "checking tcl.h presence... " >&6; }
29215 cat >conftest.$ac_ext <<_ACEOF
29216 /* confdefs.h.  */
29217 _ACEOF
29218 cat confdefs.h >>conftest.$ac_ext
29219 cat >>conftest.$ac_ext <<_ACEOF
29220 /* end confdefs.h.  */
29221 #include <tcl.h>
29222 _ACEOF
29223 if { (ac_try="$ac_cpp conftest.$ac_ext"
29224 case "(($ac_try" in
29225   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29226   *) ac_try_echo=$ac_try;;
29227 esac
29228 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29229 $as_echo "$ac_try_echo") >&5
29230   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29231   ac_status=$?
29232   grep -v '^ *+' conftest.er1 >conftest.err
29233   rm -f conftest.er1
29234   cat conftest.err >&5
29235   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29236   (exit $ac_status); } >/dev/null && {
29237          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29238          test ! -s conftest.err
29239        }; then
29240   ac_header_preproc=yes
29241 else
29242   $as_echo "$as_me: failed program was:" >&5
29243 sed 's/^/| /' conftest.$ac_ext >&5
29244
29245   ac_header_preproc=no
29246 fi
29247
29248 rm -f conftest.err conftest.$ac_ext
29249 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29250 $as_echo "$ac_header_preproc" >&6; }
29251
29252 # So?  What about this header?
29253 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29254   yes:no: )
29255     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
29256 $as_echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
29257     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
29258 $as_echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
29259     ac_header_preproc=yes
29260     ;;
29261   no:yes:* )
29262     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
29263 $as_echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
29264     { $as_echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
29265 $as_echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
29266     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
29267 $as_echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
29268     { $as_echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
29269 $as_echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
29270     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
29271 $as_echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
29272     { $as_echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
29273 $as_echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
29274     ( cat <<\_ASBOX
29275 ## ---------------------------------------- ##
29276 ## Report this to pgsql-bugs@postgresql.org ##
29277 ## ---------------------------------------- ##
29278 _ASBOX
29279      ) | sed "s/^/$as_me: WARNING:     /" >&2
29280     ;;
29281 esac
29282 { $as_echo "$as_me:$LINENO: checking for tcl.h" >&5
29283 $as_echo_n "checking for tcl.h... " >&6; }
29284 if test "${ac_cv_header_tcl_h+set}" = set; then
29285   $as_echo_n "(cached) " >&6
29286 else
29287   ac_cv_header_tcl_h=$ac_header_preproc
29288 fi
29289 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
29290 $as_echo "$ac_cv_header_tcl_h" >&6; }
29291
29292 fi
29293 if test "x$ac_cv_header_tcl_h" = x""yes; then
29294   :
29295 else
29296   { { $as_echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
29297 $as_echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
29298    { (exit 1); exit 1; }; }
29299 fi
29300
29301
29302     CPPFLAGS=$ac_save_CPPFLAGS
29303 fi
29304
29305 # check for <perl.h>
29306 if test "$with_perl" = yes; then
29307   ac_save_CPPFLAGS=$CPPFLAGS
29308   CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
29309   { $as_echo "$as_me:$LINENO: checking for perl.h" >&5
29310 $as_echo_n "checking for perl.h... " >&6; }
29311 if test "${ac_cv_header_perl_h+set}" = set; then
29312   $as_echo_n "(cached) " >&6
29313 else
29314   cat >conftest.$ac_ext <<_ACEOF
29315 /* confdefs.h.  */
29316 _ACEOF
29317 cat confdefs.h >>conftest.$ac_ext
29318 cat >>conftest.$ac_ext <<_ACEOF
29319 /* end confdefs.h.  */
29320 #include <EXTERN.h>
29321
29322 #include <perl.h>
29323 _ACEOF
29324 rm -f conftest.$ac_objext
29325 if { (ac_try="$ac_compile"
29326 case "(($ac_try" in
29327   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29328   *) ac_try_echo=$ac_try;;
29329 esac
29330 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29331 $as_echo "$ac_try_echo") >&5
29332   (eval "$ac_compile") 2>conftest.er1
29333   ac_status=$?
29334   grep -v '^ *+' conftest.er1 >conftest.err
29335   rm -f conftest.er1
29336   cat conftest.err >&5
29337   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29338   (exit $ac_status); } && {
29339          test -z "$ac_c_werror_flag" ||
29340          test ! -s conftest.err
29341        } && test -s conftest.$ac_objext; then
29342   ac_cv_header_perl_h=yes
29343 else
29344   $as_echo "$as_me: failed program was:" >&5
29345 sed 's/^/| /' conftest.$ac_ext >&5
29346
29347         ac_cv_header_perl_h=no
29348 fi
29349
29350 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29351 fi
29352 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_perl_h" >&5
29353 $as_echo "$ac_cv_header_perl_h" >&6; }
29354 if test "x$ac_cv_header_perl_h" = x""yes; then
29355   :
29356 else
29357   { { $as_echo "$as_me:$LINENO: error: header file <perl.h> is required for Perl" >&5
29358 $as_echo "$as_me: error: header file <perl.h> is required for Perl" >&2;}
29359    { (exit 1); exit 1; }; }
29360 fi
29361
29362
29363   # While we're at it, check that we can link to libperl.
29364   # On most platforms, if perl.h is there then libperl.so will be too, but at
29365   # this writing Debian packages them separately.  There is no known reason to
29366   # waste cycles on separate probes for the Tcl or Python libraries, though.
29367   pgac_save_LIBS=$LIBS
29368   LIBS="$perl_embed_ldflags"
29369   { $as_echo "$as_me:$LINENO: checking for libperl" >&5
29370 $as_echo_n "checking for libperl... " >&6; }
29371   cat >conftest.$ac_ext <<_ACEOF
29372 /* confdefs.h.  */
29373 _ACEOF
29374 cat confdefs.h >>conftest.$ac_ext
29375 cat >>conftest.$ac_ext <<_ACEOF
29376 /* end confdefs.h.  */
29377
29378 #include <EXTERN.h>
29379 #include <perl.h>
29380
29381 int
29382 main ()
29383 {
29384 perl_alloc();
29385   ;
29386   return 0;
29387 }
29388 _ACEOF
29389 rm -f conftest.$ac_objext conftest$ac_exeext
29390 if { (ac_try="$ac_link"
29391 case "(($ac_try" in
29392   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29393   *) ac_try_echo=$ac_try;;
29394 esac
29395 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29396 $as_echo "$ac_try_echo") >&5
29397   (eval "$ac_link") 2>conftest.er1
29398   ac_status=$?
29399   grep -v '^ *+' conftest.er1 >conftest.err
29400   rm -f conftest.er1
29401   cat conftest.err >&5
29402   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29403   (exit $ac_status); } && {
29404          test -z "$ac_c_werror_flag" ||
29405          test ! -s conftest.err
29406        } && test -s conftest$ac_exeext && {
29407          test "$cross_compiling" = yes ||
29408          $as_test_x conftest$ac_exeext
29409        }; then
29410   { $as_echo "$as_me:$LINENO: result: yes" >&5
29411 $as_echo "yes" >&6; }
29412 else
29413   $as_echo "$as_me: failed program was:" >&5
29414 sed 's/^/| /' conftest.$ac_ext >&5
29415
29416         { $as_echo "$as_me:$LINENO: result: no" >&5
29417 $as_echo "no" >&6; }
29418      { { $as_echo "$as_me:$LINENO: error: libperl library is required for Perl" >&5
29419 $as_echo "$as_me: error: libperl library is required for Perl" >&2;}
29420    { (exit 1); exit 1; }; }
29421 fi
29422
29423 rm -rf conftest.dSYM
29424 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29425       conftest$ac_exeext conftest.$ac_ext
29426   LIBS=$pgac_save_LIBS
29427   CPPFLAGS=$ac_save_CPPFLAGS
29428 fi
29429
29430 # check for <Python.h>
29431 if test "$with_python" = yes; then
29432   ac_save_CPPFLAGS=$CPPFLAGS
29433   CPPFLAGS="$python_includespec $CPPFLAGS"
29434   if test "${ac_cv_header_Python_h+set}" = set; then
29435   { $as_echo "$as_me:$LINENO: checking for Python.h" >&5
29436 $as_echo_n "checking for Python.h... " >&6; }
29437 if test "${ac_cv_header_Python_h+set}" = set; then
29438   $as_echo_n "(cached) " >&6
29439 fi
29440 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5
29441 $as_echo "$ac_cv_header_Python_h" >&6; }
29442 else
29443   # Is the header compilable?
29444 { $as_echo "$as_me:$LINENO: checking Python.h usability" >&5
29445 $as_echo_n "checking Python.h usability... " >&6; }
29446 cat >conftest.$ac_ext <<_ACEOF
29447 /* confdefs.h.  */
29448 _ACEOF
29449 cat confdefs.h >>conftest.$ac_ext
29450 cat >>conftest.$ac_ext <<_ACEOF
29451 /* end confdefs.h.  */
29452 $ac_includes_default
29453 #include <Python.h>
29454 _ACEOF
29455 rm -f conftest.$ac_objext
29456 if { (ac_try="$ac_compile"
29457 case "(($ac_try" in
29458   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29459   *) ac_try_echo=$ac_try;;
29460 esac
29461 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29462 $as_echo "$ac_try_echo") >&5
29463   (eval "$ac_compile") 2>conftest.er1
29464   ac_status=$?
29465   grep -v '^ *+' conftest.er1 >conftest.err
29466   rm -f conftest.er1
29467   cat conftest.err >&5
29468   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29469   (exit $ac_status); } && {
29470          test -z "$ac_c_werror_flag" ||
29471          test ! -s conftest.err
29472        } && test -s conftest.$ac_objext; then
29473   ac_header_compiler=yes
29474 else
29475   $as_echo "$as_me: failed program was:" >&5
29476 sed 's/^/| /' conftest.$ac_ext >&5
29477
29478         ac_header_compiler=no
29479 fi
29480
29481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29482 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29483 $as_echo "$ac_header_compiler" >&6; }
29484
29485 # Is the header present?
29486 { $as_echo "$as_me:$LINENO: checking Python.h presence" >&5
29487 $as_echo_n "checking Python.h presence... " >&6; }
29488 cat >conftest.$ac_ext <<_ACEOF
29489 /* confdefs.h.  */
29490 _ACEOF
29491 cat confdefs.h >>conftest.$ac_ext
29492 cat >>conftest.$ac_ext <<_ACEOF
29493 /* end confdefs.h.  */
29494 #include <Python.h>
29495 _ACEOF
29496 if { (ac_try="$ac_cpp conftest.$ac_ext"
29497 case "(($ac_try" in
29498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29499   *) ac_try_echo=$ac_try;;
29500 esac
29501 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29502 $as_echo "$ac_try_echo") >&5
29503   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29504   ac_status=$?
29505   grep -v '^ *+' conftest.er1 >conftest.err
29506   rm -f conftest.er1
29507   cat conftest.err >&5
29508   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29509   (exit $ac_status); } >/dev/null && {
29510          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29511          test ! -s conftest.err
29512        }; then
29513   ac_header_preproc=yes
29514 else
29515   $as_echo "$as_me: failed program was:" >&5
29516 sed 's/^/| /' conftest.$ac_ext >&5
29517
29518   ac_header_preproc=no
29519 fi
29520
29521 rm -f conftest.err conftest.$ac_ext
29522 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29523 $as_echo "$ac_header_preproc" >&6; }
29524
29525 # So?  What about this header?
29526 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29527   yes:no: )
29528     { $as_echo "$as_me:$LINENO: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&5
29529 $as_echo "$as_me: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
29530     { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the compiler's result" >&5
29531 $as_echo "$as_me: WARNING: Python.h: proceeding with the compiler's result" >&2;}
29532     ac_header_preproc=yes
29533     ;;
29534   no:yes:* )
29535     { $as_echo "$as_me:$LINENO: WARNING: Python.h: present but cannot be compiled" >&5
29536 $as_echo "$as_me: WARNING: Python.h: present but cannot be compiled" >&2;}
29537     { $as_echo "$as_me:$LINENO: WARNING: Python.h:     check for missing prerequisite headers?" >&5
29538 $as_echo "$as_me: WARNING: Python.h:     check for missing prerequisite headers?" >&2;}
29539     { $as_echo "$as_me:$LINENO: WARNING: Python.h: see the Autoconf documentation" >&5
29540 $as_echo "$as_me: WARNING: Python.h: see the Autoconf documentation" >&2;}
29541     { $as_echo "$as_me:$LINENO: WARNING: Python.h:     section \"Present But Cannot Be Compiled\"" >&5
29542 $as_echo "$as_me: WARNING: Python.h:     section \"Present But Cannot Be Compiled\"" >&2;}
29543     { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the preprocessor's result" >&5
29544 $as_echo "$as_me: WARNING: Python.h: proceeding with the preprocessor's result" >&2;}
29545     { $as_echo "$as_me:$LINENO: WARNING: Python.h: in the future, the compiler will take precedence" >&5
29546 $as_echo "$as_me: WARNING: Python.h: in the future, the compiler will take precedence" >&2;}
29547     ( cat <<\_ASBOX
29548 ## ---------------------------------------- ##
29549 ## Report this to pgsql-bugs@postgresql.org ##
29550 ## ---------------------------------------- ##
29551 _ASBOX
29552      ) | sed "s/^/$as_me: WARNING:     /" >&2
29553     ;;
29554 esac
29555 { $as_echo "$as_me:$LINENO: checking for Python.h" >&5
29556 $as_echo_n "checking for Python.h... " >&6; }
29557 if test "${ac_cv_header_Python_h+set}" = set; then
29558   $as_echo_n "(cached) " >&6
29559 else
29560   ac_cv_header_Python_h=$ac_header_preproc
29561 fi
29562 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5
29563 $as_echo "$ac_cv_header_Python_h" >&6; }
29564
29565 fi
29566 if test "x$ac_cv_header_Python_h" = x""yes; then
29567   :
29568 else
29569   { { $as_echo "$as_me:$LINENO: error: header file <Python.h> is required for Python" >&5
29570 $as_echo "$as_me: error: header file <Python.h> is required for Python" >&2;}
29571    { (exit 1); exit 1; }; }
29572 fi
29573
29574
29575   CPPFLAGS=$ac_save_CPPFLAGS
29576 fi
29577
29578 #
29579 # Check for DocBook and tools
29580 #
29581 for ac_prog in onsgmls nsgmls
29582 do
29583   # Extract the first word of "$ac_prog", so it can be a program name with args.
29584 set dummy $ac_prog; ac_word=$2
29585 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29586 $as_echo_n "checking for $ac_word... " >&6; }
29587 if test "${ac_cv_prog_NSGMLS+set}" = set; then
29588   $as_echo_n "(cached) " >&6
29589 else
29590   if test -n "$NSGMLS"; then
29591   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
29592 else
29593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29594 for as_dir in $PATH
29595 do
29596   IFS=$as_save_IFS
29597   test -z "$as_dir" && as_dir=.
29598   for ac_exec_ext in '' $ac_executable_extensions; do
29599   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29600     ac_cv_prog_NSGMLS="$ac_prog"
29601     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29602     break 2
29603   fi
29604 done
29605 done
29606 IFS=$as_save_IFS
29607
29608 fi
29609 fi
29610 NSGMLS=$ac_cv_prog_NSGMLS
29611 if test -n "$NSGMLS"; then
29612   { $as_echo "$as_me:$LINENO: result: $NSGMLS" >&5
29613 $as_echo "$NSGMLS" >&6; }
29614 else
29615   { $as_echo "$as_me:$LINENO: result: no" >&5
29616 $as_echo "no" >&6; }
29617 fi
29618
29619
29620   test -n "$NSGMLS" && break
29621 done
29622
29623 for ac_prog in openjade jade
29624 do
29625   # Extract the first word of "$ac_prog", so it can be a program name with args.
29626 set dummy $ac_prog; ac_word=$2
29627 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29628 $as_echo_n "checking for $ac_word... " >&6; }
29629 if test "${ac_cv_prog_JADE+set}" = set; then
29630   $as_echo_n "(cached) " >&6
29631 else
29632   if test -n "$JADE"; then
29633   ac_cv_prog_JADE="$JADE" # Let the user override the test.
29634 else
29635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29636 for as_dir in $PATH
29637 do
29638   IFS=$as_save_IFS
29639   test -z "$as_dir" && as_dir=.
29640   for ac_exec_ext in '' $ac_executable_extensions; do
29641   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29642     ac_cv_prog_JADE="$ac_prog"
29643     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29644     break 2
29645   fi
29646 done
29647 done
29648 IFS=$as_save_IFS
29649
29650 fi
29651 fi
29652 JADE=$ac_cv_prog_JADE
29653 if test -n "$JADE"; then
29654   { $as_echo "$as_me:$LINENO: result: $JADE" >&5
29655 $as_echo "$JADE" >&6; }
29656 else
29657   { $as_echo "$as_me:$LINENO: result: no" >&5
29658 $as_echo "no" >&6; }
29659 fi
29660
29661
29662   test -n "$JADE" && break
29663 done
29664
29665
29666 { $as_echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
29667 $as_echo_n "checking for DocBook V4.2... " >&6; }
29668 if test "${pgac_cv_check_docbook+set}" = set; then
29669   $as_echo_n "(cached) " >&6
29670 else
29671   cat >conftest.sgml <<EOF
29672 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
29673 <book>
29674  <title>test</title>
29675  <chapter>
29676   <title>random</title>
29677    <sect1>
29678     <title>testsect</title>
29679     <para>text</para>
29680   </sect1>
29681  </chapter>
29682 </book>
29683 EOF
29684
29685 pgac_cv_check_docbook=no
29686
29687 if test -n "$NSGMLS"; then
29688   $NSGMLS -s conftest.sgml 1>&5 2>&1
29689   if test $? -eq 0; then
29690     pgac_cv_check_docbook=yes
29691   fi
29692 fi
29693 rm -f conftest.sgml
29694 fi
29695 { $as_echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
29696 $as_echo "$pgac_cv_check_docbook" >&6; }
29697
29698 have_docbook=$pgac_cv_check_docbook
29699
29700
29701 { $as_echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
29702 $as_echo_n "checking for DocBook stylesheets... " >&6; }
29703 if test "${pgac_cv_path_stylesheets+set}" = set; then
29704   $as_echo_n "(cached) " >&6
29705 else
29706   if test -n "$DOCBOOKSTYLE"; then
29707   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
29708 else
29709   for pgac_prefix in /usr /usr/local /opt /sw; do
29710     for pgac_infix in share lib; do
29711       for pgac_postfix in \
29712         sgml/stylesheets/nwalsh-modular \
29713         sgml/stylesheets/docbook \
29714         sgml/stylesheets/dsssl/docbook \
29715         sgml/docbook-dsssl \
29716         sgml/docbook/dsssl/modular \
29717         sgml/docbook/stylesheet/dsssl/modular \
29718         sgml/docbook/dsssl-stylesheets \
29719         sgml/dsssl/docbook-dsssl-nwalsh
29720       do
29721         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
29722         if test -r "$pgac_candidate/html/docbook.dsl" \
29723            && test -r "$pgac_candidate/print/docbook.dsl"
29724         then
29725           pgac_cv_path_stylesheets=$pgac_candidate
29726           break 3
29727         fi
29728       done
29729     done
29730   done
29731 fi
29732 fi
29733
29734 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
29735
29736 if test -n "$DOCBOOKSTYLE"; then
29737   { $as_echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
29738 $as_echo "$DOCBOOKSTYLE" >&6; }
29739 else
29740   { $as_echo "$as_me:$LINENO: result: no" >&5
29741 $as_echo "no" >&6; }
29742 fi
29743 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
29744   COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
29745
29746 else
29747   # Extract the first word of "collateindex.pl", so it can be a program name with args.
29748 set dummy collateindex.pl; ac_word=$2
29749 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29750 $as_echo_n "checking for $ac_word... " >&6; }
29751 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
29752   $as_echo_n "(cached) " >&6
29753 else
29754   case $COLLATEINDEX in
29755   [\\/]* | ?:[\\/]*)
29756   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
29757   ;;
29758   *)
29759   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29760 for as_dir in $PATH
29761 do
29762   IFS=$as_save_IFS
29763   test -z "$as_dir" && as_dir=.
29764   for ac_exec_ext in '' $ac_executable_extensions; do
29765   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29766     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
29767     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29768     break 2
29769   fi
29770 done
29771 done
29772 IFS=$as_save_IFS
29773
29774   ;;
29775 esac
29776 fi
29777 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
29778 if test -n "$COLLATEINDEX"; then
29779   { $as_echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
29780 $as_echo "$COLLATEINDEX" >&6; }
29781 else
29782   { $as_echo "$as_me:$LINENO: result: no" >&5
29783 $as_echo "no" >&6; }
29784 fi
29785
29786
29787 fi
29788 for ac_prog in xsltproc
29789 do
29790   # Extract the first word of "$ac_prog", so it can be a program name with args.
29791 set dummy $ac_prog; ac_word=$2
29792 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29793 $as_echo_n "checking for $ac_word... " >&6; }
29794 if test "${ac_cv_prog_XSLTPROC+set}" = set; then
29795   $as_echo_n "(cached) " >&6
29796 else
29797   if test -n "$XSLTPROC"; then
29798   ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
29799 else
29800 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29801 for as_dir in $PATH
29802 do
29803   IFS=$as_save_IFS
29804   test -z "$as_dir" && as_dir=.
29805   for ac_exec_ext in '' $ac_executable_extensions; do
29806   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29807     ac_cv_prog_XSLTPROC="$ac_prog"
29808     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29809     break 2
29810   fi
29811 done
29812 done
29813 IFS=$as_save_IFS
29814
29815 fi
29816 fi
29817 XSLTPROC=$ac_cv_prog_XSLTPROC
29818 if test -n "$XSLTPROC"; then
29819   { $as_echo "$as_me:$LINENO: result: $XSLTPROC" >&5
29820 $as_echo "$XSLTPROC" >&6; }
29821 else
29822   { $as_echo "$as_me:$LINENO: result: no" >&5
29823 $as_echo "no" >&6; }
29824 fi
29825
29826
29827   test -n "$XSLTPROC" && break
29828 done
29829
29830 for ac_prog in osx sgml2xml sx
29831 do
29832   # Extract the first word of "$ac_prog", so it can be a program name with args.
29833 set dummy $ac_prog; ac_word=$2
29834 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29835 $as_echo_n "checking for $ac_word... " >&6; }
29836 if test "${ac_cv_prog_OSX+set}" = set; then
29837   $as_echo_n "(cached) " >&6
29838 else
29839   if test -n "$OSX"; then
29840   ac_cv_prog_OSX="$OSX" # Let the user override the test.
29841 else
29842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29843 for as_dir in $PATH
29844 do
29845   IFS=$as_save_IFS
29846   test -z "$as_dir" && as_dir=.
29847   for ac_exec_ext in '' $ac_executable_extensions; do
29848   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29849     ac_cv_prog_OSX="$ac_prog"
29850     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29851     break 2
29852   fi
29853 done
29854 done
29855 IFS=$as_save_IFS
29856
29857 fi
29858 fi
29859 OSX=$ac_cv_prog_OSX
29860 if test -n "$OSX"; then
29861   { $as_echo "$as_me:$LINENO: result: $OSX" >&5
29862 $as_echo "$OSX" >&6; }
29863 else
29864   { $as_echo "$as_me:$LINENO: result: no" >&5
29865 $as_echo "no" >&6; }
29866 fi
29867
29868
29869   test -n "$OSX" && break
29870 done
29871
29872
29873 # Thread testing
29874
29875 # We have to run the thread test near the end so we have all our symbols
29876 # defined.  Cross compiling throws a warning.
29877 #
29878 if test "$enable_thread_safety" = yes; then
29879 if test "$PORTNAME" != "win32"
29880 then
29881 { $as_echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
29882 $as_echo_n "checking thread safety of required library functions... " >&6; }
29883
29884 _CFLAGS="$CFLAGS"
29885 _LIBS="$LIBS"
29886 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
29887 LIBS="$LIBS $PTHREAD_LIBS"
29888 if test "$cross_compiling" = yes; then
29889   { $as_echo "$as_me:$LINENO: result: maybe" >&5
29890 $as_echo "maybe" >&6; }
29891   { $as_echo "$as_me:$LINENO: WARNING:
29892 *** Skipping thread test program because of cross-compile build.
29893 *** Run the program in src/test/thread on the target machine.
29894 " >&5
29895 $as_echo "$as_me: WARNING:
29896 *** Skipping thread test program because of cross-compile build.
29897 *** Run the program in src/test/thread on the target machine.
29898 " >&2;}
29899 else
29900   cat >conftest.$ac_ext <<_ACEOF
29901 /* confdefs.h.  */
29902 _ACEOF
29903 cat confdefs.h >>conftest.$ac_ext
29904 cat >>conftest.$ac_ext <<_ACEOF
29905 /* end confdefs.h.  */
29906 #include "$srcdir/src/test/thread/thread_test.c"
29907 _ACEOF
29908 rm -f conftest$ac_exeext
29909 if { (ac_try="$ac_link"
29910 case "(($ac_try" in
29911   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29912   *) ac_try_echo=$ac_try;;
29913 esac
29914 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29915 $as_echo "$ac_try_echo") >&5
29916   (eval "$ac_link") 2>&5
29917   ac_status=$?
29918   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29919   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
29920   { (case "(($ac_try" in
29921   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29922   *) ac_try_echo=$ac_try;;
29923 esac
29924 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
29925 $as_echo "$ac_try_echo") >&5
29926   (eval "$ac_try") 2>&5
29927   ac_status=$?
29928   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29929   (exit $ac_status); }; }; then
29930   { $as_echo "$as_me:$LINENO: result: yes" >&5
29931 $as_echo "yes" >&6; }
29932 else
29933   $as_echo "$as_me: program exited with status $ac_status" >&5
29934 $as_echo "$as_me: failed program was:" >&5
29935 sed 's/^/| /' conftest.$ac_ext >&5
29936
29937 ( exit $ac_status )
29938 { $as_echo "$as_me:$LINENO: result: no" >&5
29939 $as_echo "no" >&6; }
29940   { { $as_echo "$as_me:$LINENO: error: thread test program failed
29941 This platform is not thread-safe.  Check the file 'config.log' or compile
29942 and run src/test/thread/thread_test for the exact reason.
29943 Use --disable-thread-safety to disable thread safety." >&5
29944 $as_echo "$as_me: error: thread test program failed
29945 This platform is not thread-safe.  Check the file 'config.log' or compile
29946 and run src/test/thread/thread_test for the exact reason.
29947 Use --disable-thread-safety to disable thread safety." >&2;}
29948    { (exit 1); exit 1; }; }
29949 fi
29950 rm -rf conftest.dSYM
29951 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
29952 fi
29953
29954
29955 CFLAGS="$_CFLAGS"
29956 LIBS="$_LIBS"
29957 else
29958 { $as_echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
29959 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
29960 fi
29961 fi
29962
29963 # If compiler will take -Wl,--as-needed (or various platform-specific
29964 # spellings thereof) then add that to LDFLAGS.  This is much easier than
29965 # trying to filter LIBS to the minimum for each executable.
29966 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
29967 # libreadline; therefore we postpone testing it until we know what library
29968 # dependencies readline has.  The test code will try to link with $LIBS.
29969 if test "$with_readline" = yes; then
29970   link_test_func=readline
29971 else
29972   link_test_func=exit
29973 fi
29974
29975 if test "$PORTNAME" = "darwin"; then
29976   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
29977 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
29978 if test "${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+set}" = set; then
29979   $as_echo_n "(cached) " >&6
29980 else
29981   pgac_save_LDFLAGS=$LDFLAGS
29982 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
29983 if test "$cross_compiling" = yes; then
29984   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
29985 else
29986   cat >conftest.$ac_ext <<_ACEOF
29987 /* confdefs.h.  */
29988 _ACEOF
29989 cat confdefs.h >>conftest.$ac_ext
29990 cat >>conftest.$ac_ext <<_ACEOF
29991 /* end confdefs.h.  */
29992 extern void $link_test_func (); void (*fptr) () = $link_test_func;
29993 int
29994 main ()
29995 {
29996
29997   ;
29998   return 0;
29999 }
30000 _ACEOF
30001 rm -f conftest$ac_exeext
30002 if { (ac_try="$ac_link"
30003 case "(($ac_try" in
30004   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30005   *) ac_try_echo=$ac_try;;
30006 esac
30007 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30008 $as_echo "$ac_try_echo") >&5
30009   (eval "$ac_link") 2>&5
30010   ac_status=$?
30011   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30012   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
30013   { (case "(($ac_try" in
30014   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30015   *) ac_try_echo=$ac_try;;
30016 esac
30017 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30018 $as_echo "$ac_try_echo") >&5
30019   (eval "$ac_try") 2>&5
30020   ac_status=$?
30021   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30022   (exit $ac_status); }; }; then
30023   pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
30024 else
30025   $as_echo "$as_me: program exited with status $ac_status" >&5
30026 $as_echo "$as_me: failed program was:" >&5
30027 sed 's/^/| /' conftest.$ac_ext >&5
30028
30029 ( exit $ac_status )
30030 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
30031 fi
30032 rm -rf conftest.dSYM
30033 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
30034 fi
30035
30036
30037 LDFLAGS="$pgac_save_LDFLAGS"
30038 fi
30039 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
30040 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
30041 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
30042   LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
30043 fi
30044
30045 elif test "$PORTNAME" = "openbsd"; then
30046   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,-Bdynamic" >&5
30047 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
30048 if test "${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+set}" = set; then
30049   $as_echo_n "(cached) " >&6
30050 else
30051   pgac_save_LDFLAGS=$LDFLAGS
30052 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
30053 if test "$cross_compiling" = yes; then
30054   pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
30055 else
30056   cat >conftest.$ac_ext <<_ACEOF
30057 /* confdefs.h.  */
30058 _ACEOF
30059 cat confdefs.h >>conftest.$ac_ext
30060 cat >>conftest.$ac_ext <<_ACEOF
30061 /* end confdefs.h.  */
30062 extern void $link_test_func (); void (*fptr) () = $link_test_func;
30063 int
30064 main ()
30065 {
30066
30067   ;
30068   return 0;
30069 }
30070 _ACEOF
30071 rm -f conftest$ac_exeext
30072 if { (ac_try="$ac_link"
30073 case "(($ac_try" in
30074   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30075   *) ac_try_echo=$ac_try;;
30076 esac
30077 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30078 $as_echo "$ac_try_echo") >&5
30079   (eval "$ac_link") 2>&5
30080   ac_status=$?
30081   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30082   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
30083   { (case "(($ac_try" in
30084   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30085   *) ac_try_echo=$ac_try;;
30086 esac
30087 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30088 $as_echo "$ac_try_echo") >&5
30089   (eval "$ac_try") 2>&5
30090   ac_status=$?
30091   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30092   (exit $ac_status); }; }; then
30093   pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
30094 else
30095   $as_echo "$as_me: program exited with status $ac_status" >&5
30096 $as_echo "$as_me: failed program was:" >&5
30097 sed 's/^/| /' conftest.$ac_ext >&5
30098
30099 ( exit $ac_status )
30100 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
30101 fi
30102 rm -rf conftest.dSYM
30103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
30104 fi
30105
30106
30107 LDFLAGS="$pgac_save_LDFLAGS"
30108 fi
30109 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
30110 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
30111 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
30112   LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
30113 fi
30114
30115 else
30116   { $as_echo "$as_me:$LINENO: checking whether $CC supports -Wl,--as-needed" >&5
30117 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
30118 if test "${pgac_cv_prog_cc_ldflags__Wl___as_needed+set}" = set; then
30119   $as_echo_n "(cached) " >&6
30120 else
30121   pgac_save_LDFLAGS=$LDFLAGS
30122 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
30123 if test "$cross_compiling" = yes; then
30124   pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
30125 else
30126   cat >conftest.$ac_ext <<_ACEOF
30127 /* confdefs.h.  */
30128 _ACEOF
30129 cat confdefs.h >>conftest.$ac_ext
30130 cat >>conftest.$ac_ext <<_ACEOF
30131 /* end confdefs.h.  */
30132 extern void $link_test_func (); void (*fptr) () = $link_test_func;
30133 int
30134 main ()
30135 {
30136
30137   ;
30138   return 0;
30139 }
30140 _ACEOF
30141 rm -f conftest$ac_exeext
30142 if { (ac_try="$ac_link"
30143 case "(($ac_try" in
30144   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30145   *) ac_try_echo=$ac_try;;
30146 esac
30147 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30148 $as_echo "$ac_try_echo") >&5
30149   (eval "$ac_link") 2>&5
30150   ac_status=$?
30151   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30152   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
30153   { (case "(($ac_try" in
30154   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30155   *) ac_try_echo=$ac_try;;
30156 esac
30157 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
30158 $as_echo "$ac_try_echo") >&5
30159   (eval "$ac_try") 2>&5
30160   ac_status=$?
30161   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30162   (exit $ac_status); }; }; then
30163   pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
30164 else
30165   $as_echo "$as_me: program exited with status $ac_status" >&5
30166 $as_echo "$as_me: failed program was:" >&5
30167 sed 's/^/| /' conftest.$ac_ext >&5
30168
30169 ( exit $ac_status )
30170 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
30171 fi
30172 rm -rf conftest.dSYM
30173 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
30174 fi
30175
30176
30177 LDFLAGS="$pgac_save_LDFLAGS"
30178 fi
30179 { $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
30180 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
30181 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
30182   LDFLAGS="$LDFLAGS -Wl,--as-needed"
30183 fi
30184
30185 fi
30186
30187 # Create compiler version string
30188 if test x"$GCC" = x"yes" ; then
30189   cc_string=`${CC} --version | sed q`
30190   case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
30191 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
30192   cc_string=`${CC} -V 2>&1 | sed q`
30193 else
30194   cc_string=$CC
30195 fi
30196
30197
30198 cat >>confdefs.h <<_ACEOF
30199 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
30200 _ACEOF
30201
30202
30203 # Supply a numeric version string for use by 3rd party add-ons
30204 # awk -F is a regex on some platforms, and not on others, so make "." a tab
30205 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
30206 tr '.' '        ' |
30207 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
30208
30209 cat >>confdefs.h <<_ACEOF
30210 #define PG_VERSION_NUM $PG_VERSION_NUM
30211 _ACEOF
30212
30213
30214
30215 # Begin output steps
30216
30217 { $as_echo "$as_me:$LINENO: using compiler=$cc_string" >&5
30218 $as_echo "$as_me: using compiler=$cc_string" >&6;}
30219 { $as_echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
30220 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
30221 { $as_echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
30222 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
30223 { $as_echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
30224 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
30225
30226 # prepare build tree if outside source tree
30227 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
30228 # Note 2: /bin/pwd might be better than shell's built-in at getting
30229 #         a symlink-free name.
30230 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
30231   vpath_build=no
30232 else
30233   vpath_build=yes
30234   if test "$no_create" != yes; then
30235     $as_echo_n "preparing build tree... " >&6
30236     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
30237     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
30238       || { { $as_echo "$as_me:$LINENO: error: failed" >&5
30239 $as_echo "$as_me: error: failed" >&2;}
30240    { (exit 1); exit 1; }; }
30241     { $as_echo "$as_me:$LINENO: result: done" >&5
30242 $as_echo "done" >&6; }
30243   fi
30244 fi
30245
30246
30247
30248 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
30249
30250
30251 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}"
30252
30253
30254 if test "$PORTNAME" = "win32"; then
30255 ac_config_commands="$ac_config_commands check_win32_symlinks"
30256
30257 fi
30258
30259 ac_config_headers="$ac_config_headers src/include/pg_config.h"
30260
30261
30262 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
30263
30264
30265 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
30266
30267
30268 cat >confcache <<\_ACEOF
30269 # This file is a shell script that caches the results of configure
30270 # tests run on this system so they can be shared between configure
30271 # scripts and configure runs, see configure's option --config-cache.
30272 # It is not useful on other systems.  If it contains results you don't
30273 # want to keep, you may remove or edit it.
30274 #
30275 # config.status only pays attention to the cache file if you give it
30276 # the --recheck option to rerun configure.
30277 #
30278 # `ac_cv_env_foo' variables (set or unset) will be overridden when
30279 # loading this file, other *unset* `ac_cv_foo' will be assigned the
30280 # following values.
30281
30282 _ACEOF
30283
30284 # The following way of writing the cache mishandles newlines in values,
30285 # but we know of no workaround that is simple, portable, and efficient.
30286 # So, we kill variables containing newlines.
30287 # Ultrix sh set writes to stderr and can't be redirected directly,
30288 # and sets the high bit in the cache file unless we assign to the vars.
30289 (
30290   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30291     eval ac_val=\$$ac_var
30292     case $ac_val in #(
30293     *${as_nl}*)
30294       case $ac_var in #(
30295       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
30296 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30297       esac
30298       case $ac_var in #(
30299       _ | IFS | as_nl) ;; #(
30300       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30301       *) $as_unset $ac_var ;;
30302       esac ;;
30303     esac
30304   done
30305
30306   (set) 2>&1 |
30307     case $as_nl`(ac_space=' '; set) 2>&1` in #(
30308     *${as_nl}ac_space=\ *)
30309       # `set' does not quote correctly, so add quotes (double-quote
30310       # substitution turns \\\\ into \\, and sed turns \\ into \).
30311       sed -n \
30312         "s/'/'\\\\''/g;
30313           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30314       ;; #(
30315     *)
30316       # `set' quotes correctly as required by POSIX, so do not add quotes.
30317       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
30318       ;;
30319     esac |
30320     sort
30321 ) |
30322   sed '
30323      /^ac_cv_env_/b end
30324      t clear
30325      :clear
30326      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
30327      t end
30328      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30329      :end' >>confcache
30330 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30331   if test -w "$cache_file"; then
30332     test "x$cache_file" != "x/dev/null" &&
30333       { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
30334 $as_echo "$as_me: updating cache $cache_file" >&6;}
30335     cat confcache >$cache_file
30336   else
30337     { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
30338 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
30339   fi
30340 fi
30341 rm -f confcache
30342
30343 test "x$prefix" = xNONE && prefix=$ac_default_prefix
30344 # Let make expand exec_prefix.
30345 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30346
30347 DEFS=-DHAVE_CONFIG_H
30348
30349 ac_libobjs=
30350 ac_ltlibobjs=
30351 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30352   # 1. Remove the extension, and $U if already installed.
30353   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30354   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
30355   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
30356   #    will be set to the directory where LIBOBJS objects are built.
30357   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30358   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
30359 done
30360 LIBOBJS=$ac_libobjs
30361
30362 LTLIBOBJS=$ac_ltlibobjs
30363
30364
30365
30366
30367 : ${CONFIG_STATUS=./config.status}
30368 ac_write_fail=0
30369 ac_clean_files_save=$ac_clean_files
30370 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30371 { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
30372 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
30373 cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30374 #! $SHELL
30375 # Generated by $as_me.
30376 # Run this file to recreate the current configuration.
30377 # Compiler output produced by configure, useful for debugging
30378 # configure, is in config.log if it exists.
30379
30380 debug=false
30381 ac_cs_recheck=false
30382 ac_cs_silent=false
30383 SHELL=\${CONFIG_SHELL-$SHELL}
30384 _ACEOF
30385
30386 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30387 ## --------------------- ##
30388 ## M4sh Initialization.  ##
30389 ## --------------------- ##
30390
30391 # Be more Bourne compatible
30392 DUALCASE=1; export DUALCASE # for MKS sh
30393 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
30394   emulate sh
30395   NULLCMD=:
30396   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
30397   # is contrary to our usage.  Disable this feature.
30398   alias -g '${1+"$@"}'='"$@"'
30399   setopt NO_GLOB_SUBST
30400 else
30401   case `(set -o) 2>/dev/null` in
30402   *posix*) set -o posix ;;
30403 esac
30404
30405 fi
30406
30407
30408
30409
30410 # PATH needs CR
30411 # Avoid depending upon Character Ranges.
30412 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
30413 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
30414 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
30415 as_cr_digits='0123456789'
30416 as_cr_alnum=$as_cr_Letters$as_cr_digits
30417
30418 as_nl='
30419 '
30420 export as_nl
30421 # Printing a long string crashes Solaris 7 /usr/bin/printf.
30422 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
30423 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
30424 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
30425 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
30426   as_echo='printf %s\n'
30427   as_echo_n='printf %s'
30428 else
30429   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
30430     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
30431     as_echo_n='/usr/ucb/echo -n'
30432   else
30433     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
30434     as_echo_n_body='eval
30435       arg=$1;
30436       case $arg in
30437       *"$as_nl"*)
30438         expr "X$arg" : "X\\(.*\\)$as_nl";
30439         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
30440       esac;
30441       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
30442     '
30443     export as_echo_n_body
30444     as_echo_n='sh -c $as_echo_n_body as_echo'
30445   fi
30446   export as_echo_body
30447   as_echo='sh -c $as_echo_body as_echo'
30448 fi
30449
30450 # The user is always right.
30451 if test "${PATH_SEPARATOR+set}" != set; then
30452   PATH_SEPARATOR=:
30453   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
30454     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
30455       PATH_SEPARATOR=';'
30456   }
30457 fi
30458
30459 # Support unset when possible.
30460 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30461   as_unset=unset
30462 else
30463   as_unset=false
30464 fi
30465
30466
30467 # IFS
30468 # We need space, tab and new line, in precisely that order.  Quoting is
30469 # there to prevent editors from complaining about space-tab.
30470 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
30471 # splitting by setting IFS to empty value.)
30472 IFS=" ""        $as_nl"
30473
30474 # Find who we are.  Look in the path if we contain no directory separator.
30475 case $0 in
30476   *[\\/]* ) as_myself=$0 ;;
30477   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30478 for as_dir in $PATH
30479 do
30480   IFS=$as_save_IFS
30481   test -z "$as_dir" && as_dir=.
30482   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
30483 done
30484 IFS=$as_save_IFS
30485
30486      ;;
30487 esac
30488 # We did not find ourselves, most probably we were run as `sh COMMAND'
30489 # in which case we are not to be found in the path.
30490 if test "x$as_myself" = x; then
30491   as_myself=$0
30492 fi
30493 if test ! -f "$as_myself"; then
30494   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
30495   { (exit 1); exit 1; }
30496 fi
30497
30498 # Work around bugs in pre-3.0 UWIN ksh.
30499 for as_var in ENV MAIL MAILPATH
30500 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
30501 done
30502 PS1='$ '
30503 PS2='> '
30504 PS4='+ '
30505
30506 # NLS nuisances.
30507 LC_ALL=C
30508 export LC_ALL
30509 LANGUAGE=C
30510 export LANGUAGE
30511
30512 # Required to use basename.
30513 if expr a : '\(a\)' >/dev/null 2>&1 &&
30514    test "X`expr 00001 : '.*\(...\)'`" = X001; then
30515   as_expr=expr
30516 else
30517   as_expr=false
30518 fi
30519
30520 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
30521   as_basename=basename
30522 else
30523   as_basename=false
30524 fi
30525
30526
30527 # Name of the executable.
30528 as_me=`$as_basename -- "$0" ||
30529 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30530          X"$0" : 'X\(//\)$' \| \
30531          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
30532 $as_echo X/"$0" |
30533     sed '/^.*\/\([^/][^/]*\)\/*$/{
30534             s//\1/
30535             q
30536           }
30537           /^X\/\(\/\/\)$/{
30538             s//\1/
30539             q
30540           }
30541           /^X\/\(\/\).*/{
30542             s//\1/
30543             q
30544           }
30545           s/.*/./; q'`
30546
30547 # CDPATH.
30548 $as_unset CDPATH
30549
30550
30551
30552   as_lineno_1=$LINENO
30553   as_lineno_2=$LINENO
30554   test "x$as_lineno_1" != "x$as_lineno_2" &&
30555   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
30556
30557   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
30558   # uniformly replaced by the line number.  The first 'sed' inserts a
30559   # line-number line after each line using $LINENO; the second 'sed'
30560   # does the real work.  The second script uses 'N' to pair each
30561   # line-number line with the line containing $LINENO, and appends
30562   # trailing '-' during substitution so that $LINENO is not a special
30563   # case at line end.
30564   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
30565   # scripts with optimization help from Paolo Bonzini.  Blame Lee
30566   # E. McMahon (1931-1989) for sed's syntax.  :-)
30567   sed -n '
30568     p
30569     /[$]LINENO/=
30570   ' <$as_myself |
30571     sed '
30572       s/[$]LINENO.*/&-/
30573       t lineno
30574       b
30575       :lineno
30576       N
30577       :loop
30578       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
30579       t loop
30580       s/-\n.*//
30581     ' >$as_me.lineno &&
30582   chmod +x "$as_me.lineno" ||
30583     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
30584    { (exit 1); exit 1; }; }
30585
30586   # Don't try to exec as it changes $[0], causing all sort of problems
30587   # (the dirname of $[0] is not the place where we might find the
30588   # original and so on.  Autoconf is especially sensitive to this).
30589   . "./$as_me.lineno"
30590   # Exit status is that of the last command.
30591   exit
30592 }
30593
30594
30595 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
30596   as_dirname=dirname
30597 else
30598   as_dirname=false
30599 fi
30600
30601 ECHO_C= ECHO_N= ECHO_T=
30602 case `echo -n x` in
30603 -n*)
30604   case `echo 'x\c'` in
30605   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
30606   *)   ECHO_C='\c';;
30607   esac;;
30608 *)
30609   ECHO_N='-n';;
30610 esac
30611 if expr a : '\(a\)' >/dev/null 2>&1 &&
30612    test "X`expr 00001 : '.*\(...\)'`" = X001; then
30613   as_expr=expr
30614 else
30615   as_expr=false
30616 fi
30617
30618 rm -f conf$$ conf$$.exe conf$$.file
30619 if test -d conf$$.dir; then
30620   rm -f conf$$.dir/conf$$.file
30621 else
30622   rm -f conf$$.dir
30623   mkdir conf$$.dir 2>/dev/null
30624 fi
30625 if (echo >conf$$.file) 2>/dev/null; then
30626   if ln -s conf$$.file conf$$ 2>/dev/null; then
30627     as_ln_s='ln -s'
30628     # ... but there are two gotchas:
30629     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
30630     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
30631     # In both cases, we have to default to `cp -p'.
30632     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
30633       as_ln_s='cp -p'
30634   elif ln conf$$.file conf$$ 2>/dev/null; then
30635     as_ln_s=ln
30636   else
30637     as_ln_s='cp -p'
30638   fi
30639 else
30640   as_ln_s='cp -p'
30641 fi
30642 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
30643 rmdir conf$$.dir 2>/dev/null
30644
30645 if mkdir -p . 2>/dev/null; then
30646   as_mkdir_p=:
30647 else
30648   test -d ./-p && rmdir ./-p
30649   as_mkdir_p=false
30650 fi
30651
30652 if test -x / >/dev/null 2>&1; then
30653   as_test_x='test -x'
30654 else
30655   if ls -dL / >/dev/null 2>&1; then
30656     as_ls_L_option=L
30657   else
30658     as_ls_L_option=
30659   fi
30660   as_test_x='
30661     eval sh -c '\''
30662       if test -d "$1"; then
30663         test -d "$1/.";
30664       else
30665         case $1 in
30666         -*)set "./$1";;
30667         esac;
30668         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
30669         ???[sx]*):;;*)false;;esac;fi
30670     '\'' sh
30671   '
30672 fi
30673 as_executable_p=$as_test_x
30674
30675 # Sed expression to map a string onto a valid CPP name.
30676 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
30677
30678 # Sed expression to map a string onto a valid variable name.
30679 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
30680
30681
30682 exec 6>&1
30683
30684 # Save the log message, to keep $[0] and so on meaningful, and to
30685 # report actual input values of CONFIG_FILES etc. instead of their
30686 # values after options handling.
30687 ac_log="
30688 This file was extended by PostgreSQL $as_me 9.3devel, which was
30689 generated by GNU Autoconf 2.63.  Invocation command line was
30690
30691   CONFIG_FILES    = $CONFIG_FILES
30692   CONFIG_HEADERS  = $CONFIG_HEADERS
30693   CONFIG_LINKS    = $CONFIG_LINKS
30694   CONFIG_COMMANDS = $CONFIG_COMMANDS
30695   $ $0 $@
30696
30697 on `(hostname || uname -n) 2>/dev/null | sed 1q`
30698 "
30699
30700 _ACEOF
30701
30702 case $ac_config_files in *"
30703 "*) set x $ac_config_files; shift; ac_config_files=$*;;
30704 esac
30705
30706 case $ac_config_headers in *"
30707 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
30708 esac
30709
30710
30711 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30712 # Files that config.status was made for.
30713 config_files="$ac_config_files"
30714 config_headers="$ac_config_headers"
30715 config_links="$ac_config_links"
30716 config_commands="$ac_config_commands"
30717
30718 _ACEOF
30719
30720 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30721 ac_cs_usage="\
30722 \`$as_me' instantiates files from templates according to the
30723 current configuration.
30724
30725 Usage: $0 [OPTION]... [FILE]...
30726
30727   -h, --help       print this help, then exit
30728   -V, --version    print version number and configuration settings, then exit
30729   -q, --quiet, --silent
30730                    do not print progress messages
30731   -d, --debug      don't remove temporary files
30732       --recheck    update $as_me by reconfiguring in the same conditions
30733       --file=FILE[:TEMPLATE]
30734                    instantiate the configuration file FILE
30735       --header=FILE[:TEMPLATE]
30736                    instantiate the configuration header FILE
30737
30738 Configuration files:
30739 $config_files
30740
30741 Configuration headers:
30742 $config_headers
30743
30744 Configuration links:
30745 $config_links
30746
30747 Configuration commands:
30748 $config_commands
30749
30750 Report bugs to <bug-autoconf@gnu.org>."
30751
30752 _ACEOF
30753 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30754 ac_cs_version="\\
30755 PostgreSQL config.status 9.3devel
30756 configured by $0, generated by GNU Autoconf 2.63,
30757   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
30758
30759 Copyright (C) 2008 Free Software Foundation, Inc.
30760 This config.status script is free software; the Free Software Foundation
30761 gives unlimited permission to copy, distribute and modify it."
30762
30763 ac_pwd='$ac_pwd'
30764 srcdir='$srcdir'
30765 INSTALL='$INSTALL'
30766 MKDIR_P='$MKDIR_P'
30767 AWK='$AWK'
30768 test -n "\$AWK" || AWK=awk
30769 _ACEOF
30770
30771 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30772 # The default lists apply if the user does not specify any file.
30773 ac_need_defaults=:
30774 while test $# != 0
30775 do
30776   case $1 in
30777   --*=*)
30778     ac_option=`expr "X$1" : 'X\([^=]*\)='`
30779     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
30780     ac_shift=:
30781     ;;
30782   *)
30783     ac_option=$1
30784     ac_optarg=$2
30785     ac_shift=shift
30786     ;;
30787   esac
30788
30789   case $ac_option in
30790   # Handling of the options.
30791   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
30792     ac_cs_recheck=: ;;
30793   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
30794     $as_echo "$ac_cs_version"; exit ;;
30795   --debug | --debu | --deb | --de | --d | -d )
30796     debug=: ;;
30797   --file | --fil | --fi | --f )
30798     $ac_shift
30799     case $ac_optarg in
30800     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30801     esac
30802     CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
30803     ac_need_defaults=false;;
30804   --header | --heade | --head | --hea )
30805     $ac_shift
30806     case $ac_optarg in
30807     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30808     esac
30809     CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
30810     ac_need_defaults=false;;
30811   --he | --h)
30812     # Conflict between --help and --header
30813     { $as_echo "$as_me: error: ambiguous option: $1
30814 Try \`$0 --help' for more information." >&2
30815    { (exit 1); exit 1; }; };;
30816   --help | --hel | -h )
30817     $as_echo "$ac_cs_usage"; exit ;;
30818   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
30819   | -silent | --silent | --silen | --sile | --sil | --si | --s)
30820     ac_cs_silent=: ;;
30821
30822   # This is an error.
30823   -*) { $as_echo "$as_me: error: unrecognized option: $1
30824 Try \`$0 --help' for more information." >&2
30825    { (exit 1); exit 1; }; } ;;
30826
30827   *) ac_config_targets="$ac_config_targets $1"
30828      ac_need_defaults=false ;;
30829
30830   esac
30831   shift
30832 done
30833
30834 ac_configure_extra_args=
30835
30836 if $ac_cs_silent; then
30837   exec 6>/dev/null
30838   ac_configure_extra_args="$ac_configure_extra_args --silent"
30839 fi
30840
30841 _ACEOF
30842 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30843 if \$ac_cs_recheck; then
30844   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
30845   shift
30846   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
30847   CONFIG_SHELL='$SHELL'
30848   export CONFIG_SHELL
30849   exec "\$@"
30850 fi
30851
30852 _ACEOF
30853 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30854 exec 5>>config.log
30855 {
30856   echo
30857   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
30858 ## Running $as_me. ##
30859 _ASBOX
30860   $as_echo "$ac_log"
30861 } >&5
30862
30863 _ACEOF
30864 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30865 _ACEOF
30866
30867 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30868
30869 # Handling of arguments.
30870 for ac_config_target in $ac_config_targets
30871 do
30872   case $ac_config_target in
30873     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
30874     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
30875     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
30876     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
30877     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
30878     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
30879     "src/backend/port/pg_latch.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_latch.c:${LATCH_IMPLEMENTATION}" ;;
30880     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
30881     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
30882     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
30883     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
30884     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
30885     "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
30886     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
30887
30888   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
30889 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
30890    { (exit 1); exit 1; }; };;
30891   esac
30892 done
30893
30894
30895 # If the user did not use the arguments to specify the items to instantiate,
30896 # then the envvar interface is used.  Set only those that are not.
30897 # We use the long form for the default assignment because of an extremely
30898 # bizarre bug on SunOS 4.1.3.
30899 if $ac_need_defaults; then
30900   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
30901   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
30902   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
30903   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
30904 fi
30905
30906 # Have a temporary directory for convenience.  Make it in the build tree
30907 # simply because there is no reason against having it here, and in addition,
30908 # creating and moving files from /tmp can sometimes cause problems.
30909 # Hook for its removal unless debugging.
30910 # Note that there is a small window in which the directory will not be cleaned:
30911 # after its creation but before its name has been assigned to `$tmp'.
30912 $debug ||
30913 {
30914   tmp=
30915   trap 'exit_status=$?
30916   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
30917 ' 0
30918   trap '{ (exit 1); exit 1; }' 1 2 13 15
30919 }
30920 # Create a (secure) tmp directory for tmp files.
30921
30922 {
30923   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
30924   test -n "$tmp" && test -d "$tmp"
30925 }  ||
30926 {
30927   tmp=./conf$$-$RANDOM
30928   (umask 077 && mkdir "$tmp")
30929 } ||
30930 {
30931    $as_echo "$as_me: cannot create a temporary directory in ." >&2
30932    { (exit 1); exit 1; }
30933 }
30934
30935 # Set up the scripts for CONFIG_FILES section.
30936 # No need to generate them if there are no CONFIG_FILES.
30937 # This happens for instance with `./config.status config.h'.
30938 if test -n "$CONFIG_FILES"; then
30939
30940
30941 ac_cr='\r'
30942 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
30943 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
30944   ac_cs_awk_cr='\\r'
30945 else
30946   ac_cs_awk_cr=$ac_cr
30947 fi
30948
30949 echo 'BEGIN {' >"$tmp/subs1.awk" &&
30950 _ACEOF
30951
30952
30953 {
30954   echo "cat >conf$$subs.awk <<_ACEOF" &&
30955   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
30956   echo "_ACEOF"
30957 } >conf$$subs.sh ||
30958   { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
30959 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
30960    { (exit 1); exit 1; }; }
30961 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
30962 ac_delim='%!_!# '
30963 for ac_last_try in false false false false false :; do
30964   . ./conf$$subs.sh ||
30965     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
30966 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
30967    { (exit 1); exit 1; }; }
30968
30969   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
30970   if test $ac_delim_n = $ac_delim_num; then
30971     break
30972   elif $ac_last_try; then
30973     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
30974 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
30975    { (exit 1); exit 1; }; }
30976   else
30977     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30978   fi
30979 done
30980 rm -f conf$$subs.sh
30981
30982 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30983 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
30984 _ACEOF
30985 sed -n '
30986 h
30987 s/^/S["/; s/!.*/"]=/
30988 p
30989 g
30990 s/^[^!]*!//
30991 :repl
30992 t repl
30993 s/'"$ac_delim"'$//
30994 t delim
30995 :nl
30996 h
30997 s/\(.\{148\}\).*/\1/
30998 t more1
30999 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31000 p
31001 n
31002 b repl
31003 :more1
31004 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31005 p
31006 g
31007 s/.\{148\}//
31008 t nl
31009 :delim
31010 h
31011 s/\(.\{148\}\).*/\1/
31012 t more2
31013 s/["\\]/\\&/g; s/^/"/; s/$/"/
31014 p
31015 b
31016 :more2
31017 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31018 p
31019 g
31020 s/.\{148\}//
31021 t delim
31022 ' <conf$$subs.awk | sed '
31023 /^[^""]/{
31024   N
31025   s/\n//
31026 }
31027 ' >>$CONFIG_STATUS || ac_write_fail=1
31028 rm -f conf$$subs.awk
31029 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31030 _ACAWK
31031 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
31032   for (key in S) S_is_set[key] = 1
31033   FS = "\a"
31034
31035 }
31036 {
31037   line = $ 0
31038   nfields = split(line, field, "@")
31039   substed = 0
31040   len = length(field[1])
31041   for (i = 2; i < nfields; i++) {
31042     key = field[i]
31043     keylen = length(key)
31044     if (S_is_set[key]) {
31045       value = S[key]
31046       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31047       len += length(value) + length(field[++i])
31048       substed = 1
31049     } else
31050       len += 1 + keylen
31051   }
31052
31053   print line
31054 }
31055
31056 _ACAWK
31057 _ACEOF
31058 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31059 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31060   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31061 else
31062   cat
31063 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
31064   || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
31065 $as_echo "$as_me: error: could not setup config files machinery" >&2;}
31066    { (exit 1); exit 1; }; }
31067 _ACEOF
31068
31069 # VPATH may cause trouble with some makes, so we remove $(srcdir),
31070 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
31071 # trailing colons and then remove the whole line if VPATH becomes empty
31072 # (actually we leave an empty line to preserve line numbers).
31073 if test "x$srcdir" = x.; then
31074   ac_vpsub='/^[  ]*VPATH[        ]*=/{
31075 s/:*\$(srcdir):*/:/
31076 s/:*\${srcdir}:*/:/
31077 s/:*@srcdir@:*/:/
31078 s/^\([^=]*=[     ]*\):*/\1/
31079 s/:*$//
31080 s/^[^=]*=[       ]*$//
31081 }'
31082 fi
31083
31084 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31085 fi # test -n "$CONFIG_FILES"
31086
31087 # Set up the scripts for CONFIG_HEADERS section.
31088 # No need to generate them if there are no CONFIG_HEADERS.
31089 # This happens for instance with `./config.status Makefile'.
31090 if test -n "$CONFIG_HEADERS"; then
31091 cat >"$tmp/defines.awk" <<\_ACAWK ||
31092 BEGIN {
31093 _ACEOF
31094
31095 # Transform confdefs.h into an awk script `defines.awk', embedded as
31096 # here-document in config.status, that substitutes the proper values into
31097 # config.h.in to produce config.h.
31098
31099 # Create a delimiter string that does not exist in confdefs.h, to ease
31100 # handling of long lines.
31101 ac_delim='%!_!# '
31102 for ac_last_try in false false :; do
31103   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
31104   if test -z "$ac_t"; then
31105     break
31106   elif $ac_last_try; then
31107     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
31108 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
31109    { (exit 1); exit 1; }; }
31110   else
31111     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31112   fi
31113 done
31114
31115 # For the awk script, D is an array of macro values keyed by name,
31116 # likewise P contains macro parameters if any.  Preserve backslash
31117 # newline sequences.
31118
31119 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31120 sed -n '
31121 s/.\{148\}/&'"$ac_delim"'/g
31122 t rset
31123 :rset
31124 s/^[     ]*#[    ]*define[       ][      ]*/ /
31125 t def
31126 d
31127 :def
31128 s/\\$//
31129 t bsnl
31130 s/["\\]/\\&/g
31131 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
31132 D["\1"]=" \3"/p
31133 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
31134 d
31135 :bsnl
31136 s/["\\]/\\&/g
31137 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
31138 D["\1"]=" \3\\\\\\n"\\/p
31139 t cont
31140 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31141 t cont
31142 d
31143 :cont
31144 n
31145 s/.\{148\}/&'"$ac_delim"'/g
31146 t clear
31147 :clear
31148 s/\\$//
31149 t bsnlc
31150 s/["\\]/\\&/g; s/^/"/; s/$/"/p
31151 d
31152 :bsnlc
31153 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31154 b cont
31155 ' <confdefs.h | sed '
31156 s/'"$ac_delim"'/"\\\
31157 "/g' >>$CONFIG_STATUS || ac_write_fail=1
31158
31159 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31160   for (key in D) D_is_set[key] = 1
31161   FS = "\a"
31162 }
31163 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31164   line = \$ 0
31165   split(line, arg, " ")
31166   if (arg[1] == "#") {
31167     defundef = arg[2]
31168     mac1 = arg[3]
31169   } else {
31170     defundef = substr(arg[1], 2)
31171     mac1 = arg[2]
31172   }
31173   split(mac1, mac2, "(") #)
31174   macro = mac2[1]
31175   prefix = substr(line, 1, index(line, defundef) - 1)
31176   if (D_is_set[macro]) {
31177     # Preserve the white space surrounding the "#".
31178     print prefix "define", macro P[macro] D[macro]
31179     next
31180   } else {
31181     # Replace #undef with comments.  This is necessary, for example,
31182     # in the case of _POSIX_SOURCE, which is predefined and required
31183     # on some systems where configure will not decide to define it.
31184     if (defundef == "undef") {
31185       print "/*", prefix defundef, macro, "*/"
31186       next
31187     }
31188   }
31189 }
31190 { print }
31191 _ACAWK
31192 _ACEOF
31193 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31194   { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
31195 $as_echo "$as_me: error: could not setup config headers machinery" >&2;}
31196    { (exit 1); exit 1; }; }
31197 fi # test -n "$CONFIG_HEADERS"
31198
31199
31200 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
31201 shift
31202 for ac_tag
31203 do
31204   case $ac_tag in
31205   :[FHLC]) ac_mode=$ac_tag; continue;;
31206   esac
31207   case $ac_mode$ac_tag in
31208   :[FHL]*:*);;
31209   :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
31210 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
31211    { (exit 1); exit 1; }; };;
31212   :[FH]-) ac_tag=-:-;;
31213   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
31214   esac
31215   ac_save_IFS=$IFS
31216   IFS=:
31217   set x $ac_tag
31218   IFS=$ac_save_IFS
31219   shift
31220   ac_file=$1
31221   shift
31222
31223   case $ac_mode in
31224   :L) ac_source=$1;;
31225   :[FH])
31226     ac_file_inputs=
31227     for ac_f
31228     do
31229       case $ac_f in
31230       -) ac_f="$tmp/stdin";;
31231       *) # Look for the file first in the build tree, then in the source tree
31232          # (if the path is not absolute).  The absolute path cannot be DOS-style,
31233          # because $ac_f cannot contain `:'.
31234          test -f "$ac_f" ||
31235            case $ac_f in
31236            [\\/$]*) false;;
31237            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
31238            esac ||
31239            { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
31240 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
31241    { (exit 1); exit 1; }; };;
31242       esac
31243       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
31244       ac_file_inputs="$ac_file_inputs '$ac_f'"
31245     done
31246
31247     # Let's still pretend it is `configure' which instantiates (i.e., don't
31248     # use $as_me), people would be surprised to read:
31249     #    /* config.h.  Generated by config.status.  */
31250     configure_input='Generated from '`
31251           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
31252         `' by configure.'
31253     if test x"$ac_file" != x-; then
31254       configure_input="$ac_file.  $configure_input"
31255       { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
31256 $as_echo "$as_me: creating $ac_file" >&6;}
31257     fi
31258     # Neutralize special characters interpreted by sed in replacement strings.
31259     case $configure_input in #(
31260     *\&* | *\|* | *\\* )
31261        ac_sed_conf_input=`$as_echo "$configure_input" |
31262        sed 's/[\\\\&|]/\\\\&/g'`;; #(
31263     *) ac_sed_conf_input=$configure_input;;
31264     esac
31265
31266     case $ac_tag in
31267     *:-:* | *:-) cat >"$tmp/stdin" \
31268       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31269 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31270    { (exit 1); exit 1; }; } ;;
31271     esac
31272     ;;
31273   esac
31274
31275   ac_dir=`$as_dirname -- "$ac_file" ||
31276 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31277          X"$ac_file" : 'X\(//\)[^/]' \| \
31278          X"$ac_file" : 'X\(//\)$' \| \
31279          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
31280 $as_echo X"$ac_file" |
31281     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31282             s//\1/
31283             q
31284           }
31285           /^X\(\/\/\)[^/].*/{
31286             s//\1/
31287             q
31288           }
31289           /^X\(\/\/\)$/{
31290             s//\1/
31291             q
31292           }
31293           /^X\(\/\).*/{
31294             s//\1/
31295             q
31296           }
31297           s/.*/./; q'`
31298   { as_dir="$ac_dir"
31299   case $as_dir in #(
31300   -*) as_dir=./$as_dir;;
31301   esac
31302   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
31303     as_dirs=
31304     while :; do
31305       case $as_dir in #(
31306       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31307       *) as_qdir=$as_dir;;
31308       esac
31309       as_dirs="'$as_qdir' $as_dirs"
31310       as_dir=`$as_dirname -- "$as_dir" ||
31311 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31312          X"$as_dir" : 'X\(//\)[^/]' \| \
31313          X"$as_dir" : 'X\(//\)$' \| \
31314          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31315 $as_echo X"$as_dir" |
31316     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31317             s//\1/
31318             q
31319           }
31320           /^X\(\/\/\)[^/].*/{
31321             s//\1/
31322             q
31323           }
31324           /^X\(\/\/\)$/{
31325             s//\1/
31326             q
31327           }
31328           /^X\(\/\).*/{
31329             s//\1/
31330             q
31331           }
31332           s/.*/./; q'`
31333       test -d "$as_dir" && break
31334     done
31335     test -z "$as_dirs" || eval "mkdir $as_dirs"
31336   } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
31337 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
31338    { (exit 1); exit 1; }; }; }
31339   ac_builddir=.
31340
31341 case "$ac_dir" in
31342 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
31343 *)
31344   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
31345   # A ".." for each directory in $ac_dir_suffix.
31346   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
31347   case $ac_top_builddir_sub in
31348   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
31349   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
31350   esac ;;
31351 esac
31352 ac_abs_top_builddir=$ac_pwd
31353 ac_abs_builddir=$ac_pwd$ac_dir_suffix
31354 # for backward compatibility:
31355 ac_top_builddir=$ac_top_build_prefix
31356
31357 case $srcdir in
31358   .)  # We are building in place.
31359     ac_srcdir=.
31360     ac_top_srcdir=$ac_top_builddir_sub
31361     ac_abs_top_srcdir=$ac_pwd ;;
31362   [\\/]* | ?:[\\/]* )  # Absolute name.
31363     ac_srcdir=$srcdir$ac_dir_suffix;
31364     ac_top_srcdir=$srcdir
31365     ac_abs_top_srcdir=$srcdir ;;
31366   *) # Relative name.
31367     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
31368     ac_top_srcdir=$ac_top_build_prefix$srcdir
31369     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
31370 esac
31371 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
31372
31373
31374   case $ac_mode in
31375   :F)
31376   #
31377   # CONFIG_FILE
31378   #
31379
31380   case $INSTALL in
31381   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
31382   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
31383   esac
31384   ac_MKDIR_P=$MKDIR_P
31385   case $MKDIR_P in
31386   [\\/$]* | ?:[\\/]* ) ;;
31387   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
31388   esac
31389 _ACEOF
31390
31391 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31392 # If the template does not know about datarootdir, expand it.
31393 # FIXME: This hack should be removed a few years after 2.60.
31394 ac_datarootdir_hack=; ac_datarootdir_seen=
31395
31396 ac_sed_dataroot='
31397 /datarootdir/ {
31398   p
31399   q
31400 }
31401 /@datadir@/p
31402 /@docdir@/p
31403 /@infodir@/p
31404 /@localedir@/p
31405 /@mandir@/p
31406 '
31407 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
31408 *datarootdir*) ac_datarootdir_seen=yes;;
31409 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
31410   { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
31411 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
31412 _ACEOF
31413 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31414   ac_datarootdir_hack='
31415   s&@datadir@&$datadir&g
31416   s&@docdir@&$docdir&g
31417   s&@infodir@&$infodir&g
31418   s&@localedir@&$localedir&g
31419   s&@mandir@&$mandir&g
31420     s&\\\${datarootdir}&$datarootdir&g' ;;
31421 esac
31422 _ACEOF
31423
31424 # Neutralize VPATH when `$srcdir' = `.'.
31425 # Shell code in configure.ac might set extrasub.
31426 # FIXME: do we really want to maintain this feature?
31427 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31428 ac_sed_extra="$ac_vpsub
31429 $extrasub
31430 _ACEOF
31431 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31432 :t
31433 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
31434 s|@configure_input@|$ac_sed_conf_input|;t t
31435 s&@top_builddir@&$ac_top_builddir_sub&;t t
31436 s&@top_build_prefix@&$ac_top_build_prefix&;t t
31437 s&@srcdir@&$ac_srcdir&;t t
31438 s&@abs_srcdir@&$ac_abs_srcdir&;t t
31439 s&@top_srcdir@&$ac_top_srcdir&;t t
31440 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
31441 s&@builddir@&$ac_builddir&;t t
31442 s&@abs_builddir@&$ac_abs_builddir&;t t
31443 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
31444 s&@INSTALL@&$ac_INSTALL&;t t
31445 s&@MKDIR_P@&$ac_MKDIR_P&;t t
31446 $ac_datarootdir_hack
31447 "
31448 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
31449   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31450 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31451    { (exit 1); exit 1; }; }
31452
31453 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
31454   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
31455   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
31456   { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31457 which seems to be undefined.  Please make sure it is defined." >&5
31458 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31459 which seems to be undefined.  Please make sure it is defined." >&2;}
31460
31461   rm -f "$tmp/stdin"
31462   case $ac_file in
31463   -) cat "$tmp/out" && rm -f "$tmp/out";;
31464   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
31465   esac \
31466   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31467 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31468    { (exit 1); exit 1; }; }
31469  ;;
31470   :H)
31471   #
31472   # CONFIG_HEADER
31473   #
31474   if test x"$ac_file" != x-; then
31475     {
31476       $as_echo "/* $configure_input  */" \
31477       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
31478     } >"$tmp/config.h" \
31479       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31480 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31481    { (exit 1); exit 1; }; }
31482     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
31483       { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
31484 $as_echo "$as_me: $ac_file is unchanged" >&6;}
31485     else
31486       rm -f "$ac_file"
31487       mv "$tmp/config.h" "$ac_file" \
31488         || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
31489 $as_echo "$as_me: error: could not create $ac_file" >&2;}
31490    { (exit 1); exit 1; }; }
31491     fi
31492   else
31493     $as_echo "/* $configure_input  */" \
31494       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
31495       || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
31496 $as_echo "$as_me: error: could not create -" >&2;}
31497    { (exit 1); exit 1; }; }
31498   fi
31499  ;;
31500   :L)
31501   #
31502   # CONFIG_LINK
31503   #
31504
31505   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
31506     :
31507   else
31508     # Prefer the file from the source tree if names are identical.
31509     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
31510       ac_source=$srcdir/$ac_source
31511     fi
31512
31513     { $as_echo "$as_me:$LINENO: linking $ac_source to $ac_file" >&5
31514 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
31515
31516     if test ! -r "$ac_source"; then
31517       { { $as_echo "$as_me:$LINENO: error: $ac_source: file not found" >&5
31518 $as_echo "$as_me: error: $ac_source: file not found" >&2;}
31519    { (exit 1); exit 1; }; }
31520     fi
31521     rm -f "$ac_file"
31522
31523     # Try a relative symlink, then a hard link, then a copy.
31524     case $srcdir in
31525     [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
31526         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
31527     esac
31528     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
31529       ln "$ac_source" "$ac_file" 2>/dev/null ||
31530       cp -p "$ac_source" "$ac_file" ||
31531       { { $as_echo "$as_me:$LINENO: error: cannot link or copy $ac_source to $ac_file" >&5
31532 $as_echo "$as_me: error: cannot link or copy $ac_source to $ac_file" >&2;}
31533    { (exit 1); exit 1; }; }
31534   fi
31535  ;;
31536   :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
31537 $as_echo "$as_me: executing $ac_file commands" >&6;}
31538  ;;
31539   esac
31540
31541
31542   case $ac_file$ac_mode in
31543     "check_win32_symlinks":C)
31544 # Links sometimes fail undetected on Mingw -
31545 # so here we detect it and warn the user
31546 for FILE in $CONFIG_LINKS
31547  do
31548         # test -e works for symlinks in the MinGW console
31549         test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
31550 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
31551  done
31552  ;;
31553     "src/include/pg_config.h":H)
31554 # Update timestamp for pg_config.h (see Makefile.global)
31555 echo >src/include/stamp-h
31556  ;;
31557     "src/include/pg_config_ext.h":H)
31558 # Update timestamp for pg_config_ext.h (see Makefile.global)
31559 echo >src/include/stamp-ext-h
31560  ;;
31561     "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
31562
31563   esac
31564 done # for ac_tag
31565
31566
31567 { (exit 0); exit 0; }
31568 _ACEOF
31569 chmod +x $CONFIG_STATUS
31570 ac_clean_files=$ac_clean_files_save
31571
31572 test $ac_write_fail = 0 ||
31573   { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
31574 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
31575    { (exit 1); exit 1; }; }
31576
31577
31578 # configure is writing to config.log, and then calls config.status.
31579 # config.status does its own redirection, appending to config.log.
31580 # Unfortunately, on DOS this fails, as config.log is still kept open
31581 # by configure, so config.status won't be able to write to it; its
31582 # output is simply discarded.  So we exec the FD to /dev/null,
31583 # effectively closing config.log, so it can be properly (re)opened and
31584 # appended to by config.status.  When coming back to configure, we
31585 # need to make the FD available again.
31586 if test "$no_create" != yes; then
31587   ac_cs_success=:
31588   ac_config_status_args=
31589   test "$silent" = yes &&
31590     ac_config_status_args="$ac_config_status_args --quiet"
31591   exec 5>/dev/null
31592   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
31593   exec 5>>config.log
31594   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31595   # would make configure fail if this is the last instruction.
31596   $ac_cs_success || { (exit 1); exit 1; }
31597 fi
31598 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
31599   { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
31600 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
31601 fi
31602