OSDN Git Service

Modify the float4 datatype to be pass-by-val. Along the way, remove the last
[pg-rex/syncrep.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.61 for PostgreSQL 8.4devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
8 # 2002, 2003, 2004, 2005, 2006 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-2008, 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   # Zsh 3.x and 4.x performs 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 # The user is always right.
45 if test "${PATH_SEPARATOR+set}" != set; then
46   echo "#! /bin/sh" >conf$$.sh
47   echo  "exit 0"   >>conf$$.sh
48   chmod +x conf$$.sh
49   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
50     PATH_SEPARATOR=';'
51   else
52     PATH_SEPARATOR=:
53   fi
54   rm -f conf$$.sh
55 fi
56
57 # Support unset when possible.
58 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
59   as_unset=unset
60 else
61   as_unset=false
62 fi
63
64
65 # IFS
66 # We need space, tab and new line, in precisely that order.  Quoting is
67 # there to prevent editors from complaining about space-tab.
68 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
69 # splitting by setting IFS to empty value.)
70 as_nl='
71 '
72 IFS=" ""        $as_nl"
73
74 # Find who we are.  Look in the path if we contain no directory separator.
75 case $0 in
76   *[\\/]* ) as_myself=$0 ;;
77   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
78 for as_dir in $PATH
79 do
80   IFS=$as_save_IFS
81   test -z "$as_dir" && as_dir=.
82   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
83 done
84 IFS=$as_save_IFS
85
86      ;;
87 esac
88 # We did not find ourselves, most probably we were run as `sh COMMAND'
89 # in which case we are not to be found in the path.
90 if test "x$as_myself" = x; then
91   as_myself=$0
92 fi
93 if test ! -f "$as_myself"; then
94   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
95   { (exit 1); exit 1; }
96 fi
97
98 # Work around bugs in pre-3.0 UWIN ksh.
99 for as_var in ENV MAIL MAILPATH
100 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
101 done
102 PS1='$ '
103 PS2='> '
104 PS4='+ '
105
106 # NLS nuisances.
107 for as_var in \
108   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
109   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
110   LC_TELEPHONE LC_TIME
111 do
112   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
113     eval $as_var=C; export $as_var
114   else
115     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
116   fi
117 done
118
119 # Required to use basename.
120 if expr a : '\(a\)' >/dev/null 2>&1 &&
121    test "X`expr 00001 : '.*\(...\)'`" = X001; then
122   as_expr=expr
123 else
124   as_expr=false
125 fi
126
127 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
128   as_basename=basename
129 else
130   as_basename=false
131 fi
132
133
134 # Name of the executable.
135 as_me=`$as_basename -- "$0" ||
136 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
137          X"$0" : 'X\(//\)$' \| \
138          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
139 echo X/"$0" |
140     sed '/^.*\/\([^/][^/]*\)\/*$/{
141             s//\1/
142             q
143           }
144           /^X\/\(\/\/\)$/{
145             s//\1/
146             q
147           }
148           /^X\/\(\/\).*/{
149             s//\1/
150             q
151           }
152           s/.*/./; q'`
153
154 # CDPATH.
155 $as_unset CDPATH
156
157
158 if test "x$CONFIG_SHELL" = x; then
159   if (eval ":") 2>/dev/null; then
160   as_have_required=yes
161 else
162   as_have_required=no
163 fi
164
165   if test $as_have_required = yes &&     (eval ":
166 (as_func_return () {
167   (exit \$1)
168 }
169 as_func_success () {
170   as_func_return 0
171 }
172 as_func_failure () {
173   as_func_return 1
174 }
175 as_func_ret_success () {
176   return 0
177 }
178 as_func_ret_failure () {
179   return 1
180 }
181
182 exitcode=0
183 if as_func_success; then
184   :
185 else
186   exitcode=1
187   echo as_func_success failed.
188 fi
189
190 if as_func_failure; then
191   exitcode=1
192   echo as_func_failure succeeded.
193 fi
194
195 if as_func_ret_success; then
196   :
197 else
198   exitcode=1
199   echo as_func_ret_success failed.
200 fi
201
202 if as_func_ret_failure; then
203   exitcode=1
204   echo as_func_ret_failure succeeded.
205 fi
206
207 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
208   :
209 else
210   exitcode=1
211   echo positional parameters were not saved.
212 fi
213
214 test \$exitcode = 0) || { (exit 1); exit 1; }
215
216 (
217   as_lineno_1=\$LINENO
218   as_lineno_2=\$LINENO
219   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
220   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
221 ") 2> /dev/null; then
222   :
223 else
224   as_candidate_shells=
225     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
226 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
227 do
228   IFS=$as_save_IFS
229   test -z "$as_dir" && as_dir=.
230   case $as_dir in
231          /*)
232            for as_base in sh bash ksh sh5; do
233              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
234            done;;
235        esac
236 done
237 IFS=$as_save_IFS
238
239
240       for as_shell in $as_candidate_shells $SHELL; do
241          # Try only shells that exist, to save several forks.
242          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
243                 { ("$as_shell") 2> /dev/null <<\_ASEOF
244 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
245   emulate sh
246   NULLCMD=:
247   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
248   # is contrary to our usage.  Disable this feature.
249   alias -g '${1+"$@"}'='"$@"'
250   setopt NO_GLOB_SUBST
251 else
252   case `(set -o) 2>/dev/null` in
253   *posix*) set -o posix ;;
254 esac
255
256 fi
257
258
259 :
260 _ASEOF
261 }; then
262   CONFIG_SHELL=$as_shell
263                as_have_required=yes
264                if { "$as_shell" 2> /dev/null <<\_ASEOF
265 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
266   emulate sh
267   NULLCMD=:
268   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
269   # is contrary to our usage.  Disable this feature.
270   alias -g '${1+"$@"}'='"$@"'
271   setopt NO_GLOB_SUBST
272 else
273   case `(set -o) 2>/dev/null` in
274   *posix*) set -o posix ;;
275 esac
276
277 fi
278
279
280 :
281 (as_func_return () {
282   (exit $1)
283 }
284 as_func_success () {
285   as_func_return 0
286 }
287 as_func_failure () {
288   as_func_return 1
289 }
290 as_func_ret_success () {
291   return 0
292 }
293 as_func_ret_failure () {
294   return 1
295 }
296
297 exitcode=0
298 if as_func_success; then
299   :
300 else
301   exitcode=1
302   echo as_func_success failed.
303 fi
304
305 if as_func_failure; then
306   exitcode=1
307   echo as_func_failure succeeded.
308 fi
309
310 if as_func_ret_success; then
311   :
312 else
313   exitcode=1
314   echo as_func_ret_success failed.
315 fi
316
317 if as_func_ret_failure; then
318   exitcode=1
319   echo as_func_ret_failure succeeded.
320 fi
321
322 if ( set x; as_func_ret_success y && test x = "$1" ); then
323   :
324 else
325   exitcode=1
326   echo positional parameters were not saved.
327 fi
328
329 test $exitcode = 0) || { (exit 1); exit 1; }
330
331 (
332   as_lineno_1=$LINENO
333   as_lineno_2=$LINENO
334   test "x$as_lineno_1" != "x$as_lineno_2" &&
335   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
336
337 _ASEOF
338 }; then
339   break
340 fi
341
342 fi
343
344       done
345
346       if test "x$CONFIG_SHELL" != x; then
347   for as_var in BASH_ENV ENV
348         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
349         done
350         export CONFIG_SHELL
351         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
352 fi
353
354
355     if test $as_have_required = no; then
356   echo This script requires a shell more modern than all the
357       echo shells that I found on your system.  Please install a
358       echo modern shell, or manually run the script under such a
359       echo shell if you do have one.
360       { (exit 1); exit 1; }
361 fi
362
363
364 fi
365
366 fi
367
368
369
370 (eval "as_func_return () {
371   (exit \$1)
372 }
373 as_func_success () {
374   as_func_return 0
375 }
376 as_func_failure () {
377   as_func_return 1
378 }
379 as_func_ret_success () {
380   return 0
381 }
382 as_func_ret_failure () {
383   return 1
384 }
385
386 exitcode=0
387 if as_func_success; then
388   :
389 else
390   exitcode=1
391   echo as_func_success failed.
392 fi
393
394 if as_func_failure; then
395   exitcode=1
396   echo as_func_failure succeeded.
397 fi
398
399 if as_func_ret_success; then
400   :
401 else
402   exitcode=1
403   echo as_func_ret_success failed.
404 fi
405
406 if as_func_ret_failure; then
407   exitcode=1
408   echo as_func_ret_failure succeeded.
409 fi
410
411 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
412   :
413 else
414   exitcode=1
415   echo positional parameters were not saved.
416 fi
417
418 test \$exitcode = 0") || {
419   echo No shell found that supports shell functions.
420   echo Please tell autoconf@gnu.org about your system,
421   echo including any error possibly output before this
422   echo message
423 }
424
425
426
427   as_lineno_1=$LINENO
428   as_lineno_2=$LINENO
429   test "x$as_lineno_1" != "x$as_lineno_2" &&
430   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
431
432   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
433   # uniformly replaced by the line number.  The first 'sed' inserts a
434   # line-number line after each line using $LINENO; the second 'sed'
435   # does the real work.  The second script uses 'N' to pair each
436   # line-number line with the line containing $LINENO, and appends
437   # trailing '-' during substitution so that $LINENO is not a special
438   # case at line end.
439   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
440   # scripts with optimization help from Paolo Bonzini.  Blame Lee
441   # E. McMahon (1931-1989) for sed's syntax.  :-)
442   sed -n '
443     p
444     /[$]LINENO/=
445   ' <$as_myself |
446     sed '
447       s/[$]LINENO.*/&-/
448       t lineno
449       b
450       :lineno
451       N
452       :loop
453       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
454       t loop
455       s/-\n.*//
456     ' >$as_me.lineno &&
457   chmod +x "$as_me.lineno" ||
458     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
459    { (exit 1); exit 1; }; }
460
461   # Don't try to exec as it changes $[0], causing all sort of problems
462   # (the dirname of $[0] is not the place where we might find the
463   # original and so on.  Autoconf is especially sensitive to this).
464   . "./$as_me.lineno"
465   # Exit status is that of the last command.
466   exit
467 }
468
469
470 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
471   as_dirname=dirname
472 else
473   as_dirname=false
474 fi
475
476 ECHO_C= ECHO_N= ECHO_T=
477 case `echo -n x` in
478 -n*)
479   case `echo 'x\c'` in
480   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
481   *)   ECHO_C='\c';;
482   esac;;
483 *)
484   ECHO_N='-n';;
485 esac
486
487 if expr a : '\(a\)' >/dev/null 2>&1 &&
488    test "X`expr 00001 : '.*\(...\)'`" = X001; then
489   as_expr=expr
490 else
491   as_expr=false
492 fi
493
494 rm -f conf$$ conf$$.exe conf$$.file
495 if test -d conf$$.dir; then
496   rm -f conf$$.dir/conf$$.file
497 else
498   rm -f conf$$.dir
499   mkdir conf$$.dir
500 fi
501 echo >conf$$.file
502 if ln -s conf$$.file conf$$ 2>/dev/null; then
503   as_ln_s='ln -s'
504   # ... but there are two gotchas:
505   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
506   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
507   # In both cases, we have to default to `cp -p'.
508   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
509     as_ln_s='cp -p'
510 elif ln conf$$.file conf$$ 2>/dev/null; then
511   as_ln_s=ln
512 else
513   as_ln_s='cp -p'
514 fi
515 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
516 rmdir conf$$.dir 2>/dev/null
517
518 if mkdir -p . 2>/dev/null; then
519   as_mkdir_p=:
520 else
521   test -d ./-p && rmdir ./-p
522   as_mkdir_p=false
523 fi
524
525 if test -x / >/dev/null 2>&1; then
526   as_test_x='test -x'
527 else
528   if ls -dL / >/dev/null 2>&1; then
529     as_ls_L_option=L
530   else
531     as_ls_L_option=
532   fi
533   as_test_x='
534     eval sh -c '\''
535       if test -d "$1"; then
536         test -d "$1/.";
537       else
538         case $1 in
539         -*)set "./$1";;
540         esac;
541         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
542         ???[sx]*):;;*)false;;esac;fi
543     '\'' sh
544   '
545 fi
546 as_executable_p=$as_test_x
547
548 # Sed expression to map a string onto a valid CPP name.
549 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
550
551 # Sed expression to map a string onto a valid variable name.
552 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
553
554
555
556 exec 7<&0 </dev/null 6>&1
557
558 # Name of the host.
559 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
560 # so uname gets run too.
561 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
562
563 #
564 # Initializations.
565 #
566 ac_default_prefix=/usr/local
567 ac_clean_files=
568 ac_config_libobj_dir=.
569 LIBOBJS=
570 cross_compiling=no
571 subdirs=
572 MFLAGS=
573 MAKEFLAGS=
574 SHELL=${CONFIG_SHELL-/bin/sh}
575
576 # Identity of this package.
577 PACKAGE_NAME='PostgreSQL'
578 PACKAGE_TARNAME='postgresql'
579 PACKAGE_VERSION='8.4devel'
580 PACKAGE_STRING='PostgreSQL 8.4devel'
581 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
582
583 ac_unique_file="src/backend/access/common/heaptuple.c"
584 ac_default_prefix=/usr/local/pgsql
585 # Factoring default headers for most tests.
586 ac_includes_default="\
587 #include <stdio.h>
588 #ifdef HAVE_SYS_TYPES_H
589 # include <sys/types.h>
590 #endif
591 #ifdef HAVE_SYS_STAT_H
592 # include <sys/stat.h>
593 #endif
594 #ifdef STDC_HEADERS
595 # include <stdlib.h>
596 # include <stddef.h>
597 #else
598 # ifdef HAVE_STDLIB_H
599 #  include <stdlib.h>
600 # endif
601 #endif
602 #ifdef HAVE_STRING_H
603 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
604 #  include <memory.h>
605 # endif
606 # include <string.h>
607 #endif
608 #ifdef HAVE_STRINGS_H
609 # include <strings.h>
610 #endif
611 #ifdef HAVE_INTTYPES_H
612 # include <inttypes.h>
613 #endif
614 #ifdef HAVE_STDINT_H
615 # include <stdint.h>
616 #endif
617 #ifdef HAVE_UNISTD_H
618 # include <unistd.h>
619 #endif"
620
621 ac_subst_vars='SHELL
622 PATH_SEPARATOR
623 PACKAGE_NAME
624 PACKAGE_TARNAME
625 PACKAGE_VERSION
626 PACKAGE_STRING
627 PACKAGE_BUGREPORT
628 exec_prefix
629 prefix
630 program_transform_name
631 bindir
632 sbindir
633 libexecdir
634 datarootdir
635 datadir
636 sysconfdir
637 sharedstatedir
638 localstatedir
639 includedir
640 oldincludedir
641 docdir
642 infodir
643 htmldir
644 dvidir
645 pdfdir
646 psdir
647 libdir
648 localedir
649 mandir
650 DEFS
651 ECHO_C
652 ECHO_N
653 ECHO_T
654 LIBS
655 build_alias
656 host_alias
657 target_alias
658 configure_args
659 build
660 build_cpu
661 build_vendor
662 build_os
663 host
664 host_cpu
665 host_vendor
666 host_os
667 PORTNAME
668 enable_nls
669 WANTED_LANGUAGES
670 default_port
671 enable_shared
672 enable_rpath
673 enable_debug
674 enable_profiling
675 DTRACE
676 DTRACEFLAGS
677 enable_dtrace
678 CC
679 CFLAGS
680 LDFLAGS
681 CPPFLAGS
682 ac_ct_CC
683 EXEEXT
684 OBJEXT
685 CPP
686 GCC
687 TAS
688 autodepend
689 INCLUDES
690 enable_thread_safety
691 with_tcl
692 with_perl
693 with_python
694 with_gssapi
695 with_krb5
696 krb_srvtab
697 with_pam
698 with_ldap
699 with_bonjour
700 with_openssl
701 with_ossp_uuid
702 XML2_CONFIG
703 with_libxml
704 with_libxslt
705 with_system_tzdata
706 with_zlib
707 GREP
708 EGREP
709 ELF_SYS
710 LDFLAGS_SL
711 LD
712 with_gnu_ld
713 ld_R_works
714 RANLIB
715 STRIP
716 STRIP_STATIC_LIB
717 STRIP_SHARED_LIB
718 TAR
719 LN_S
720 AWK
721 YACC
722 YFLAGS
723 FLEX
724 FLEXFLAGS
725 PERL
726 perl_archlibexp
727 perl_privlibexp
728 perl_useshrplib
729 perl_embed_ldflags
730 PYTHON
731 python_version
732 python_configdir
733 python_includespec
734 python_libdir
735 python_libspec
736 python_additional_libs
737 OSSP_UUID_LIBS
738 HAVE_IPV6
739 LIBOBJS
740 acx_pthread_config
741 PTHREAD_CC
742 PTHREAD_LIBS
743 PTHREAD_CFLAGS
744 LDAP_LIBS_FE
745 LDAP_LIBS_BE
746 HAVE_POSIX_SIGNALS
747 MSGFMT
748 MSGMERGE
749 XGETTEXT
750 TCLSH
751 TCL_CONFIG_SH
752 TCL_INCLUDE_SPEC
753 TCL_LIB_FILE
754 TCL_LIBS
755 TCL_LIB_SPEC
756 TCL_SHARED_BUILD
757 TCL_SHLIB_LD_LIBS
758 NSGMLS
759 JADE
760 have_docbook
761 DOCBOOKSTYLE
762 COLLATEINDEX
763 SGMLSPL
764 vpath_build
765 LTLIBOBJS'
766 ac_subst_files=''
767       ac_precious_vars='build_alias
768 host_alias
769 target_alias
770 CC
771 CFLAGS
772 LDFLAGS
773 LIBS
774 CPPFLAGS
775 CPP
776 LDFLAGS_SL
777 DOCBOOKSTYLE'
778
779
780 # Initialize some variables set by options.
781 ac_init_help=
782 ac_init_version=false
783 # The variables have the same names as the options, with
784 # dashes changed to underlines.
785 cache_file=/dev/null
786 exec_prefix=NONE
787 no_create=
788 no_recursion=
789 prefix=NONE
790 program_prefix=NONE
791 program_suffix=NONE
792 program_transform_name=s,x,x,
793 silent=
794 site=
795 srcdir=
796 verbose=
797 x_includes=NONE
798 x_libraries=NONE
799
800 # Installation directory options.
801 # These are left unexpanded so users can "make install exec_prefix=/foo"
802 # and all the variables that are supposed to be based on exec_prefix
803 # by default will actually change.
804 # Use braces instead of parens because sh, perl, etc. also accept them.
805 # (The list follows the same order as the GNU Coding Standards.)
806 bindir='${exec_prefix}/bin'
807 sbindir='${exec_prefix}/sbin'
808 libexecdir='${exec_prefix}/libexec'
809 datarootdir='${prefix}/share'
810 datadir='${datarootdir}'
811 sysconfdir='${prefix}/etc'
812 sharedstatedir='${prefix}/com'
813 localstatedir='${prefix}/var'
814 includedir='${prefix}/include'
815 oldincludedir='/usr/include'
816 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
817 infodir='${datarootdir}/info'
818 htmldir='${docdir}'
819 dvidir='${docdir}'
820 pdfdir='${docdir}'
821 psdir='${docdir}'
822 libdir='${exec_prefix}/lib'
823 localedir='${datarootdir}/locale'
824 mandir='${datarootdir}/man'
825
826 ac_prev=
827 ac_dashdash=
828 for ac_option
829 do
830   # If the previous option needs an argument, assign it.
831   if test -n "$ac_prev"; then
832     eval $ac_prev=\$ac_option
833     ac_prev=
834     continue
835   fi
836
837   case $ac_option in
838   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
839   *)    ac_optarg=yes ;;
840   esac
841
842   # Accept the important Cygnus configure options, so we can diagnose typos.
843
844   case $ac_dashdash$ac_option in
845   --)
846     ac_dashdash=yes ;;
847
848   -bindir | --bindir | --bindi | --bind | --bin | --bi)
849     ac_prev=bindir ;;
850   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
851     bindir=$ac_optarg ;;
852
853   -build | --build | --buil | --bui | --bu)
854     ac_prev=build_alias ;;
855   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
856     build_alias=$ac_optarg ;;
857
858   -cache-file | --cache-file | --cache-fil | --cache-fi \
859   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
860     ac_prev=cache_file ;;
861   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
862   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
863     cache_file=$ac_optarg ;;
864
865   --config-cache | -C)
866     cache_file=config.cache ;;
867
868   -datadir | --datadir | --datadi | --datad)
869     ac_prev=datadir ;;
870   -datadir=* | --datadir=* | --datadi=* | --datad=*)
871     datadir=$ac_optarg ;;
872
873   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
874   | --dataroo | --dataro | --datar)
875     ac_prev=datarootdir ;;
876   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
877   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
878     datarootdir=$ac_optarg ;;
879
880   -disable-* | --disable-*)
881     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
882     # Reject names that are not valid shell variable names.
883     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
884       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
885    { (exit 1); exit 1; }; }
886     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
887     eval enable_$ac_feature=no ;;
888
889   -docdir | --docdir | --docdi | --doc | --do)
890     ac_prev=docdir ;;
891   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
892     docdir=$ac_optarg ;;
893
894   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
895     ac_prev=dvidir ;;
896   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
897     dvidir=$ac_optarg ;;
898
899   -enable-* | --enable-*)
900     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
901     # Reject names that are not valid shell variable names.
902     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
903       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
904    { (exit 1); exit 1; }; }
905     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
906     eval enable_$ac_feature=\$ac_optarg ;;
907
908   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
909   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
910   | --exec | --exe | --ex)
911     ac_prev=exec_prefix ;;
912   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
913   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
914   | --exec=* | --exe=* | --ex=*)
915     exec_prefix=$ac_optarg ;;
916
917   -gas | --gas | --ga | --g)
918     # Obsolete; use --with-gas.
919     with_gas=yes ;;
920
921   -help | --help | --hel | --he | -h)
922     ac_init_help=long ;;
923   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
924     ac_init_help=recursive ;;
925   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
926     ac_init_help=short ;;
927
928   -host | --host | --hos | --ho)
929     ac_prev=host_alias ;;
930   -host=* | --host=* | --hos=* | --ho=*)
931     host_alias=$ac_optarg ;;
932
933   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
934     ac_prev=htmldir ;;
935   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
936   | --ht=*)
937     htmldir=$ac_optarg ;;
938
939   -includedir | --includedir | --includedi | --included | --include \
940   | --includ | --inclu | --incl | --inc)
941     ac_prev=includedir ;;
942   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
943   | --includ=* | --inclu=* | --incl=* | --inc=*)
944     includedir=$ac_optarg ;;
945
946   -infodir | --infodir | --infodi | --infod | --info | --inf)
947     ac_prev=infodir ;;
948   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
949     infodir=$ac_optarg ;;
950
951   -libdir | --libdir | --libdi | --libd)
952     ac_prev=libdir ;;
953   -libdir=* | --libdir=* | --libdi=* | --libd=*)
954     libdir=$ac_optarg ;;
955
956   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
957   | --libexe | --libex | --libe)
958     ac_prev=libexecdir ;;
959   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
960   | --libexe=* | --libex=* | --libe=*)
961     libexecdir=$ac_optarg ;;
962
963   -localedir | --localedir | --localedi | --localed | --locale)
964     ac_prev=localedir ;;
965   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
966     localedir=$ac_optarg ;;
967
968   -localstatedir | --localstatedir | --localstatedi | --localstated \
969   | --localstate | --localstat | --localsta | --localst | --locals)
970     ac_prev=localstatedir ;;
971   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
972   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
973     localstatedir=$ac_optarg ;;
974
975   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
976     ac_prev=mandir ;;
977   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
978     mandir=$ac_optarg ;;
979
980   -nfp | --nfp | --nf)
981     # Obsolete; use --without-fp.
982     with_fp=no ;;
983
984   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
985   | --no-cr | --no-c | -n)
986     no_create=yes ;;
987
988   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
989   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
990     no_recursion=yes ;;
991
992   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
993   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
994   | --oldin | --oldi | --old | --ol | --o)
995     ac_prev=oldincludedir ;;
996   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
997   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
998   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
999     oldincludedir=$ac_optarg ;;
1000
1001   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1002     ac_prev=prefix ;;
1003   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1004     prefix=$ac_optarg ;;
1005
1006   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1007   | --program-pre | --program-pr | --program-p)
1008     ac_prev=program_prefix ;;
1009   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1010   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1011     program_prefix=$ac_optarg ;;
1012
1013   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1014   | --program-suf | --program-su | --program-s)
1015     ac_prev=program_suffix ;;
1016   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1017   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1018     program_suffix=$ac_optarg ;;
1019
1020   -program-transform-name | --program-transform-name \
1021   | --program-transform-nam | --program-transform-na \
1022   | --program-transform-n | --program-transform- \
1023   | --program-transform | --program-transfor \
1024   | --program-transfo | --program-transf \
1025   | --program-trans | --program-tran \
1026   | --progr-tra | --program-tr | --program-t)
1027     ac_prev=program_transform_name ;;
1028   -program-transform-name=* | --program-transform-name=* \
1029   | --program-transform-nam=* | --program-transform-na=* \
1030   | --program-transform-n=* | --program-transform-=* \
1031   | --program-transform=* | --program-transfor=* \
1032   | --program-transfo=* | --program-transf=* \
1033   | --program-trans=* | --program-tran=* \
1034   | --progr-tra=* | --program-tr=* | --program-t=*)
1035     program_transform_name=$ac_optarg ;;
1036
1037   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1038     ac_prev=pdfdir ;;
1039   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1040     pdfdir=$ac_optarg ;;
1041
1042   -psdir | --psdir | --psdi | --psd | --ps)
1043     ac_prev=psdir ;;
1044   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1045     psdir=$ac_optarg ;;
1046
1047   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1048   | -silent | --silent | --silen | --sile | --sil)
1049     silent=yes ;;
1050
1051   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1052     ac_prev=sbindir ;;
1053   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1054   | --sbi=* | --sb=*)
1055     sbindir=$ac_optarg ;;
1056
1057   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1058   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1059   | --sharedst | --shareds | --shared | --share | --shar \
1060   | --sha | --sh)
1061     ac_prev=sharedstatedir ;;
1062   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1063   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1064   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1065   | --sha=* | --sh=*)
1066     sharedstatedir=$ac_optarg ;;
1067
1068   -site | --site | --sit)
1069     ac_prev=site ;;
1070   -site=* | --site=* | --sit=*)
1071     site=$ac_optarg ;;
1072
1073   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1074     ac_prev=srcdir ;;
1075   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1076     srcdir=$ac_optarg ;;
1077
1078   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1079   | --syscon | --sysco | --sysc | --sys | --sy)
1080     ac_prev=sysconfdir ;;
1081   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1082   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1083     sysconfdir=$ac_optarg ;;
1084
1085   -target | --target | --targe | --targ | --tar | --ta | --t)
1086     ac_prev=target_alias ;;
1087   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1088     target_alias=$ac_optarg ;;
1089
1090   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1091     verbose=yes ;;
1092
1093   -version | --version | --versio | --versi | --vers | -V)
1094     ac_init_version=: ;;
1095
1096   -with-* | --with-*)
1097     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1098     # Reject names that are not valid shell variable names.
1099     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1100       { echo "$as_me: error: invalid package name: $ac_package" >&2
1101    { (exit 1); exit 1; }; }
1102     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1103     eval with_$ac_package=\$ac_optarg ;;
1104
1105   -without-* | --without-*)
1106     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1107     # Reject names that are not valid shell variable names.
1108     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1109       { echo "$as_me: error: invalid package name: $ac_package" >&2
1110    { (exit 1); exit 1; }; }
1111     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1112     eval with_$ac_package=no ;;
1113
1114   --x)
1115     # Obsolete; use --with-x.
1116     with_x=yes ;;
1117
1118   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1119   | --x-incl | --x-inc | --x-in | --x-i)
1120     ac_prev=x_includes ;;
1121   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1122   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1123     x_includes=$ac_optarg ;;
1124
1125   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1126   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1127     ac_prev=x_libraries ;;
1128   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1129   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1130     x_libraries=$ac_optarg ;;
1131
1132   -*) { echo "$as_me: error: unrecognized option: $ac_option
1133 Try \`$0 --help' for more information." >&2
1134    { (exit 1); exit 1; }; }
1135     ;;
1136
1137   *=*)
1138     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1139     # Reject names that are not valid shell variable names.
1140     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1141       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1142    { (exit 1); exit 1; }; }
1143     eval $ac_envvar=\$ac_optarg
1144     export $ac_envvar ;;
1145
1146   *)
1147     # FIXME: should be removed in autoconf 3.0.
1148     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1149     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1150       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1151     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1152     ;;
1153
1154   esac
1155 done
1156
1157 if test -n "$ac_prev"; then
1158   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1159   { echo "$as_me: error: missing argument to $ac_option" >&2
1160    { (exit 1); exit 1; }; }
1161 fi
1162
1163 # Be sure to have absolute directory names.
1164 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1165                 datadir sysconfdir sharedstatedir localstatedir includedir \
1166                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1167                 libdir localedir mandir
1168 do
1169   eval ac_val=\$$ac_var
1170   case $ac_val in
1171     [\\/$]* | ?:[\\/]* )  continue;;
1172     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1173   esac
1174   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1175    { (exit 1); exit 1; }; }
1176 done
1177
1178 # There might be people who depend on the old broken behavior: `$host'
1179 # used to hold the argument of --host etc.
1180 # FIXME: To remove some day.
1181 build=$build_alias
1182 host=$host_alias
1183 target=$target_alias
1184
1185 # FIXME: To remove some day.
1186 if test "x$host_alias" != x; then
1187   if test "x$build_alias" = x; then
1188     cross_compiling=maybe
1189     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1190     If a cross compiler is detected then cross compile mode will be used." >&2
1191   elif test "x$build_alias" != "x$host_alias"; then
1192     cross_compiling=yes
1193   fi
1194 fi
1195
1196 ac_tool_prefix=
1197 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1198
1199 test "$silent" = yes && exec 6>/dev/null
1200
1201
1202 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1203 ac_ls_di=`ls -di .` &&
1204 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1205   { echo "$as_me: error: Working directory cannot be determined" >&2
1206    { (exit 1); exit 1; }; }
1207 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1208   { echo "$as_me: error: pwd does not report name of working directory" >&2
1209    { (exit 1); exit 1; }; }
1210
1211
1212 # Find the source files, if location was not specified.
1213 if test -z "$srcdir"; then
1214   ac_srcdir_defaulted=yes
1215   # Try the directory containing this script, then the parent directory.
1216   ac_confdir=`$as_dirname -- "$0" ||
1217 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1218          X"$0" : 'X\(//\)[^/]' \| \
1219          X"$0" : 'X\(//\)$' \| \
1220          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1221 echo X"$0" |
1222     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1223             s//\1/
1224             q
1225           }
1226           /^X\(\/\/\)[^/].*/{
1227             s//\1/
1228             q
1229           }
1230           /^X\(\/\/\)$/{
1231             s//\1/
1232             q
1233           }
1234           /^X\(\/\).*/{
1235             s//\1/
1236             q
1237           }
1238           s/.*/./; q'`
1239   srcdir=$ac_confdir
1240   if test ! -r "$srcdir/$ac_unique_file"; then
1241     srcdir=..
1242   fi
1243 else
1244   ac_srcdir_defaulted=no
1245 fi
1246 if test ! -r "$srcdir/$ac_unique_file"; then
1247   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1248   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1249    { (exit 1); exit 1; }; }
1250 fi
1251 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1252 ac_abs_confdir=`(
1253         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1254    { (exit 1); exit 1; }; }
1255         pwd)`
1256 # When building in place, set srcdir=.
1257 if test "$ac_abs_confdir" = "$ac_pwd"; then
1258   srcdir=.
1259 fi
1260 # Remove unnecessary trailing slashes from srcdir.
1261 # Double slashes in file names in object file debugging info
1262 # mess up M-x gdb in Emacs.
1263 case $srcdir in
1264 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1265 esac
1266 for ac_var in $ac_precious_vars; do
1267   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1268   eval ac_env_${ac_var}_value=\$${ac_var}
1269   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1270   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1271 done
1272
1273 #
1274 # Report the --help message.
1275 #
1276 if test "$ac_init_help" = "long"; then
1277   # Omit some internal or obsolete options to make the list less imposing.
1278   # This message is too long to be a string in the A/UX 3.1 sh.
1279   cat <<_ACEOF
1280 \`configure' configures PostgreSQL 8.4devel to adapt to many kinds of systems.
1281
1282 Usage: $0 [OPTION]... [VAR=VALUE]...
1283
1284 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1285 VAR=VALUE.  See below for descriptions of some of the useful variables.
1286
1287 Defaults for the options are specified in brackets.
1288
1289 Configuration:
1290   -h, --help              display this help and exit
1291       --help=short        display options specific to this package
1292       --help=recursive    display the short help of all the included packages
1293   -V, --version           display version information and exit
1294   -q, --quiet, --silent   do not print \`checking...' messages
1295       --cache-file=FILE   cache test results in FILE [disabled]
1296   -C, --config-cache      alias for \`--cache-file=config.cache'
1297   -n, --no-create         do not create output files
1298       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1299
1300 Installation directories:
1301   --prefix=PREFIX         install architecture-independent files in PREFIX
1302                           [$ac_default_prefix]
1303   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1304                           [PREFIX]
1305
1306 By default, \`make install' will install all the files in
1307 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1308 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1309 for instance \`--prefix=\$HOME'.
1310
1311 For better control, use the options below.
1312
1313 Fine tuning of the installation directories:
1314   --bindir=DIR           user executables [EPREFIX/bin]
1315   --sbindir=DIR          system admin executables [EPREFIX/sbin]
1316   --libexecdir=DIR       program executables [EPREFIX/libexec]
1317   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1318   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1319   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1320   --libdir=DIR           object code libraries [EPREFIX/lib]
1321   --includedir=DIR       C header files [PREFIX/include]
1322   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1323   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1324   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1325   --infodir=DIR          info documentation [DATAROOTDIR/info]
1326   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1327   --mandir=DIR           man documentation [DATAROOTDIR/man]
1328   --docdir=DIR           documentation root [DATAROOTDIR/doc/postgresql]
1329   --htmldir=DIR          html documentation [DOCDIR]
1330   --dvidir=DIR           dvi documentation [DOCDIR]
1331   --pdfdir=DIR           pdf documentation [DOCDIR]
1332   --psdir=DIR            ps documentation [DOCDIR]
1333 _ACEOF
1334
1335   cat <<\_ACEOF
1336
1337 System types:
1338   --build=BUILD     configure for building on BUILD [guessed]
1339   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1340 _ACEOF
1341 fi
1342
1343 if test -n "$ac_init_help"; then
1344   case $ac_init_help in
1345      short | recursive ) echo "Configuration of PostgreSQL 8.4devel:";;
1346    esac
1347   cat <<\_ACEOF
1348
1349 Optional Features:
1350   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1351   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1352   --disable-integer-datetimes  disable 64-bit integer date/time support
1353   --enable-nls[=LANGUAGES]  enable Native Language Support
1354   --disable-shared        do not build shared libraries
1355   --disable-rpath         do not embed shared library search path in executables
1356   --disable-spinlocks     do not use spinlocks
1357   --enable-debug          build with debugging symbols (-g)
1358   --enable-profiling      build with profiling enabled
1359   --enable-dtrace         build with DTrace support
1360   --disable-segmented-files disable data file segmentation (requires largefile support)
1361   --enable-depend         turn on automatic dependency tracking
1362   --enable-cassert        enable assertion checks (for debugging)
1363   --enable-thread-safety  make client libraries thread-safe
1364   --enable-thread-safety-force  force thread-safety despite thread test failure
1365   --disable-largefile     omit support for large files
1366
1367 Optional Packages:
1368   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1369   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1370
1371   --with-includes=DIRS    look for additional header files in DIRS
1372   --with-libraries=DIRS   look for additional libraries in DIRS
1373   --with-libs=DIRS        alternative spelling of --with-libraries
1374   --with-pgport=PORTNUM   change default port number [5432]
1375   --with-tcl              build Tcl modules (PL/Tcl)
1376   --with-tclconfig=DIR    tclConfig.sh is in DIR
1377   --with-perl             build Perl modules (PL/Perl)
1378   --with-python           build Python modules (PL/Python)
1379   --with-gssapi           build with GSSAPI support
1380   --with-krb5             build with Kerberos 5 support
1381   --with-krb-srvnam=NAME  default service principal name in Kerberos [postgres]
1382   --with-pam              build with PAM support
1383   --with-ldap             build with LDAP support
1384   --with-bonjour          build with Bonjour support
1385   --with-openssl          build with OpenSSL support
1386   --without-readline      do not use GNU Readline nor BSD Libedit for editing
1387   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
1388   --with-ossp-uuid        use OSSP UUID library when building contrib/uuid-ossp
1389   --with-libxml           build with XML support
1390   --with-libxslt          use XSLT support when building contrib/xml2
1391   --with-system-tzdata=DIR  use system time zone data in DIR
1392   --without-zlib          do not use Zlib
1393   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1394
1395 Some influential environment variables:
1396   CC          C compiler command
1397   CFLAGS      C compiler flags
1398   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1399               nonstandard directory <lib dir>
1400   LIBS        libraries to pass to the linker, e.g. -l<library>
1401   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1402               you have headers in a nonstandard directory <include dir>
1403   CPP         C preprocessor
1404   LDFLAGS_SL
1405   DOCBOOKSTYLE
1406               location of DocBook stylesheets
1407
1408 Use these variables to override the choices made by `configure' or to help
1409 it to find libraries and programs with nonstandard names/locations.
1410
1411 Report bugs to <pgsql-bugs@postgresql.org>.
1412 _ACEOF
1413 ac_status=$?
1414 fi
1415
1416 if test "$ac_init_help" = "recursive"; then
1417   # If there are subdirs, report their specific --help.
1418   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1419     test -d "$ac_dir" || continue
1420     ac_builddir=.
1421
1422 case "$ac_dir" in
1423 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1424 *)
1425   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1426   # A ".." for each directory in $ac_dir_suffix.
1427   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1428   case $ac_top_builddir_sub in
1429   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1430   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1431   esac ;;
1432 esac
1433 ac_abs_top_builddir=$ac_pwd
1434 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1435 # for backward compatibility:
1436 ac_top_builddir=$ac_top_build_prefix
1437
1438 case $srcdir in
1439   .)  # We are building in place.
1440     ac_srcdir=.
1441     ac_top_srcdir=$ac_top_builddir_sub
1442     ac_abs_top_srcdir=$ac_pwd ;;
1443   [\\/]* | ?:[\\/]* )  # Absolute name.
1444     ac_srcdir=$srcdir$ac_dir_suffix;
1445     ac_top_srcdir=$srcdir
1446     ac_abs_top_srcdir=$srcdir ;;
1447   *) # Relative name.
1448     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1449     ac_top_srcdir=$ac_top_build_prefix$srcdir
1450     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1451 esac
1452 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1453
1454     cd "$ac_dir" || { ac_status=$?; continue; }
1455     # Check for guested configure.
1456     if test -f "$ac_srcdir/configure.gnu"; then
1457       echo &&
1458       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1459     elif test -f "$ac_srcdir/configure"; then
1460       echo &&
1461       $SHELL "$ac_srcdir/configure" --help=recursive
1462     else
1463       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1464     fi || ac_status=$?
1465     cd "$ac_pwd" || { ac_status=$?; break; }
1466   done
1467 fi
1468
1469 test -n "$ac_init_help" && exit $ac_status
1470 if $ac_init_version; then
1471   cat <<\_ACEOF
1472 PostgreSQL configure 8.4devel
1473 generated by GNU Autoconf 2.61
1474
1475 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1476 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1477 This configure script is free software; the Free Software Foundation
1478 gives unlimited permission to copy, distribute and modify it.
1479
1480 Copyright (c) 1996-2008, PostgreSQL Global Development Group
1481 _ACEOF
1482   exit
1483 fi
1484 cat >config.log <<_ACEOF
1485 This file contains any messages produced by compilers while
1486 running configure, to aid debugging if configure makes a mistake.
1487
1488 It was created by PostgreSQL $as_me 8.4devel, which was
1489 generated by GNU Autoconf 2.61.  Invocation command line was
1490
1491   $ $0 $@
1492
1493 _ACEOF
1494 exec 5>>config.log
1495 {
1496 cat <<_ASUNAME
1497 ## --------- ##
1498 ## Platform. ##
1499 ## --------- ##
1500
1501 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1502 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1503 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1504 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1505 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1506
1507 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1508 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1509
1510 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1511 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1512 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1513 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1514 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1515 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1516 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1517
1518 _ASUNAME
1519
1520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1521 for as_dir in $PATH
1522 do
1523   IFS=$as_save_IFS
1524   test -z "$as_dir" && as_dir=.
1525   echo "PATH: $as_dir"
1526 done
1527 IFS=$as_save_IFS
1528
1529 } >&5
1530
1531 cat >&5 <<_ACEOF
1532
1533
1534 ## ----------- ##
1535 ## Core tests. ##
1536 ## ----------- ##
1537
1538 _ACEOF
1539
1540
1541 # Keep a trace of the command line.
1542 # Strip out --no-create and --no-recursion so they do not pile up.
1543 # Strip out --silent because we don't want to record it for future runs.
1544 # Also quote any args containing shell meta-characters.
1545 # Make two passes to allow for proper duplicate-argument suppression.
1546 ac_configure_args=
1547 ac_configure_args0=
1548 ac_configure_args1=
1549 ac_must_keep_next=false
1550 for ac_pass in 1 2
1551 do
1552   for ac_arg
1553   do
1554     case $ac_arg in
1555     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1556     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1557     | -silent | --silent | --silen | --sile | --sil)
1558       continue ;;
1559     *\'*)
1560       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1561     esac
1562     case $ac_pass in
1563     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1564     2)
1565       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1566       if test $ac_must_keep_next = true; then
1567         ac_must_keep_next=false # Got value, back to normal.
1568       else
1569         case $ac_arg in
1570           *=* | --config-cache | -C | -disable-* | --disable-* \
1571           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1572           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1573           | -with-* | --with-* | -without-* | --without-* | --x)
1574             case "$ac_configure_args0 " in
1575               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1576             esac
1577             ;;
1578           -* ) ac_must_keep_next=true ;;
1579         esac
1580       fi
1581       ac_configure_args="$ac_configure_args '$ac_arg'"
1582       ;;
1583     esac
1584   done
1585 done
1586 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1587 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1588
1589 # When interrupted or exit'd, cleanup temporary files, and complete
1590 # config.log.  We remove comments because anyway the quotes in there
1591 # would cause problems or look ugly.
1592 # WARNING: Use '\'' to represent an apostrophe within the trap.
1593 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1594 trap 'exit_status=$?
1595   # Save into config.log some information that might help in debugging.
1596   {
1597     echo
1598
1599     cat <<\_ASBOX
1600 ## ---------------- ##
1601 ## Cache variables. ##
1602 ## ---------------- ##
1603 _ASBOX
1604     echo
1605     # The following way of writing the cache mishandles newlines in values,
1606 (
1607   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1608     eval ac_val=\$$ac_var
1609     case $ac_val in #(
1610     *${as_nl}*)
1611       case $ac_var in #(
1612       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1613 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1614       esac
1615       case $ac_var in #(
1616       _ | IFS | as_nl) ;; #(
1617       *) $as_unset $ac_var ;;
1618       esac ;;
1619     esac
1620   done
1621   (set) 2>&1 |
1622     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1623     *${as_nl}ac_space=\ *)
1624       sed -n \
1625         "s/'\''/'\''\\\\'\'''\''/g;
1626           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1627       ;; #(
1628     *)
1629       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1630       ;;
1631     esac |
1632     sort
1633 )
1634     echo
1635
1636     cat <<\_ASBOX
1637 ## ----------------- ##
1638 ## Output variables. ##
1639 ## ----------------- ##
1640 _ASBOX
1641     echo
1642     for ac_var in $ac_subst_vars
1643     do
1644       eval ac_val=\$$ac_var
1645       case $ac_val in
1646       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1647       esac
1648       echo "$ac_var='\''$ac_val'\''"
1649     done | sort
1650     echo
1651
1652     if test -n "$ac_subst_files"; then
1653       cat <<\_ASBOX
1654 ## ------------------- ##
1655 ## File substitutions. ##
1656 ## ------------------- ##
1657 _ASBOX
1658       echo
1659       for ac_var in $ac_subst_files
1660       do
1661         eval ac_val=\$$ac_var
1662         case $ac_val in
1663         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1664         esac
1665         echo "$ac_var='\''$ac_val'\''"
1666       done | sort
1667       echo
1668     fi
1669
1670     if test -s confdefs.h; then
1671       cat <<\_ASBOX
1672 ## ----------- ##
1673 ## confdefs.h. ##
1674 ## ----------- ##
1675 _ASBOX
1676       echo
1677       cat confdefs.h
1678       echo
1679     fi
1680     test "$ac_signal" != 0 &&
1681       echo "$as_me: caught signal $ac_signal"
1682     echo "$as_me: exit $exit_status"
1683   } >&5
1684   rm -f core *.core core.conftest.* &&
1685     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1686     exit $exit_status
1687 ' 0
1688 for ac_signal in 1 2 13 15; do
1689   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1690 done
1691 ac_signal=0
1692
1693 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1694 rm -f -r conftest* confdefs.h
1695
1696 # Predefined preprocessor variables.
1697
1698 cat >>confdefs.h <<_ACEOF
1699 #define PACKAGE_NAME "$PACKAGE_NAME"
1700 _ACEOF
1701
1702
1703 cat >>confdefs.h <<_ACEOF
1704 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1705 _ACEOF
1706
1707
1708 cat >>confdefs.h <<_ACEOF
1709 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1710 _ACEOF
1711
1712
1713 cat >>confdefs.h <<_ACEOF
1714 #define PACKAGE_STRING "$PACKAGE_STRING"
1715 _ACEOF
1716
1717
1718 cat >>confdefs.h <<_ACEOF
1719 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1720 _ACEOF
1721
1722
1723 # Let the site file select an alternate cache file if it wants to.
1724 # Prefer explicitly selected file to automatically selected ones.
1725 if test -n "$CONFIG_SITE"; then
1726   set x "$CONFIG_SITE"
1727 elif test "x$prefix" != xNONE; then
1728   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1729 else
1730   set x "$ac_default_prefix/share/config.site" \
1731         "$ac_default_prefix/etc/config.site"
1732 fi
1733 shift
1734 for ac_site_file
1735 do
1736   if test -r "$ac_site_file"; then
1737     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1738 echo "$as_me: loading site script $ac_site_file" >&6;}
1739     sed 's/^/| /' "$ac_site_file" >&5
1740     . "$ac_site_file"
1741   fi
1742 done
1743
1744 if test -r "$cache_file"; then
1745   # Some versions of bash will fail to source /dev/null (special
1746   # files actually), so we avoid doing that.
1747   if test -f "$cache_file"; then
1748     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1749 echo "$as_me: loading cache $cache_file" >&6;}
1750     case $cache_file in
1751       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1752       *)                      . "./$cache_file";;
1753     esac
1754   fi
1755 else
1756   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1757 echo "$as_me: creating cache $cache_file" >&6;}
1758   >$cache_file
1759 fi
1760
1761 # Check that the precious variables saved in the cache have kept the same
1762 # value.
1763 ac_cache_corrupted=false
1764 for ac_var in $ac_precious_vars; do
1765   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1766   eval ac_new_set=\$ac_env_${ac_var}_set
1767   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1768   eval ac_new_val=\$ac_env_${ac_var}_value
1769   case $ac_old_set,$ac_new_set in
1770     set,)
1771       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1772 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1773       ac_cache_corrupted=: ;;
1774     ,set)
1775       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1776 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1777       ac_cache_corrupted=: ;;
1778     ,);;
1779     *)
1780       if test "x$ac_old_val" != "x$ac_new_val"; then
1781         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1782 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1783         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1784 echo "$as_me:   former value:  $ac_old_val" >&2;}
1785         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1786 echo "$as_me:   current value: $ac_new_val" >&2;}
1787         ac_cache_corrupted=:
1788       fi;;
1789   esac
1790   # Pass precious variables to config.status.
1791   if test "$ac_new_set" = set; then
1792     case $ac_new_val in
1793     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1794     *) ac_arg=$ac_var=$ac_new_val ;;
1795     esac
1796     case " $ac_configure_args " in
1797       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1798       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1799     esac
1800   fi
1801 done
1802 if $ac_cache_corrupted; then
1803   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1804 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1805   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1806 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1807    { (exit 1); exit 1; }; }
1808 fi
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834 ac_ext=c
1835 ac_cpp='$CPP $CPPFLAGS'
1836 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1837 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1838 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1839
1840
1841
1842
1843
1844
1845 ac_aux_dir=
1846 for ac_dir in config "$srcdir"/config; do
1847   if test -f "$ac_dir/install-sh"; then
1848     ac_aux_dir=$ac_dir
1849     ac_install_sh="$ac_aux_dir/install-sh -c"
1850     break
1851   elif test -f "$ac_dir/install.sh"; then
1852     ac_aux_dir=$ac_dir
1853     ac_install_sh="$ac_aux_dir/install.sh -c"
1854     break
1855   elif test -f "$ac_dir/shtool"; then
1856     ac_aux_dir=$ac_dir
1857     ac_install_sh="$ac_aux_dir/shtool install -c"
1858     break
1859   fi
1860 done
1861 if test -z "$ac_aux_dir"; then
1862   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
1863 echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
1864    { (exit 1); exit 1; }; }
1865 fi
1866
1867 # These three variables are undocumented and unsupported,
1868 # and are intended to be withdrawn in a future Autoconf release.
1869 # They can cause serious problems if a builder's source tree is in a directory
1870 # whose full name contains unusual characters.
1871 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1872 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1873 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1874
1875
1876
1877 configure_args=$ac_configure_args
1878
1879
1880
1881 cat >>confdefs.h <<_ACEOF
1882 #define PG_VERSION "$PACKAGE_VERSION"
1883 _ACEOF
1884
1885
1886 # Make sure we can run config.sub.
1887 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1888   { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
1889 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
1890    { (exit 1); exit 1; }; }
1891
1892 { echo "$as_me:$LINENO: checking build system type" >&5
1893 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
1894 if test "${ac_cv_build+set}" = set; then
1895   echo $ECHO_N "(cached) $ECHO_C" >&6
1896 else
1897   ac_build_alias=$build_alias
1898 test "x$ac_build_alias" = x &&
1899   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1900 test "x$ac_build_alias" = x &&
1901   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1902 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1903    { (exit 1); exit 1; }; }
1904 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1905   { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
1906 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
1907    { (exit 1); exit 1; }; }
1908
1909 fi
1910 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1911 echo "${ECHO_T}$ac_cv_build" >&6; }
1912 case $ac_cv_build in
1913 *-*-*) ;;
1914 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
1915 echo "$as_me: error: invalid value of canonical build" >&2;}
1916    { (exit 1); exit 1; }; };;
1917 esac
1918 build=$ac_cv_build
1919 ac_save_IFS=$IFS; IFS='-'
1920 set x $ac_cv_build
1921 shift
1922 build_cpu=$1
1923 build_vendor=$2
1924 shift; shift
1925 # Remember, the first character of IFS is used to create $*,
1926 # except with old shells:
1927 build_os=$*
1928 IFS=$ac_save_IFS
1929 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
1930
1931
1932 { echo "$as_me:$LINENO: checking host system type" >&5
1933 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
1934 if test "${ac_cv_host+set}" = set; then
1935   echo $ECHO_N "(cached) $ECHO_C" >&6
1936 else
1937   if test "x$host_alias" = x; then
1938   ac_cv_host=$ac_cv_build
1939 else
1940   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
1941     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
1942 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
1943    { (exit 1); exit 1; }; }
1944 fi
1945
1946 fi
1947 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1948 echo "${ECHO_T}$ac_cv_host" >&6; }
1949 case $ac_cv_host in
1950 *-*-*) ;;
1951 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
1952 echo "$as_me: error: invalid value of canonical host" >&2;}
1953    { (exit 1); exit 1; }; };;
1954 esac
1955 host=$ac_cv_host
1956 ac_save_IFS=$IFS; IFS='-'
1957 set x $ac_cv_host
1958 shift
1959 host_cpu=$1
1960 host_vendor=$2
1961 shift; shift
1962 # Remember, the first character of IFS is used to create $*,
1963 # except with old shells:
1964 host_os=$*
1965 IFS=$ac_save_IFS
1966 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
1967
1968
1969
1970 template=
1971 { echo "$as_me:$LINENO: checking which template to use" >&5
1972 echo $ECHO_N "checking which template to use... $ECHO_C" >&6; }
1973
1974
1975 pgac_args="$pgac_args with_template"
1976
1977
1978 # Check whether --with-template was given.
1979 if test "${with_template+set}" = set; then
1980   withval=$with_template;
1981   case $withval in
1982     yes)
1983       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1984 echo "$as_me: error: argument required for --with-template option" >&2;}
1985    { (exit 1); exit 1; }; }
1986       ;;
1987     no)
1988       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1989 echo "$as_me: error: argument required for --with-template option" >&2;}
1990    { (exit 1); exit 1; }; }
1991       ;;
1992     *)
1993
1994   case $withval in
1995     list)   echo; ls "$srcdir/src/template"; exit;;
1996     *)      if test -f "$srcdir/src/template/$with_template" ; then
1997               template=$withval
1998             else
1999               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
2000 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
2001    { (exit 1); exit 1; }; }
2002             fi;;
2003   esac
2004
2005       ;;
2006   esac
2007
2008 else
2009
2010 # --with-template not given
2011
2012 case $host_os in
2013      aix*) template=aix ;;
2014     bsdi*) template=bsdi ;;
2015   cygwin*) template=cygwin ;;
2016   darwin*) template=darwin ;;
2017     dgux*) template=dgux ;;
2018  freebsd*) template=freebsd ;;
2019     hpux*) template=hpux ;;
2020     irix*) template=irix ;;
2021  linux*|gnu*|k*bsd*-gnu)
2022            template=linux ;;
2023    mingw*) template=win32 ;;
2024   netbsd*) template=netbsd ;;
2025 nextstep*) template=nextstep ;;
2026  openbsd*) template=openbsd ;;
2027      osf*) template=osf ;;
2028      sco*) template=sco ;;
2029  solaris*) template=solaris ;;
2030    sunos*) template=sunos4 ;;
2031  sysv4.2*)
2032         case $host_vendor in
2033           univel) template=univel ;;
2034         esac ;;
2035    sysv4*) template=svr4 ;;
2036    sysv5*) template=unixware ;;
2037   ultrix*) template=ultrix4 ;;
2038 esac
2039
2040   if test x"$template" = x"" ; then
2041     { { echo "$as_me:$LINENO: error:
2042 *******************************************************************
2043 PostgreSQL has apparently not been ported to your platform yet.
2044 To try a manual configuration, look into the src/template directory
2045 for a similar platform and use the '--with-template=' option.
2046
2047 Please also contact <pgsql-ports@postgresql.org> to see about
2048 rectifying this.  Include the above 'checking host system type...'
2049 line.
2050 *******************************************************************
2051 " >&5
2052 echo "$as_me: error:
2053 *******************************************************************
2054 PostgreSQL has apparently not been ported to your platform yet.
2055 To try a manual configuration, look into the src/template directory
2056 for a similar platform and use the '--with-template=' option.
2057
2058 Please also contact <pgsql-ports@postgresql.org> to see about
2059 rectifying this.  Include the above 'checking host system type...'
2060 line.
2061 *******************************************************************
2062 " >&2;}
2063    { (exit 1); exit 1; }; }
2064   fi
2065
2066
2067 fi
2068
2069
2070
2071 { echo "$as_me:$LINENO: result: $template" >&5
2072 echo "${ECHO_T}$template" >&6; }
2073
2074 PORTNAME=$template
2075
2076
2077 # Initialize default assumption that we do not need separate assembly code
2078 # for TAS (test-and-set).  This can be overridden by the template file
2079 # when it's executed.
2080 need_tas=no
2081 tas_file=dummy.s
2082
2083
2084
2085 ##
2086 ## Command line options
2087 ##
2088
2089 #
2090 # Add non-standard directories to the include path
2091 #
2092
2093 pgac_args="$pgac_args with_includes"
2094
2095
2096 # Check whether --with-includes was given.
2097 if test "${with_includes+set}" = set; then
2098   withval=$with_includes;
2099   case $withval in
2100     yes)
2101       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2102 echo "$as_me: error: argument required for --with-includes option" >&2;}
2103    { (exit 1); exit 1; }; }
2104       ;;
2105     no)
2106       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
2107 echo "$as_me: error: argument required for --with-includes option" >&2;}
2108    { (exit 1); exit 1; }; }
2109       ;;
2110     *)
2111
2112       ;;
2113   esac
2114
2115 fi
2116
2117
2118
2119
2120 #
2121 # Add non-standard directories to the library search path
2122 #
2123
2124 pgac_args="$pgac_args with_libraries"
2125
2126
2127 # Check whether --with-libraries was given.
2128 if test "${with_libraries+set}" = set; then
2129   withval=$with_libraries;
2130   case $withval in
2131     yes)
2132       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2133 echo "$as_me: error: argument required for --with-libraries option" >&2;}
2134    { (exit 1); exit 1; }; }
2135       ;;
2136     no)
2137       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
2138 echo "$as_me: error: argument required for --with-libraries option" >&2;}
2139    { (exit 1); exit 1; }; }
2140       ;;
2141     *)
2142       LIBRARY_DIRS=$withval
2143       ;;
2144   esac
2145
2146 fi
2147
2148
2149
2150
2151 pgac_args="$pgac_args with_libs"
2152
2153
2154 # Check whether --with-libs was given.
2155 if test "${with_libs+set}" = set; then
2156   withval=$with_libs;
2157   case $withval in
2158     yes)
2159       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2160 echo "$as_me: error: argument required for --with-libs option" >&2;}
2161    { (exit 1); exit 1; }; }
2162       ;;
2163     no)
2164       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
2165 echo "$as_me: error: argument required for --with-libs option" >&2;}
2166    { (exit 1); exit 1; }; }
2167       ;;
2168     *)
2169       LIBRARY_DIRS=$withval
2170       ;;
2171   esac
2172
2173 fi
2174
2175
2176
2177
2178 #
2179 # 64-bit integer date/time storage: enabled by default.
2180 #
2181 { echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
2182 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6; }
2183
2184 pgac_args="$pgac_args enable_integer_datetimes"
2185
2186 # Check whether --enable-integer-datetimes was given.
2187 if test "${enable_integer_datetimes+set}" = set; then
2188   enableval=$enable_integer_datetimes;
2189   case $enableval in
2190     yes)
2191
2192 cat >>confdefs.h <<\_ACEOF
2193 #define USE_INTEGER_DATETIMES 1
2194 _ACEOF
2195
2196       ;;
2197     no)
2198       :
2199       ;;
2200     *)
2201       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
2202 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
2203    { (exit 1); exit 1; }; }
2204       ;;
2205   esac
2206
2207 else
2208   enable_integer_datetimes=yes
2209
2210 cat >>confdefs.h <<\_ACEOF
2211 #define USE_INTEGER_DATETIMES 1
2212 _ACEOF
2213
2214 fi
2215
2216
2217 { echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
2218 echo "${ECHO_T}$enable_integer_datetimes" >&6; }
2219
2220
2221 #
2222 # NLS
2223 #
2224 { echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
2225 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6; }
2226
2227 pgac_args="$pgac_args enable_nls"
2228
2229 # Check whether --enable-nls was given.
2230 if test "${enable_nls+set}" = set; then
2231   enableval=$enable_nls;
2232   case $enableval in
2233     yes)
2234       :
2235       ;;
2236     no)
2237       :
2238       ;;
2239     *)
2240       enable_nls=yes
2241 WANTED_LANGUAGES=$enableval
2242       ;;
2243   esac
2244
2245 else
2246   enable_nls=no
2247 fi
2248
2249
2250
2251 if test "$enable_nls" = yes; then
2252
2253 cat >>confdefs.h <<\_ACEOF
2254 #define ENABLE_NLS 1
2255 _ACEOF
2256
2257 fi
2258
2259 { echo "$as_me:$LINENO: result: $enable_nls" >&5
2260 echo "${ECHO_T}$enable_nls" >&6; }
2261
2262
2263
2264 #
2265 # Default port number (--with-pgport), default 5432
2266 #
2267 { echo "$as_me:$LINENO: checking for default port number" >&5
2268 echo $ECHO_N "checking for default port number... $ECHO_C" >&6; }
2269
2270 pgac_args="$pgac_args with_pgport"
2271
2272
2273 # Check whether --with-pgport was given.
2274 if test "${with_pgport+set}" = set; then
2275   withval=$with_pgport;
2276   case $withval in
2277     yes)
2278       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2279 echo "$as_me: error: argument required for --with-pgport option" >&2;}
2280    { (exit 1); exit 1; }; }
2281       ;;
2282     no)
2283       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
2284 echo "$as_me: error: argument required for --with-pgport option" >&2;}
2285    { (exit 1); exit 1; }; }
2286       ;;
2287     *)
2288       default_port=$withval
2289       ;;
2290   esac
2291
2292 else
2293   default_port=5432
2294 fi
2295
2296
2297 { echo "$as_me:$LINENO: result: $default_port" >&5
2298 echo "${ECHO_T}$default_port" >&6; }
2299 # Need both of these because some places want an integer and some a string
2300
2301 cat >>confdefs.h <<_ACEOF
2302 #define DEF_PGPORT ${default_port}
2303 _ACEOF
2304
2305
2306 cat >>confdefs.h <<_ACEOF
2307 #define DEF_PGPORT_STR "${default_port}"
2308 _ACEOF
2309
2310
2311
2312 #
2313 # Option to disable shared libraries
2314 #
2315
2316 pgac_args="$pgac_args enable_shared"
2317
2318 # Check whether --enable-shared was given.
2319 if test "${enable_shared+set}" = set; then
2320   enableval=$enable_shared;
2321   case $enableval in
2322     yes)
2323       :
2324       ;;
2325     no)
2326       :
2327       ;;
2328     *)
2329       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
2330 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
2331    { (exit 1); exit 1; }; }
2332       ;;
2333   esac
2334
2335 else
2336   enable_shared=yes
2337
2338 fi
2339
2340
2341
2342
2343 #
2344 # '-rpath'-like feature can be disabled
2345 #
2346
2347 pgac_args="$pgac_args enable_rpath"
2348
2349 # Check whether --enable-rpath was given.
2350 if test "${enable_rpath+set}" = set; then
2351   enableval=$enable_rpath;
2352   case $enableval in
2353     yes)
2354       :
2355       ;;
2356     no)
2357       :
2358       ;;
2359     *)
2360       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
2361 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
2362    { (exit 1); exit 1; }; }
2363       ;;
2364   esac
2365
2366 else
2367   enable_rpath=yes
2368
2369 fi
2370
2371
2372
2373
2374 #
2375 # Spinlocks
2376 #
2377
2378 pgac_args="$pgac_args enable_spinlocks"
2379
2380 # Check whether --enable-spinlocks was given.
2381 if test "${enable_spinlocks+set}" = set; then
2382   enableval=$enable_spinlocks;
2383   case $enableval in
2384     yes)
2385       :
2386       ;;
2387     no)
2388       :
2389       ;;
2390     *)
2391       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
2392 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
2393    { (exit 1); exit 1; }; }
2394       ;;
2395   esac
2396
2397 else
2398   enable_spinlocks=yes
2399
2400 fi
2401
2402
2403
2404 #
2405 # --enable-debug adds -g to compiler flags
2406 #
2407
2408 pgac_args="$pgac_args enable_debug"
2409
2410 # Check whether --enable-debug was given.
2411 if test "${enable_debug+set}" = set; then
2412   enableval=$enable_debug;
2413   case $enableval in
2414     yes)
2415       :
2416       ;;
2417     no)
2418       :
2419       ;;
2420     *)
2421       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
2422 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
2423    { (exit 1); exit 1; }; }
2424       ;;
2425   esac
2426
2427 else
2428   enable_debug=no
2429
2430 fi
2431
2432
2433
2434
2435 #
2436 # --enable-profiling enables gcc profiling
2437 #
2438
2439 pgac_args="$pgac_args enable_profiling"
2440
2441 # Check whether --enable-profiling was given.
2442 if test "${enable_profiling+set}" = set; then
2443   enableval=$enable_profiling;
2444   case $enableval in
2445     yes)
2446       :
2447       ;;
2448     no)
2449       :
2450       ;;
2451     *)
2452       { { echo "$as_me:$LINENO: error: no argument expected for --enable-profiling option" >&5
2453 echo "$as_me: error: no argument expected for --enable-profiling option" >&2;}
2454    { (exit 1); exit 1; }; }
2455       ;;
2456   esac
2457
2458 else
2459   enable_profiling=no
2460
2461 fi
2462
2463
2464
2465
2466 #
2467 # DTrace
2468 #
2469
2470 pgac_args="$pgac_args enable_dtrace"
2471
2472 # Check whether --enable-dtrace was given.
2473 if test "${enable_dtrace+set}" = set; then
2474   enableval=$enable_dtrace;
2475   case $enableval in
2476     yes)
2477
2478 cat >>confdefs.h <<\_ACEOF
2479 #define ENABLE_DTRACE 1
2480 _ACEOF
2481
2482 for ac_prog in dtrace
2483 do
2484   # Extract the first word of "$ac_prog", so it can be a program name with args.
2485 set dummy $ac_prog; ac_word=$2
2486 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2487 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2488 if test "${ac_cv_prog_DTRACE+set}" = set; then
2489   echo $ECHO_N "(cached) $ECHO_C" >&6
2490 else
2491   if test -n "$DTRACE"; then
2492   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
2493 else
2494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2495 for as_dir in $PATH
2496 do
2497   IFS=$as_save_IFS
2498   test -z "$as_dir" && as_dir=.
2499   for ac_exec_ext in '' $ac_executable_extensions; do
2500   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2501     ac_cv_prog_DTRACE="$ac_prog"
2502     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2503     break 2
2504   fi
2505 done
2506 done
2507 IFS=$as_save_IFS
2508
2509 fi
2510 fi
2511 DTRACE=$ac_cv_prog_DTRACE
2512 if test -n "$DTRACE"; then
2513   { echo "$as_me:$LINENO: result: $DTRACE" >&5
2514 echo "${ECHO_T}$DTRACE" >&6; }
2515 else
2516   { echo "$as_me:$LINENO: result: no" >&5
2517 echo "${ECHO_T}no" >&6; }
2518 fi
2519
2520
2521   test -n "$DTRACE" && break
2522 done
2523
2524 if test -z "$DTRACE"; then
2525   { { echo "$as_me:$LINENO: error: dtrace not found" >&5
2526 echo "$as_me: error: dtrace not found" >&2;}
2527    { (exit 1); exit 1; }; }
2528 fi
2529
2530       ;;
2531     no)
2532       :
2533       ;;
2534     *)
2535       { { echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2536 echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2537    { (exit 1); exit 1; }; }
2538       ;;
2539   esac
2540
2541 else
2542   enable_dtrace=no
2543
2544 fi
2545
2546
2547
2548
2549 #
2550 # Data file segmentation
2551 #
2552
2553 pgac_args="$pgac_args enable_segmented_files"
2554
2555 # Check whether --enable-segmented-files was given.
2556 if test "${enable_segmented_files+set}" = set; then
2557   enableval=$enable_segmented_files;
2558   case $enableval in
2559     yes)
2560       :
2561       ;;
2562     no)
2563       :
2564       ;;
2565     *)
2566       { { echo "$as_me:$LINENO: error: no argument expected for --enable-segmented-files option" >&5
2567 echo "$as_me: error: no argument expected for --enable-segmented-files option" >&2;}
2568    { (exit 1); exit 1; }; }
2569       ;;
2570   esac
2571
2572 else
2573   enable_segmented_files=yes
2574
2575 fi
2576
2577
2578
2579 #
2580 # C compiler
2581 #
2582
2583 # For historical reasons you can also use --with-CC to specify the C compiler
2584 # to use, although the standard way to do this is to set the CC environment
2585 # variable.
2586
2587 pgac_args="$pgac_args with_CC"
2588
2589
2590 # Check whether --with-CC was given.
2591 if test "${with_CC+set}" = set; then
2592   withval=$with_CC;
2593   case $withval in
2594     yes)
2595       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2596 echo "$as_me: error: argument required for --with-CC option" >&2;}
2597    { (exit 1); exit 1; }; }
2598       ;;
2599     no)
2600       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2601 echo "$as_me: error: argument required for --with-CC option" >&2;}
2602    { (exit 1); exit 1; }; }
2603       ;;
2604     *)
2605       CC=$with_CC
2606       ;;
2607   esac
2608
2609 fi
2610
2611
2612
2613 case $template in
2614   aix) pgac_cc_list="gcc xlc";;
2615  irix) pgac_cc_list="cc";; # no gcc
2616     *) pgac_cc_list="gcc cc";;
2617 esac
2618
2619 ac_ext=c
2620 ac_cpp='$CPP $CPPFLAGS'
2621 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2622 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2623 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2624 if test -n "$ac_tool_prefix"; then
2625   for ac_prog in $pgac_cc_list
2626   do
2627     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2628 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2629 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2630 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2631 if test "${ac_cv_prog_CC+set}" = set; then
2632   echo $ECHO_N "(cached) $ECHO_C" >&6
2633 else
2634   if test -n "$CC"; then
2635   ac_cv_prog_CC="$CC" # Let the user override the test.
2636 else
2637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2638 for as_dir in $PATH
2639 do
2640   IFS=$as_save_IFS
2641   test -z "$as_dir" && as_dir=.
2642   for ac_exec_ext in '' $ac_executable_extensions; do
2643   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2644     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2645     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2646     break 2
2647   fi
2648 done
2649 done
2650 IFS=$as_save_IFS
2651
2652 fi
2653 fi
2654 CC=$ac_cv_prog_CC
2655 if test -n "$CC"; then
2656   { echo "$as_me:$LINENO: result: $CC" >&5
2657 echo "${ECHO_T}$CC" >&6; }
2658 else
2659   { echo "$as_me:$LINENO: result: no" >&5
2660 echo "${ECHO_T}no" >&6; }
2661 fi
2662
2663
2664     test -n "$CC" && break
2665   done
2666 fi
2667 if test -z "$CC"; then
2668   ac_ct_CC=$CC
2669   for ac_prog in $pgac_cc_list
2670 do
2671   # Extract the first word of "$ac_prog", so it can be a program name with args.
2672 set dummy $ac_prog; ac_word=$2
2673 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2675 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2676   echo $ECHO_N "(cached) $ECHO_C" >&6
2677 else
2678   if test -n "$ac_ct_CC"; then
2679   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2680 else
2681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2682 for as_dir in $PATH
2683 do
2684   IFS=$as_save_IFS
2685   test -z "$as_dir" && as_dir=.
2686   for ac_exec_ext in '' $ac_executable_extensions; do
2687   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2688     ac_cv_prog_ac_ct_CC="$ac_prog"
2689     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2690     break 2
2691   fi
2692 done
2693 done
2694 IFS=$as_save_IFS
2695
2696 fi
2697 fi
2698 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2699 if test -n "$ac_ct_CC"; then
2700   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2701 echo "${ECHO_T}$ac_ct_CC" >&6; }
2702 else
2703   { echo "$as_me:$LINENO: result: no" >&5
2704 echo "${ECHO_T}no" >&6; }
2705 fi
2706
2707
2708   test -n "$ac_ct_CC" && break
2709 done
2710
2711   if test "x$ac_ct_CC" = x; then
2712     CC=""
2713   else
2714     case $cross_compiling:$ac_tool_warned in
2715 yes:)
2716 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2717 whose name does not start with the host triplet.  If you think this
2718 configuration is useful to you, please write to autoconf@gnu.org." >&5
2719 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2720 whose name does not start with the host triplet.  If you think this
2721 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2722 ac_tool_warned=yes ;;
2723 esac
2724     CC=$ac_ct_CC
2725   fi
2726 fi
2727
2728
2729 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2730 See \`config.log' for more details." >&5
2731 echo "$as_me: error: no acceptable C compiler found in \$PATH
2732 See \`config.log' for more details." >&2;}
2733    { (exit 1); exit 1; }; }
2734
2735 # Provide some information about the compiler.
2736 echo "$as_me:$LINENO: checking for C compiler version" >&5
2737 ac_compiler=`set X $ac_compile; echo $2`
2738 { (ac_try="$ac_compiler --version >&5"
2739 case "(($ac_try" in
2740   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2741   *) ac_try_echo=$ac_try;;
2742 esac
2743 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2744   (eval "$ac_compiler --version >&5") 2>&5
2745   ac_status=$?
2746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2747   (exit $ac_status); }
2748 { (ac_try="$ac_compiler -v >&5"
2749 case "(($ac_try" in
2750   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2751   *) ac_try_echo=$ac_try;;
2752 esac
2753 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2754   (eval "$ac_compiler -v >&5") 2>&5
2755   ac_status=$?
2756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2757   (exit $ac_status); }
2758 { (ac_try="$ac_compiler -V >&5"
2759 case "(($ac_try" in
2760   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2761   *) ac_try_echo=$ac_try;;
2762 esac
2763 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2764   (eval "$ac_compiler -V >&5") 2>&5
2765   ac_status=$?
2766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2767   (exit $ac_status); }
2768
2769 cat >conftest.$ac_ext <<_ACEOF
2770 /* confdefs.h.  */
2771 _ACEOF
2772 cat confdefs.h >>conftest.$ac_ext
2773 cat >>conftest.$ac_ext <<_ACEOF
2774 /* end confdefs.h.  */
2775
2776 int
2777 main ()
2778 {
2779
2780   ;
2781   return 0;
2782 }
2783 _ACEOF
2784 ac_clean_files_save=$ac_clean_files
2785 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2786 # Try to create an executable without -o first, disregard a.out.
2787 # It will help us diagnose broken compilers, and finding out an intuition
2788 # of exeext.
2789 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2790 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2791 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2792 #
2793 # List of possible output files, starting from the most likely.
2794 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2795 # only as a last resort.  b.out is created by i960 compilers.
2796 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2797 #
2798 # The IRIX 6 linker writes into existing files which may not be
2799 # executable, retaining their permissions.  Remove them first so a
2800 # subsequent execution test works.
2801 ac_rmfiles=
2802 for ac_file in $ac_files
2803 do
2804   case $ac_file in
2805     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2806     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2807   esac
2808 done
2809 rm -f $ac_rmfiles
2810
2811 if { (ac_try="$ac_link_default"
2812 case "(($ac_try" in
2813   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2814   *) ac_try_echo=$ac_try;;
2815 esac
2816 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2817   (eval "$ac_link_default") 2>&5
2818   ac_status=$?
2819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2820   (exit $ac_status); }; then
2821   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2822 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2823 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2824 # so that the user can short-circuit this test for compilers unknown to
2825 # Autoconf.
2826 for ac_file in $ac_files ''
2827 do
2828   test -f "$ac_file" || continue
2829   case $ac_file in
2830     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2831         ;;
2832     [ab].out )
2833         # We found the default executable, but exeext='' is most
2834         # certainly right.
2835         break;;
2836     *.* )
2837         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2838         then :; else
2839            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2840         fi
2841         # We set ac_cv_exeext here because the later test for it is not
2842         # safe: cross compilers may not add the suffix if given an `-o'
2843         # argument, so we may need to know it at that point already.
2844         # Even if this section looks crufty: it has the advantage of
2845         # actually working.
2846         break;;
2847     * )
2848         break;;
2849   esac
2850 done
2851 test "$ac_cv_exeext" = no && ac_cv_exeext=
2852
2853 else
2854   ac_file=''
2855 fi
2856
2857 { echo "$as_me:$LINENO: result: $ac_file" >&5
2858 echo "${ECHO_T}$ac_file" >&6; }
2859 if test -z "$ac_file"; then
2860   echo "$as_me: failed program was:" >&5
2861 sed 's/^/| /' conftest.$ac_ext >&5
2862
2863 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2864 See \`config.log' for more details." >&5
2865 echo "$as_me: error: C compiler cannot create executables
2866 See \`config.log' for more details." >&2;}
2867    { (exit 77); exit 77; }; }
2868 fi
2869
2870 ac_exeext=$ac_cv_exeext
2871
2872 # Check that the compiler produces executables we can run.  If not, either
2873 # the compiler is broken, or we cross compile.
2874 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2875 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2876 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2877 # If not cross compiling, check that we can run a simple program.
2878 if test "$cross_compiling" != yes; then
2879   if { ac_try='./$ac_file'
2880   { (case "(($ac_try" in
2881   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2882   *) ac_try_echo=$ac_try;;
2883 esac
2884 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2885   (eval "$ac_try") 2>&5
2886   ac_status=$?
2887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2888   (exit $ac_status); }; }; then
2889     cross_compiling=no
2890   else
2891     if test "$cross_compiling" = maybe; then
2892         cross_compiling=yes
2893     else
2894         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2895 If you meant to cross compile, use \`--host'.
2896 See \`config.log' for more details." >&5
2897 echo "$as_me: error: cannot run C compiled programs.
2898 If you meant to cross compile, use \`--host'.
2899 See \`config.log' for more details." >&2;}
2900    { (exit 1); exit 1; }; }
2901     fi
2902   fi
2903 fi
2904 { echo "$as_me:$LINENO: result: yes" >&5
2905 echo "${ECHO_T}yes" >&6; }
2906
2907 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2908 ac_clean_files=$ac_clean_files_save
2909 # Check that the compiler produces executables we can run.  If not, either
2910 # the compiler is broken, or we cross compile.
2911 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2912 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2913 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
2914 echo "${ECHO_T}$cross_compiling" >&6; }
2915
2916 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
2917 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2918 if { (ac_try="$ac_link"
2919 case "(($ac_try" in
2920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2921   *) ac_try_echo=$ac_try;;
2922 esac
2923 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2924   (eval "$ac_link") 2>&5
2925   ac_status=$?
2926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2927   (exit $ac_status); }; then
2928   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2929 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2930 # work properly (i.e., refer to `conftest.exe'), while it won't with
2931 # `rm'.
2932 for ac_file in conftest.exe conftest conftest.*; do
2933   test -f "$ac_file" || continue
2934   case $ac_file in
2935     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2936     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2937           break;;
2938     * ) break;;
2939   esac
2940 done
2941 else
2942   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2943 See \`config.log' for more details." >&5
2944 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2945 See \`config.log' for more details." >&2;}
2946    { (exit 1); exit 1; }; }
2947 fi
2948
2949 rm -f conftest$ac_cv_exeext
2950 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2951 echo "${ECHO_T}$ac_cv_exeext" >&6; }
2952
2953 rm -f conftest.$ac_ext
2954 EXEEXT=$ac_cv_exeext
2955 ac_exeext=$EXEEXT
2956 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
2957 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2958 if test "${ac_cv_objext+set}" = set; then
2959   echo $ECHO_N "(cached) $ECHO_C" >&6
2960 else
2961   cat >conftest.$ac_ext <<_ACEOF
2962 /* confdefs.h.  */
2963 _ACEOF
2964 cat confdefs.h >>conftest.$ac_ext
2965 cat >>conftest.$ac_ext <<_ACEOF
2966 /* end confdefs.h.  */
2967
2968 int
2969 main ()
2970 {
2971
2972   ;
2973   return 0;
2974 }
2975 _ACEOF
2976 rm -f conftest.o conftest.obj
2977 if { (ac_try="$ac_compile"
2978 case "(($ac_try" in
2979   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2980   *) ac_try_echo=$ac_try;;
2981 esac
2982 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2983   (eval "$ac_compile") 2>&5
2984   ac_status=$?
2985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2986   (exit $ac_status); }; then
2987   for ac_file in conftest.o conftest.obj conftest.*; do
2988   test -f "$ac_file" || continue;
2989   case $ac_file in
2990     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2991     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2992        break;;
2993   esac
2994 done
2995 else
2996   echo "$as_me: failed program was:" >&5
2997 sed 's/^/| /' conftest.$ac_ext >&5
2998
2999 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3000 See \`config.log' for more details." >&5
3001 echo "$as_me: error: cannot compute suffix of object files: cannot compile
3002 See \`config.log' for more details." >&2;}
3003    { (exit 1); exit 1; }; }
3004 fi
3005
3006 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3007 fi
3008 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3009 echo "${ECHO_T}$ac_cv_objext" >&6; }
3010 OBJEXT=$ac_cv_objext
3011 ac_objext=$OBJEXT
3012 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3013 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3014 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3015   echo $ECHO_N "(cached) $ECHO_C" >&6
3016 else
3017   cat >conftest.$ac_ext <<_ACEOF
3018 /* confdefs.h.  */
3019 _ACEOF
3020 cat confdefs.h >>conftest.$ac_ext
3021 cat >>conftest.$ac_ext <<_ACEOF
3022 /* end confdefs.h.  */
3023
3024 int
3025 main ()
3026 {
3027 #ifndef __GNUC__
3028        choke me
3029 #endif
3030
3031   ;
3032   return 0;
3033 }
3034 _ACEOF
3035 rm -f conftest.$ac_objext
3036 if { (ac_try="$ac_compile"
3037 case "(($ac_try" in
3038   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3039   *) ac_try_echo=$ac_try;;
3040 esac
3041 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3042   (eval "$ac_compile") 2>conftest.er1
3043   ac_status=$?
3044   grep -v '^ *+' conftest.er1 >conftest.err
3045   rm -f conftest.er1
3046   cat conftest.err >&5
3047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3048   (exit $ac_status); } && {
3049          test -z "$ac_c_werror_flag" ||
3050          test ! -s conftest.err
3051        } && test -s conftest.$ac_objext; then
3052   ac_compiler_gnu=yes
3053 else
3054   echo "$as_me: failed program was:" >&5
3055 sed 's/^/| /' conftest.$ac_ext >&5
3056
3057         ac_compiler_gnu=no
3058 fi
3059
3060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3061 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3062
3063 fi
3064 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3065 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3066 GCC=`test $ac_compiler_gnu = yes && echo yes`
3067 ac_test_CFLAGS=${CFLAGS+set}
3068 ac_save_CFLAGS=$CFLAGS
3069 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3070 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3071 if test "${ac_cv_prog_cc_g+set}" = set; then
3072   echo $ECHO_N "(cached) $ECHO_C" >&6
3073 else
3074   ac_save_c_werror_flag=$ac_c_werror_flag
3075    ac_c_werror_flag=yes
3076    ac_cv_prog_cc_g=no
3077    CFLAGS="-g"
3078    cat >conftest.$ac_ext <<_ACEOF
3079 /* confdefs.h.  */
3080 _ACEOF
3081 cat confdefs.h >>conftest.$ac_ext
3082 cat >>conftest.$ac_ext <<_ACEOF
3083 /* end confdefs.h.  */
3084
3085 int
3086 main ()
3087 {
3088
3089   ;
3090   return 0;
3091 }
3092 _ACEOF
3093 rm -f conftest.$ac_objext
3094 if { (ac_try="$ac_compile"
3095 case "(($ac_try" in
3096   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3097   *) ac_try_echo=$ac_try;;
3098 esac
3099 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3100   (eval "$ac_compile") 2>conftest.er1
3101   ac_status=$?
3102   grep -v '^ *+' conftest.er1 >conftest.err
3103   rm -f conftest.er1
3104   cat conftest.err >&5
3105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3106   (exit $ac_status); } && {
3107          test -z "$ac_c_werror_flag" ||
3108          test ! -s conftest.err
3109        } && test -s conftest.$ac_objext; then
3110   ac_cv_prog_cc_g=yes
3111 else
3112   echo "$as_me: failed program was:" >&5
3113 sed 's/^/| /' conftest.$ac_ext >&5
3114
3115         CFLAGS=""
3116       cat >conftest.$ac_ext <<_ACEOF
3117 /* confdefs.h.  */
3118 _ACEOF
3119 cat confdefs.h >>conftest.$ac_ext
3120 cat >>conftest.$ac_ext <<_ACEOF
3121 /* end confdefs.h.  */
3122
3123 int
3124 main ()
3125 {
3126
3127   ;
3128   return 0;
3129 }
3130 _ACEOF
3131 rm -f conftest.$ac_objext
3132 if { (ac_try="$ac_compile"
3133 case "(($ac_try" in
3134   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3135   *) ac_try_echo=$ac_try;;
3136 esac
3137 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3138   (eval "$ac_compile") 2>conftest.er1
3139   ac_status=$?
3140   grep -v '^ *+' conftest.er1 >conftest.err
3141   rm -f conftest.er1
3142   cat conftest.err >&5
3143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3144   (exit $ac_status); } && {
3145          test -z "$ac_c_werror_flag" ||
3146          test ! -s conftest.err
3147        } && test -s conftest.$ac_objext; then
3148   :
3149 else
3150   echo "$as_me: failed program was:" >&5
3151 sed 's/^/| /' conftest.$ac_ext >&5
3152
3153         ac_c_werror_flag=$ac_save_c_werror_flag
3154          CFLAGS="-g"
3155          cat >conftest.$ac_ext <<_ACEOF
3156 /* confdefs.h.  */
3157 _ACEOF
3158 cat confdefs.h >>conftest.$ac_ext
3159 cat >>conftest.$ac_ext <<_ACEOF
3160 /* end confdefs.h.  */
3161
3162 int
3163 main ()
3164 {
3165
3166   ;
3167   return 0;
3168 }
3169 _ACEOF
3170 rm -f conftest.$ac_objext
3171 if { (ac_try="$ac_compile"
3172 case "(($ac_try" in
3173   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3174   *) ac_try_echo=$ac_try;;
3175 esac
3176 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3177   (eval "$ac_compile") 2>conftest.er1
3178   ac_status=$?
3179   grep -v '^ *+' conftest.er1 >conftest.err
3180   rm -f conftest.er1
3181   cat conftest.err >&5
3182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3183   (exit $ac_status); } && {
3184          test -z "$ac_c_werror_flag" ||
3185          test ! -s conftest.err
3186        } && test -s conftest.$ac_objext; then
3187   ac_cv_prog_cc_g=yes
3188 else
3189   echo "$as_me: failed program was:" >&5
3190 sed 's/^/| /' conftest.$ac_ext >&5
3191
3192
3193 fi
3194
3195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3196 fi
3197
3198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3199 fi
3200
3201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3202    ac_c_werror_flag=$ac_save_c_werror_flag
3203 fi
3204 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3205 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3206 if test "$ac_test_CFLAGS" = set; then
3207   CFLAGS=$ac_save_CFLAGS
3208 elif test $ac_cv_prog_cc_g = yes; then
3209   if test "$GCC" = yes; then
3210     CFLAGS="-g -O2"
3211   else
3212     CFLAGS="-g"
3213   fi
3214 else
3215   if test "$GCC" = yes; then
3216     CFLAGS="-O2"
3217   else
3218     CFLAGS=
3219   fi
3220 fi
3221 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3222 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3223 if test "${ac_cv_prog_cc_c89+set}" = set; then
3224   echo $ECHO_N "(cached) $ECHO_C" >&6
3225 else
3226   ac_cv_prog_cc_c89=no
3227 ac_save_CC=$CC
3228 cat >conftest.$ac_ext <<_ACEOF
3229 /* confdefs.h.  */
3230 _ACEOF
3231 cat confdefs.h >>conftest.$ac_ext
3232 cat >>conftest.$ac_ext <<_ACEOF
3233 /* end confdefs.h.  */
3234 #include <stdarg.h>
3235 #include <stdio.h>
3236 #include <sys/types.h>
3237 #include <sys/stat.h>
3238 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3239 struct buf { int x; };
3240 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3241 static char *e (p, i)
3242      char **p;
3243      int i;
3244 {
3245   return p[i];
3246 }
3247 static char *f (char * (*g) (char **, int), char **p, ...)
3248 {
3249   char *s;
3250   va_list v;
3251   va_start (v,p);
3252   s = g (p, va_arg (v,int));
3253   va_end (v);
3254   return s;
3255 }
3256
3257 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3258    function prototypes and stuff, but not '\xHH' hex character constants.
3259    These don't provoke an error unfortunately, instead are silently treated
3260    as 'x'.  The following induces an error, until -std is added to get
3261    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3262    array size at least.  It's necessary to write '\x00'==0 to get something
3263    that's true only with -std.  */
3264 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3265
3266 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3267    inside strings and character constants.  */
3268 #define FOO(x) 'x'
3269 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3270
3271 int test (int i, double x);
3272 struct s1 {int (*f) (int a);};
3273 struct s2 {int (*f) (double a);};
3274 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3275 int argc;
3276 char **argv;
3277 int
3278 main ()
3279 {
3280 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3281   ;
3282   return 0;
3283 }
3284 _ACEOF
3285 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3286         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3287 do
3288   CC="$ac_save_CC $ac_arg"
3289   rm -f conftest.$ac_objext
3290 if { (ac_try="$ac_compile"
3291 case "(($ac_try" in
3292   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3293   *) ac_try_echo=$ac_try;;
3294 esac
3295 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3296   (eval "$ac_compile") 2>conftest.er1
3297   ac_status=$?
3298   grep -v '^ *+' conftest.er1 >conftest.err
3299   rm -f conftest.er1
3300   cat conftest.err >&5
3301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3302   (exit $ac_status); } && {
3303          test -z "$ac_c_werror_flag" ||
3304          test ! -s conftest.err
3305        } && test -s conftest.$ac_objext; then
3306   ac_cv_prog_cc_c89=$ac_arg
3307 else
3308   echo "$as_me: failed program was:" >&5
3309 sed 's/^/| /' conftest.$ac_ext >&5
3310
3311
3312 fi
3313
3314 rm -f core conftest.err conftest.$ac_objext
3315   test "x$ac_cv_prog_cc_c89" != "xno" && break
3316 done
3317 rm -f conftest.$ac_ext
3318 CC=$ac_save_CC
3319
3320 fi
3321 # AC_CACHE_VAL
3322 case "x$ac_cv_prog_cc_c89" in
3323   x)
3324     { echo "$as_me:$LINENO: result: none needed" >&5
3325 echo "${ECHO_T}none needed" >&6; } ;;
3326   xno)
3327     { echo "$as_me:$LINENO: result: unsupported" >&5
3328 echo "${ECHO_T}unsupported" >&6; } ;;
3329   *)
3330     CC="$CC $ac_cv_prog_cc_c89"
3331     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3332 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3333 esac
3334
3335
3336 ac_ext=c
3337 ac_cpp='$CPP $CPPFLAGS'
3338 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3339 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3340 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3341
3342
3343 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
3344 # but has idiosyncrasies of its own.  We assume icc will define
3345 # __INTEL_COMPILER regardless of CFLAGS.
3346
3347 cat >conftest.$ac_ext <<_ACEOF
3348 /* confdefs.h.  */
3349 _ACEOF
3350 cat confdefs.h >>conftest.$ac_ext
3351 cat >>conftest.$ac_ext <<_ACEOF
3352 /* end confdefs.h.  */
3353
3354 int
3355 main ()
3356 {
3357 #ifndef __INTEL_COMPILER
3358 choke me
3359 #endif
3360   ;
3361   return 0;
3362 }
3363 _ACEOF
3364 rm -f conftest.$ac_objext
3365 if { (ac_try="$ac_compile"
3366 case "(($ac_try" in
3367   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3368   *) ac_try_echo=$ac_try;;
3369 esac
3370 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3371   (eval "$ac_compile") 2>conftest.er1
3372   ac_status=$?
3373   grep -v '^ *+' conftest.er1 >conftest.err
3374   rm -f conftest.er1
3375   cat conftest.err >&5
3376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3377   (exit $ac_status); } && {
3378          test -z "$ac_c_werror_flag" ||
3379          test ! -s conftest.err
3380        } && test -s conftest.$ac_objext; then
3381   ICC=yes
3382 else
3383   echo "$as_me: failed program was:" >&5
3384 sed 's/^/| /' conftest.$ac_ext >&5
3385
3386         ICC=no
3387 fi
3388
3389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3390
3391 unset CFLAGS
3392
3393 #
3394 # Read the template
3395 #
3396 . "$srcdir/src/template/$template" || exit
3397
3398 # CFLAGS are selected so:
3399 # If the user specifies something in the environment, that is used.
3400 # else:  If the template file set something, that is used.
3401 # else:  If the compiler is GCC, then we use -O2.
3402 # else:  If the compiler is something else, then we use -0.
3403
3404 if test "$ac_env_CFLAGS_set" = set; then
3405   CFLAGS=$ac_env_CFLAGS_value
3406 elif test "${CFLAGS+set}" = set; then
3407   : # (keep what template set)
3408 elif test "$GCC" = yes; then
3409   CFLAGS="-O2"
3410 else
3411   # if the user selected debug mode, don't use -O
3412   if test "$enable_debug" != yes; then
3413     CFLAGS="-O"
3414   fi
3415 fi
3416
3417 # Some versions of GCC support some additional useful warning flags.
3418 # Check whether they are supported, and add them to CFLAGS if so.
3419 # ICC pretends to be GCC but it's lying; it doesn't support these options.
3420
3421 if test "$GCC" = yes -a "$ICC" = no; then
3422   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
3423   # These work in some but not all gcc versions
3424   { echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
3425 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6; }
3426 pgac_save_CFLAGS=$CFLAGS
3427 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
3428 cat >conftest.$ac_ext <<_ACEOF
3429 /* confdefs.h.  */
3430 _ACEOF
3431 cat confdefs.h >>conftest.$ac_ext
3432 cat >>conftest.$ac_ext <<_ACEOF
3433 /* end confdefs.h.  */
3434
3435 int
3436 main ()
3437 {
3438
3439   ;
3440   return 0;
3441 }
3442 _ACEOF
3443 rm -f conftest.$ac_objext
3444 if { (ac_try="$ac_compile"
3445 case "(($ac_try" in
3446   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3447   *) ac_try_echo=$ac_try;;
3448 esac
3449 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3450   (eval "$ac_compile") 2>conftest.er1
3451   ac_status=$?
3452   grep -v '^ *+' conftest.er1 >conftest.err
3453   rm -f conftest.er1
3454   cat conftest.err >&5
3455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3456   (exit $ac_status); } && {
3457          test -z "$ac_c_werror_flag" ||
3458          test ! -s conftest.err
3459        } && test -s conftest.$ac_objext; then
3460   { echo "$as_me:$LINENO: result: yes" >&5
3461 echo "${ECHO_T}yes" >&6; }
3462 else
3463   echo "$as_me: failed program was:" >&5
3464 sed 's/^/| /' conftest.$ac_ext >&5
3465
3466         CFLAGS="$pgac_save_CFLAGS"
3467                     { echo "$as_me:$LINENO: result: no" >&5
3468 echo "${ECHO_T}no" >&6; }
3469 fi
3470
3471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3472
3473   { echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
3474 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6; }
3475 pgac_save_CFLAGS=$CFLAGS
3476 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
3477 cat >conftest.$ac_ext <<_ACEOF
3478 /* confdefs.h.  */
3479 _ACEOF
3480 cat confdefs.h >>conftest.$ac_ext
3481 cat >>conftest.$ac_ext <<_ACEOF
3482 /* end confdefs.h.  */
3483
3484 int
3485 main ()
3486 {
3487
3488   ;
3489   return 0;
3490 }
3491 _ACEOF
3492 rm -f conftest.$ac_objext
3493 if { (ac_try="$ac_compile"
3494 case "(($ac_try" in
3495   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3496   *) ac_try_echo=$ac_try;;
3497 esac
3498 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3499   (eval "$ac_compile") 2>conftest.er1
3500   ac_status=$?
3501   grep -v '^ *+' conftest.er1 >conftest.err
3502   rm -f conftest.er1
3503   cat conftest.err >&5
3504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3505   (exit $ac_status); } && {
3506          test -z "$ac_c_werror_flag" ||
3507          test ! -s conftest.err
3508        } && test -s conftest.$ac_objext; then
3509   { echo "$as_me:$LINENO: result: yes" >&5
3510 echo "${ECHO_T}yes" >&6; }
3511 else
3512   echo "$as_me: failed program was:" >&5
3513 sed 's/^/| /' conftest.$ac_ext >&5
3514
3515         CFLAGS="$pgac_save_CFLAGS"
3516                     { echo "$as_me:$LINENO: result: no" >&5
3517 echo "${ECHO_T}no" >&6; }
3518 fi
3519
3520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3521
3522   # Disable strict-aliasing rules; needed for gcc 3.3+
3523   { echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
3524 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6; }
3525 pgac_save_CFLAGS=$CFLAGS
3526 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
3527 cat >conftest.$ac_ext <<_ACEOF
3528 /* confdefs.h.  */
3529 _ACEOF
3530 cat confdefs.h >>conftest.$ac_ext
3531 cat >>conftest.$ac_ext <<_ACEOF
3532 /* end confdefs.h.  */
3533
3534 int
3535 main ()
3536 {
3537
3538   ;
3539   return 0;
3540 }
3541 _ACEOF
3542 rm -f conftest.$ac_objext
3543 if { (ac_try="$ac_compile"
3544 case "(($ac_try" in
3545   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3546   *) ac_try_echo=$ac_try;;
3547 esac
3548 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3549   (eval "$ac_compile") 2>conftest.er1
3550   ac_status=$?
3551   grep -v '^ *+' conftest.er1 >conftest.err
3552   rm -f conftest.er1
3553   cat conftest.err >&5
3554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3555   (exit $ac_status); } && {
3556          test -z "$ac_c_werror_flag" ||
3557          test ! -s conftest.err
3558        } && test -s conftest.$ac_objext; then
3559   { echo "$as_me:$LINENO: result: yes" >&5
3560 echo "${ECHO_T}yes" >&6; }
3561 else
3562   echo "$as_me: failed program was:" >&5
3563 sed 's/^/| /' conftest.$ac_ext >&5
3564
3565         CFLAGS="$pgac_save_CFLAGS"
3566                     { echo "$as_me:$LINENO: result: no" >&5
3567 echo "${ECHO_T}no" >&6; }
3568 fi
3569
3570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3571
3572   # Disable optimizations that assume no overflow; needed for gcc 4.3+
3573   { echo "$as_me:$LINENO: checking if $CC supports -fwrapv" >&5
3574 echo $ECHO_N "checking if $CC supports -fwrapv... $ECHO_C" >&6; }
3575 pgac_save_CFLAGS=$CFLAGS
3576 CFLAGS="$pgac_save_CFLAGS -fwrapv"
3577 cat >conftest.$ac_ext <<_ACEOF
3578 /* confdefs.h.  */
3579 _ACEOF
3580 cat confdefs.h >>conftest.$ac_ext
3581 cat >>conftest.$ac_ext <<_ACEOF
3582 /* end confdefs.h.  */
3583
3584 int
3585 main ()
3586 {
3587
3588   ;
3589   return 0;
3590 }
3591 _ACEOF
3592 rm -f conftest.$ac_objext
3593 if { (ac_try="$ac_compile"
3594 case "(($ac_try" in
3595   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3596   *) ac_try_echo=$ac_try;;
3597 esac
3598 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3599   (eval "$ac_compile") 2>conftest.er1
3600   ac_status=$?
3601   grep -v '^ *+' conftest.er1 >conftest.err
3602   rm -f conftest.er1
3603   cat conftest.err >&5
3604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3605   (exit $ac_status); } && {
3606          test -z "$ac_c_werror_flag" ||
3607          test ! -s conftest.err
3608        } && test -s conftest.$ac_objext; then
3609   { echo "$as_me:$LINENO: result: yes" >&5
3610 echo "${ECHO_T}yes" >&6; }
3611 else
3612   echo "$as_me: failed program was:" >&5
3613 sed 's/^/| /' conftest.$ac_ext >&5
3614
3615         CFLAGS="$pgac_save_CFLAGS"
3616                     { echo "$as_me:$LINENO: result: no" >&5
3617 echo "${ECHO_T}no" >&6; }
3618 fi
3619
3620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3621
3622 elif test "$ICC" = yes; then
3623   # Intel's compiler has a bug/misoptimization in checking for
3624   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
3625   { echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5
3626 echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6; }
3627 pgac_save_CFLAGS=$CFLAGS
3628 CFLAGS="$pgac_save_CFLAGS -mp1"
3629 cat >conftest.$ac_ext <<_ACEOF
3630 /* confdefs.h.  */
3631 _ACEOF
3632 cat confdefs.h >>conftest.$ac_ext
3633 cat >>conftest.$ac_ext <<_ACEOF
3634 /* end confdefs.h.  */
3635
3636 int
3637 main ()
3638 {
3639
3640   ;
3641   return 0;
3642 }
3643 _ACEOF
3644 rm -f conftest.$ac_objext
3645 if { (ac_try="$ac_compile"
3646 case "(($ac_try" in
3647   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3648   *) ac_try_echo=$ac_try;;
3649 esac
3650 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3651   (eval "$ac_compile") 2>conftest.er1
3652   ac_status=$?
3653   grep -v '^ *+' conftest.er1 >conftest.err
3654   rm -f conftest.er1
3655   cat conftest.err >&5
3656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3657   (exit $ac_status); } && {
3658          test -z "$ac_c_werror_flag" ||
3659          test ! -s conftest.err
3660        } && test -s conftest.$ac_objext; then
3661   { echo "$as_me:$LINENO: result: yes" >&5
3662 echo "${ECHO_T}yes" >&6; }
3663 else
3664   echo "$as_me: failed program was:" >&5
3665 sed 's/^/| /' conftest.$ac_ext >&5
3666
3667         CFLAGS="$pgac_save_CFLAGS"
3668                     { echo "$as_me:$LINENO: result: no" >&5
3669 echo "${ECHO_T}no" >&6; }
3670 fi
3671
3672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3673
3674   # Make sure strict aliasing is off (though this is said to be the default)
3675   { echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
3676 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6; }
3677 pgac_save_CFLAGS=$CFLAGS
3678 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
3679 cat >conftest.$ac_ext <<_ACEOF
3680 /* confdefs.h.  */
3681 _ACEOF
3682 cat confdefs.h >>conftest.$ac_ext
3683 cat >>conftest.$ac_ext <<_ACEOF
3684 /* end confdefs.h.  */
3685
3686 int
3687 main ()
3688 {
3689
3690   ;
3691   return 0;
3692 }
3693 _ACEOF
3694 rm -f conftest.$ac_objext
3695 if { (ac_try="$ac_compile"
3696 case "(($ac_try" in
3697   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3698   *) ac_try_echo=$ac_try;;
3699 esac
3700 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3701   (eval "$ac_compile") 2>conftest.er1
3702   ac_status=$?
3703   grep -v '^ *+' conftest.er1 >conftest.err
3704   rm -f conftest.er1
3705   cat conftest.err >&5
3706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3707   (exit $ac_status); } && {
3708          test -z "$ac_c_werror_flag" ||
3709          test ! -s conftest.err
3710        } && test -s conftest.$ac_objext; then
3711   { echo "$as_me:$LINENO: result: yes" >&5
3712 echo "${ECHO_T}yes" >&6; }
3713 else
3714   echo "$as_me: failed program was:" >&5
3715 sed 's/^/| /' conftest.$ac_ext >&5
3716
3717         CFLAGS="$pgac_save_CFLAGS"
3718                     { echo "$as_me:$LINENO: result: no" >&5
3719 echo "${ECHO_T}no" >&6; }
3720 fi
3721
3722 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3723
3724 elif test x"${CC}" = x"xlc"; then
3725   # AIX xlc has to have strict aliasing turned off too
3726   { echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
3727 echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6; }
3728 pgac_save_CFLAGS=$CFLAGS
3729 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
3730 cat >conftest.$ac_ext <<_ACEOF
3731 /* confdefs.h.  */
3732 _ACEOF
3733 cat confdefs.h >>conftest.$ac_ext
3734 cat >>conftest.$ac_ext <<_ACEOF
3735 /* end confdefs.h.  */
3736
3737 int
3738 main ()
3739 {
3740
3741   ;
3742   return 0;
3743 }
3744 _ACEOF
3745 rm -f conftest.$ac_objext
3746 if { (ac_try="$ac_compile"
3747 case "(($ac_try" in
3748   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3749   *) ac_try_echo=$ac_try;;
3750 esac
3751 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3752   (eval "$ac_compile") 2>conftest.er1
3753   ac_status=$?
3754   grep -v '^ *+' conftest.er1 >conftest.err
3755   rm -f conftest.er1
3756   cat conftest.err >&5
3757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3758   (exit $ac_status); } && {
3759          test -z "$ac_c_werror_flag" ||
3760          test ! -s conftest.err
3761        } && test -s conftest.$ac_objext; then
3762   { echo "$as_me:$LINENO: result: yes" >&5
3763 echo "${ECHO_T}yes" >&6; }
3764 else
3765   echo "$as_me: failed program was:" >&5
3766 sed 's/^/| /' conftest.$ac_ext >&5
3767
3768         CFLAGS="$pgac_save_CFLAGS"
3769                     { echo "$as_me:$LINENO: result: no" >&5
3770 echo "${ECHO_T}no" >&6; }
3771 fi
3772
3773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3774
3775 fi
3776
3777 # supply -g if --enable-debug
3778 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
3779   CFLAGS="$CFLAGS -g"
3780 fi
3781
3782 # enable profiling if --enable-profiling
3783 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
3784   if test "$GCC" = yes; then
3785
3786 cat >>confdefs.h <<\_ACEOF
3787 #define PROFILE_PID_DIR 1
3788 _ACEOF
3789
3790     CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
3791   else
3792     { { echo "$as_me:$LINENO: error: --enable-profiling is supported only when using GCC" >&5
3793 echo "$as_me: error: --enable-profiling is supported only when using GCC" >&2;}
3794    { (exit 1); exit 1; }; }
3795   fi
3796 fi
3797
3798 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
3799 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
3800
3801 # We already have this in Makefile.win32, but configure needs it too
3802 if test "$PORTNAME" = "win32"; then
3803   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
3804 fi
3805
3806 # Check if the compiler still works with the template settings
3807 { echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
3808 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6; }
3809 cat >conftest.$ac_ext <<_ACEOF
3810 /* confdefs.h.  */
3811 _ACEOF
3812 cat confdefs.h >>conftest.$ac_ext
3813 cat >>conftest.$ac_ext <<_ACEOF
3814 /* end confdefs.h.  */
3815
3816 int
3817 main ()
3818 {
3819 return 0;
3820   ;
3821   return 0;
3822 }
3823 _ACEOF
3824 rm -f conftest.$ac_objext conftest$ac_exeext
3825 if { (ac_try="$ac_link"
3826 case "(($ac_try" in
3827   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3828   *) ac_try_echo=$ac_try;;
3829 esac
3830 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3831   (eval "$ac_link") 2>conftest.er1
3832   ac_status=$?
3833   grep -v '^ *+' conftest.er1 >conftest.err
3834   rm -f conftest.er1
3835   cat conftest.err >&5
3836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3837   (exit $ac_status); } && {
3838          test -z "$ac_c_werror_flag" ||
3839          test ! -s conftest.err
3840        } && test -s conftest$ac_exeext &&
3841        $as_test_x conftest$ac_exeext; then
3842   { echo "$as_me:$LINENO: result: yes" >&5
3843 echo "${ECHO_T}yes" >&6; }
3844 else
3845   echo "$as_me: failed program was:" >&5
3846 sed 's/^/| /' conftest.$ac_ext >&5
3847
3848         { echo "$as_me:$LINENO: result: no" >&5
3849 echo "${ECHO_T}no" >&6; }
3850    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
3851 echo "$as_me: error: cannot proceed" >&2;}
3852    { (exit 1); exit 1; }; }
3853 fi
3854
3855 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3856       conftest$ac_exeext conftest.$ac_ext
3857
3858 # Defend against gcc -ffast-math
3859 if test "$GCC" = yes; then
3860 cat >conftest.$ac_ext <<_ACEOF
3861 /* confdefs.h.  */
3862 _ACEOF
3863 cat confdefs.h >>conftest.$ac_ext
3864 cat >>conftest.$ac_ext <<_ACEOF
3865 /* end confdefs.h.  */
3866
3867 int
3868 main ()
3869 {
3870 #ifdef __FAST_MATH__
3871 choke me
3872 #endif
3873   ;
3874   return 0;
3875 }
3876 _ACEOF
3877 rm -f conftest.$ac_objext
3878 if { (ac_try="$ac_compile"
3879 case "(($ac_try" in
3880   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3881   *) ac_try_echo=$ac_try;;
3882 esac
3883 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3884   (eval "$ac_compile") 2>conftest.er1
3885   ac_status=$?
3886   grep -v '^ *+' conftest.er1 >conftest.err
3887   rm -f conftest.er1
3888   cat conftest.err >&5
3889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3890   (exit $ac_status); } && {
3891          test -z "$ac_c_werror_flag" ||
3892          test ! -s conftest.err
3893        } && test -s conftest.$ac_objext; then
3894   :
3895 else
3896   echo "$as_me: failed program was:" >&5
3897 sed 's/^/| /' conftest.$ac_ext >&5
3898
3899         { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3900 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3901    { (exit 1); exit 1; }; }
3902 fi
3903
3904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3905 fi
3906
3907 ac_ext=c
3908 ac_cpp='$CPP $CPPFLAGS'
3909 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3910 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3911 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3912 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3913 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3914 # On Suns, sometimes $CPP names a directory.
3915 if test -n "$CPP" && test -d "$CPP"; then
3916   CPP=
3917 fi
3918 if test -z "$CPP"; then
3919   if test "${ac_cv_prog_CPP+set}" = set; then
3920   echo $ECHO_N "(cached) $ECHO_C" >&6
3921 else
3922       # Double quotes because CPP needs to be expanded
3923     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3924     do
3925       ac_preproc_ok=false
3926 for ac_c_preproc_warn_flag in '' yes
3927 do
3928   # Use a header file that comes with gcc, so configuring glibc
3929   # with a fresh cross-compiler works.
3930   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3931   # <limits.h> exists even on freestanding compilers.
3932   # On the NeXT, cc -E runs the code through the compiler's parser,
3933   # not just through cpp. "Syntax error" is here to catch this case.
3934   cat >conftest.$ac_ext <<_ACEOF
3935 /* confdefs.h.  */
3936 _ACEOF
3937 cat confdefs.h >>conftest.$ac_ext
3938 cat >>conftest.$ac_ext <<_ACEOF
3939 /* end confdefs.h.  */
3940 #ifdef __STDC__
3941 # include <limits.h>
3942 #else
3943 # include <assert.h>
3944 #endif
3945                      Syntax error
3946 _ACEOF
3947 if { (ac_try="$ac_cpp conftest.$ac_ext"
3948 case "(($ac_try" in
3949   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3950   *) ac_try_echo=$ac_try;;
3951 esac
3952 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3953   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3954   ac_status=$?
3955   grep -v '^ *+' conftest.er1 >conftest.err
3956   rm -f conftest.er1
3957   cat conftest.err >&5
3958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3959   (exit $ac_status); } >/dev/null && {
3960          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3961          test ! -s conftest.err
3962        }; then
3963   :
3964 else
3965   echo "$as_me: failed program was:" >&5
3966 sed 's/^/| /' conftest.$ac_ext >&5
3967
3968   # Broken: fails on valid input.
3969 continue
3970 fi
3971
3972 rm -f conftest.err conftest.$ac_ext
3973
3974   # OK, works on sane cases.  Now check whether nonexistent headers
3975   # can be detected and how.
3976   cat >conftest.$ac_ext <<_ACEOF
3977 /* confdefs.h.  */
3978 _ACEOF
3979 cat confdefs.h >>conftest.$ac_ext
3980 cat >>conftest.$ac_ext <<_ACEOF
3981 /* end confdefs.h.  */
3982 #include <ac_nonexistent.h>
3983 _ACEOF
3984 if { (ac_try="$ac_cpp conftest.$ac_ext"
3985 case "(($ac_try" in
3986   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3987   *) ac_try_echo=$ac_try;;
3988 esac
3989 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3990   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3991   ac_status=$?
3992   grep -v '^ *+' conftest.er1 >conftest.err
3993   rm -f conftest.er1
3994   cat conftest.err >&5
3995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3996   (exit $ac_status); } >/dev/null && {
3997          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3998          test ! -s conftest.err
3999        }; then
4000   # Broken: success on invalid input.
4001 continue
4002 else
4003   echo "$as_me: failed program was:" >&5
4004 sed 's/^/| /' conftest.$ac_ext >&5
4005
4006   # Passes both tests.
4007 ac_preproc_ok=:
4008 break
4009 fi
4010
4011 rm -f conftest.err conftest.$ac_ext
4012
4013 done
4014 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4015 rm -f conftest.err conftest.$ac_ext
4016 if $ac_preproc_ok; then
4017   break
4018 fi
4019
4020     done
4021     ac_cv_prog_CPP=$CPP
4022
4023 fi
4024   CPP=$ac_cv_prog_CPP
4025 else
4026   ac_cv_prog_CPP=$CPP
4027 fi
4028 { echo "$as_me:$LINENO: result: $CPP" >&5
4029 echo "${ECHO_T}$CPP" >&6; }
4030 ac_preproc_ok=false
4031 for ac_c_preproc_warn_flag in '' yes
4032 do
4033   # Use a header file that comes with gcc, so configuring glibc
4034   # with a fresh cross-compiler works.
4035   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4036   # <limits.h> exists even on freestanding compilers.
4037   # On the NeXT, cc -E runs the code through the compiler's parser,
4038   # not just through cpp. "Syntax error" is here to catch this case.
4039   cat >conftest.$ac_ext <<_ACEOF
4040 /* confdefs.h.  */
4041 _ACEOF
4042 cat confdefs.h >>conftest.$ac_ext
4043 cat >>conftest.$ac_ext <<_ACEOF
4044 /* end confdefs.h.  */
4045 #ifdef __STDC__
4046 # include <limits.h>
4047 #else
4048 # include <assert.h>
4049 #endif
4050                      Syntax error
4051 _ACEOF
4052 if { (ac_try="$ac_cpp conftest.$ac_ext"
4053 case "(($ac_try" in
4054   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4055   *) ac_try_echo=$ac_try;;
4056 esac
4057 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4058   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4059   ac_status=$?
4060   grep -v '^ *+' conftest.er1 >conftest.err
4061   rm -f conftest.er1
4062   cat conftest.err >&5
4063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4064   (exit $ac_status); } >/dev/null && {
4065          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4066          test ! -s conftest.err
4067        }; then
4068   :
4069 else
4070   echo "$as_me: failed program was:" >&5
4071 sed 's/^/| /' conftest.$ac_ext >&5
4072
4073   # Broken: fails on valid input.
4074 continue
4075 fi
4076
4077 rm -f conftest.err conftest.$ac_ext
4078
4079   # OK, works on sane cases.  Now check whether nonexistent headers
4080   # can be detected and how.
4081   cat >conftest.$ac_ext <<_ACEOF
4082 /* confdefs.h.  */
4083 _ACEOF
4084 cat confdefs.h >>conftest.$ac_ext
4085 cat >>conftest.$ac_ext <<_ACEOF
4086 /* end confdefs.h.  */
4087 #include <ac_nonexistent.h>
4088 _ACEOF
4089 if { (ac_try="$ac_cpp conftest.$ac_ext"
4090 case "(($ac_try" in
4091   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4092   *) ac_try_echo=$ac_try;;
4093 esac
4094 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4095   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4096   ac_status=$?
4097   grep -v '^ *+' conftest.er1 >conftest.err
4098   rm -f conftest.er1
4099   cat conftest.err >&5
4100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4101   (exit $ac_status); } >/dev/null && {
4102          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4103          test ! -s conftest.err
4104        }; then
4105   # Broken: success on invalid input.
4106 continue
4107 else
4108   echo "$as_me: failed program was:" >&5
4109 sed 's/^/| /' conftest.$ac_ext >&5
4110
4111   # Passes both tests.
4112 ac_preproc_ok=:
4113 break
4114 fi
4115
4116 rm -f conftest.err conftest.$ac_ext
4117
4118 done
4119 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4120 rm -f conftest.err conftest.$ac_ext
4121 if $ac_preproc_ok; then
4122   :
4123 else
4124   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4125 See \`config.log' for more details." >&5
4126 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4127 See \`config.log' for more details." >&2;}
4128    { (exit 1); exit 1; }; }
4129 fi
4130
4131 ac_ext=c
4132 ac_cpp='$CPP $CPPFLAGS'
4133 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4134 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4135 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4136
4137
4138
4139 # Create compiler version string
4140 if test x"$GCC" = x"yes" ; then
4141   cc_string="GCC `${CC} --version | sed q`"
4142 else
4143   cc_string=$CC
4144 fi
4145
4146 cat >>confdefs.h <<_ACEOF
4147 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
4148 _ACEOF
4149
4150
4151
4152 #
4153 # Set up TAS assembly code if needed; the template file has now had its
4154 # chance to request this.
4155 #
4156 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
4157
4158
4159 if test "$need_tas" = yes ; then
4160   TAS=tas.o
4161 else
4162   TAS=""
4163 fi
4164
4165
4166
4167 #
4168 # Automatic dependency tracking
4169 #
4170
4171 pgac_args="$pgac_args enable_depend"
4172
4173 # Check whether --enable-depend was given.
4174 if test "${enable_depend+set}" = set; then
4175   enableval=$enable_depend;
4176   case $enableval in
4177     yes)
4178       autodepend=yes
4179       ;;
4180     no)
4181       :
4182       ;;
4183     *)
4184       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
4185 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
4186    { (exit 1); exit 1; }; }
4187       ;;
4188   esac
4189
4190 else
4191   enable_depend=no
4192
4193 fi
4194
4195
4196
4197
4198
4199 #
4200 # Enable assert checks
4201 #
4202
4203 pgac_args="$pgac_args enable_cassert"
4204
4205 # Check whether --enable-cassert was given.
4206 if test "${enable_cassert+set}" = set; then
4207   enableval=$enable_cassert;
4208   case $enableval in
4209     yes)
4210
4211 cat >>confdefs.h <<\_ACEOF
4212 #define USE_ASSERT_CHECKING 1
4213 _ACEOF
4214
4215       ;;
4216     no)
4217       :
4218       ;;
4219     *)
4220       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
4221 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
4222    { (exit 1); exit 1; }; }
4223       ;;
4224   esac
4225
4226 else
4227   enable_cassert=no
4228
4229 fi
4230
4231
4232
4233
4234 #
4235 # Include directories
4236 #
4237 ac_save_IFS=$IFS
4238 IFS="${IFS}${PATH_SEPARATOR}"
4239 # SRCH_INC comes from the template file
4240 for dir in $with_includes $SRCH_INC; do
4241   if test -d "$dir"; then
4242     INCLUDES="$INCLUDES -I$dir"
4243   else
4244     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
4245 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
4246   fi
4247 done
4248 IFS=$ac_save_IFS
4249
4250
4251
4252 #
4253 # Library directories
4254 #
4255 ac_save_IFS=$IFS
4256 IFS="${IFS}${PATH_SEPARATOR}"
4257 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
4258 for dir in $LIBRARY_DIRS $SRCH_LIB; do
4259   if test -d "$dir"; then
4260     LIBDIRS="$LIBDIRS -L$dir"
4261   else
4262     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
4263 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
4264   fi
4265 done
4266 IFS=$ac_save_IFS
4267
4268 #
4269 # Enable thread-safe client libraries
4270 #
4271 { echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
4272 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6; }
4273 if test "$PORTNAME" != "win32"; then
4274
4275 pgac_args="$pgac_args enable_thread_safety"
4276
4277 # Check whether --enable-thread-safety was given.
4278 if test "${enable_thread_safety+set}" = set; then
4279   enableval=$enable_thread_safety;
4280   case $enableval in
4281     yes)
4282       :
4283       ;;
4284     no)
4285       :
4286       ;;
4287     *)
4288       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
4289 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
4290    { (exit 1); exit 1; }; }
4291       ;;
4292   esac
4293
4294 else
4295   enable_thread_safety=no
4296
4297 fi
4298
4299
4300 else
4301 # Win32 should always use threads
4302
4303 pgac_args="$pgac_args enable_thread_safety"
4304
4305 # Check whether --enable-thread-safety was given.
4306 if test "${enable_thread_safety+set}" = set; then
4307   enableval=$enable_thread_safety;
4308   case $enableval in
4309     yes)
4310       :
4311       ;;
4312     no)
4313       :
4314       ;;
4315     *)
4316       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
4317 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
4318    { (exit 1); exit 1; }; }
4319       ;;
4320   esac
4321
4322 else
4323   enable_thread_safety=yes
4324
4325 fi
4326
4327
4328 fi
4329
4330
4331 pgac_args="$pgac_args enable_thread_safety_force"
4332
4333 # Check whether --enable-thread-safety-force was given.
4334 if test "${enable_thread_safety_force+set}" = set; then
4335   enableval=$enable_thread_safety_force;
4336   case $enableval in
4337     yes)
4338       :
4339       ;;
4340     no)
4341       :
4342       ;;
4343     *)
4344       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
4345 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
4346    { (exit 1); exit 1; }; }
4347       ;;
4348   esac
4349
4350 else
4351   enable_thread_safety_force=no
4352
4353 fi
4354
4355
4356 if test "$enable_thread_safety" = yes -o \
4357         "$enable_thread_safety_force" = yes; then
4358   enable_thread_safety="yes"    # for 'force'
4359
4360 cat >>confdefs.h <<\_ACEOF
4361 #define ENABLE_THREAD_SAFETY 1
4362 _ACEOF
4363
4364 fi
4365 { echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
4366 echo "${ECHO_T}$enable_thread_safety" >&6; }
4367
4368
4369 #
4370 # Optionally build Tcl modules (PL/Tcl)
4371 #
4372 { echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
4373 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6; }
4374
4375 pgac_args="$pgac_args with_tcl"
4376
4377
4378 # Check whether --with-tcl was given.
4379 if test "${with_tcl+set}" = set; then
4380   withval=$with_tcl;
4381   case $withval in
4382     yes)
4383       :
4384       ;;
4385     no)
4386       :
4387       ;;
4388     *)
4389       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
4390 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
4391    { (exit 1); exit 1; }; }
4392       ;;
4393   esac
4394
4395 else
4396   with_tcl=no
4397
4398 fi
4399
4400
4401 { echo "$as_me:$LINENO: result: $with_tcl" >&5
4402 echo "${ECHO_T}$with_tcl" >&6; }
4403
4404
4405 # We see if the path to the Tcl/Tk configuration scripts is specified.
4406 # This will override the use of tclsh to find the paths to search.
4407
4408
4409 pgac_args="$pgac_args with_tclconfig"
4410
4411
4412 # Check whether --with-tclconfig was given.
4413 if test "${with_tclconfig+set}" = set; then
4414   withval=$with_tclconfig;
4415   case $withval in
4416     yes)
4417       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
4418 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
4419    { (exit 1); exit 1; }; }
4420       ;;
4421     no)
4422       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
4423 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
4424    { (exit 1); exit 1; }; }
4425       ;;
4426     *)
4427
4428       ;;
4429   esac
4430
4431 fi
4432
4433
4434
4435 #
4436 # Optionally build Perl modules (PL/Perl)
4437 #
4438 { echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
4439 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6; }
4440
4441 pgac_args="$pgac_args with_perl"
4442
4443
4444 # Check whether --with-perl was given.
4445 if test "${with_perl+set}" = set; then
4446   withval=$with_perl;
4447   case $withval in
4448     yes)
4449       :
4450       ;;
4451     no)
4452       :
4453       ;;
4454     *)
4455       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
4456 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
4457    { (exit 1); exit 1; }; }
4458       ;;
4459   esac
4460
4461 else
4462   with_perl=no
4463
4464 fi
4465
4466
4467 { echo "$as_me:$LINENO: result: $with_perl" >&5
4468 echo "${ECHO_T}$with_perl" >&6; }
4469
4470
4471 #
4472 # Optionally build Python modules (PL/Python)
4473 #
4474 { echo "$as_me:$LINENO: checking whether to build Python modules" >&5
4475 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6; }
4476
4477 pgac_args="$pgac_args with_python"
4478
4479
4480 # Check whether --with-python was given.
4481 if test "${with_python+set}" = set; then
4482   withval=$with_python;
4483   case $withval in
4484     yes)
4485       :
4486       ;;
4487     no)
4488       :
4489       ;;
4490     *)
4491       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
4492 echo "$as_me: error: no argument expected for --with-python option" >&2;}
4493    { (exit 1); exit 1; }; }
4494       ;;
4495   esac
4496
4497 else
4498   with_python=no
4499
4500 fi
4501
4502
4503 { echo "$as_me:$LINENO: result: $with_python" >&5
4504 echo "${ECHO_T}$with_python" >&6; }
4505
4506
4507 #
4508 # GSSAPI
4509 #
4510 { echo "$as_me:$LINENO: checking whether to build with GSSAPI support" >&5
4511 echo $ECHO_N "checking whether to build with GSSAPI support... $ECHO_C" >&6; }
4512
4513 pgac_args="$pgac_args with_gssapi"
4514
4515
4516 # Check whether --with-gssapi was given.
4517 if test "${with_gssapi+set}" = set; then
4518   withval=$with_gssapi;
4519   case $withval in
4520     yes)
4521
4522
4523 cat >>confdefs.h <<\_ACEOF
4524 #define ENABLE_GSS 1
4525 _ACEOF
4526
4527   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
4528
4529       ;;
4530     no)
4531       :
4532       ;;
4533     *)
4534       { { echo "$as_me:$LINENO: error: no argument expected for --with-gssapi option" >&5
4535 echo "$as_me: error: no argument expected for --with-gssapi option" >&2;}
4536    { (exit 1); exit 1; }; }
4537       ;;
4538   esac
4539
4540 else
4541   with_gssapi=no
4542
4543 fi
4544
4545
4546 { echo "$as_me:$LINENO: result: $with_gssapi" >&5
4547 echo "${ECHO_T}$with_gssapi" >&6; }
4548
4549
4550 #
4551 # Kerberos 5
4552 #
4553 { echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
4554 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6; }
4555
4556 pgac_args="$pgac_args with_krb5"
4557
4558
4559 # Check whether --with-krb5 was given.
4560 if test "${with_krb5+set}" = set; then
4561   withval=$with_krb5;
4562   case $withval in
4563     yes)
4564
4565
4566 cat >>confdefs.h <<\_ACEOF
4567 #define KRB5 1
4568 _ACEOF
4569
4570   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
4571
4572       ;;
4573     no)
4574       :
4575       ;;
4576     *)
4577       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
4578 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
4579    { (exit 1); exit 1; }; }
4580       ;;
4581   esac
4582
4583 else
4584   with_krb5=no
4585
4586 fi
4587
4588
4589 { echo "$as_me:$LINENO: result: $with_krb5" >&5
4590 echo "${ECHO_T}$with_krb5" >&6; }
4591
4592
4593
4594
4595
4596
4597 #
4598 # Kerberos configuration parameters
4599 #
4600
4601 pgac_args="$pgac_args with_krb_srvnam"
4602
4603
4604 # Check whether --with-krb-srvnam was given.
4605 if test "${with_krb_srvnam+set}" = set; then
4606   withval=$with_krb_srvnam;
4607   case $withval in
4608     yes)
4609       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
4610 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
4611    { (exit 1); exit 1; }; }
4612       ;;
4613     no)
4614       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
4615 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
4616    { (exit 1); exit 1; }; }
4617       ;;
4618     *)
4619
4620       ;;
4621   esac
4622
4623 else
4624   with_krb_srvnam="postgres"
4625 fi
4626
4627
4628
4629 cat >>confdefs.h <<_ACEOF
4630 #define PG_KRB_SRVNAM "$with_krb_srvnam"
4631 _ACEOF
4632
4633
4634
4635 #
4636 # PAM
4637 #
4638 { echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
4639 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6; }
4640
4641 pgac_args="$pgac_args with_pam"
4642
4643
4644 # Check whether --with-pam was given.
4645 if test "${with_pam+set}" = set; then
4646   withval=$with_pam;
4647   case $withval in
4648     yes)
4649
4650 cat >>confdefs.h <<\_ACEOF
4651 #define USE_PAM 1
4652 _ACEOF
4653
4654       ;;
4655     no)
4656       :
4657       ;;
4658     *)
4659       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
4660 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
4661    { (exit 1); exit 1; }; }
4662       ;;
4663   esac
4664
4665 else
4666   with_pam=no
4667
4668 fi
4669
4670
4671 { echo "$as_me:$LINENO: result: $with_pam" >&5
4672 echo "${ECHO_T}$with_pam" >&6; }
4673
4674
4675
4676 #
4677 # LDAP
4678 #
4679 { echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
4680 echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6; }
4681
4682 pgac_args="$pgac_args with_ldap"
4683
4684
4685 # Check whether --with-ldap was given.
4686 if test "${with_ldap+set}" = set; then
4687   withval=$with_ldap;
4688   case $withval in
4689     yes)
4690
4691 cat >>confdefs.h <<\_ACEOF
4692 #define USE_LDAP 1
4693 _ACEOF
4694
4695       ;;
4696     no)
4697       :
4698       ;;
4699     *)
4700       { { echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
4701 echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
4702    { (exit 1); exit 1; }; }
4703       ;;
4704   esac
4705
4706 else
4707   with_ldap=no
4708
4709 fi
4710
4711
4712 { echo "$as_me:$LINENO: result: $with_ldap" >&5
4713 echo "${ECHO_T}$with_ldap" >&6; }
4714
4715
4716
4717 #
4718 # Bonjour
4719 #
4720 { echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
4721 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6; }
4722
4723 pgac_args="$pgac_args with_bonjour"
4724
4725
4726 # Check whether --with-bonjour was given.
4727 if test "${with_bonjour+set}" = set; then
4728   withval=$with_bonjour;
4729   case $withval in
4730     yes)
4731
4732 cat >>confdefs.h <<\_ACEOF
4733 #define USE_BONJOUR 1
4734 _ACEOF
4735
4736       ;;
4737     no)
4738       :
4739       ;;
4740     *)
4741       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
4742 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
4743    { (exit 1); exit 1; }; }
4744       ;;
4745   esac
4746
4747 else
4748   with_bonjour=no
4749
4750 fi
4751
4752
4753 { echo "$as_me:$LINENO: result: $with_bonjour" >&5
4754 echo "${ECHO_T}$with_bonjour" >&6; }
4755
4756
4757
4758 #
4759 # OpenSSL
4760 #
4761 { echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
4762 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6; }
4763
4764 pgac_args="$pgac_args with_openssl"
4765
4766
4767 # Check whether --with-openssl was given.
4768 if test "${with_openssl+set}" = set; then
4769   withval=$with_openssl;
4770   case $withval in
4771     yes)
4772
4773 cat >>confdefs.h <<\_ACEOF
4774 #define USE_SSL 1
4775 _ACEOF
4776
4777       ;;
4778     no)
4779       :
4780       ;;
4781     *)
4782       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
4783 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
4784    { (exit 1); exit 1; }; }
4785       ;;
4786   esac
4787
4788 else
4789   with_openssl=no
4790
4791 fi
4792
4793
4794 { echo "$as_me:$LINENO: result: $with_openssl" >&5
4795 echo "${ECHO_T}$with_openssl" >&6; }
4796
4797
4798
4799 #
4800 # Readline
4801 #
4802
4803 pgac_args="$pgac_args with_readline"
4804
4805
4806 # Check whether --with-readline was given.
4807 if test "${with_readline+set}" = set; then
4808   withval=$with_readline;
4809   case $withval in
4810     yes)
4811       :
4812       ;;
4813     no)
4814       :
4815       ;;
4816     *)
4817       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
4818 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
4819    { (exit 1); exit 1; }; }
4820       ;;
4821   esac
4822
4823 else
4824   with_readline=yes
4825
4826 fi
4827
4828
4829 # readline on MinGW has problems with backslashes in psql and other bugs.
4830 # This is particularly a problem with non-US code pages.
4831 # Therefore disable its use until we understand the cause. 2004-07-20
4832 if test "$PORTNAME" = "win32"; then
4833   if test "$with_readline" = yes; then
4834     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
4835 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
4836     with_readline=no
4837   fi
4838 fi
4839
4840
4841 #
4842 # Prefer libedit
4843 #
4844
4845 pgac_args="$pgac_args with_libedit_preferred"
4846
4847
4848 # Check whether --with-libedit-preferred was given.
4849 if test "${with_libedit_preferred+set}" = set; then
4850   withval=$with_libedit_preferred;
4851   case $withval in
4852     yes)
4853       :
4854       ;;
4855     no)
4856       :
4857       ;;
4858     *)
4859       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
4860 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
4861    { (exit 1); exit 1; }; }
4862       ;;
4863   esac
4864
4865 else
4866   with_libedit_preferred=no
4867
4868 fi
4869
4870
4871
4872
4873 #
4874 # OSSP UUID library
4875 #
4876
4877 pgac_args="$pgac_args with_ossp_uuid"
4878
4879
4880 # Check whether --with-ossp-uuid was given.
4881 if test "${with_ossp_uuid+set}" = set; then
4882   withval=$with_ossp_uuid;
4883   case $withval in
4884     yes)
4885       :
4886       ;;
4887     no)
4888       :
4889       ;;
4890     *)
4891       { { echo "$as_me:$LINENO: error: no argument expected for --with-ossp-uuid option" >&5
4892 echo "$as_me: error: no argument expected for --with-ossp-uuid option" >&2;}
4893    { (exit 1); exit 1; }; }
4894       ;;
4895   esac
4896
4897 else
4898   with_ossp_uuid=no
4899
4900 fi
4901
4902
4903
4904
4905
4906 #
4907 # XML
4908 #
4909
4910 pgac_args="$pgac_args with_libxml"
4911
4912
4913 # Check whether --with-libxml was given.
4914 if test "${with_libxml+set}" = set; then
4915   withval=$with_libxml;
4916   case $withval in
4917     yes)
4918
4919 cat >>confdefs.h <<\_ACEOF
4920 #define USE_LIBXML 1
4921 _ACEOF
4922
4923       ;;
4924     no)
4925       :
4926       ;;
4927     *)
4928       { { echo "$as_me:$LINENO: error: no argument expected for --with-libxml option" >&5
4929 echo "$as_me: error: no argument expected for --with-libxml option" >&2;}
4930    { (exit 1); exit 1; }; }
4931       ;;
4932   esac
4933
4934 else
4935   with_libxml=no
4936
4937 fi
4938
4939
4940
4941 if test "$with_libxml" = yes ; then
4942   for ac_prog in xml2-config
4943 do
4944   # Extract the first word of "$ac_prog", so it can be a program name with args.
4945 set dummy $ac_prog; ac_word=$2
4946 { echo "$as_me:$LINENO: checking for $ac_word" >&5
4947 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4948 if test "${ac_cv_prog_XML2_CONFIG+set}" = set; then
4949   echo $ECHO_N "(cached) $ECHO_C" >&6
4950 else
4951   if test -n "$XML2_CONFIG"; then
4952   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
4953 else
4954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955 for as_dir in $PATH
4956 do
4957   IFS=$as_save_IFS
4958   test -z "$as_dir" && as_dir=.
4959   for ac_exec_ext in '' $ac_executable_extensions; do
4960   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4961     ac_cv_prog_XML2_CONFIG="$ac_prog"
4962     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4963     break 2
4964   fi
4965 done
4966 done
4967 IFS=$as_save_IFS
4968
4969 fi
4970 fi
4971 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
4972 if test -n "$XML2_CONFIG"; then
4973   { echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5
4974 echo "${ECHO_T}$XML2_CONFIG" >&6; }
4975 else
4976   { echo "$as_me:$LINENO: result: no" >&5
4977 echo "${ECHO_T}no" >&6; }
4978 fi
4979
4980
4981   test -n "$XML2_CONFIG" && break
4982 done
4983
4984   if test -n "$XML2_CONFIG"; then
4985     for pgac_option in `$XML2_CONFIG --cflags`; do
4986       case $pgac_option in
4987         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
4988       esac
4989     done
4990     for pgac_option in `$XML2_CONFIG --libs`; do
4991       case $pgac_option in
4992         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
4993       esac
4994     done
4995   fi
4996 fi
4997
4998
4999
5000 #
5001 # XSLT
5002 #
5003
5004 pgac_args="$pgac_args with_libxslt"
5005
5006
5007 # Check whether --with-libxslt was given.
5008 if test "${with_libxslt+set}" = set; then
5009   withval=$with_libxslt;
5010   case $withval in
5011     yes)
5012
5013 cat >>confdefs.h <<\_ACEOF
5014 #define USE_LIBXSLT 1
5015 _ACEOF
5016
5017       ;;
5018     no)
5019       :
5020       ;;
5021     *)
5022       { { echo "$as_me:$LINENO: error: no argument expected for --with-libxslt option" >&5
5023 echo "$as_me: error: no argument expected for --with-libxslt option" >&2;}
5024    { (exit 1); exit 1; }; }
5025       ;;
5026   esac
5027
5028 else
5029   with_libxslt=no
5030
5031 fi
5032
5033
5034
5035
5036
5037
5038 #
5039 # tzdata
5040 #
5041
5042 pgac_args="$pgac_args with_system_tzdata"
5043
5044
5045 # Check whether --with-system-tzdata was given.
5046 if test "${with_system_tzdata+set}" = set; then
5047   withval=$with_system_tzdata;
5048   case $withval in
5049     yes)
5050       { { echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
5051 echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
5052    { (exit 1); exit 1; }; }
5053       ;;
5054     no)
5055       { { echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
5056 echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
5057    { (exit 1); exit 1; }; }
5058       ;;
5059     *)
5060
5061       ;;
5062   esac
5063
5064 fi
5065
5066
5067
5068
5069 #
5070 # Zlib
5071 #
5072
5073 pgac_args="$pgac_args with_zlib"
5074
5075
5076 # Check whether --with-zlib was given.
5077 if test "${with_zlib+set}" = set; then
5078   withval=$with_zlib;
5079   case $withval in
5080     yes)
5081       :
5082       ;;
5083     no)
5084       :
5085       ;;
5086     *)
5087       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
5088 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
5089    { (exit 1); exit 1; }; }
5090       ;;
5091   esac
5092
5093 else
5094   with_zlib=yes
5095
5096 fi
5097
5098
5099
5100
5101 #
5102 # Elf
5103 #
5104
5105 # Assume system is ELF if it predefines __ELF__ as 1,
5106 # otherwise believe host_os based default.
5107 case $host_os in
5108     freebsd1*|freebsd2*) elf=no;;
5109     freebsd3*|freebsd4*) elf=yes;;
5110 esac
5111
5112
5113 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
5114 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
5115 if test "${ac_cv_path_GREP+set}" = set; then
5116   echo $ECHO_N "(cached) $ECHO_C" >&6
5117 else
5118   # Extract the first word of "grep ggrep" to use in msg output
5119 if test -z "$GREP"; then
5120 set dummy grep ggrep; ac_prog_name=$2
5121 if test "${ac_cv_path_GREP+set}" = set; then
5122   echo $ECHO_N "(cached) $ECHO_C" >&6
5123 else
5124   ac_path_GREP_found=false
5125 # Loop through the user's path and test for each of PROGNAME-LIST
5126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5127 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5128 do
5129   IFS=$as_save_IFS
5130   test -z "$as_dir" && as_dir=.
5131   for ac_prog in grep ggrep; do
5132   for ac_exec_ext in '' $ac_executable_extensions; do
5133     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5134     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5135     # Check for GNU ac_path_GREP and select it if it is found.
5136   # Check for GNU $ac_path_GREP
5137 case `"$ac_path_GREP" --version 2>&1` in
5138 *GNU*)
5139   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5140 *)
5141   ac_count=0
5142   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
5143   while :
5144   do
5145     cat "conftest.in" "conftest.in" >"conftest.tmp"
5146     mv "conftest.tmp" "conftest.in"
5147     cp "conftest.in" "conftest.nl"
5148     echo 'GREP' >> "conftest.nl"
5149     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5150     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5151     ac_count=`expr $ac_count + 1`
5152     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5153       # Best one so far, save it but keep looking for a better one
5154       ac_cv_path_GREP="$ac_path_GREP"
5155       ac_path_GREP_max=$ac_count
5156     fi
5157     # 10*(2^10) chars as input seems more than enough
5158     test $ac_count -gt 10 && break
5159   done
5160   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5161 esac
5162
5163
5164     $ac_path_GREP_found && break 3
5165   done
5166 done
5167
5168 done
5169 IFS=$as_save_IFS
5170
5171
5172 fi
5173
5174 GREP="$ac_cv_path_GREP"
5175 if test -z "$GREP"; then
5176   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5177 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5178    { (exit 1); exit 1; }; }
5179 fi
5180
5181 else
5182   ac_cv_path_GREP=$GREP
5183 fi
5184
5185
5186 fi
5187 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
5188 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
5189  GREP="$ac_cv_path_GREP"
5190
5191
5192 { echo "$as_me:$LINENO: checking for egrep" >&5
5193 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
5194 if test "${ac_cv_path_EGREP+set}" = set; then
5195   echo $ECHO_N "(cached) $ECHO_C" >&6
5196 else
5197   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5198    then ac_cv_path_EGREP="$GREP -E"
5199    else
5200      # Extract the first word of "egrep" to use in msg output
5201 if test -z "$EGREP"; then
5202 set dummy egrep; ac_prog_name=$2
5203 if test "${ac_cv_path_EGREP+set}" = set; then
5204   echo $ECHO_N "(cached) $ECHO_C" >&6
5205 else
5206   ac_path_EGREP_found=false
5207 # Loop through the user's path and test for each of PROGNAME-LIST
5208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5209 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5210 do
5211   IFS=$as_save_IFS
5212   test -z "$as_dir" && as_dir=.
5213   for ac_prog in egrep; do
5214   for ac_exec_ext in '' $ac_executable_extensions; do
5215     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5216     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5217     # Check for GNU ac_path_EGREP and select it if it is found.
5218   # Check for GNU $ac_path_EGREP
5219 case `"$ac_path_EGREP" --version 2>&1` in
5220 *GNU*)
5221   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5222 *)
5223   ac_count=0
5224   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
5225   while :
5226   do
5227     cat "conftest.in" "conftest.in" >"conftest.tmp"
5228     mv "conftest.tmp" "conftest.in"
5229     cp "conftest.in" "conftest.nl"
5230     echo 'EGREP' >> "conftest.nl"
5231     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5232     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5233     ac_count=`expr $ac_count + 1`
5234     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5235       # Best one so far, save it but keep looking for a better one
5236       ac_cv_path_EGREP="$ac_path_EGREP"
5237       ac_path_EGREP_max=$ac_count
5238     fi
5239     # 10*(2^10) chars as input seems more than enough
5240     test $ac_count -gt 10 && break
5241   done
5242   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5243 esac
5244
5245
5246     $ac_path_EGREP_found && break 3
5247   done
5248 done
5249
5250 done
5251 IFS=$as_save_IFS
5252
5253
5254 fi
5255
5256 EGREP="$ac_cv_path_EGREP"
5257 if test -z "$EGREP"; then
5258   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5259 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5260    { (exit 1); exit 1; }; }
5261 fi
5262
5263 else
5264   ac_cv_path_EGREP=$EGREP
5265 fi
5266
5267
5268    fi
5269 fi
5270 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
5271 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
5272  EGREP="$ac_cv_path_EGREP"
5273
5274
5275 cat >conftest.$ac_ext <<_ACEOF
5276 /* confdefs.h.  */
5277 _ACEOF
5278 cat confdefs.h >>conftest.$ac_ext
5279 cat >>conftest.$ac_ext <<_ACEOF
5280 /* end confdefs.h.  */
5281 #if __ELF__
5282   yes
5283 #endif
5284
5285 _ACEOF
5286 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5287   $EGREP "yes" >/dev/null 2>&1; then
5288   ELF_SYS=true
5289 else
5290   if test "X$elf" = "Xyes" ; then
5291   ELF_SYS=true
5292 else
5293   ELF_SYS=
5294 fi
5295 fi
5296 rm -f conftest*
5297
5298
5299
5300 #
5301 # Assignments
5302 #
5303
5304 CPPFLAGS="$CPPFLAGS $INCLUDES"
5305 LDFLAGS="$LDFLAGS $LIBDIRS"
5306
5307 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
5308 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
5309 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
5310 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
5311
5312
5313
5314
5315 # Check whether --with-gnu-ld was given.
5316 if test "${with_gnu_ld+set}" = set; then
5317   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
5318 else
5319   with_gnu_ld=no
5320 fi
5321
5322 ac_prog=ld
5323 if test "$GCC" = yes; then
5324   # Check if gcc -print-prog-name=ld gives a path.
5325   { echo "$as_me:$LINENO: checking for ld used by GCC" >&5
5326 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; }
5327   case $host in
5328   *-*-mingw*)
5329     # gcc leaves a trailing carriage return which upsets mingw
5330     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5331   *)
5332     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5333   esac
5334   case "$ac_prog" in
5335     # Accept absolute paths.
5336     [\\/]* | [A-Za-z]:[\\/]*)
5337       re_direlt='/[^/][^/]*/\.\./'
5338       # Canonicalize the path of ld
5339       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
5340       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
5341         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
5342       done
5343       test -z "$LD" && LD="$ac_prog"
5344       ;;
5345   "")
5346     # If it fails, then pretend we aren't using GCC.
5347     ac_prog=ld
5348     ;;
5349   *)
5350     # If it is relative, then search for the first ld in PATH.
5351     with_gnu_ld=unknown
5352     ;;
5353   esac
5354 elif test "$with_gnu_ld" = yes; then
5355   { echo "$as_me:$LINENO: checking for GNU ld" >&5
5356 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
5357 else
5358   { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
5359 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
5360 fi
5361 if test "${ac_cv_path_LD+set}" = set; then
5362   echo $ECHO_N "(cached) $ECHO_C" >&6
5363 else
5364   if test -z "$LD"; then
5365   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
5366   for ac_dir in $PATH; do
5367     test -z "$ac_dir" && ac_dir=.
5368     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5369       ac_cv_path_LD="$ac_dir/$ac_prog"
5370       # Check to see if the program is GNU ld.  I'd rather use --version,
5371       # but apparently some GNU ld's only accept -v.
5372       # Break only if it was the GNU/non-GNU ld that we prefer.
5373       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
5374         test "$with_gnu_ld" != no && break
5375       else
5376         test "$with_gnu_ld" != yes && break
5377       fi
5378     fi
5379   done
5380   IFS="$ac_save_ifs"
5381 else
5382   ac_cv_path_LD="$LD" # Let the user override the test with a path.
5383 fi
5384 fi
5385
5386 LD="$ac_cv_path_LD"
5387 if test -n "$LD"; then
5388   { echo "$as_me:$LINENO: result: $LD" >&5
5389 echo "${ECHO_T}$LD" >&6; }
5390 else
5391   { echo "$as_me:$LINENO: result: no" >&5
5392 echo "${ECHO_T}no" >&6; }
5393 fi
5394 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
5395 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
5396    { (exit 1); exit 1; }; }
5397 { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
5398 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
5399 if test "${ac_cv_prog_gnu_ld+set}" = set; then
5400   echo $ECHO_N "(cached) $ECHO_C" >&6
5401 else
5402   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
5403 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
5404   ac_cv_prog_gnu_ld=yes
5405 else
5406   ac_cv_prog_gnu_ld=no
5407 fi
5408 fi
5409 { echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
5410 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6; }
5411 with_gnu_ld=$ac_cv_prog_gnu_ld
5412
5413
5414
5415
5416 case $host_os in sysv5*)
5417   { echo "$as_me:$LINENO: checking whether ld -R works" >&5
5418 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6; }
5419 if test "${pgac_cv_prog_ld_R+set}" = set; then
5420   echo $ECHO_N "(cached) $ECHO_C" >&6
5421 else
5422
5423     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
5424     cat >conftest.$ac_ext <<_ACEOF
5425 /* confdefs.h.  */
5426 _ACEOF
5427 cat confdefs.h >>conftest.$ac_ext
5428 cat >>conftest.$ac_ext <<_ACEOF
5429 /* end confdefs.h.  */
5430
5431 int
5432 main ()
5433 {
5434
5435   ;
5436   return 0;
5437 }
5438 _ACEOF
5439 rm -f conftest.$ac_objext conftest$ac_exeext
5440 if { (ac_try="$ac_link"
5441 case "(($ac_try" in
5442   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5443   *) ac_try_echo=$ac_try;;
5444 esac
5445 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5446   (eval "$ac_link") 2>conftest.er1
5447   ac_status=$?
5448   grep -v '^ *+' conftest.er1 >conftest.err
5449   rm -f conftest.er1
5450   cat conftest.err >&5
5451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5452   (exit $ac_status); } && {
5453          test -z "$ac_c_werror_flag" ||
5454          test ! -s conftest.err
5455        } && test -s conftest$ac_exeext &&
5456        $as_test_x conftest$ac_exeext; then
5457   pgac_cv_prog_ld_R=yes
5458 else
5459   echo "$as_me: failed program was:" >&5
5460 sed 's/^/| /' conftest.$ac_ext >&5
5461
5462         pgac_cv_prog_ld_R=no
5463 fi
5464
5465 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5466       conftest$ac_exeext conftest.$ac_ext
5467     LDFLAGS=$pgac_save_LDFLAGS
5468
5469 fi
5470 { echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
5471 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6; }
5472   ld_R_works=$pgac_cv_prog_ld_R
5473
5474 esac
5475 if test -n "$ac_tool_prefix"; then
5476   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5477 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5478 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5479 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5480 if test "${ac_cv_prog_RANLIB+set}" = set; then
5481   echo $ECHO_N "(cached) $ECHO_C" >&6
5482 else
5483   if test -n "$RANLIB"; then
5484   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5485 else
5486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5487 for as_dir in $PATH
5488 do
5489   IFS=$as_save_IFS
5490   test -z "$as_dir" && as_dir=.
5491   for ac_exec_ext in '' $ac_executable_extensions; do
5492   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5493     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5494     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5495     break 2
5496   fi
5497 done
5498 done
5499 IFS=$as_save_IFS
5500
5501 fi
5502 fi
5503 RANLIB=$ac_cv_prog_RANLIB
5504 if test -n "$RANLIB"; then
5505   { echo "$as_me:$LINENO: result: $RANLIB" >&5
5506 echo "${ECHO_T}$RANLIB" >&6; }
5507 else
5508   { echo "$as_me:$LINENO: result: no" >&5
5509 echo "${ECHO_T}no" >&6; }
5510 fi
5511
5512
5513 fi
5514 if test -z "$ac_cv_prog_RANLIB"; then
5515   ac_ct_RANLIB=$RANLIB
5516   # Extract the first word of "ranlib", so it can be a program name with args.
5517 set dummy ranlib; ac_word=$2
5518 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5519 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5520 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5521   echo $ECHO_N "(cached) $ECHO_C" >&6
5522 else
5523   if test -n "$ac_ct_RANLIB"; then
5524   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5525 else
5526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5527 for as_dir in $PATH
5528 do
5529   IFS=$as_save_IFS
5530   test -z "$as_dir" && as_dir=.
5531   for ac_exec_ext in '' $ac_executable_extensions; do
5532   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5533     ac_cv_prog_ac_ct_RANLIB="ranlib"
5534     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5535     break 2
5536   fi
5537 done
5538 done
5539 IFS=$as_save_IFS
5540
5541 fi
5542 fi
5543 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5544 if test -n "$ac_ct_RANLIB"; then
5545   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5546 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
5547 else
5548   { echo "$as_me:$LINENO: result: no" >&5
5549 echo "${ECHO_T}no" >&6; }
5550 fi
5551
5552   if test "x$ac_ct_RANLIB" = x; then
5553     RANLIB=":"
5554   else
5555     case $cross_compiling:$ac_tool_warned in
5556 yes:)
5557 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5558 whose name does not start with the host triplet.  If you think this
5559 configuration is useful to you, please write to autoconf@gnu.org." >&5
5560 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5561 whose name does not start with the host triplet.  If you think this
5562 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5563 ac_tool_warned=yes ;;
5564 esac
5565     RANLIB=$ac_ct_RANLIB
5566   fi
5567 else
5568   RANLIB="$ac_cv_prog_RANLIB"
5569 fi
5570
5571
5572   if test -n "$ac_tool_prefix"; then
5573   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5574 set dummy ${ac_tool_prefix}strip; ac_word=$2
5575 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5576 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5577 if test "${ac_cv_prog_STRIP+set}" = set; then
5578   echo $ECHO_N "(cached) $ECHO_C" >&6
5579 else
5580   if test -n "$STRIP"; then
5581   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5582 else
5583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5584 for as_dir in $PATH
5585 do
5586   IFS=$as_save_IFS
5587   test -z "$as_dir" && as_dir=.
5588   for ac_exec_ext in '' $ac_executable_extensions; do
5589   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5590     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5591     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5592     break 2
5593   fi
5594 done
5595 done
5596 IFS=$as_save_IFS
5597
5598 fi
5599 fi
5600 STRIP=$ac_cv_prog_STRIP
5601 if test -n "$STRIP"; then
5602   { echo "$as_me:$LINENO: result: $STRIP" >&5
5603 echo "${ECHO_T}$STRIP" >&6; }
5604 else
5605   { echo "$as_me:$LINENO: result: no" >&5
5606 echo "${ECHO_T}no" >&6; }
5607 fi
5608
5609
5610 fi
5611 if test -z "$ac_cv_prog_STRIP"; then
5612   ac_ct_STRIP=$STRIP
5613   # Extract the first word of "strip", so it can be a program name with args.
5614 set dummy strip; ac_word=$2
5615 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5616 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5617 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
5618   echo $ECHO_N "(cached) $ECHO_C" >&6
5619 else
5620   if test -n "$ac_ct_STRIP"; then
5621   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5622 else
5623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5624 for as_dir in $PATH
5625 do
5626   IFS=$as_save_IFS
5627   test -z "$as_dir" && as_dir=.
5628   for ac_exec_ext in '' $ac_executable_extensions; do
5629   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5630     ac_cv_prog_ac_ct_STRIP="strip"
5631     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5632     break 2
5633   fi
5634 done
5635 done
5636 IFS=$as_save_IFS
5637
5638 fi
5639 fi
5640 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5641 if test -n "$ac_ct_STRIP"; then
5642   { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
5643 echo "${ECHO_T}$ac_ct_STRIP" >&6; }
5644 else
5645   { echo "$as_me:$LINENO: result: no" >&5
5646 echo "${ECHO_T}no" >&6; }
5647 fi
5648
5649   if test "x$ac_ct_STRIP" = x; then
5650     STRIP=":"
5651   else
5652     case $cross_compiling:$ac_tool_warned in
5653 yes:)
5654 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5655 whose name does not start with the host triplet.  If you think this
5656 configuration is useful to you, please write to autoconf@gnu.org." >&5
5657 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5658 whose name does not start with the host triplet.  If you think this
5659 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5660 ac_tool_warned=yes ;;
5661 esac
5662     STRIP=$ac_ct_STRIP
5663   fi
5664 else
5665   STRIP="$ac_cv_prog_STRIP"
5666 fi
5667
5668
5669   { echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
5670 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6; }
5671   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
5672     STRIP_STATIC_LIB="$STRIP -x"
5673     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
5674     { echo "$as_me:$LINENO: result: yes" >&5
5675 echo "${ECHO_T}yes" >&6; }
5676   else
5677     STRIP_STATIC_LIB=:
5678     STRIP_SHARED_LIB=:
5679     { echo "$as_me:$LINENO: result: no" >&5
5680 echo "${ECHO_T}no" >&6; }
5681   fi
5682
5683
5684
5685
5686 # Extract the first word of "tar", so it can be a program name with args.
5687 set dummy tar; ac_word=$2
5688 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5689 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5690 if test "${ac_cv_path_TAR+set}" = set; then
5691   echo $ECHO_N "(cached) $ECHO_C" >&6
5692 else
5693   case $TAR in
5694   [\\/]* | ?:[\\/]*)
5695   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5696   ;;
5697   *)
5698   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5699 for as_dir in $PATH
5700 do
5701   IFS=$as_save_IFS
5702   test -z "$as_dir" && as_dir=.
5703   for ac_exec_ext in '' $ac_executable_extensions; do
5704   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5705     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5706     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5707     break 2
5708   fi
5709 done
5710 done
5711 IFS=$as_save_IFS
5712
5713   ;;
5714 esac
5715 fi
5716 TAR=$ac_cv_path_TAR
5717 if test -n "$TAR"; then
5718   { echo "$as_me:$LINENO: result: $TAR" >&5
5719 echo "${ECHO_T}$TAR" >&6; }
5720 else
5721   { echo "$as_me:$LINENO: result: no" >&5
5722 echo "${ECHO_T}no" >&6; }
5723 fi
5724
5725
5726 { echo "$as_me:$LINENO: checking whether ln -s works" >&5
5727 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
5728 LN_S=$as_ln_s
5729 if test "$LN_S" = "ln -s"; then
5730   { echo "$as_me:$LINENO: result: yes" >&5
5731 echo "${ECHO_T}yes" >&6; }
5732 else
5733   { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
5734 echo "${ECHO_T}no, using $LN_S" >&6; }
5735 fi
5736
5737 for ac_prog in gawk mawk nawk awk
5738 do
5739   # Extract the first word of "$ac_prog", so it can be a program name with args.
5740 set dummy $ac_prog; ac_word=$2
5741 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5742 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5743 if test "${ac_cv_prog_AWK+set}" = set; then
5744   echo $ECHO_N "(cached) $ECHO_C" >&6
5745 else
5746   if test -n "$AWK"; then
5747   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5748 else
5749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5750 for as_dir in $PATH
5751 do
5752   IFS=$as_save_IFS
5753   test -z "$as_dir" && as_dir=.
5754   for ac_exec_ext in '' $ac_executable_extensions; do
5755   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5756     ac_cv_prog_AWK="$ac_prog"
5757     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5758     break 2
5759   fi
5760 done
5761 done
5762 IFS=$as_save_IFS
5763
5764 fi
5765 fi
5766 AWK=$ac_cv_prog_AWK
5767 if test -n "$AWK"; then
5768   { echo "$as_me:$LINENO: result: $AWK" >&5
5769 echo "${ECHO_T}$AWK" >&6; }
5770 else
5771   { echo "$as_me:$LINENO: result: no" >&5
5772 echo "${ECHO_T}no" >&6; }
5773 fi
5774
5775
5776   test -n "$AWK" && break
5777 done
5778
5779
5780 # Let the user override the search
5781 if test -z "$YACC"; then
5782   for ac_prog in 'bison -y'
5783 do
5784   # Extract the first word of "$ac_prog", so it can be a program name with args.
5785 set dummy $ac_prog; ac_word=$2
5786 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5787 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5788 if test "${ac_cv_prog_YACC+set}" = set; then
5789   echo $ECHO_N "(cached) $ECHO_C" >&6
5790 else
5791   if test -n "$YACC"; then
5792   ac_cv_prog_YACC="$YACC" # Let the user override the test.
5793 else
5794 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5795 for as_dir in $PATH
5796 do
5797   IFS=$as_save_IFS
5798   test -z "$as_dir" && as_dir=.
5799   for ac_exec_ext in '' $ac_executable_extensions; do
5800   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5801     ac_cv_prog_YACC="$ac_prog"
5802     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5803     break 2
5804   fi
5805 done
5806 done
5807 IFS=$as_save_IFS
5808
5809 fi
5810 fi
5811 YACC=$ac_cv_prog_YACC
5812 if test -n "$YACC"; then
5813   { echo "$as_me:$LINENO: result: $YACC" >&5
5814 echo "${ECHO_T}$YACC" >&6; }
5815 else
5816   { echo "$as_me:$LINENO: result: no" >&5
5817 echo "${ECHO_T}no" >&6; }
5818 fi
5819
5820
5821   test -n "$YACC" && break
5822 done
5823
5824 fi
5825
5826 if test "$YACC"; then
5827   pgac_yacc_version=`$YACC --version 2>/dev/null | sed q`
5828   { echo "$as_me:$LINENO: using $pgac_yacc_version" >&5
5829 echo "$as_me: using $pgac_yacc_version" >&6;}
5830   if echo "$pgac_yacc_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
5831   then
5832     { echo "$as_me:$LINENO: WARNING:
5833 *** The installed version of Bison is too old to use with PostgreSQL.
5834 *** Bison version 1.875 or later is required." >&5
5835 echo "$as_me: WARNING:
5836 *** The installed version of Bison is too old to use with PostgreSQL.
5837 *** Bison version 1.875 or later is required." >&2;}
5838     YACC=""
5839   fi
5840 fi
5841
5842 if test -z "$YACC"; then
5843   { echo "$as_me:$LINENO: WARNING:
5844 *** Without Bison you will not be able to build PostgreSQL from CVS nor
5845 *** change any of the parser definition files.  You can obtain Bison from
5846 *** a GNU mirror site.  (If you are using the official distribution of
5847 *** PostgreSQL then you do not need to worry about this, because the Bison
5848 *** output is pre-generated.)  To use a different yacc program (possible,
5849 *** but not recommended), set the environment variable YACC before running
5850 *** 'configure'." >&5
5851 echo "$as_me: WARNING:
5852 *** Without Bison you will not be able to build PostgreSQL from CVS nor
5853 *** change any of the parser definition files.  You can obtain Bison from
5854 *** a GNU mirror site.  (If you are using the official distribution of
5855 *** PostgreSQL then you do not need to worry about this, because the Bison
5856 *** output is pre-generated.)  To use a different yacc program (possible,
5857 *** but not recommended), set the environment variable YACC before running
5858 *** 'configure'." >&2;}
5859 fi
5860 # We don't need AC_SUBST(YACC) because AC_PATH_PROG did it
5861
5862
5863 { echo "$as_me:$LINENO: checking for flex" >&5
5864 echo $ECHO_N "checking for flex... $ECHO_C" >&6; }
5865 if test "${pgac_cv_path_flex+set}" = set; then
5866   echo $ECHO_N "(cached) $ECHO_C" >&6
5867 else
5868   # Let the user override the test
5869 if test -n "$FLEX"; then
5870   pgac_cv_path_flex=$FLEX
5871 else
5872   pgac_save_IFS=$IFS
5873   IFS=$PATH_SEPARATOR
5874   for pgac_dir in $PATH; do
5875     IFS=$pgac_save_IFS
5876     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
5877       pgac_dir=`pwd`
5878     fi
5879     for pgac_prog in flex lex; do
5880       pgac_candidate="$pgac_dir/$pgac_prog"
5881       if test -f "$pgac_candidate" \
5882         && $pgac_candidate --version </dev/null >/dev/null 2>&1
5883       then
5884         echo '%%'  > conftest.l
5885         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
5886           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
5887             pgac_broken_flex=$pgac_candidate
5888             continue
5889           fi
5890
5891           pgac_cv_path_flex=$pgac_candidate
5892           break 2
5893         fi
5894       fi
5895     done
5896   done
5897   rm -f conftest.l lex.yy.c
5898   : ${pgac_cv_path_flex=no}
5899 fi
5900
5901 fi
5902 { echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
5903 echo "${ECHO_T}$pgac_cv_path_flex" >&6; }
5904 if test x"$pgac_cv_path_flex" = x"no"; then
5905   if test -n "$pgac_broken_flex"; then
5906     { echo "$as_me:$LINENO: WARNING:
5907 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
5908 *** should get version 2.5.4 or later." >&5
5909 echo "$as_me: WARNING:
5910 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
5911 *** should get version 2.5.4 or later." >&2;}
5912   fi
5913
5914   { echo "$as_me:$LINENO: WARNING:
5915 *** Without Flex you will not be able to build PostgreSQL from CVS or
5916 *** change any of the scanner definition files.  You can obtain Flex from
5917 *** a GNU mirror site.  (If you are using the official distribution of
5918 *** PostgreSQL then you do not need to worry about this because the Flex
5919 *** output is pre-generated.)" >&5
5920 echo "$as_me: WARNING:
5921 *** Without Flex you will not be able to build PostgreSQL from CVS or
5922 *** change any of the scanner definition files.  You can obtain Flex from
5923 *** a GNU mirror site.  (If you are using the official distribution of
5924 *** PostgreSQL then you do not need to worry about this because the Flex
5925 *** output is pre-generated.)" >&2;}
5926
5927   FLEX=
5928 else
5929   FLEX=$pgac_cv_path_flex
5930   pgac_flex_version=`$FLEX -V 2>/dev/null`
5931   { echo "$as_me:$LINENO: using $pgac_flex_version" >&5
5932 echo "$as_me: using $pgac_flex_version" >&6;}
5933 fi
5934
5935
5936
5937
5938
5939 # Extract the first word of "perl", so it can be a program name with args.
5940 set dummy perl; ac_word=$2
5941 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5942 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5943 if test "${ac_cv_path_PERL+set}" = set; then
5944   echo $ECHO_N "(cached) $ECHO_C" >&6
5945 else
5946   case $PERL in
5947   [\\/]* | ?:[\\/]*)
5948   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
5949   ;;
5950   *)
5951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5952 for as_dir in $PATH
5953 do
5954   IFS=$as_save_IFS
5955   test -z "$as_dir" && as_dir=.
5956   for ac_exec_ext in '' $ac_executable_extensions; do
5957   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5958     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5959     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5960     break 2
5961   fi
5962 done
5963 done
5964 IFS=$as_save_IFS
5965
5966   ;;
5967 esac
5968 fi
5969 PERL=$ac_cv_path_PERL
5970 if test -n "$PERL"; then
5971   { echo "$as_me:$LINENO: result: $PERL" >&5
5972 echo "${ECHO_T}$PERL" >&6; }
5973 else
5974   { echo "$as_me:$LINENO: result: no" >&5
5975 echo "${ECHO_T}no" >&6; }
5976 fi
5977
5978
5979 if test "$with_perl" = yes; then
5980
5981 { echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
5982 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6; }
5983 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
5984 { echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
5985 echo "${ECHO_T}$perl_archlibexp" >&6; }
5986 { echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
5987 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6; }
5988 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
5989 { echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
5990 echo "${ECHO_T}$perl_privlibexp" >&6; }
5991 { echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
5992 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6; }
5993 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
5994 { echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
5995 echo "${ECHO_T}$perl_useshrplib" >&6; }
5996
5997 { echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
5998 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6; }
5999 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
6000 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
6001 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
6002 { echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
6003 echo "${ECHO_T}$perl_embed_ldflags" >&6; }
6004 fi
6005
6006 if test "$with_python" = yes; then
6007   # Extract the first word of "python", so it can be a program name with args.
6008 set dummy python; ac_word=$2
6009 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6010 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6011 if test "${ac_cv_path_PYTHON+set}" = set; then
6012   echo $ECHO_N "(cached) $ECHO_C" >&6
6013 else
6014   case $PYTHON in
6015   [\\/]* | ?:[\\/]*)
6016   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
6017   ;;
6018   *)
6019   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6020 for as_dir in $PATH
6021 do
6022   IFS=$as_save_IFS
6023   test -z "$as_dir" && as_dir=.
6024   for ac_exec_ext in '' $ac_executable_extensions; do
6025   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6026     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
6027     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6028     break 2
6029   fi
6030 done
6031 done
6032 IFS=$as_save_IFS
6033
6034   ;;
6035 esac
6036 fi
6037 PYTHON=$ac_cv_path_PYTHON
6038 if test -n "$PYTHON"; then
6039   { echo "$as_me:$LINENO: result: $PYTHON" >&5
6040 echo "${ECHO_T}$PYTHON" >&6; }
6041 else
6042   { echo "$as_me:$LINENO: result: no" >&5
6043 echo "${ECHO_T}no" >&6; }
6044 fi
6045
6046
6047 if test x"$PYTHON" = x""; then
6048   { { echo "$as_me:$LINENO: error: Python not found" >&5
6049 echo "$as_me: error: Python not found" >&2;}
6050    { (exit 1); exit 1; }; }
6051 fi
6052
6053
6054 { echo "$as_me:$LINENO: checking for Python distutils module" >&5
6055 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6; }
6056 if "${PYTHON}" 2>&- -c 'import distutils'
6057 then
6058     { echo "$as_me:$LINENO: result: yes" >&5
6059 echo "${ECHO_T}yes" >&6; }
6060 else
6061     { echo "$as_me:$LINENO: result: no" >&5
6062 echo "${ECHO_T}no" >&6; }
6063     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
6064 echo "$as_me: error: distutils module not found" >&2;}
6065    { (exit 1); exit 1; }; }
6066 fi
6067 { echo "$as_me:$LINENO: checking Python configuration directory" >&5
6068 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6; }
6069 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
6070 python_configdir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib as f; import os; print os.path.join(f(plat_specific=1,standard_lib=1),'config')"`
6071 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
6072
6073 # This should be enough of a message.
6074 { echo "$as_me:$LINENO: result: $python_configdir" >&5
6075 echo "${ECHO_T}$python_configdir" >&6; }
6076
6077
6078 { echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
6079 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6; }
6080
6081 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
6082 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
6083 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
6084 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
6085
6086 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
6087 then
6088         # New way: use the official shared library
6089         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
6090         python_libspec="-L${python_libdir} -l${ldlibrary}"
6091 else
6092         # Old way: use libpython from python_configdir
6093         python_libdir="${python_configdir}"
6094         python_libspec="-L${python_libdir} -lpython${python_version}"
6095 fi
6096
6097 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
6098
6099 { echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
6100 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6; }
6101
6102
6103 # threaded python is not supported on bsd's
6104 { echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
6105 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6; }
6106 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
6107 if test "$pythreads" = "1"; then
6108   { echo "$as_me:$LINENO: result: yes" >&5
6109 echo "${ECHO_T}yes" >&6; }
6110   case $host_os in
6111   openbsd*|freebsd*)
6112     { { echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
6113 echo "$as_me: error: threaded Python not supported on this platform" >&2;}
6114    { (exit 1); exit 1; }; }
6115     ;;
6116   esac
6117 else
6118   { echo "$as_me:$LINENO: result: no" >&5
6119 echo "${ECHO_T}no" >&6; }
6120 fi
6121
6122
6123 fi
6124
6125 # Supply a numeric version string for use by 3rd party add-ons
6126 # awk -F is a regex on some platforms, and not on others, so make "." a tab
6127 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
6128 tr '.' '        ' |
6129 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
6130
6131 cat >>confdefs.h <<_ACEOF
6132 #define PG_VERSION_NUM $PG_VERSION_NUM
6133 _ACEOF
6134
6135
6136 ##
6137 ## Libraries
6138 ##
6139 ## Most libraries are included only if they demonstrably provide a function
6140 ## we need, but libm is an exception: always include it, because there are
6141 ## too many compilers that play cute optimization games that will break
6142 ## probes for standard functions such as pow().
6143 ##
6144
6145
6146 { echo "$as_me:$LINENO: checking for main in -lm" >&5
6147 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; }
6148 if test "${ac_cv_lib_m_main+set}" = set; then
6149   echo $ECHO_N "(cached) $ECHO_C" >&6
6150 else
6151   ac_check_lib_save_LIBS=$LIBS
6152 LIBS="-lm  $LIBS"
6153 cat >conftest.$ac_ext <<_ACEOF
6154 /* confdefs.h.  */
6155 _ACEOF
6156 cat confdefs.h >>conftest.$ac_ext
6157 cat >>conftest.$ac_ext <<_ACEOF
6158 /* end confdefs.h.  */
6159
6160
6161 int
6162 main ()
6163 {
6164 return main ();
6165   ;
6166   return 0;
6167 }
6168 _ACEOF
6169 rm -f conftest.$ac_objext conftest$ac_exeext
6170 if { (ac_try="$ac_link"
6171 case "(($ac_try" in
6172   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6173   *) ac_try_echo=$ac_try;;
6174 esac
6175 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6176   (eval "$ac_link") 2>conftest.er1
6177   ac_status=$?
6178   grep -v '^ *+' conftest.er1 >conftest.err
6179   rm -f conftest.er1
6180   cat conftest.err >&5
6181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6182   (exit $ac_status); } && {
6183          test -z "$ac_c_werror_flag" ||
6184          test ! -s conftest.err
6185        } && test -s conftest$ac_exeext &&
6186        $as_test_x conftest$ac_exeext; then
6187   ac_cv_lib_m_main=yes
6188 else
6189   echo "$as_me: failed program was:" >&5
6190 sed 's/^/| /' conftest.$ac_ext >&5
6191
6192         ac_cv_lib_m_main=no
6193 fi
6194
6195 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6196       conftest$ac_exeext conftest.$ac_ext
6197 LIBS=$ac_check_lib_save_LIBS
6198 fi
6199 { echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
6200 echo "${ECHO_T}$ac_cv_lib_m_main" >&6; }
6201 if test $ac_cv_lib_m_main = yes; then
6202   cat >>confdefs.h <<_ACEOF
6203 #define HAVE_LIBM 1
6204 _ACEOF
6205
6206   LIBS="-lm $LIBS"
6207
6208 fi
6209
6210 { echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
6211 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6; }
6212 if test "${ac_cv_search_setproctitle+set}" = set; then
6213   echo $ECHO_N "(cached) $ECHO_C" >&6
6214 else
6215   ac_func_search_save_LIBS=$LIBS
6216 cat >conftest.$ac_ext <<_ACEOF
6217 /* confdefs.h.  */
6218 _ACEOF
6219 cat confdefs.h >>conftest.$ac_ext
6220 cat >>conftest.$ac_ext <<_ACEOF
6221 /* end confdefs.h.  */
6222
6223 /* Override any GCC internal prototype to avoid an error.
6224    Use char because int might match the return type of a GCC
6225    builtin and then its argument prototype would still apply.  */
6226 #ifdef __cplusplus
6227 extern "C"
6228 #endif
6229 char setproctitle ();
6230 int
6231 main ()
6232 {
6233 return setproctitle ();
6234   ;
6235   return 0;
6236 }
6237 _ACEOF
6238 for ac_lib in '' util; do
6239   if test -z "$ac_lib"; then
6240     ac_res="none required"
6241   else
6242     ac_res=-l$ac_lib
6243     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6244   fi
6245   rm -f conftest.$ac_objext conftest$ac_exeext
6246 if { (ac_try="$ac_link"
6247 case "(($ac_try" in
6248   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6249   *) ac_try_echo=$ac_try;;
6250 esac
6251 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6252   (eval "$ac_link") 2>conftest.er1
6253   ac_status=$?
6254   grep -v '^ *+' conftest.er1 >conftest.err
6255   rm -f conftest.er1
6256   cat conftest.err >&5
6257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6258   (exit $ac_status); } && {
6259          test -z "$ac_c_werror_flag" ||
6260          test ! -s conftest.err
6261        } && test -s conftest$ac_exeext &&
6262        $as_test_x conftest$ac_exeext; then
6263   ac_cv_search_setproctitle=$ac_res
6264 else
6265   echo "$as_me: failed program was:" >&5
6266 sed 's/^/| /' conftest.$ac_ext >&5
6267
6268
6269 fi
6270
6271 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6272       conftest$ac_exeext
6273   if test "${ac_cv_search_setproctitle+set}" = set; then
6274   break
6275 fi
6276 done
6277 if test "${ac_cv_search_setproctitle+set}" = set; then
6278   :
6279 else
6280   ac_cv_search_setproctitle=no
6281 fi
6282 rm conftest.$ac_ext
6283 LIBS=$ac_func_search_save_LIBS
6284 fi
6285 { echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
6286 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6; }
6287 ac_res=$ac_cv_search_setproctitle
6288 if test "$ac_res" != no; then
6289   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6290
6291 fi
6292
6293 { echo "$as_me:$LINENO: checking for library containing dlopen" >&5
6294 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; }
6295 if test "${ac_cv_search_dlopen+set}" = set; then
6296   echo $ECHO_N "(cached) $ECHO_C" >&6
6297 else
6298   ac_func_search_save_LIBS=$LIBS
6299 cat >conftest.$ac_ext <<_ACEOF
6300 /* confdefs.h.  */
6301 _ACEOF
6302 cat confdefs.h >>conftest.$ac_ext
6303 cat >>conftest.$ac_ext <<_ACEOF
6304 /* end confdefs.h.  */
6305
6306 /* Override any GCC internal prototype to avoid an error.
6307    Use char because int might match the return type of a GCC
6308    builtin and then its argument prototype would still apply.  */
6309 #ifdef __cplusplus
6310 extern "C"
6311 #endif
6312 char dlopen ();
6313 int
6314 main ()
6315 {
6316 return dlopen ();
6317   ;
6318   return 0;
6319 }
6320 _ACEOF
6321 for ac_lib in '' dl; do
6322   if test -z "$ac_lib"; then
6323     ac_res="none required"
6324   else
6325     ac_res=-l$ac_lib
6326     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6327   fi
6328   rm -f conftest.$ac_objext conftest$ac_exeext
6329 if { (ac_try="$ac_link"
6330 case "(($ac_try" in
6331   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6332   *) ac_try_echo=$ac_try;;
6333 esac
6334 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6335   (eval "$ac_link") 2>conftest.er1
6336   ac_status=$?
6337   grep -v '^ *+' conftest.er1 >conftest.err
6338   rm -f conftest.er1
6339   cat conftest.err >&5
6340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6341   (exit $ac_status); } && {
6342          test -z "$ac_c_werror_flag" ||
6343          test ! -s conftest.err
6344        } && test -s conftest$ac_exeext &&
6345        $as_test_x conftest$ac_exeext; then
6346   ac_cv_search_dlopen=$ac_res
6347 else
6348   echo "$as_me: failed program was:" >&5
6349 sed 's/^/| /' conftest.$ac_ext >&5
6350
6351
6352 fi
6353
6354 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6355       conftest$ac_exeext
6356   if test "${ac_cv_search_dlopen+set}" = set; then
6357   break
6358 fi
6359 done
6360 if test "${ac_cv_search_dlopen+set}" = set; then
6361   :
6362 else
6363   ac_cv_search_dlopen=no
6364 fi
6365 rm conftest.$ac_ext
6366 LIBS=$ac_func_search_save_LIBS
6367 fi
6368 { echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
6369 echo "${ECHO_T}$ac_cv_search_dlopen" >&6; }
6370 ac_res=$ac_cv_search_dlopen
6371 if test "$ac_res" != no; then
6372   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6373
6374 fi
6375
6376 { echo "$as_me:$LINENO: checking for library containing socket" >&5
6377 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6; }
6378 if test "${ac_cv_search_socket+set}" = set; then
6379   echo $ECHO_N "(cached) $ECHO_C" >&6
6380 else
6381   ac_func_search_save_LIBS=$LIBS
6382 cat >conftest.$ac_ext <<_ACEOF
6383 /* confdefs.h.  */
6384 _ACEOF
6385 cat confdefs.h >>conftest.$ac_ext
6386 cat >>conftest.$ac_ext <<_ACEOF
6387 /* end confdefs.h.  */
6388
6389 /* Override any GCC internal prototype to avoid an error.
6390    Use char because int might match the return type of a GCC
6391    builtin and then its argument prototype would still apply.  */
6392 #ifdef __cplusplus
6393 extern "C"
6394 #endif
6395 char socket ();
6396 int
6397 main ()
6398 {
6399 return socket ();
6400   ;
6401   return 0;
6402 }
6403 _ACEOF
6404 for ac_lib in '' socket wsock32; do
6405   if test -z "$ac_lib"; then
6406     ac_res="none required"
6407   else
6408     ac_res=-l$ac_lib
6409     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6410   fi
6411   rm -f conftest.$ac_objext conftest$ac_exeext
6412 if { (ac_try="$ac_link"
6413 case "(($ac_try" in
6414   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6415   *) ac_try_echo=$ac_try;;
6416 esac
6417 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6418   (eval "$ac_link") 2>conftest.er1
6419   ac_status=$?
6420   grep -v '^ *+' conftest.er1 >conftest.err
6421   rm -f conftest.er1
6422   cat conftest.err >&5
6423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6424   (exit $ac_status); } && {
6425          test -z "$ac_c_werror_flag" ||
6426          test ! -s conftest.err
6427        } && test -s conftest$ac_exeext &&
6428        $as_test_x conftest$ac_exeext; then
6429   ac_cv_search_socket=$ac_res
6430 else
6431   echo "$as_me: failed program was:" >&5
6432 sed 's/^/| /' conftest.$ac_ext >&5
6433
6434
6435 fi
6436
6437 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6438       conftest$ac_exeext
6439   if test "${ac_cv_search_socket+set}" = set; then
6440   break
6441 fi
6442 done
6443 if test "${ac_cv_search_socket+set}" = set; then
6444   :
6445 else
6446   ac_cv_search_socket=no
6447 fi
6448 rm conftest.$ac_ext
6449 LIBS=$ac_func_search_save_LIBS
6450 fi
6451 { echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
6452 echo "${ECHO_T}$ac_cv_search_socket" >&6; }
6453 ac_res=$ac_cv_search_socket
6454 if test "$ac_res" != no; then
6455   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6456
6457 fi
6458
6459 { echo "$as_me:$LINENO: checking for library containing shl_load" >&5
6460 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6; }
6461 if test "${ac_cv_search_shl_load+set}" = set; then
6462   echo $ECHO_N "(cached) $ECHO_C" >&6
6463 else
6464   ac_func_search_save_LIBS=$LIBS
6465 cat >conftest.$ac_ext <<_ACEOF
6466 /* confdefs.h.  */
6467 _ACEOF
6468 cat confdefs.h >>conftest.$ac_ext
6469 cat >>conftest.$ac_ext <<_ACEOF
6470 /* end confdefs.h.  */
6471
6472 /* Override any GCC internal prototype to avoid an error.
6473    Use char because int might match the return type of a GCC
6474    builtin and then its argument prototype would still apply.  */
6475 #ifdef __cplusplus
6476 extern "C"
6477 #endif
6478 char shl_load ();
6479 int
6480 main ()
6481 {
6482 return shl_load ();
6483   ;
6484   return 0;
6485 }
6486 _ACEOF
6487 for ac_lib in '' dld; do
6488   if test -z "$ac_lib"; then
6489     ac_res="none required"
6490   else
6491     ac_res=-l$ac_lib
6492     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6493   fi
6494   rm -f conftest.$ac_objext conftest$ac_exeext
6495 if { (ac_try="$ac_link"
6496 case "(($ac_try" in
6497   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6498   *) ac_try_echo=$ac_try;;
6499 esac
6500 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6501   (eval "$ac_link") 2>conftest.er1
6502   ac_status=$?
6503   grep -v '^ *+' conftest.er1 >conftest.err
6504   rm -f conftest.er1
6505   cat conftest.err >&5
6506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6507   (exit $ac_status); } && {
6508          test -z "$ac_c_werror_flag" ||
6509          test ! -s conftest.err
6510        } && test -s conftest$ac_exeext &&
6511        $as_test_x conftest$ac_exeext; then
6512   ac_cv_search_shl_load=$ac_res
6513 else
6514   echo "$as_me: failed program was:" >&5
6515 sed 's/^/| /' conftest.$ac_ext >&5
6516
6517
6518 fi
6519
6520 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6521       conftest$ac_exeext
6522   if test "${ac_cv_search_shl_load+set}" = set; then
6523   break
6524 fi
6525 done
6526 if test "${ac_cv_search_shl_load+set}" = set; then
6527   :
6528 else
6529   ac_cv_search_shl_load=no
6530 fi
6531 rm conftest.$ac_ext
6532 LIBS=$ac_func_search_save_LIBS
6533 fi
6534 { echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
6535 echo "${ECHO_T}$ac_cv_search_shl_load" >&6; }
6536 ac_res=$ac_cv_search_shl_load
6537 if test "$ac_res" != no; then
6538   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6539
6540 fi
6541
6542 # We only use libld in port/dynloader/aix.c
6543 case $host_os in
6544      aix*)
6545         { echo "$as_me:$LINENO: checking for library containing ldopen" >&5
6546 echo $ECHO_N "checking for library containing ldopen... $ECHO_C" >&6; }
6547 if test "${ac_cv_search_ldopen+set}" = set; then
6548   echo $ECHO_N "(cached) $ECHO_C" >&6
6549 else
6550   ac_func_search_save_LIBS=$LIBS
6551 cat >conftest.$ac_ext <<_ACEOF
6552 /* confdefs.h.  */
6553 _ACEOF
6554 cat confdefs.h >>conftest.$ac_ext
6555 cat >>conftest.$ac_ext <<_ACEOF
6556 /* end confdefs.h.  */
6557
6558 /* Override any GCC internal prototype to avoid an error.
6559    Use char because int might match the return type of a GCC
6560    builtin and then its argument prototype would still apply.  */
6561 #ifdef __cplusplus
6562 extern "C"
6563 #endif
6564 char ldopen ();
6565 int
6566 main ()
6567 {
6568 return ldopen ();
6569   ;
6570   return 0;
6571 }
6572 _ACEOF
6573 for ac_lib in '' ld; do
6574   if test -z "$ac_lib"; then
6575     ac_res="none required"
6576   else
6577     ac_res=-l$ac_lib
6578     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6579   fi
6580   rm -f conftest.$ac_objext conftest$ac_exeext
6581 if { (ac_try="$ac_link"
6582 case "(($ac_try" in
6583   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6584   *) ac_try_echo=$ac_try;;
6585 esac
6586 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6587   (eval "$ac_link") 2>conftest.er1
6588   ac_status=$?
6589   grep -v '^ *+' conftest.er1 >conftest.err
6590   rm -f conftest.er1
6591   cat conftest.err >&5
6592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6593   (exit $ac_status); } && {
6594          test -z "$ac_c_werror_flag" ||
6595          test ! -s conftest.err
6596        } && test -s conftest$ac_exeext &&
6597        $as_test_x conftest$ac_exeext; then
6598   ac_cv_search_ldopen=$ac_res
6599 else
6600   echo "$as_me: failed program was:" >&5
6601 sed 's/^/| /' conftest.$ac_ext >&5
6602
6603
6604 fi
6605
6606 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6607       conftest$ac_exeext
6608   if test "${ac_cv_search_ldopen+set}" = set; then
6609   break
6610 fi
6611 done
6612 if test "${ac_cv_search_ldopen+set}" = set; then
6613   :
6614 else
6615   ac_cv_search_ldopen=no
6616 fi
6617 rm conftest.$ac_ext
6618 LIBS=$ac_func_search_save_LIBS
6619 fi
6620 { echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
6621 echo "${ECHO_T}$ac_cv_search_ldopen" >&6; }
6622 ac_res=$ac_cv_search_ldopen
6623 if test "$ac_res" != no; then
6624   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6625
6626 fi
6627
6628         ;;
6629 esac
6630 { echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
6631 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6; }
6632 if test "${ac_cv_search_getopt_long+set}" = set; then
6633   echo $ECHO_N "(cached) $ECHO_C" >&6
6634 else
6635   ac_func_search_save_LIBS=$LIBS
6636 cat >conftest.$ac_ext <<_ACEOF
6637 /* confdefs.h.  */
6638 _ACEOF
6639 cat confdefs.h >>conftest.$ac_ext
6640 cat >>conftest.$ac_ext <<_ACEOF
6641 /* end confdefs.h.  */
6642
6643 /* Override any GCC internal prototype to avoid an error.
6644    Use char because int might match the return type of a GCC
6645    builtin and then its argument prototype would still apply.  */
6646 #ifdef __cplusplus
6647 extern "C"
6648 #endif
6649 char getopt_long ();
6650 int
6651 main ()
6652 {
6653 return getopt_long ();
6654   ;
6655   return 0;
6656 }
6657 _ACEOF
6658 for ac_lib in '' getopt gnugetopt; do
6659   if test -z "$ac_lib"; then
6660     ac_res="none required"
6661   else
6662     ac_res=-l$ac_lib
6663     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6664   fi
6665   rm -f conftest.$ac_objext conftest$ac_exeext
6666 if { (ac_try="$ac_link"
6667 case "(($ac_try" in
6668   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6669   *) ac_try_echo=$ac_try;;
6670 esac
6671 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6672   (eval "$ac_link") 2>conftest.er1
6673   ac_status=$?
6674   grep -v '^ *+' conftest.er1 >conftest.err
6675   rm -f conftest.er1
6676   cat conftest.err >&5
6677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6678   (exit $ac_status); } && {
6679          test -z "$ac_c_werror_flag" ||
6680          test ! -s conftest.err
6681        } && test -s conftest$ac_exeext &&
6682        $as_test_x conftest$ac_exeext; then
6683   ac_cv_search_getopt_long=$ac_res
6684 else
6685   echo "$as_me: failed program was:" >&5
6686 sed 's/^/| /' conftest.$ac_ext >&5
6687
6688
6689 fi
6690
6691 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6692       conftest$ac_exeext
6693   if test "${ac_cv_search_getopt_long+set}" = set; then
6694   break
6695 fi
6696 done
6697 if test "${ac_cv_search_getopt_long+set}" = set; then
6698   :
6699 else
6700   ac_cv_search_getopt_long=no
6701 fi
6702 rm conftest.$ac_ext
6703 LIBS=$ac_func_search_save_LIBS
6704 fi
6705 { echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
6706 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6; }
6707 ac_res=$ac_cv_search_getopt_long
6708 if test "$ac_res" != no; then
6709   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6710
6711 fi
6712
6713 { echo "$as_me:$LINENO: checking for library containing crypt" >&5
6714 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6; }
6715 if test "${ac_cv_search_crypt+set}" = set; then
6716   echo $ECHO_N "(cached) $ECHO_C" >&6
6717 else
6718   ac_func_search_save_LIBS=$LIBS
6719 cat >conftest.$ac_ext <<_ACEOF
6720 /* confdefs.h.  */
6721 _ACEOF
6722 cat confdefs.h >>conftest.$ac_ext
6723 cat >>conftest.$ac_ext <<_ACEOF
6724 /* end confdefs.h.  */
6725
6726 /* Override any GCC internal prototype to avoid an error.
6727    Use char because int might match the return type of a GCC
6728    builtin and then its argument prototype would still apply.  */
6729 #ifdef __cplusplus
6730 extern "C"
6731 #endif
6732 char crypt ();
6733 int
6734 main ()
6735 {
6736 return crypt ();
6737   ;
6738   return 0;
6739 }
6740 _ACEOF
6741 for ac_lib in '' crypt; do
6742   if test -z "$ac_lib"; then
6743     ac_res="none required"
6744   else
6745     ac_res=-l$ac_lib
6746     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6747   fi
6748   rm -f conftest.$ac_objext conftest$ac_exeext
6749 if { (ac_try="$ac_link"
6750 case "(($ac_try" in
6751   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6752   *) ac_try_echo=$ac_try;;
6753 esac
6754 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6755   (eval "$ac_link") 2>conftest.er1
6756   ac_status=$?
6757   grep -v '^ *+' conftest.er1 >conftest.err
6758   rm -f conftest.er1
6759   cat conftest.err >&5
6760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6761   (exit $ac_status); } && {
6762          test -z "$ac_c_werror_flag" ||
6763          test ! -s conftest.err
6764        } && test -s conftest$ac_exeext &&
6765        $as_test_x conftest$ac_exeext; then
6766   ac_cv_search_crypt=$ac_res
6767 else
6768   echo "$as_me: failed program was:" >&5
6769 sed 's/^/| /' conftest.$ac_ext >&5
6770
6771
6772 fi
6773
6774 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6775       conftest$ac_exeext
6776   if test "${ac_cv_search_crypt+set}" = set; then
6777   break
6778 fi
6779 done
6780 if test "${ac_cv_search_crypt+set}" = set; then
6781   :
6782 else
6783   ac_cv_search_crypt=no
6784 fi
6785 rm conftest.$ac_ext
6786 LIBS=$ac_func_search_save_LIBS
6787 fi
6788 { echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6789 echo "${ECHO_T}$ac_cv_search_crypt" >&6; }
6790 ac_res=$ac_cv_search_crypt
6791 if test "$ac_res" != no; then
6792   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6793
6794 fi
6795
6796 # Solaris:
6797 { echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6798 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6; }
6799 if test "${ac_cv_search_fdatasync+set}" = set; then
6800   echo $ECHO_N "(cached) $ECHO_C" >&6
6801 else
6802   ac_func_search_save_LIBS=$LIBS
6803 cat >conftest.$ac_ext <<_ACEOF
6804 /* confdefs.h.  */
6805 _ACEOF
6806 cat confdefs.h >>conftest.$ac_ext
6807 cat >>conftest.$ac_ext <<_ACEOF
6808 /* end confdefs.h.  */
6809
6810 /* Override any GCC internal prototype to avoid an error.
6811    Use char because int might match the return type of a GCC
6812    builtin and then its argument prototype would still apply.  */
6813 #ifdef __cplusplus
6814 extern "C"
6815 #endif
6816 char fdatasync ();
6817 int
6818 main ()
6819 {
6820 return fdatasync ();
6821   ;
6822   return 0;
6823 }
6824 _ACEOF
6825 for ac_lib in '' rt posix4; do
6826   if test -z "$ac_lib"; then
6827     ac_res="none required"
6828   else
6829     ac_res=-l$ac_lib
6830     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6831   fi
6832   rm -f conftest.$ac_objext conftest$ac_exeext
6833 if { (ac_try="$ac_link"
6834 case "(($ac_try" in
6835   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6836   *) ac_try_echo=$ac_try;;
6837 esac
6838 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6839   (eval "$ac_link") 2>conftest.er1
6840   ac_status=$?
6841   grep -v '^ *+' conftest.er1 >conftest.err
6842   rm -f conftest.er1
6843   cat conftest.err >&5
6844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6845   (exit $ac_status); } && {
6846          test -z "$ac_c_werror_flag" ||
6847          test ! -s conftest.err
6848        } && test -s conftest$ac_exeext &&
6849        $as_test_x conftest$ac_exeext; then
6850   ac_cv_search_fdatasync=$ac_res
6851 else
6852   echo "$as_me: failed program was:" >&5
6853 sed 's/^/| /' conftest.$ac_ext >&5
6854
6855
6856 fi
6857
6858 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6859       conftest$ac_exeext
6860   if test "${ac_cv_search_fdatasync+set}" = set; then
6861   break
6862 fi
6863 done
6864 if test "${ac_cv_search_fdatasync+set}" = set; then
6865   :
6866 else
6867   ac_cv_search_fdatasync=no
6868 fi
6869 rm conftest.$ac_ext
6870 LIBS=$ac_func_search_save_LIBS
6871 fi
6872 { echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6873 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6; }
6874 ac_res=$ac_cv_search_fdatasync
6875 if test "$ac_res" != no; then
6876   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6877
6878 fi
6879
6880 # Cygwin:
6881 { echo "$as_me:$LINENO: checking for library containing shmget" >&5
6882 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6; }
6883 if test "${ac_cv_search_shmget+set}" = set; then
6884   echo $ECHO_N "(cached) $ECHO_C" >&6
6885 else
6886   ac_func_search_save_LIBS=$LIBS
6887 cat >conftest.$ac_ext <<_ACEOF
6888 /* confdefs.h.  */
6889 _ACEOF
6890 cat confdefs.h >>conftest.$ac_ext
6891 cat >>conftest.$ac_ext <<_ACEOF
6892 /* end confdefs.h.  */
6893
6894 /* Override any GCC internal prototype to avoid an error.
6895    Use char because int might match the return type of a GCC
6896    builtin and then its argument prototype would still apply.  */
6897 #ifdef __cplusplus
6898 extern "C"
6899 #endif
6900 char shmget ();
6901 int
6902 main ()
6903 {
6904 return shmget ();
6905   ;
6906   return 0;
6907 }
6908 _ACEOF
6909 for ac_lib in '' cygipc; do
6910   if test -z "$ac_lib"; then
6911     ac_res="none required"
6912   else
6913     ac_res=-l$ac_lib
6914     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6915   fi
6916   rm -f conftest.$ac_objext conftest$ac_exeext
6917 if { (ac_try="$ac_link"
6918 case "(($ac_try" in
6919   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6920   *) ac_try_echo=$ac_try;;
6921 esac
6922 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6923   (eval "$ac_link") 2>conftest.er1
6924   ac_status=$?
6925   grep -v '^ *+' conftest.er1 >conftest.err
6926   rm -f conftest.er1
6927   cat conftest.err >&5
6928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6929   (exit $ac_status); } && {
6930          test -z "$ac_c_werror_flag" ||
6931          test ! -s conftest.err
6932        } && test -s conftest$ac_exeext &&
6933        $as_test_x conftest$ac_exeext; then
6934   ac_cv_search_shmget=$ac_res
6935 else
6936   echo "$as_me: failed program was:" >&5
6937 sed 's/^/| /' conftest.$ac_ext >&5
6938
6939
6940 fi
6941
6942 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6943       conftest$ac_exeext
6944   if test "${ac_cv_search_shmget+set}" = set; then
6945   break
6946 fi
6947 done
6948 if test "${ac_cv_search_shmget+set}" = set; then
6949   :
6950 else
6951   ac_cv_search_shmget=no
6952 fi
6953 rm conftest.$ac_ext
6954 LIBS=$ac_func_search_save_LIBS
6955 fi
6956 { echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
6957 echo "${ECHO_T}$ac_cv_search_shmget" >&6; }
6958 ac_res=$ac_cv_search_shmget
6959 if test "$ac_res" != no; then
6960   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6961
6962 fi
6963
6964
6965 if test "$with_readline" = yes; then
6966
6967
6968 if test "${pgac_cv_check_readline+set}" = set; then
6969   echo $ECHO_N "(cached) $ECHO_C" >&6
6970 else
6971   pgac_cv_check_readline=no
6972 pgac_save_LIBS=$LIBS
6973 if test x"$with_libedit_preferred" != x"yes"
6974 then    READLINE_ORDER="-lreadline -ledit"
6975 else    READLINE_ORDER="-ledit -lreadline"
6976 fi
6977 for pgac_rllib in $READLINE_ORDER ; do
6978   { echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6979 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6; }
6980   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6981     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6982     cat >conftest.$ac_ext <<_ACEOF
6983 /* confdefs.h.  */
6984 _ACEOF
6985 cat confdefs.h >>conftest.$ac_ext
6986 cat >>conftest.$ac_ext <<_ACEOF
6987 /* end confdefs.h.  */
6988
6989 /* Override any GCC internal prototype to avoid an error.
6990    Use char because int might match the return type of a GCC
6991    builtin and then its argument prototype would still apply.  */
6992 #ifdef __cplusplus
6993 extern "C"
6994 #endif
6995 char readline ();
6996 int
6997 main ()
6998 {
6999 return readline ();
7000   ;
7001   return 0;
7002 }
7003 _ACEOF
7004 rm -f conftest.$ac_objext conftest$ac_exeext
7005 if { (ac_try="$ac_link"
7006 case "(($ac_try" in
7007   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7008   *) ac_try_echo=$ac_try;;
7009 esac
7010 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7011   (eval "$ac_link") 2>conftest.er1
7012   ac_status=$?
7013   grep -v '^ *+' conftest.er1 >conftest.err
7014   rm -f conftest.er1
7015   cat conftest.err >&5
7016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7017   (exit $ac_status); } && {
7018          test -z "$ac_c_werror_flag" ||
7019          test ! -s conftest.err
7020        } && test -s conftest$ac_exeext &&
7021        $as_test_x conftest$ac_exeext; then
7022
7023       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
7024       # recognize dependent libraries; assume curses is needed if we didn't
7025       # find any dependency.
7026       case $host_os in
7027         netbsd* | openbsd* | irix*)
7028           if test x"$pgac_lib" = x"" ; then
7029             pgac_lib=" -lcurses"
7030           fi ;;
7031       esac
7032
7033       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
7034       break
7035
7036 else
7037   echo "$as_me: failed program was:" >&5
7038 sed 's/^/| /' conftest.$ac_ext >&5
7039
7040
7041 fi
7042
7043 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7044       conftest$ac_exeext conftest.$ac_ext
7045   done
7046   if test "$pgac_cv_check_readline" != no ; then
7047     { echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
7048 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6; }
7049     break
7050   else
7051     { echo "$as_me:$LINENO: result: no" >&5
7052 echo "${ECHO_T}no" >&6; }
7053   fi
7054 done
7055 LIBS=$pgac_save_LIBS
7056
7057 fi
7058
7059 if test "$pgac_cv_check_readline" != no ; then
7060   LIBS="$pgac_cv_check_readline $LIBS"
7061
7062 cat >>confdefs.h <<\_ACEOF
7063 #define HAVE_LIBREADLINE 1
7064 _ACEOF
7065
7066 fi
7067
7068
7069   if test x"$pgac_cv_check_readline" = x"no"; then
7070     { { echo "$as_me:$LINENO: error: readline library not found
7071 If you have readline already installed, see config.log for details on the
7072 failure.  It is possible the compiler isn't looking in the proper directory.
7073 Use --without-readline to disable readline support." >&5
7074 echo "$as_me: error: readline library not found
7075 If you have readline already installed, see config.log for details on the
7076 failure.  It is possible the compiler isn't looking in the proper directory.
7077 Use --without-readline to disable readline support." >&2;}
7078    { (exit 1); exit 1; }; }
7079   fi
7080 fi
7081
7082 if test "$with_zlib" = yes; then
7083
7084 { echo "$as_me:$LINENO: checking for inflate in -lz" >&5
7085 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6; }
7086 if test "${ac_cv_lib_z_inflate+set}" = set; then
7087   echo $ECHO_N "(cached) $ECHO_C" >&6
7088 else
7089   ac_check_lib_save_LIBS=$LIBS
7090 LIBS="-lz  $LIBS"
7091 cat >conftest.$ac_ext <<_ACEOF
7092 /* confdefs.h.  */
7093 _ACEOF
7094 cat confdefs.h >>conftest.$ac_ext
7095 cat >>conftest.$ac_ext <<_ACEOF
7096 /* end confdefs.h.  */
7097
7098 /* Override any GCC internal prototype to avoid an error.
7099    Use char because int might match the return type of a GCC
7100    builtin and then its argument prototype would still apply.  */
7101 #ifdef __cplusplus
7102 extern "C"
7103 #endif
7104 char inflate ();
7105 int
7106 main ()
7107 {
7108 return inflate ();
7109   ;
7110   return 0;
7111 }
7112 _ACEOF
7113 rm -f conftest.$ac_objext conftest$ac_exeext
7114 if { (ac_try="$ac_link"
7115 case "(($ac_try" in
7116   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7117   *) ac_try_echo=$ac_try;;
7118 esac
7119 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7120   (eval "$ac_link") 2>conftest.er1
7121   ac_status=$?
7122   grep -v '^ *+' conftest.er1 >conftest.err
7123   rm -f conftest.er1
7124   cat conftest.err >&5
7125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7126   (exit $ac_status); } && {
7127          test -z "$ac_c_werror_flag" ||
7128          test ! -s conftest.err
7129        } && test -s conftest$ac_exeext &&
7130        $as_test_x conftest$ac_exeext; then
7131   ac_cv_lib_z_inflate=yes
7132 else
7133   echo "$as_me: failed program was:" >&5
7134 sed 's/^/| /' conftest.$ac_ext >&5
7135
7136         ac_cv_lib_z_inflate=no
7137 fi
7138
7139 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7140       conftest$ac_exeext conftest.$ac_ext
7141 LIBS=$ac_check_lib_save_LIBS
7142 fi
7143 { echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
7144 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6; }
7145 if test $ac_cv_lib_z_inflate = yes; then
7146   cat >>confdefs.h <<_ACEOF
7147 #define HAVE_LIBZ 1
7148 _ACEOF
7149
7150   LIBS="-lz $LIBS"
7151
7152 else
7153   { { echo "$as_me:$LINENO: error: zlib library not found
7154 If you have zlib already installed, see config.log for details on the
7155 failure.  It is possible the compiler isn't looking in the proper directory.
7156 Use --without-zlib to disable zlib support." >&5
7157 echo "$as_me: error: zlib library not found
7158 If you have zlib already installed, see config.log for details on the
7159 failure.  It is possible the compiler isn't looking in the proper directory.
7160 Use --without-zlib to disable zlib support." >&2;}
7161    { (exit 1); exit 1; }; }
7162 fi
7163
7164 fi
7165
7166 if test "$enable_spinlocks" = yes; then
7167
7168 cat >>confdefs.h <<\_ACEOF
7169 #define HAVE_SPINLOCKS 1
7170 _ACEOF
7171
7172 else
7173   { echo "$as_me:$LINENO: WARNING:
7174 *** Not using spinlocks will cause poor performance." >&5
7175 echo "$as_me: WARNING:
7176 *** Not using spinlocks will cause poor performance." >&2;}
7177 fi
7178
7179 if test "$with_gssapi" = yes ; then
7180   if test "$PORTNAME" != "win32"; then
7181     { echo "$as_me:$LINENO: checking for library containing gss_init_sec_context" >&5
7182 echo $ECHO_N "checking for library containing gss_init_sec_context... $ECHO_C" >&6; }
7183 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
7184   echo $ECHO_N "(cached) $ECHO_C" >&6
7185 else
7186   ac_func_search_save_LIBS=$LIBS
7187 cat >conftest.$ac_ext <<_ACEOF
7188 /* confdefs.h.  */
7189 _ACEOF
7190 cat confdefs.h >>conftest.$ac_ext
7191 cat >>conftest.$ac_ext <<_ACEOF
7192 /* end confdefs.h.  */
7193
7194 /* Override any GCC internal prototype to avoid an error.
7195    Use char because int might match the return type of a GCC
7196    builtin and then its argument prototype would still apply.  */
7197 #ifdef __cplusplus
7198 extern "C"
7199 #endif
7200 char gss_init_sec_context ();
7201 int
7202 main ()
7203 {
7204 return gss_init_sec_context ();
7205   ;
7206   return 0;
7207 }
7208 _ACEOF
7209 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
7210   if test -z "$ac_lib"; then
7211     ac_res="none required"
7212   else
7213     ac_res=-l$ac_lib
7214     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7215   fi
7216   rm -f conftest.$ac_objext conftest$ac_exeext
7217 if { (ac_try="$ac_link"
7218 case "(($ac_try" in
7219   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7220   *) ac_try_echo=$ac_try;;
7221 esac
7222 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7223   (eval "$ac_link") 2>conftest.er1
7224   ac_status=$?
7225   grep -v '^ *+' conftest.er1 >conftest.err
7226   rm -f conftest.er1
7227   cat conftest.err >&5
7228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7229   (exit $ac_status); } && {
7230          test -z "$ac_c_werror_flag" ||
7231          test ! -s conftest.err
7232        } && test -s conftest$ac_exeext &&
7233        $as_test_x conftest$ac_exeext; then
7234   ac_cv_search_gss_init_sec_context=$ac_res
7235 else
7236   echo "$as_me: failed program was:" >&5
7237 sed 's/^/| /' conftest.$ac_ext >&5
7238
7239
7240 fi
7241
7242 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7243       conftest$ac_exeext
7244   if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
7245   break
7246 fi
7247 done
7248 if test "${ac_cv_search_gss_init_sec_context+set}" = set; then
7249   :
7250 else
7251   ac_cv_search_gss_init_sec_context=no
7252 fi
7253 rm conftest.$ac_ext
7254 LIBS=$ac_func_search_save_LIBS
7255 fi
7256 { echo "$as_me:$LINENO: result: $ac_cv_search_gss_init_sec_context" >&5
7257 echo "${ECHO_T}$ac_cv_search_gss_init_sec_context" >&6; }
7258 ac_res=$ac_cv_search_gss_init_sec_context
7259 if test "$ac_res" != no; then
7260   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7261
7262 else
7263   { { echo "$as_me:$LINENO: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&5
7264 echo "$as_me: error: could not find function 'gss_init_sec_context' required for GSSAPI" >&2;}
7265    { (exit 1); exit 1; }; }
7266 fi
7267
7268   else
7269     LIBS="$LIBS -lgssapi32"
7270   fi
7271 fi
7272
7273 if test "$with_krb5" = yes ; then
7274   if test "$PORTNAME" != "win32"; then
7275      { echo "$as_me:$LINENO: checking for library containing com_err" >&5
7276 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6; }
7277 if test "${ac_cv_search_com_err+set}" = set; then
7278   echo $ECHO_N "(cached) $ECHO_C" >&6
7279 else
7280   ac_func_search_save_LIBS=$LIBS
7281 cat >conftest.$ac_ext <<_ACEOF
7282 /* confdefs.h.  */
7283 _ACEOF
7284 cat confdefs.h >>conftest.$ac_ext
7285 cat >>conftest.$ac_ext <<_ACEOF
7286 /* end confdefs.h.  */
7287
7288 /* Override any GCC internal prototype to avoid an error.
7289    Use char because int might match the return type of a GCC
7290    builtin and then its argument prototype would still apply.  */
7291 #ifdef __cplusplus
7292 extern "C"
7293 #endif
7294 char com_err ();
7295 int
7296 main ()
7297 {
7298 return com_err ();
7299   ;
7300   return 0;
7301 }
7302 _ACEOF
7303 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err; do
7304   if test -z "$ac_lib"; then
7305     ac_res="none required"
7306   else
7307     ac_res=-l$ac_lib
7308     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7309   fi
7310   rm -f conftest.$ac_objext conftest$ac_exeext
7311 if { (ac_try="$ac_link"
7312 case "(($ac_try" in
7313   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7314   *) ac_try_echo=$ac_try;;
7315 esac
7316 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7317   (eval "$ac_link") 2>conftest.er1
7318   ac_status=$?
7319   grep -v '^ *+' conftest.er1 >conftest.err
7320   rm -f conftest.er1
7321   cat conftest.err >&5
7322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7323   (exit $ac_status); } && {
7324          test -z "$ac_c_werror_flag" ||
7325          test ! -s conftest.err
7326        } && test -s conftest$ac_exeext &&
7327        $as_test_x conftest$ac_exeext; then
7328   ac_cv_search_com_err=$ac_res
7329 else
7330   echo "$as_me: failed program was:" >&5
7331 sed 's/^/| /' conftest.$ac_ext >&5
7332
7333
7334 fi
7335
7336 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7337       conftest$ac_exeext
7338   if test "${ac_cv_search_com_err+set}" = set; then
7339   break
7340 fi
7341 done
7342 if test "${ac_cv_search_com_err+set}" = set; then
7343   :
7344 else
7345   ac_cv_search_com_err=no
7346 fi
7347 rm conftest.$ac_ext
7348 LIBS=$ac_func_search_save_LIBS
7349 fi
7350 { echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
7351 echo "${ECHO_T}$ac_cv_search_com_err" >&6; }
7352 ac_res=$ac_cv_search_com_err
7353 if test "$ac_res" != no; then
7354   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7355
7356 else
7357   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
7358 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
7359    { (exit 1); exit 1; }; }
7360 fi
7361
7362      { echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
7363 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6; }
7364 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
7365   echo $ECHO_N "(cached) $ECHO_C" >&6
7366 else
7367   ac_func_search_save_LIBS=$LIBS
7368 cat >conftest.$ac_ext <<_ACEOF
7369 /* confdefs.h.  */
7370 _ACEOF
7371 cat confdefs.h >>conftest.$ac_ext
7372 cat >>conftest.$ac_ext <<_ACEOF
7373 /* end confdefs.h.  */
7374
7375 /* Override any GCC internal prototype to avoid an error.
7376    Use char because int might match the return type of a GCC
7377    builtin and then its argument prototype would still apply.  */
7378 #ifdef __cplusplus
7379 extern "C"
7380 #endif
7381 char krb5_sendauth ();
7382 int
7383 main ()
7384 {
7385 return krb5_sendauth ();
7386   ;
7387   return 0;
7388 }
7389 _ACEOF
7390 for ac_lib in '' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
7391   if test -z "$ac_lib"; then
7392     ac_res="none required"
7393   else
7394     ac_res=-l$ac_lib
7395     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7396   fi
7397   rm -f conftest.$ac_objext conftest$ac_exeext
7398 if { (ac_try="$ac_link"
7399 case "(($ac_try" in
7400   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7401   *) ac_try_echo=$ac_try;;
7402 esac
7403 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7404   (eval "$ac_link") 2>conftest.er1
7405   ac_status=$?
7406   grep -v '^ *+' conftest.er1 >conftest.err
7407   rm -f conftest.er1
7408   cat conftest.err >&5
7409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7410   (exit $ac_status); } && {
7411          test -z "$ac_c_werror_flag" ||
7412          test ! -s conftest.err
7413        } && test -s conftest$ac_exeext &&
7414        $as_test_x conftest$ac_exeext; then
7415   ac_cv_search_krb5_sendauth=$ac_res
7416 else
7417   echo "$as_me: failed program was:" >&5
7418 sed 's/^/| /' conftest.$ac_ext >&5
7419
7420
7421 fi
7422
7423 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7424       conftest$ac_exeext
7425   if test "${ac_cv_search_krb5_sendauth+set}" = set; then
7426   break
7427 fi
7428 done
7429 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
7430   :
7431 else
7432   ac_cv_search_krb5_sendauth=no
7433 fi
7434 rm conftest.$ac_ext
7435 LIBS=$ac_func_search_save_LIBS
7436 fi
7437 { echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
7438 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6; }
7439 ac_res=$ac_cv_search_krb5_sendauth
7440 if test "$ac_res" != no; then
7441   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7442
7443 else
7444   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
7445 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
7446    { (exit 1); exit 1; }; }
7447 fi
7448
7449   else
7450      { echo "$as_me:$LINENO: checking for library containing com_err" >&5
7451 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6; }
7452 if test "${ac_cv_search_com_err+set}" = set; then
7453   echo $ECHO_N "(cached) $ECHO_C" >&6
7454 else
7455   ac_func_search_save_LIBS=$LIBS
7456 cat >conftest.$ac_ext <<_ACEOF
7457 /* confdefs.h.  */
7458 _ACEOF
7459 cat confdefs.h >>conftest.$ac_ext
7460 cat >>conftest.$ac_ext <<_ACEOF
7461 /* end confdefs.h.  */
7462
7463 /* Override any GCC internal prototype to avoid an error.
7464    Use char because int might match the return type of a GCC
7465    builtin and then its argument prototype would still apply.  */
7466 #ifdef __cplusplus
7467 extern "C"
7468 #endif
7469 char com_err ();
7470 int
7471 main ()
7472 {
7473 return com_err ();
7474   ;
7475   return 0;
7476 }
7477 _ACEOF
7478 for ac_lib in '' 'comerr32 -lkrb5_32'; do
7479   if test -z "$ac_lib"; then
7480     ac_res="none required"
7481   else
7482     ac_res=-l$ac_lib
7483     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7484   fi
7485   rm -f conftest.$ac_objext conftest$ac_exeext
7486 if { (ac_try="$ac_link"
7487 case "(($ac_try" in
7488   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7489   *) ac_try_echo=$ac_try;;
7490 esac
7491 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7492   (eval "$ac_link") 2>conftest.er1
7493   ac_status=$?
7494   grep -v '^ *+' conftest.er1 >conftest.err
7495   rm -f conftest.er1
7496   cat conftest.err >&5
7497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7498   (exit $ac_status); } && {
7499          test -z "$ac_c_werror_flag" ||
7500          test ! -s conftest.err
7501        } && test -s conftest$ac_exeext &&
7502        $as_test_x conftest$ac_exeext; then
7503   ac_cv_search_com_err=$ac_res
7504 else
7505   echo "$as_me: failed program was:" >&5
7506 sed 's/^/| /' conftest.$ac_ext >&5
7507
7508
7509 fi
7510
7511 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7512       conftest$ac_exeext
7513   if test "${ac_cv_search_com_err+set}" = set; then
7514   break
7515 fi
7516 done
7517 if test "${ac_cv_search_com_err+set}" = set; then
7518   :
7519 else
7520   ac_cv_search_com_err=no
7521 fi
7522 rm conftest.$ac_ext
7523 LIBS=$ac_func_search_save_LIBS
7524 fi
7525 { echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
7526 echo "${ECHO_T}$ac_cv_search_com_err" >&6; }
7527 ac_res=$ac_cv_search_com_err
7528 if test "$ac_res" != no; then
7529   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7530
7531 else
7532   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
7533 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
7534    { (exit 1); exit 1; }; }
7535 fi
7536
7537   fi
7538 fi
7539
7540 if test "$with_openssl" = yes ; then
7541     if test "$PORTNAME" != "win32"; then
7542
7543 { echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
7544 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6; }
7545 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
7546   echo $ECHO_N "(cached) $ECHO_C" >&6
7547 else
7548   ac_check_lib_save_LIBS=$LIBS
7549 LIBS="-lcrypto  $LIBS"
7550 cat >conftest.$ac_ext <<_ACEOF
7551 /* confdefs.h.  */
7552 _ACEOF
7553 cat confdefs.h >>conftest.$ac_ext
7554 cat >>conftest.$ac_ext <<_ACEOF
7555 /* end confdefs.h.  */
7556
7557 /* Override any GCC internal prototype to avoid an error.
7558    Use char because int might match the return type of a GCC
7559    builtin and then its argument prototype would still apply.  */
7560 #ifdef __cplusplus
7561 extern "C"
7562 #endif
7563 char CRYPTO_new_ex_data ();
7564 int
7565 main ()
7566 {
7567 return CRYPTO_new_ex_data ();
7568   ;
7569   return 0;
7570 }
7571 _ACEOF
7572 rm -f conftest.$ac_objext conftest$ac_exeext
7573 if { (ac_try="$ac_link"
7574 case "(($ac_try" in
7575   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7576   *) ac_try_echo=$ac_try;;
7577 esac
7578 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7579   (eval "$ac_link") 2>conftest.er1
7580   ac_status=$?
7581   grep -v '^ *+' conftest.er1 >conftest.err
7582   rm -f conftest.er1
7583   cat conftest.err >&5
7584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7585   (exit $ac_status); } && {
7586          test -z "$ac_c_werror_flag" ||
7587          test ! -s conftest.err
7588        } && test -s conftest$ac_exeext &&
7589        $as_test_x conftest$ac_exeext; then
7590   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
7591 else
7592   echo "$as_me: failed program was:" >&5
7593 sed 's/^/| /' conftest.$ac_ext >&5
7594
7595         ac_cv_lib_crypto_CRYPTO_new_ex_data=no
7596 fi
7597
7598 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7599       conftest$ac_exeext conftest.$ac_ext
7600 LIBS=$ac_check_lib_save_LIBS
7601 fi
7602 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
7603 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
7604 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
7605   cat >>confdefs.h <<_ACEOF
7606 #define HAVE_LIBCRYPTO 1
7607 _ACEOF
7608
7609   LIBS="-lcrypto $LIBS"
7610
7611 else
7612   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
7613 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
7614    { (exit 1); exit 1; }; }
7615 fi
7616
7617
7618 { echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7619 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6; }
7620 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7621   echo $ECHO_N "(cached) $ECHO_C" >&6
7622 else
7623   ac_check_lib_save_LIBS=$LIBS
7624 LIBS="-lssl  $LIBS"
7625 cat >conftest.$ac_ext <<_ACEOF
7626 /* confdefs.h.  */
7627 _ACEOF
7628 cat confdefs.h >>conftest.$ac_ext
7629 cat >>conftest.$ac_ext <<_ACEOF
7630 /* end confdefs.h.  */
7631
7632 /* Override any GCC internal prototype to avoid an error.
7633    Use char because int might match the return type of a GCC
7634    builtin and then its argument prototype would still apply.  */
7635 #ifdef __cplusplus
7636 extern "C"
7637 #endif
7638 char SSL_library_init ();
7639 int
7640 main ()
7641 {
7642 return SSL_library_init ();
7643   ;
7644   return 0;
7645 }
7646 _ACEOF
7647 rm -f conftest.$ac_objext conftest$ac_exeext
7648 if { (ac_try="$ac_link"
7649 case "(($ac_try" in
7650   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7651   *) ac_try_echo=$ac_try;;
7652 esac
7653 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7654   (eval "$ac_link") 2>conftest.er1
7655   ac_status=$?
7656   grep -v '^ *+' conftest.er1 >conftest.err
7657   rm -f conftest.er1
7658   cat conftest.err >&5
7659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7660   (exit $ac_status); } && {
7661          test -z "$ac_c_werror_flag" ||
7662          test ! -s conftest.err
7663        } && test -s conftest$ac_exeext &&
7664        $as_test_x conftest$ac_exeext; then
7665   ac_cv_lib_ssl_SSL_library_init=yes
7666 else
7667   echo "$as_me: failed program was:" >&5
7668 sed 's/^/| /' conftest.$ac_ext >&5
7669
7670         ac_cv_lib_ssl_SSL_library_init=no
7671 fi
7672
7673 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7674       conftest$ac_exeext conftest.$ac_ext
7675 LIBS=$ac_check_lib_save_LIBS
7676 fi
7677 { echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7678 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6; }
7679 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7680   cat >>confdefs.h <<_ACEOF
7681 #define HAVE_LIBSSL 1
7682 _ACEOF
7683
7684   LIBS="-lssl $LIBS"
7685
7686 else
7687   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7688 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7689    { (exit 1); exit 1; }; }
7690 fi
7691
7692   else
7693
7694 { echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7695 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6; }
7696 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7697   echo $ECHO_N "(cached) $ECHO_C" >&6
7698 else
7699   ac_check_lib_save_LIBS=$LIBS
7700 LIBS="-leay32  $LIBS"
7701 cat >conftest.$ac_ext <<_ACEOF
7702 /* confdefs.h.  */
7703 _ACEOF
7704 cat confdefs.h >>conftest.$ac_ext
7705 cat >>conftest.$ac_ext <<_ACEOF
7706 /* end confdefs.h.  */
7707
7708 /* Override any GCC internal prototype to avoid an error.
7709    Use char because int might match the return type of a GCC
7710    builtin and then its argument prototype would still apply.  */
7711 #ifdef __cplusplus
7712 extern "C"
7713 #endif
7714 char CRYPTO_new_ex_data ();
7715 int
7716 main ()
7717 {
7718 return CRYPTO_new_ex_data ();
7719   ;
7720   return 0;
7721 }
7722 _ACEOF
7723 rm -f conftest.$ac_objext conftest$ac_exeext
7724 if { (ac_try="$ac_link"
7725 case "(($ac_try" in
7726   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7727   *) ac_try_echo=$ac_try;;
7728 esac
7729 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7730   (eval "$ac_link") 2>conftest.er1
7731   ac_status=$?
7732   grep -v '^ *+' conftest.er1 >conftest.err
7733   rm -f conftest.er1
7734   cat conftest.err >&5
7735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7736   (exit $ac_status); } && {
7737          test -z "$ac_c_werror_flag" ||
7738          test ! -s conftest.err
7739        } && test -s conftest$ac_exeext &&
7740        $as_test_x conftest$ac_exeext; then
7741   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7742 else
7743   echo "$as_me: failed program was:" >&5
7744 sed 's/^/| /' conftest.$ac_ext >&5
7745
7746         ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7747 fi
7748
7749 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7750       conftest$ac_exeext conftest.$ac_ext
7751 LIBS=$ac_check_lib_save_LIBS
7752 fi
7753 { echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7754 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6; }
7755 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7756   cat >>confdefs.h <<_ACEOF
7757 #define HAVE_LIBEAY32 1
7758 _ACEOF
7759
7760   LIBS="-leay32 $LIBS"
7761
7762 else
7763   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7764 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7765    { (exit 1); exit 1; }; }
7766 fi
7767
7768
7769 { echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7770 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6; }
7771 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7772   echo $ECHO_N "(cached) $ECHO_C" >&6
7773 else
7774   ac_check_lib_save_LIBS=$LIBS
7775 LIBS="-lssleay32  $LIBS"
7776 cat >conftest.$ac_ext <<_ACEOF
7777 /* confdefs.h.  */
7778 _ACEOF
7779 cat confdefs.h >>conftest.$ac_ext
7780 cat >>conftest.$ac_ext <<_ACEOF
7781 /* end confdefs.h.  */
7782
7783 /* Override any GCC internal prototype to avoid an error.
7784    Use char because int might match the return type of a GCC
7785    builtin and then its argument prototype would still apply.  */
7786 #ifdef __cplusplus
7787 extern "C"
7788 #endif
7789 char SSL_library_init ();
7790 int
7791 main ()
7792 {
7793 return SSL_library_init ();
7794   ;
7795   return 0;
7796 }
7797 _ACEOF
7798 rm -f conftest.$ac_objext conftest$ac_exeext
7799 if { (ac_try="$ac_link"
7800 case "(($ac_try" in
7801   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7802   *) ac_try_echo=$ac_try;;
7803 esac
7804 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7805   (eval "$ac_link") 2>conftest.er1
7806   ac_status=$?
7807   grep -v '^ *+' conftest.er1 >conftest.err
7808   rm -f conftest.er1
7809   cat conftest.err >&5
7810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7811   (exit $ac_status); } && {
7812          test -z "$ac_c_werror_flag" ||
7813          test ! -s conftest.err
7814        } && test -s conftest$ac_exeext &&
7815        $as_test_x conftest$ac_exeext; then
7816   ac_cv_lib_ssleay32_SSL_library_init=yes
7817 else
7818   echo "$as_me: failed program was:" >&5
7819 sed 's/^/| /' conftest.$ac_ext >&5
7820
7821         ac_cv_lib_ssleay32_SSL_library_init=no
7822 fi
7823
7824 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7825       conftest$ac_exeext conftest.$ac_ext
7826 LIBS=$ac_check_lib_save_LIBS
7827 fi
7828 { echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7829 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6; }
7830 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7831   cat >>confdefs.h <<_ACEOF
7832 #define HAVE_LIBSSLEAY32 1
7833 _ACEOF
7834
7835   LIBS="-lssleay32 $LIBS"
7836
7837 else
7838   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7839 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7840    { (exit 1); exit 1; }; }
7841 fi
7842
7843   fi
7844 fi
7845
7846 if test "$with_pam" = yes ; then
7847
7848 { echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7849 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6; }
7850 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7851   echo $ECHO_N "(cached) $ECHO_C" >&6
7852 else
7853   ac_check_lib_save_LIBS=$LIBS
7854 LIBS="-lpam  $LIBS"
7855 cat >conftest.$ac_ext <<_ACEOF
7856 /* confdefs.h.  */
7857 _ACEOF
7858 cat confdefs.h >>conftest.$ac_ext
7859 cat >>conftest.$ac_ext <<_ACEOF
7860 /* end confdefs.h.  */
7861
7862 /* Override any GCC internal prototype to avoid an error.
7863    Use char because int might match the return type of a GCC
7864    builtin and then its argument prototype would still apply.  */
7865 #ifdef __cplusplus
7866 extern "C"
7867 #endif
7868 char pam_start ();
7869 int
7870 main ()
7871 {
7872 return pam_start ();
7873   ;
7874   return 0;
7875 }
7876 _ACEOF
7877 rm -f conftest.$ac_objext conftest$ac_exeext
7878 if { (ac_try="$ac_link"
7879 case "(($ac_try" in
7880   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7881   *) ac_try_echo=$ac_try;;
7882 esac
7883 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7884   (eval "$ac_link") 2>conftest.er1
7885   ac_status=$?
7886   grep -v '^ *+' conftest.er1 >conftest.err
7887   rm -f conftest.er1
7888   cat conftest.err >&5
7889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7890   (exit $ac_status); } && {
7891          test -z "$ac_c_werror_flag" ||
7892          test ! -s conftest.err
7893        } && test -s conftest$ac_exeext &&
7894        $as_test_x conftest$ac_exeext; then
7895   ac_cv_lib_pam_pam_start=yes
7896 else
7897   echo "$as_me: failed program was:" >&5
7898 sed 's/^/| /' conftest.$ac_ext >&5
7899
7900         ac_cv_lib_pam_pam_start=no
7901 fi
7902
7903 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7904       conftest$ac_exeext conftest.$ac_ext
7905 LIBS=$ac_check_lib_save_LIBS
7906 fi
7907 { echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7908 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6; }
7909 if test $ac_cv_lib_pam_pam_start = yes; then
7910   cat >>confdefs.h <<_ACEOF
7911 #define HAVE_LIBPAM 1
7912 _ACEOF
7913
7914   LIBS="-lpam $LIBS"
7915
7916 else
7917   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7918 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7919    { (exit 1); exit 1; }; }
7920 fi
7921
7922 fi
7923
7924 if test "$with_libxml" = yes ; then
7925
7926 { echo "$as_me:$LINENO: checking for xmlSaveToBuffer in -lxml2" >&5
7927 echo $ECHO_N "checking for xmlSaveToBuffer in -lxml2... $ECHO_C" >&6; }
7928 if test "${ac_cv_lib_xml2_xmlSaveToBuffer+set}" = set; then
7929   echo $ECHO_N "(cached) $ECHO_C" >&6
7930 else
7931   ac_check_lib_save_LIBS=$LIBS
7932 LIBS="-lxml2  $LIBS"
7933 cat >conftest.$ac_ext <<_ACEOF
7934 /* confdefs.h.  */
7935 _ACEOF
7936 cat confdefs.h >>conftest.$ac_ext
7937 cat >>conftest.$ac_ext <<_ACEOF
7938 /* end confdefs.h.  */
7939
7940 /* Override any GCC internal prototype to avoid an error.
7941    Use char because int might match the return type of a GCC
7942    builtin and then its argument prototype would still apply.  */
7943 #ifdef __cplusplus
7944 extern "C"
7945 #endif
7946 char xmlSaveToBuffer ();
7947 int
7948 main ()
7949 {
7950 return xmlSaveToBuffer ();
7951   ;
7952   return 0;
7953 }
7954 _ACEOF
7955 rm -f conftest.$ac_objext conftest$ac_exeext
7956 if { (ac_try="$ac_link"
7957 case "(($ac_try" in
7958   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7959   *) ac_try_echo=$ac_try;;
7960 esac
7961 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7962   (eval "$ac_link") 2>conftest.er1
7963   ac_status=$?
7964   grep -v '^ *+' conftest.er1 >conftest.err
7965   rm -f conftest.er1
7966   cat conftest.err >&5
7967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7968   (exit $ac_status); } && {
7969          test -z "$ac_c_werror_flag" ||
7970          test ! -s conftest.err
7971        } && test -s conftest$ac_exeext &&
7972        $as_test_x conftest$ac_exeext; then
7973   ac_cv_lib_xml2_xmlSaveToBuffer=yes
7974 else
7975   echo "$as_me: failed program was:" >&5
7976 sed 's/^/| /' conftest.$ac_ext >&5
7977
7978         ac_cv_lib_xml2_xmlSaveToBuffer=no
7979 fi
7980
7981 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7982       conftest$ac_exeext conftest.$ac_ext
7983 LIBS=$ac_check_lib_save_LIBS
7984 fi
7985 { echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
7986 echo "${ECHO_T}$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
7987 if test $ac_cv_lib_xml2_xmlSaveToBuffer = yes; then
7988   cat >>confdefs.h <<_ACEOF
7989 #define HAVE_LIBXML2 1
7990 _ACEOF
7991
7992   LIBS="-lxml2 $LIBS"
7993
7994 else
7995   { { echo "$as_me:$LINENO: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&5
7996 echo "$as_me: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&2;}
7997    { (exit 1); exit 1; }; }
7998 fi
7999
8000 fi
8001
8002 if test "$with_libxslt" = yes ; then
8003
8004 { echo "$as_me:$LINENO: checking for xsltLibxmlVersion in -lxslt" >&5
8005 echo $ECHO_N "checking for xsltLibxmlVersion in -lxslt... $ECHO_C" >&6; }
8006 if test "${ac_cv_lib_xslt_xsltLibxmlVersion+set}" = set; then
8007   echo $ECHO_N "(cached) $ECHO_C" >&6
8008 else
8009   ac_check_lib_save_LIBS=$LIBS
8010 LIBS="-lxslt  $LIBS"
8011 cat >conftest.$ac_ext <<_ACEOF
8012 /* confdefs.h.  */
8013 _ACEOF
8014 cat confdefs.h >>conftest.$ac_ext
8015 cat >>conftest.$ac_ext <<_ACEOF
8016 /* end confdefs.h.  */
8017
8018 /* Override any GCC internal prototype to avoid an error.
8019    Use char because int might match the return type of a GCC
8020    builtin and then its argument prototype would still apply.  */
8021 #ifdef __cplusplus
8022 extern "C"
8023 #endif
8024 char xsltLibxmlVersion ();
8025 int
8026 main ()
8027 {
8028 return xsltLibxmlVersion ();
8029   ;
8030   return 0;
8031 }
8032 _ACEOF
8033 rm -f conftest.$ac_objext conftest$ac_exeext
8034 if { (ac_try="$ac_link"
8035 case "(($ac_try" in
8036   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8037   *) ac_try_echo=$ac_try;;
8038 esac
8039 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8040   (eval "$ac_link") 2>conftest.er1
8041   ac_status=$?
8042   grep -v '^ *+' conftest.er1 >conftest.err
8043   rm -f conftest.er1
8044   cat conftest.err >&5
8045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8046   (exit $ac_status); } && {
8047          test -z "$ac_c_werror_flag" ||
8048          test ! -s conftest.err
8049        } && test -s conftest$ac_exeext &&
8050        $as_test_x conftest$ac_exeext; then
8051   ac_cv_lib_xslt_xsltLibxmlVersion=yes
8052 else
8053   echo "$as_me: failed program was:" >&5
8054 sed 's/^/| /' conftest.$ac_ext >&5
8055
8056         ac_cv_lib_xslt_xsltLibxmlVersion=no
8057 fi
8058
8059 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8060       conftest$ac_exeext conftest.$ac_ext
8061 LIBS=$ac_check_lib_save_LIBS
8062 fi
8063 { echo "$as_me:$LINENO: result: $ac_cv_lib_xslt_xsltLibxmlVersion" >&5
8064 echo "${ECHO_T}$ac_cv_lib_xslt_xsltLibxmlVersion" >&6; }
8065 if test $ac_cv_lib_xslt_xsltLibxmlVersion = yes; then
8066   cat >>confdefs.h <<_ACEOF
8067 #define HAVE_LIBXSLT 1
8068 _ACEOF
8069
8070   LIBS="-lxslt $LIBS"
8071
8072 else
8073   { { echo "$as_me:$LINENO: error: library 'xslt' is required for XSLT support" >&5
8074 echo "$as_me: error: library 'xslt' is required for XSLT support" >&2;}
8075    { (exit 1); exit 1; }; }
8076 fi
8077
8078 fi
8079
8080 # for contrib/uuid-ossp
8081 if test "$with_ossp_uuid" = yes ; then
8082   { echo "$as_me:$LINENO: checking for uuid_export in -lossp-uuid" >&5
8083 echo $ECHO_N "checking for uuid_export in -lossp-uuid... $ECHO_C" >&6; }
8084 if test "${ac_cv_lib_ossp_uuid_uuid_export+set}" = set; then
8085   echo $ECHO_N "(cached) $ECHO_C" >&6
8086 else
8087   ac_check_lib_save_LIBS=$LIBS
8088 LIBS="-lossp-uuid  $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 uuid_export ();
8103 int
8104 main ()
8105 {
8106 return uuid_export ();
8107   ;
8108   return 0;
8109 }
8110 _ACEOF
8111 rm -f conftest.$ac_objext conftest$ac_exeext
8112 if { (ac_try="$ac_link"
8113 case "(($ac_try" in
8114   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8115   *) ac_try_echo=$ac_try;;
8116 esac
8117 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8118   (eval "$ac_link") 2>conftest.er1
8119   ac_status=$?
8120   grep -v '^ *+' conftest.er1 >conftest.err
8121   rm -f conftest.er1
8122   cat conftest.err >&5
8123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8124   (exit $ac_status); } && {
8125          test -z "$ac_c_werror_flag" ||
8126          test ! -s conftest.err
8127        } && test -s conftest$ac_exeext &&
8128        $as_test_x conftest$ac_exeext; then
8129   ac_cv_lib_ossp_uuid_uuid_export=yes
8130 else
8131   echo "$as_me: failed program was:" >&5
8132 sed 's/^/| /' conftest.$ac_ext >&5
8133
8134         ac_cv_lib_ossp_uuid_uuid_export=no
8135 fi
8136
8137 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8138       conftest$ac_exeext conftest.$ac_ext
8139 LIBS=$ac_check_lib_save_LIBS
8140 fi
8141 { echo "$as_me:$LINENO: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
8142 echo "${ECHO_T}$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
8143 if test $ac_cv_lib_ossp_uuid_uuid_export = yes; then
8144   OSSP_UUID_LIBS="-lossp-uuid"
8145 else
8146   { echo "$as_me:$LINENO: checking for uuid_export in -luuid" >&5
8147 echo $ECHO_N "checking for uuid_export in -luuid... $ECHO_C" >&6; }
8148 if test "${ac_cv_lib_uuid_uuid_export+set}" = set; then
8149   echo $ECHO_N "(cached) $ECHO_C" >&6
8150 else
8151   ac_check_lib_save_LIBS=$LIBS
8152 LIBS="-luuid  $LIBS"
8153 cat >conftest.$ac_ext <<_ACEOF
8154 /* confdefs.h.  */
8155 _ACEOF
8156 cat confdefs.h >>conftest.$ac_ext
8157 cat >>conftest.$ac_ext <<_ACEOF
8158 /* end confdefs.h.  */
8159
8160 /* Override any GCC internal prototype to avoid an error.
8161    Use char because int might match the return type of a GCC
8162    builtin and then its argument prototype would still apply.  */
8163 #ifdef __cplusplus
8164 extern "C"
8165 #endif
8166 char uuid_export ();
8167 int
8168 main ()
8169 {
8170 return uuid_export ();
8171   ;
8172   return 0;
8173 }
8174 _ACEOF
8175 rm -f conftest.$ac_objext conftest$ac_exeext
8176 if { (ac_try="$ac_link"
8177 case "(($ac_try" in
8178   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8179   *) ac_try_echo=$ac_try;;
8180 esac
8181 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8182   (eval "$ac_link") 2>conftest.er1
8183   ac_status=$?
8184   grep -v '^ *+' conftest.er1 >conftest.err
8185   rm -f conftest.er1
8186   cat conftest.err >&5
8187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8188   (exit $ac_status); } && {
8189          test -z "$ac_c_werror_flag" ||
8190          test ! -s conftest.err
8191        } && test -s conftest$ac_exeext &&
8192        $as_test_x conftest$ac_exeext; then
8193   ac_cv_lib_uuid_uuid_export=yes
8194 else
8195   echo "$as_me: failed program was:" >&5
8196 sed 's/^/| /' conftest.$ac_ext >&5
8197
8198         ac_cv_lib_uuid_uuid_export=no
8199 fi
8200
8201 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8202       conftest$ac_exeext conftest.$ac_ext
8203 LIBS=$ac_check_lib_save_LIBS
8204 fi
8205 { echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_export" >&5
8206 echo "${ECHO_T}$ac_cv_lib_uuid_uuid_export" >&6; }
8207 if test $ac_cv_lib_uuid_uuid_export = yes; then
8208   OSSP_UUID_LIBS="-luuid"
8209 else
8210   { { echo "$as_me:$LINENO: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&5
8211 echo "$as_me: error: library 'ossp-uuid' or 'uuid' is required for OSSP-UUID" >&2;}
8212    { (exit 1); exit 1; }; }
8213 fi
8214
8215 fi
8216
8217 fi
8218
8219
8220
8221 ##
8222 ## Header files
8223 ##
8224
8225 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
8226 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
8227 if test "${ac_cv_header_stdc+set}" = set; then
8228   echo $ECHO_N "(cached) $ECHO_C" >&6
8229 else
8230   cat >conftest.$ac_ext <<_ACEOF
8231 /* confdefs.h.  */
8232 _ACEOF
8233 cat confdefs.h >>conftest.$ac_ext
8234 cat >>conftest.$ac_ext <<_ACEOF
8235 /* end confdefs.h.  */
8236 #include <stdlib.h>
8237 #include <stdarg.h>
8238 #include <string.h>
8239 #include <float.h>
8240
8241 int
8242 main ()
8243 {
8244
8245   ;
8246   return 0;
8247 }
8248 _ACEOF
8249 rm -f conftest.$ac_objext
8250 if { (ac_try="$ac_compile"
8251 case "(($ac_try" in
8252   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8253   *) ac_try_echo=$ac_try;;
8254 esac
8255 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8256   (eval "$ac_compile") 2>conftest.er1
8257   ac_status=$?
8258   grep -v '^ *+' conftest.er1 >conftest.err
8259   rm -f conftest.er1
8260   cat conftest.err >&5
8261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8262   (exit $ac_status); } && {
8263          test -z "$ac_c_werror_flag" ||
8264          test ! -s conftest.err
8265        } && test -s conftest.$ac_objext; then
8266   ac_cv_header_stdc=yes
8267 else
8268   echo "$as_me: failed program was:" >&5
8269 sed 's/^/| /' conftest.$ac_ext >&5
8270
8271         ac_cv_header_stdc=no
8272 fi
8273
8274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8275
8276 if test $ac_cv_header_stdc = yes; then
8277   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8278   cat >conftest.$ac_ext <<_ACEOF
8279 /* confdefs.h.  */
8280 _ACEOF
8281 cat confdefs.h >>conftest.$ac_ext
8282 cat >>conftest.$ac_ext <<_ACEOF
8283 /* end confdefs.h.  */
8284 #include <string.h>
8285
8286 _ACEOF
8287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8288   $EGREP "memchr" >/dev/null 2>&1; then
8289   :
8290 else
8291   ac_cv_header_stdc=no
8292 fi
8293 rm -f conftest*
8294
8295 fi
8296
8297 if test $ac_cv_header_stdc = yes; then
8298   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8299   cat >conftest.$ac_ext <<_ACEOF
8300 /* confdefs.h.  */
8301 _ACEOF
8302 cat confdefs.h >>conftest.$ac_ext
8303 cat >>conftest.$ac_ext <<_ACEOF
8304 /* end confdefs.h.  */
8305 #include <stdlib.h>
8306
8307 _ACEOF
8308 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8309   $EGREP "free" >/dev/null 2>&1; then
8310   :
8311 else
8312   ac_cv_header_stdc=no
8313 fi
8314 rm -f conftest*
8315
8316 fi
8317
8318 if test $ac_cv_header_stdc = yes; then
8319   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8320   if test "$cross_compiling" = yes; then
8321   :
8322 else
8323   cat >conftest.$ac_ext <<_ACEOF
8324 /* confdefs.h.  */
8325 _ACEOF
8326 cat confdefs.h >>conftest.$ac_ext
8327 cat >>conftest.$ac_ext <<_ACEOF
8328 /* end confdefs.h.  */
8329 #include <ctype.h>
8330 #include <stdlib.h>
8331 #if ((' ' & 0x0FF) == 0x020)
8332 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8333 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8334 #else
8335 # define ISLOWER(c) \
8336                    (('a' <= (c) && (c) <= 'i') \
8337                      || ('j' <= (c) && (c) <= 'r') \
8338                      || ('s' <= (c) && (c) <= 'z'))
8339 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8340 #endif
8341
8342 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8343 int
8344 main ()
8345 {
8346   int i;
8347   for (i = 0; i < 256; i++)
8348     if (XOR (islower (i), ISLOWER (i))
8349         || toupper (i) != TOUPPER (i))
8350       return 2;
8351   return 0;
8352 }
8353 _ACEOF
8354 rm -f conftest$ac_exeext
8355 if { (ac_try="$ac_link"
8356 case "(($ac_try" in
8357   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8358   *) ac_try_echo=$ac_try;;
8359 esac
8360 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8361   (eval "$ac_link") 2>&5
8362   ac_status=$?
8363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8364   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8365   { (case "(($ac_try" in
8366   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8367   *) ac_try_echo=$ac_try;;
8368 esac
8369 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8370   (eval "$ac_try") 2>&5
8371   ac_status=$?
8372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8373   (exit $ac_status); }; }; then
8374   :
8375 else
8376   echo "$as_me: program exited with status $ac_status" >&5
8377 echo "$as_me: failed program was:" >&5
8378 sed 's/^/| /' conftest.$ac_ext >&5
8379
8380 ( exit $ac_status )
8381 ac_cv_header_stdc=no
8382 fi
8383 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8384 fi
8385
8386
8387 fi
8388 fi
8389 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
8390 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
8391 if test $ac_cv_header_stdc = yes; then
8392
8393 cat >>confdefs.h <<\_ACEOF
8394 #define STDC_HEADERS 1
8395 _ACEOF
8396
8397 fi
8398
8399 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8410                   inttypes.h stdint.h unistd.h
8411 do
8412 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8413 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8414 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8415 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8416   echo $ECHO_N "(cached) $ECHO_C" >&6
8417 else
8418   cat >conftest.$ac_ext <<_ACEOF
8419 /* confdefs.h.  */
8420 _ACEOF
8421 cat confdefs.h >>conftest.$ac_ext
8422 cat >>conftest.$ac_ext <<_ACEOF
8423 /* end confdefs.h.  */
8424 $ac_includes_default
8425
8426 #include <$ac_header>
8427 _ACEOF
8428 rm -f conftest.$ac_objext
8429 if { (ac_try="$ac_compile"
8430 case "(($ac_try" in
8431   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8432   *) ac_try_echo=$ac_try;;
8433 esac
8434 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8435   (eval "$ac_compile") 2>conftest.er1
8436   ac_status=$?
8437   grep -v '^ *+' conftest.er1 >conftest.err
8438   rm -f conftest.er1
8439   cat conftest.err >&5
8440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8441   (exit $ac_status); } && {
8442          test -z "$ac_c_werror_flag" ||
8443          test ! -s conftest.err
8444        } && test -s conftest.$ac_objext; then
8445   eval "$as_ac_Header=yes"
8446 else
8447   echo "$as_me: failed program was:" >&5
8448 sed 's/^/| /' conftest.$ac_ext >&5
8449
8450         eval "$as_ac_Header=no"
8451 fi
8452
8453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8454 fi
8455 ac_res=`eval echo '${'$as_ac_Header'}'`
8456                { echo "$as_me:$LINENO: result: $ac_res" >&5
8457 echo "${ECHO_T}$ac_res" >&6; }
8458 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8459   cat >>confdefs.h <<_ACEOF
8460 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8461 _ACEOF
8462
8463 fi
8464
8465 done
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494 for ac_header in crypt.h dld.h fp_class.h getopt.h ieeefp.h langinfo.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/tas.h sys/time.h sys/un.h termios.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h
8495 do
8496 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8497 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8498   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8499 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8500 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8501   echo $ECHO_N "(cached) $ECHO_C" >&6
8502 fi
8503 ac_res=`eval echo '${'$as_ac_Header'}'`
8504                { echo "$as_me:$LINENO: result: $ac_res" >&5
8505 echo "${ECHO_T}$ac_res" >&6; }
8506 else
8507   # Is the header compilable?
8508 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8509 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8510 cat >conftest.$ac_ext <<_ACEOF
8511 /* confdefs.h.  */
8512 _ACEOF
8513 cat confdefs.h >>conftest.$ac_ext
8514 cat >>conftest.$ac_ext <<_ACEOF
8515 /* end confdefs.h.  */
8516 $ac_includes_default
8517 #include <$ac_header>
8518 _ACEOF
8519 rm -f conftest.$ac_objext
8520 if { (ac_try="$ac_compile"
8521 case "(($ac_try" in
8522   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8523   *) ac_try_echo=$ac_try;;
8524 esac
8525 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8526   (eval "$ac_compile") 2>conftest.er1
8527   ac_status=$?
8528   grep -v '^ *+' conftest.er1 >conftest.err
8529   rm -f conftest.er1
8530   cat conftest.err >&5
8531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8532   (exit $ac_status); } && {
8533          test -z "$ac_c_werror_flag" ||
8534          test ! -s conftest.err
8535        } && test -s conftest.$ac_objext; then
8536   ac_header_compiler=yes
8537 else
8538   echo "$as_me: failed program was:" >&5
8539 sed 's/^/| /' conftest.$ac_ext >&5
8540
8541         ac_header_compiler=no
8542 fi
8543
8544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8545 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8546 echo "${ECHO_T}$ac_header_compiler" >&6; }
8547
8548 # Is the header present?
8549 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8550 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8551 cat >conftest.$ac_ext <<_ACEOF
8552 /* confdefs.h.  */
8553 _ACEOF
8554 cat confdefs.h >>conftest.$ac_ext
8555 cat >>conftest.$ac_ext <<_ACEOF
8556 /* end confdefs.h.  */
8557 #include <$ac_header>
8558 _ACEOF
8559 if { (ac_try="$ac_cpp conftest.$ac_ext"
8560 case "(($ac_try" in
8561   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8562   *) ac_try_echo=$ac_try;;
8563 esac
8564 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8565   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8566   ac_status=$?
8567   grep -v '^ *+' conftest.er1 >conftest.err
8568   rm -f conftest.er1
8569   cat conftest.err >&5
8570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8571   (exit $ac_status); } >/dev/null && {
8572          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8573          test ! -s conftest.err
8574        }; then
8575   ac_header_preproc=yes
8576 else
8577   echo "$as_me: failed program was:" >&5
8578 sed 's/^/| /' conftest.$ac_ext >&5
8579
8580   ac_header_preproc=no
8581 fi
8582
8583 rm -f conftest.err conftest.$ac_ext
8584 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8585 echo "${ECHO_T}$ac_header_preproc" >&6; }
8586
8587 # So?  What about this header?
8588 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8589   yes:no: )
8590     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8591 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8592     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8593 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8594     ac_header_preproc=yes
8595     ;;
8596   no:yes:* )
8597     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8598 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8599     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8600 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8601     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8602 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8603     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8604 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8605     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8606 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8607     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8608 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8609     ( cat <<\_ASBOX
8610 ## ---------------------------------------- ##
8611 ## Report this to pgsql-bugs@postgresql.org ##
8612 ## ---------------------------------------- ##
8613 _ASBOX
8614      ) | sed "s/^/$as_me: WARNING:     /" >&2
8615     ;;
8616 esac
8617 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8618 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8619 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8620   echo $ECHO_N "(cached) $ECHO_C" >&6
8621 else
8622   eval "$as_ac_Header=\$ac_header_preproc"
8623 fi
8624 ac_res=`eval echo '${'$as_ac_Header'}'`
8625                { echo "$as_me:$LINENO: result: $ac_res" >&5
8626 echo "${ECHO_T}$ac_res" >&6; }
8627
8628 fi
8629 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8630   cat >>confdefs.h <<_ACEOF
8631 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8632 _ACEOF
8633
8634 fi
8635
8636 done
8637
8638
8639 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
8640 # netinet/in.h is included first.
8641
8642 for ac_header in netinet/in.h
8643 do
8644 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8645 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8646   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8647 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8648 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8649   echo $ECHO_N "(cached) $ECHO_C" >&6
8650 fi
8651 ac_res=`eval echo '${'$as_ac_Header'}'`
8652                { echo "$as_me:$LINENO: result: $ac_res" >&5
8653 echo "${ECHO_T}$ac_res" >&6; }
8654 else
8655   # Is the header compilable?
8656 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8657 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8658 cat >conftest.$ac_ext <<_ACEOF
8659 /* confdefs.h.  */
8660 _ACEOF
8661 cat confdefs.h >>conftest.$ac_ext
8662 cat >>conftest.$ac_ext <<_ACEOF
8663 /* end confdefs.h.  */
8664 $ac_includes_default
8665 #include <$ac_header>
8666 _ACEOF
8667 rm -f conftest.$ac_objext
8668 if { (ac_try="$ac_compile"
8669 case "(($ac_try" in
8670   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8671   *) ac_try_echo=$ac_try;;
8672 esac
8673 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8674   (eval "$ac_compile") 2>conftest.er1
8675   ac_status=$?
8676   grep -v '^ *+' conftest.er1 >conftest.err
8677   rm -f conftest.er1
8678   cat conftest.err >&5
8679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8680   (exit $ac_status); } && {
8681          test -z "$ac_c_werror_flag" ||
8682          test ! -s conftest.err
8683        } && test -s conftest.$ac_objext; then
8684   ac_header_compiler=yes
8685 else
8686   echo "$as_me: failed program was:" >&5
8687 sed 's/^/| /' conftest.$ac_ext >&5
8688
8689         ac_header_compiler=no
8690 fi
8691
8692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8693 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8694 echo "${ECHO_T}$ac_header_compiler" >&6; }
8695
8696 # Is the header present?
8697 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8698 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8699 cat >conftest.$ac_ext <<_ACEOF
8700 /* confdefs.h.  */
8701 _ACEOF
8702 cat confdefs.h >>conftest.$ac_ext
8703 cat >>conftest.$ac_ext <<_ACEOF
8704 /* end confdefs.h.  */
8705 #include <$ac_header>
8706 _ACEOF
8707 if { (ac_try="$ac_cpp conftest.$ac_ext"
8708 case "(($ac_try" in
8709   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8710   *) ac_try_echo=$ac_try;;
8711 esac
8712 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8713   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8714   ac_status=$?
8715   grep -v '^ *+' conftest.er1 >conftest.err
8716   rm -f conftest.er1
8717   cat conftest.err >&5
8718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8719   (exit $ac_status); } >/dev/null && {
8720          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8721          test ! -s conftest.err
8722        }; then
8723   ac_header_preproc=yes
8724 else
8725   echo "$as_me: failed program was:" >&5
8726 sed 's/^/| /' conftest.$ac_ext >&5
8727
8728   ac_header_preproc=no
8729 fi
8730
8731 rm -f conftest.err conftest.$ac_ext
8732 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8733 echo "${ECHO_T}$ac_header_preproc" >&6; }
8734
8735 # So?  What about this header?
8736 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8737   yes:no: )
8738     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8739 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8740     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8741 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8742     ac_header_preproc=yes
8743     ;;
8744   no:yes:* )
8745     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8746 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8747     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8748 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8749     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8750 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8751     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8752 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8753     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8754 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8755     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8756 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8757     ( cat <<\_ASBOX
8758 ## ---------------------------------------- ##
8759 ## Report this to pgsql-bugs@postgresql.org ##
8760 ## ---------------------------------------- ##
8761 _ASBOX
8762      ) | sed "s/^/$as_me: WARNING:     /" >&2
8763     ;;
8764 esac
8765 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8766 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8767 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8768   echo $ECHO_N "(cached) $ECHO_C" >&6
8769 else
8770   eval "$as_ac_Header=\$ac_header_preproc"
8771 fi
8772 ac_res=`eval echo '${'$as_ac_Header'}'`
8773                { echo "$as_me:$LINENO: result: $ac_res" >&5
8774 echo "${ECHO_T}$ac_res" >&6; }
8775
8776 fi
8777 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8778   cat >>confdefs.h <<_ACEOF
8779 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8780 _ACEOF
8781
8782 fi
8783
8784 done
8785
8786
8787 for ac_header in netinet/tcp.h
8788 do
8789 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8790 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8791 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8792 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8793   echo $ECHO_N "(cached) $ECHO_C" >&6
8794 else
8795   cat >conftest.$ac_ext <<_ACEOF
8796 /* confdefs.h.  */
8797 _ACEOF
8798 cat confdefs.h >>conftest.$ac_ext
8799 cat >>conftest.$ac_ext <<_ACEOF
8800 /* end confdefs.h.  */
8801 $ac_includes_default
8802 #ifdef HAVE_NETINET_IN_H
8803 #include <netinet/in.h>
8804 #endif
8805
8806
8807 #include <$ac_header>
8808 _ACEOF
8809 rm -f conftest.$ac_objext
8810 if { (ac_try="$ac_compile"
8811 case "(($ac_try" in
8812   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8813   *) ac_try_echo=$ac_try;;
8814 esac
8815 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8816   (eval "$ac_compile") 2>conftest.er1
8817   ac_status=$?
8818   grep -v '^ *+' conftest.er1 >conftest.err
8819   rm -f conftest.er1
8820   cat conftest.err >&5
8821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8822   (exit $ac_status); } && {
8823          test -z "$ac_c_werror_flag" ||
8824          test ! -s conftest.err
8825        } && test -s conftest.$ac_objext; then
8826   eval "$as_ac_Header=yes"
8827 else
8828   echo "$as_me: failed program was:" >&5
8829 sed 's/^/| /' conftest.$ac_ext >&5
8830
8831         eval "$as_ac_Header=no"
8832 fi
8833
8834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8835 fi
8836 ac_res=`eval echo '${'$as_ac_Header'}'`
8837                { echo "$as_me:$LINENO: result: $ac_res" >&5
8838 echo "${ECHO_T}$ac_res" >&6; }
8839 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8840   cat >>confdefs.h <<_ACEOF
8841 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8842 _ACEOF
8843
8844 fi
8845
8846 done
8847
8848
8849 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
8850
8851 for ac_header in readline/readline.h
8852 do
8853 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8854 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8855   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8856 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8857 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8858   echo $ECHO_N "(cached) $ECHO_C" >&6
8859 fi
8860 ac_res=`eval echo '${'$as_ac_Header'}'`
8861                { echo "$as_me:$LINENO: result: $ac_res" >&5
8862 echo "${ECHO_T}$ac_res" >&6; }
8863 else
8864   # Is the header compilable?
8865 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
8866 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8867 cat >conftest.$ac_ext <<_ACEOF
8868 /* confdefs.h.  */
8869 _ACEOF
8870 cat confdefs.h >>conftest.$ac_ext
8871 cat >>conftest.$ac_ext <<_ACEOF
8872 /* end confdefs.h.  */
8873 $ac_includes_default
8874 #include <$ac_header>
8875 _ACEOF
8876 rm -f conftest.$ac_objext
8877 if { (ac_try="$ac_compile"
8878 case "(($ac_try" in
8879   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8880   *) ac_try_echo=$ac_try;;
8881 esac
8882 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8883   (eval "$ac_compile") 2>conftest.er1
8884   ac_status=$?
8885   grep -v '^ *+' conftest.er1 >conftest.err
8886   rm -f conftest.er1
8887   cat conftest.err >&5
8888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8889   (exit $ac_status); } && {
8890          test -z "$ac_c_werror_flag" ||
8891          test ! -s conftest.err
8892        } && test -s conftest.$ac_objext; then
8893   ac_header_compiler=yes
8894 else
8895   echo "$as_me: failed program was:" >&5
8896 sed 's/^/| /' conftest.$ac_ext >&5
8897
8898         ac_header_compiler=no
8899 fi
8900
8901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8902 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8903 echo "${ECHO_T}$ac_header_compiler" >&6; }
8904
8905 # Is the header present?
8906 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
8907 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8908 cat >conftest.$ac_ext <<_ACEOF
8909 /* confdefs.h.  */
8910 _ACEOF
8911 cat confdefs.h >>conftest.$ac_ext
8912 cat >>conftest.$ac_ext <<_ACEOF
8913 /* end confdefs.h.  */
8914 #include <$ac_header>
8915 _ACEOF
8916 if { (ac_try="$ac_cpp conftest.$ac_ext"
8917 case "(($ac_try" in
8918   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8919   *) ac_try_echo=$ac_try;;
8920 esac
8921 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8922   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8923   ac_status=$?
8924   grep -v '^ *+' conftest.er1 >conftest.err
8925   rm -f conftest.er1
8926   cat conftest.err >&5
8927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8928   (exit $ac_status); } >/dev/null && {
8929          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8930          test ! -s conftest.err
8931        }; then
8932   ac_header_preproc=yes
8933 else
8934   echo "$as_me: failed program was:" >&5
8935 sed 's/^/| /' conftest.$ac_ext >&5
8936
8937   ac_header_preproc=no
8938 fi
8939
8940 rm -f conftest.err conftest.$ac_ext
8941 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8942 echo "${ECHO_T}$ac_header_preproc" >&6; }
8943
8944 # So?  What about this header?
8945 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8946   yes:no: )
8947     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8948 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8949     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8950 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8951     ac_header_preproc=yes
8952     ;;
8953   no:yes:* )
8954     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8955 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8956     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8957 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8958     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8959 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8960     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8961 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8962     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8963 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8964     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8965 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8966     ( cat <<\_ASBOX
8967 ## ---------------------------------------- ##
8968 ## Report this to pgsql-bugs@postgresql.org ##
8969 ## ---------------------------------------- ##
8970 _ASBOX
8971      ) | sed "s/^/$as_me: WARNING:     /" >&2
8972     ;;
8973 esac
8974 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8975 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8976 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8977   echo $ECHO_N "(cached) $ECHO_C" >&6
8978 else
8979   eval "$as_ac_Header=\$ac_header_preproc"
8980 fi
8981 ac_res=`eval echo '${'$as_ac_Header'}'`
8982                { echo "$as_me:$LINENO: result: $ac_res" >&5
8983 echo "${ECHO_T}$ac_res" >&6; }
8984
8985 fi
8986 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8987   cat >>confdefs.h <<_ACEOF
8988 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8989 _ACEOF
8990
8991 else
8992
8993 for ac_header in readline.h
8994 do
8995 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8996 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8997   { echo "$as_me:$LINENO: checking for $ac_header" >&5
8998 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8999 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9000   echo $ECHO_N "(cached) $ECHO_C" >&6
9001 fi
9002 ac_res=`eval echo '${'$as_ac_Header'}'`
9003                { echo "$as_me:$LINENO: result: $ac_res" >&5
9004 echo "${ECHO_T}$ac_res" >&6; }
9005 else
9006   # Is the header compilable?
9007 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9008 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9009 cat >conftest.$ac_ext <<_ACEOF
9010 /* confdefs.h.  */
9011 _ACEOF
9012 cat confdefs.h >>conftest.$ac_ext
9013 cat >>conftest.$ac_ext <<_ACEOF
9014 /* end confdefs.h.  */
9015 $ac_includes_default
9016 #include <$ac_header>
9017 _ACEOF
9018 rm -f conftest.$ac_objext
9019 if { (ac_try="$ac_compile"
9020 case "(($ac_try" in
9021   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9022   *) ac_try_echo=$ac_try;;
9023 esac
9024 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9025   (eval "$ac_compile") 2>conftest.er1
9026   ac_status=$?
9027   grep -v '^ *+' conftest.er1 >conftest.err
9028   rm -f conftest.er1
9029   cat conftest.err >&5
9030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9031   (exit $ac_status); } && {
9032          test -z "$ac_c_werror_flag" ||
9033          test ! -s conftest.err
9034        } && test -s conftest.$ac_objext; then
9035   ac_header_compiler=yes
9036 else
9037   echo "$as_me: failed program was:" >&5
9038 sed 's/^/| /' conftest.$ac_ext >&5
9039
9040         ac_header_compiler=no
9041 fi
9042
9043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9044 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9045 echo "${ECHO_T}$ac_header_compiler" >&6; }
9046
9047 # Is the header present?
9048 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9049 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9050 cat >conftest.$ac_ext <<_ACEOF
9051 /* confdefs.h.  */
9052 _ACEOF
9053 cat confdefs.h >>conftest.$ac_ext
9054 cat >>conftest.$ac_ext <<_ACEOF
9055 /* end confdefs.h.  */
9056 #include <$ac_header>
9057 _ACEOF
9058 if { (ac_try="$ac_cpp conftest.$ac_ext"
9059 case "(($ac_try" in
9060   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9061   *) ac_try_echo=$ac_try;;
9062 esac
9063 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9064   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9065   ac_status=$?
9066   grep -v '^ *+' conftest.er1 >conftest.err
9067   rm -f conftest.er1
9068   cat conftest.err >&5
9069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9070   (exit $ac_status); } >/dev/null && {
9071          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9072          test ! -s conftest.err
9073        }; then
9074   ac_header_preproc=yes
9075 else
9076   echo "$as_me: failed program was:" >&5
9077 sed 's/^/| /' conftest.$ac_ext >&5
9078
9079   ac_header_preproc=no
9080 fi
9081
9082 rm -f conftest.err conftest.$ac_ext
9083 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9084 echo "${ECHO_T}$ac_header_preproc" >&6; }
9085
9086 # So?  What about this header?
9087 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9088   yes:no: )
9089     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9090 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9091     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9092 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9093     ac_header_preproc=yes
9094     ;;
9095   no:yes:* )
9096     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9097 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9098     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9099 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9100     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9101 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9102     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9103 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9104     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9105 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9106     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9107 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9108     ( cat <<\_ASBOX
9109 ## ---------------------------------------- ##
9110 ## Report this to pgsql-bugs@postgresql.org ##
9111 ## ---------------------------------------- ##
9112 _ASBOX
9113      ) | sed "s/^/$as_me: WARNING:     /" >&2
9114     ;;
9115 esac
9116 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9117 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9118 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9119   echo $ECHO_N "(cached) $ECHO_C" >&6
9120 else
9121   eval "$as_ac_Header=\$ac_header_preproc"
9122 fi
9123 ac_res=`eval echo '${'$as_ac_Header'}'`
9124                { echo "$as_me:$LINENO: result: $ac_res" >&5
9125 echo "${ECHO_T}$ac_res" >&6; }
9126
9127 fi
9128 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9129   cat >>confdefs.h <<_ACEOF
9130 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9131 _ACEOF
9132
9133 else
9134   { { echo "$as_me:$LINENO: error: readline header not found
9135 If you have readline already installed, see config.log for details on the
9136 failure.  It is possible the compiler isn't looking in the proper directory.
9137 Use --without-readline to disable readline support." >&5
9138 echo "$as_me: error: readline header not found
9139 If you have readline already installed, see config.log for details on the
9140 failure.  It is possible the compiler isn't looking in the proper directory.
9141 Use --without-readline to disable readline support." >&2;}
9142    { (exit 1); exit 1; }; }
9143 fi
9144
9145 done
9146
9147 fi
9148
9149 done
9150
9151
9152 for ac_header in readline/history.h
9153 do
9154 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9155 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9156   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9157 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9158 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9159   echo $ECHO_N "(cached) $ECHO_C" >&6
9160 fi
9161 ac_res=`eval echo '${'$as_ac_Header'}'`
9162                { echo "$as_me:$LINENO: result: $ac_res" >&5
9163 echo "${ECHO_T}$ac_res" >&6; }
9164 else
9165   # Is the header compilable?
9166 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9167 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9168 cat >conftest.$ac_ext <<_ACEOF
9169 /* confdefs.h.  */
9170 _ACEOF
9171 cat confdefs.h >>conftest.$ac_ext
9172 cat >>conftest.$ac_ext <<_ACEOF
9173 /* end confdefs.h.  */
9174 $ac_includes_default
9175 #include <$ac_header>
9176 _ACEOF
9177 rm -f conftest.$ac_objext
9178 if { (ac_try="$ac_compile"
9179 case "(($ac_try" in
9180   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9181   *) ac_try_echo=$ac_try;;
9182 esac
9183 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9184   (eval "$ac_compile") 2>conftest.er1
9185   ac_status=$?
9186   grep -v '^ *+' conftest.er1 >conftest.err
9187   rm -f conftest.er1
9188   cat conftest.err >&5
9189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9190   (exit $ac_status); } && {
9191          test -z "$ac_c_werror_flag" ||
9192          test ! -s conftest.err
9193        } && test -s conftest.$ac_objext; then
9194   ac_header_compiler=yes
9195 else
9196   echo "$as_me: failed program was:" >&5
9197 sed 's/^/| /' conftest.$ac_ext >&5
9198
9199         ac_header_compiler=no
9200 fi
9201
9202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9203 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9204 echo "${ECHO_T}$ac_header_compiler" >&6; }
9205
9206 # Is the header present?
9207 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9208 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9209 cat >conftest.$ac_ext <<_ACEOF
9210 /* confdefs.h.  */
9211 _ACEOF
9212 cat confdefs.h >>conftest.$ac_ext
9213 cat >>conftest.$ac_ext <<_ACEOF
9214 /* end confdefs.h.  */
9215 #include <$ac_header>
9216 _ACEOF
9217 if { (ac_try="$ac_cpp conftest.$ac_ext"
9218 case "(($ac_try" in
9219   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9220   *) ac_try_echo=$ac_try;;
9221 esac
9222 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9223   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9224   ac_status=$?
9225   grep -v '^ *+' conftest.er1 >conftest.err
9226   rm -f conftest.er1
9227   cat conftest.err >&5
9228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9229   (exit $ac_status); } >/dev/null && {
9230          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9231          test ! -s conftest.err
9232        }; then
9233   ac_header_preproc=yes
9234 else
9235   echo "$as_me: failed program was:" >&5
9236 sed 's/^/| /' conftest.$ac_ext >&5
9237
9238   ac_header_preproc=no
9239 fi
9240
9241 rm -f conftest.err conftest.$ac_ext
9242 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9243 echo "${ECHO_T}$ac_header_preproc" >&6; }
9244
9245 # So?  What about this header?
9246 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9247   yes:no: )
9248     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9249 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9250     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9251 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9252     ac_header_preproc=yes
9253     ;;
9254   no:yes:* )
9255     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9256 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9257     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9258 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9259     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9260 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9261     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9262 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9263     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9264 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9265     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9266 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9267     ( cat <<\_ASBOX
9268 ## ---------------------------------------- ##
9269 ## Report this to pgsql-bugs@postgresql.org ##
9270 ## ---------------------------------------- ##
9271 _ASBOX
9272      ) | sed "s/^/$as_me: WARNING:     /" >&2
9273     ;;
9274 esac
9275 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9276 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9277 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9278   echo $ECHO_N "(cached) $ECHO_C" >&6
9279 else
9280   eval "$as_ac_Header=\$ac_header_preproc"
9281 fi
9282 ac_res=`eval echo '${'$as_ac_Header'}'`
9283                { echo "$as_me:$LINENO: result: $ac_res" >&5
9284 echo "${ECHO_T}$ac_res" >&6; }
9285
9286 fi
9287 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9288   cat >>confdefs.h <<_ACEOF
9289 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9290 _ACEOF
9291
9292 else
9293
9294 for ac_header in history.h
9295 do
9296 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9297 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9298   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9299 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9300 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9301   echo $ECHO_N "(cached) $ECHO_C" >&6
9302 fi
9303 ac_res=`eval echo '${'$as_ac_Header'}'`
9304                { echo "$as_me:$LINENO: result: $ac_res" >&5
9305 echo "${ECHO_T}$ac_res" >&6; }
9306 else
9307   # Is the header compilable?
9308 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9309 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9310 cat >conftest.$ac_ext <<_ACEOF
9311 /* confdefs.h.  */
9312 _ACEOF
9313 cat confdefs.h >>conftest.$ac_ext
9314 cat >>conftest.$ac_ext <<_ACEOF
9315 /* end confdefs.h.  */
9316 $ac_includes_default
9317 #include <$ac_header>
9318 _ACEOF
9319 rm -f conftest.$ac_objext
9320 if { (ac_try="$ac_compile"
9321 case "(($ac_try" in
9322   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9323   *) ac_try_echo=$ac_try;;
9324 esac
9325 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9326   (eval "$ac_compile") 2>conftest.er1
9327   ac_status=$?
9328   grep -v '^ *+' conftest.er1 >conftest.err
9329   rm -f conftest.er1
9330   cat conftest.err >&5
9331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9332   (exit $ac_status); } && {
9333          test -z "$ac_c_werror_flag" ||
9334          test ! -s conftest.err
9335        } && test -s conftest.$ac_objext; then
9336   ac_header_compiler=yes
9337 else
9338   echo "$as_me: failed program was:" >&5
9339 sed 's/^/| /' conftest.$ac_ext >&5
9340
9341         ac_header_compiler=no
9342 fi
9343
9344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9345 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9346 echo "${ECHO_T}$ac_header_compiler" >&6; }
9347
9348 # Is the header present?
9349 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9350 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9351 cat >conftest.$ac_ext <<_ACEOF
9352 /* confdefs.h.  */
9353 _ACEOF
9354 cat confdefs.h >>conftest.$ac_ext
9355 cat >>conftest.$ac_ext <<_ACEOF
9356 /* end confdefs.h.  */
9357 #include <$ac_header>
9358 _ACEOF
9359 if { (ac_try="$ac_cpp conftest.$ac_ext"
9360 case "(($ac_try" in
9361   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9362   *) ac_try_echo=$ac_try;;
9363 esac
9364 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9365   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9366   ac_status=$?
9367   grep -v '^ *+' conftest.er1 >conftest.err
9368   rm -f conftest.er1
9369   cat conftest.err >&5
9370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9371   (exit $ac_status); } >/dev/null && {
9372          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9373          test ! -s conftest.err
9374        }; then
9375   ac_header_preproc=yes
9376 else
9377   echo "$as_me: failed program was:" >&5
9378 sed 's/^/| /' conftest.$ac_ext >&5
9379
9380   ac_header_preproc=no
9381 fi
9382
9383 rm -f conftest.err conftest.$ac_ext
9384 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9385 echo "${ECHO_T}$ac_header_preproc" >&6; }
9386
9387 # So?  What about this header?
9388 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9389   yes:no: )
9390     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9391 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9392     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9393 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9394     ac_header_preproc=yes
9395     ;;
9396   no:yes:* )
9397     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9398 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9399     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9400 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9401     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9402 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9403     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9404 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9405     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9406 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9407     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9408 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9409     ( cat <<\_ASBOX
9410 ## ---------------------------------------- ##
9411 ## Report this to pgsql-bugs@postgresql.org ##
9412 ## ---------------------------------------- ##
9413 _ASBOX
9414      ) | sed "s/^/$as_me: WARNING:     /" >&2
9415     ;;
9416 esac
9417 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9418 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9419 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9420   echo $ECHO_N "(cached) $ECHO_C" >&6
9421 else
9422   eval "$as_ac_Header=\$ac_header_preproc"
9423 fi
9424 ac_res=`eval echo '${'$as_ac_Header'}'`
9425                { echo "$as_me:$LINENO: result: $ac_res" >&5
9426 echo "${ECHO_T}$ac_res" >&6; }
9427
9428 fi
9429 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9430   cat >>confdefs.h <<_ACEOF
9431 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9432 _ACEOF
9433
9434 else
9435   { { echo "$as_me:$LINENO: error: history header not found
9436 If you have readline already installed, see config.log for details on the
9437 failure.  It is possible the compiler isn't looking in the proper directory.
9438 Use --without-readline to disable readline support." >&5
9439 echo "$as_me: error: history header not found
9440 If you have readline already installed, see config.log for details on the
9441 failure.  It is possible the compiler isn't looking in the proper directory.
9442 Use --without-readline to disable readline support." >&2;}
9443    { (exit 1); exit 1; }; }
9444 fi
9445
9446 done
9447
9448 fi
9449
9450 done
9451
9452 fi
9453
9454 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
9455 # Some installations of libedit usurp /usr/include/readline/, which seems
9456 # bad practice, since in combined installations readline will have its headers
9457 # there.  We might have to resort to AC_EGREP checks to make sure we found
9458 # the proper header...
9459
9460 for ac_header in editline/readline.h
9461 do
9462 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9463 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9464   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9465 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9466 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9467   echo $ECHO_N "(cached) $ECHO_C" >&6
9468 fi
9469 ac_res=`eval echo '${'$as_ac_Header'}'`
9470                { echo "$as_me:$LINENO: result: $ac_res" >&5
9471 echo "${ECHO_T}$ac_res" >&6; }
9472 else
9473   # Is the header compilable?
9474 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9475 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9476 cat >conftest.$ac_ext <<_ACEOF
9477 /* confdefs.h.  */
9478 _ACEOF
9479 cat confdefs.h >>conftest.$ac_ext
9480 cat >>conftest.$ac_ext <<_ACEOF
9481 /* end confdefs.h.  */
9482 $ac_includes_default
9483 #include <$ac_header>
9484 _ACEOF
9485 rm -f conftest.$ac_objext
9486 if { (ac_try="$ac_compile"
9487 case "(($ac_try" in
9488   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9489   *) ac_try_echo=$ac_try;;
9490 esac
9491 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9492   (eval "$ac_compile") 2>conftest.er1
9493   ac_status=$?
9494   grep -v '^ *+' conftest.er1 >conftest.err
9495   rm -f conftest.er1
9496   cat conftest.err >&5
9497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9498   (exit $ac_status); } && {
9499          test -z "$ac_c_werror_flag" ||
9500          test ! -s conftest.err
9501        } && test -s conftest.$ac_objext; then
9502   ac_header_compiler=yes
9503 else
9504   echo "$as_me: failed program was:" >&5
9505 sed 's/^/| /' conftest.$ac_ext >&5
9506
9507         ac_header_compiler=no
9508 fi
9509
9510 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9511 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9512 echo "${ECHO_T}$ac_header_compiler" >&6; }
9513
9514 # Is the header present?
9515 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9516 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9517 cat >conftest.$ac_ext <<_ACEOF
9518 /* confdefs.h.  */
9519 _ACEOF
9520 cat confdefs.h >>conftest.$ac_ext
9521 cat >>conftest.$ac_ext <<_ACEOF
9522 /* end confdefs.h.  */
9523 #include <$ac_header>
9524 _ACEOF
9525 if { (ac_try="$ac_cpp conftest.$ac_ext"
9526 case "(($ac_try" in
9527   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9528   *) ac_try_echo=$ac_try;;
9529 esac
9530 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9531   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9532   ac_status=$?
9533   grep -v '^ *+' conftest.er1 >conftest.err
9534   rm -f conftest.er1
9535   cat conftest.err >&5
9536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9537   (exit $ac_status); } >/dev/null && {
9538          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9539          test ! -s conftest.err
9540        }; then
9541   ac_header_preproc=yes
9542 else
9543   echo "$as_me: failed program was:" >&5
9544 sed 's/^/| /' conftest.$ac_ext >&5
9545
9546   ac_header_preproc=no
9547 fi
9548
9549 rm -f conftest.err conftest.$ac_ext
9550 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9551 echo "${ECHO_T}$ac_header_preproc" >&6; }
9552
9553 # So?  What about this header?
9554 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9555   yes:no: )
9556     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9557 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9558     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9559 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9560     ac_header_preproc=yes
9561     ;;
9562   no:yes:* )
9563     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9564 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9565     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9566 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9567     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9568 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9569     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9570 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9571     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9572 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9573     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9574 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9575     ( cat <<\_ASBOX
9576 ## ---------------------------------------- ##
9577 ## Report this to pgsql-bugs@postgresql.org ##
9578 ## ---------------------------------------- ##
9579 _ASBOX
9580      ) | sed "s/^/$as_me: WARNING:     /" >&2
9581     ;;
9582 esac
9583 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9584 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9585 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9586   echo $ECHO_N "(cached) $ECHO_C" >&6
9587 else
9588   eval "$as_ac_Header=\$ac_header_preproc"
9589 fi
9590 ac_res=`eval echo '${'$as_ac_Header'}'`
9591                { echo "$as_me:$LINENO: result: $ac_res" >&5
9592 echo "${ECHO_T}$ac_res" >&6; }
9593
9594 fi
9595 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9596   cat >>confdefs.h <<_ACEOF
9597 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9598 _ACEOF
9599
9600 else
9601
9602 for ac_header in readline.h
9603 do
9604 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9605 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9606   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9607 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9608 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9609   echo $ECHO_N "(cached) $ECHO_C" >&6
9610 fi
9611 ac_res=`eval echo '${'$as_ac_Header'}'`
9612                { echo "$as_me:$LINENO: result: $ac_res" >&5
9613 echo "${ECHO_T}$ac_res" >&6; }
9614 else
9615   # Is the header compilable?
9616 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9617 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9618 cat >conftest.$ac_ext <<_ACEOF
9619 /* confdefs.h.  */
9620 _ACEOF
9621 cat confdefs.h >>conftest.$ac_ext
9622 cat >>conftest.$ac_ext <<_ACEOF
9623 /* end confdefs.h.  */
9624 $ac_includes_default
9625 #include <$ac_header>
9626 _ACEOF
9627 rm -f conftest.$ac_objext
9628 if { (ac_try="$ac_compile"
9629 case "(($ac_try" in
9630   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9631   *) ac_try_echo=$ac_try;;
9632 esac
9633 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9634   (eval "$ac_compile") 2>conftest.er1
9635   ac_status=$?
9636   grep -v '^ *+' conftest.er1 >conftest.err
9637   rm -f conftest.er1
9638   cat conftest.err >&5
9639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9640   (exit $ac_status); } && {
9641          test -z "$ac_c_werror_flag" ||
9642          test ! -s conftest.err
9643        } && test -s conftest.$ac_objext; then
9644   ac_header_compiler=yes
9645 else
9646   echo "$as_me: failed program was:" >&5
9647 sed 's/^/| /' conftest.$ac_ext >&5
9648
9649         ac_header_compiler=no
9650 fi
9651
9652 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9653 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9654 echo "${ECHO_T}$ac_header_compiler" >&6; }
9655
9656 # Is the header present?
9657 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9658 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9659 cat >conftest.$ac_ext <<_ACEOF
9660 /* confdefs.h.  */
9661 _ACEOF
9662 cat confdefs.h >>conftest.$ac_ext
9663 cat >>conftest.$ac_ext <<_ACEOF
9664 /* end confdefs.h.  */
9665 #include <$ac_header>
9666 _ACEOF
9667 if { (ac_try="$ac_cpp conftest.$ac_ext"
9668 case "(($ac_try" in
9669   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9670   *) ac_try_echo=$ac_try;;
9671 esac
9672 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9673   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9674   ac_status=$?
9675   grep -v '^ *+' conftest.er1 >conftest.err
9676   rm -f conftest.er1
9677   cat conftest.err >&5
9678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9679   (exit $ac_status); } >/dev/null && {
9680          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9681          test ! -s conftest.err
9682        }; then
9683   ac_header_preproc=yes
9684 else
9685   echo "$as_me: failed program was:" >&5
9686 sed 's/^/| /' conftest.$ac_ext >&5
9687
9688   ac_header_preproc=no
9689 fi
9690
9691 rm -f conftest.err conftest.$ac_ext
9692 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9693 echo "${ECHO_T}$ac_header_preproc" >&6; }
9694
9695 # So?  What about this header?
9696 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9697   yes:no: )
9698     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9699 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9700     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9701 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9702     ac_header_preproc=yes
9703     ;;
9704   no:yes:* )
9705     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9706 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9707     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9708 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9709     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9710 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9711     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9712 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9713     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9714 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9715     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9716 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9717     ( cat <<\_ASBOX
9718 ## ---------------------------------------- ##
9719 ## Report this to pgsql-bugs@postgresql.org ##
9720 ## ---------------------------------------- ##
9721 _ASBOX
9722      ) | sed "s/^/$as_me: WARNING:     /" >&2
9723     ;;
9724 esac
9725 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9726 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9727 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9728   echo $ECHO_N "(cached) $ECHO_C" >&6
9729 else
9730   eval "$as_ac_Header=\$ac_header_preproc"
9731 fi
9732 ac_res=`eval echo '${'$as_ac_Header'}'`
9733                { echo "$as_me:$LINENO: result: $ac_res" >&5
9734 echo "${ECHO_T}$ac_res" >&6; }
9735
9736 fi
9737 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9738   cat >>confdefs.h <<_ACEOF
9739 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9740 _ACEOF
9741
9742 else
9743
9744 for ac_header in readline/readline.h
9745 do
9746 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9747 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9748   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9749 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9750 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9751   echo $ECHO_N "(cached) $ECHO_C" >&6
9752 fi
9753 ac_res=`eval echo '${'$as_ac_Header'}'`
9754                { echo "$as_me:$LINENO: result: $ac_res" >&5
9755 echo "${ECHO_T}$ac_res" >&6; }
9756 else
9757   # Is the header compilable?
9758 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9759 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9760 cat >conftest.$ac_ext <<_ACEOF
9761 /* confdefs.h.  */
9762 _ACEOF
9763 cat confdefs.h >>conftest.$ac_ext
9764 cat >>conftest.$ac_ext <<_ACEOF
9765 /* end confdefs.h.  */
9766 $ac_includes_default
9767 #include <$ac_header>
9768 _ACEOF
9769 rm -f conftest.$ac_objext
9770 if { (ac_try="$ac_compile"
9771 case "(($ac_try" in
9772   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9773   *) ac_try_echo=$ac_try;;
9774 esac
9775 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9776   (eval "$ac_compile") 2>conftest.er1
9777   ac_status=$?
9778   grep -v '^ *+' conftest.er1 >conftest.err
9779   rm -f conftest.er1
9780   cat conftest.err >&5
9781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9782   (exit $ac_status); } && {
9783          test -z "$ac_c_werror_flag" ||
9784          test ! -s conftest.err
9785        } && test -s conftest.$ac_objext; then
9786   ac_header_compiler=yes
9787 else
9788   echo "$as_me: failed program was:" >&5
9789 sed 's/^/| /' conftest.$ac_ext >&5
9790
9791         ac_header_compiler=no
9792 fi
9793
9794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9795 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9796 echo "${ECHO_T}$ac_header_compiler" >&6; }
9797
9798 # Is the header present?
9799 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9800 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9801 cat >conftest.$ac_ext <<_ACEOF
9802 /* confdefs.h.  */
9803 _ACEOF
9804 cat confdefs.h >>conftest.$ac_ext
9805 cat >>conftest.$ac_ext <<_ACEOF
9806 /* end confdefs.h.  */
9807 #include <$ac_header>
9808 _ACEOF
9809 if { (ac_try="$ac_cpp conftest.$ac_ext"
9810 case "(($ac_try" in
9811   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9812   *) ac_try_echo=$ac_try;;
9813 esac
9814 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9815   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9816   ac_status=$?
9817   grep -v '^ *+' conftest.er1 >conftest.err
9818   rm -f conftest.er1
9819   cat conftest.err >&5
9820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9821   (exit $ac_status); } >/dev/null && {
9822          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9823          test ! -s conftest.err
9824        }; then
9825   ac_header_preproc=yes
9826 else
9827   echo "$as_me: failed program was:" >&5
9828 sed 's/^/| /' conftest.$ac_ext >&5
9829
9830   ac_header_preproc=no
9831 fi
9832
9833 rm -f conftest.err conftest.$ac_ext
9834 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9835 echo "${ECHO_T}$ac_header_preproc" >&6; }
9836
9837 # So?  What about this header?
9838 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9839   yes:no: )
9840     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9841 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9842     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9843 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9844     ac_header_preproc=yes
9845     ;;
9846   no:yes:* )
9847     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9848 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9849     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9850 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9851     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9852 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9853     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9854 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9855     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9856 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9857     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9858 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9859     ( cat <<\_ASBOX
9860 ## ---------------------------------------- ##
9861 ## Report this to pgsql-bugs@postgresql.org ##
9862 ## ---------------------------------------- ##
9863 _ASBOX
9864      ) | sed "s/^/$as_me: WARNING:     /" >&2
9865     ;;
9866 esac
9867 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9868 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9869 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9870   echo $ECHO_N "(cached) $ECHO_C" >&6
9871 else
9872   eval "$as_ac_Header=\$ac_header_preproc"
9873 fi
9874 ac_res=`eval echo '${'$as_ac_Header'}'`
9875                { echo "$as_me:$LINENO: result: $ac_res" >&5
9876 echo "${ECHO_T}$ac_res" >&6; }
9877
9878 fi
9879 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9880   cat >>confdefs.h <<_ACEOF
9881 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9882 _ACEOF
9883
9884 else
9885   { { echo "$as_me:$LINENO: error: readline header not found
9886 If you have libedit already installed, see config.log for details on the
9887 failure.  It is possible the compiler isn't looking in the proper directory.
9888 Use --without-readline to disable libedit support." >&5
9889 echo "$as_me: error: readline header not found
9890 If you have libedit already installed, see config.log for details on the
9891 failure.  It is possible the compiler isn't looking in the proper directory.
9892 Use --without-readline to disable libedit support." >&2;}
9893    { (exit 1); exit 1; }; }
9894 fi
9895
9896 done
9897
9898 fi
9899
9900 done
9901
9902 fi
9903
9904 done
9905
9906 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9907 # not be there at all.  Hence, don't complain if not found.  We must check
9908 # though, since in yet other versions it is an independent header.
9909
9910 for ac_header in editline/history.h
9911 do
9912 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9913 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9914   { echo "$as_me:$LINENO: checking for $ac_header" >&5
9915 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9916 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9917   echo $ECHO_N "(cached) $ECHO_C" >&6
9918 fi
9919 ac_res=`eval echo '${'$as_ac_Header'}'`
9920                { echo "$as_me:$LINENO: result: $ac_res" >&5
9921 echo "${ECHO_T}$ac_res" >&6; }
9922 else
9923   # Is the header compilable?
9924 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
9925 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
9926 cat >conftest.$ac_ext <<_ACEOF
9927 /* confdefs.h.  */
9928 _ACEOF
9929 cat confdefs.h >>conftest.$ac_ext
9930 cat >>conftest.$ac_ext <<_ACEOF
9931 /* end confdefs.h.  */
9932 $ac_includes_default
9933 #include <$ac_header>
9934 _ACEOF
9935 rm -f conftest.$ac_objext
9936 if { (ac_try="$ac_compile"
9937 case "(($ac_try" in
9938   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9939   *) ac_try_echo=$ac_try;;
9940 esac
9941 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9942   (eval "$ac_compile") 2>conftest.er1
9943   ac_status=$?
9944   grep -v '^ *+' conftest.er1 >conftest.err
9945   rm -f conftest.er1
9946   cat conftest.err >&5
9947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9948   (exit $ac_status); } && {
9949          test -z "$ac_c_werror_flag" ||
9950          test ! -s conftest.err
9951        } && test -s conftest.$ac_objext; then
9952   ac_header_compiler=yes
9953 else
9954   echo "$as_me: failed program was:" >&5
9955 sed 's/^/| /' conftest.$ac_ext >&5
9956
9957         ac_header_compiler=no
9958 fi
9959
9960 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9961 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9962 echo "${ECHO_T}$ac_header_compiler" >&6; }
9963
9964 # Is the header present?
9965 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
9966 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
9967 cat >conftest.$ac_ext <<_ACEOF
9968 /* confdefs.h.  */
9969 _ACEOF
9970 cat confdefs.h >>conftest.$ac_ext
9971 cat >>conftest.$ac_ext <<_ACEOF
9972 /* end confdefs.h.  */
9973 #include <$ac_header>
9974 _ACEOF
9975 if { (ac_try="$ac_cpp conftest.$ac_ext"
9976 case "(($ac_try" in
9977   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9978   *) ac_try_echo=$ac_try;;
9979 esac
9980 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9981   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9982   ac_status=$?
9983   grep -v '^ *+' conftest.er1 >conftest.err
9984   rm -f conftest.er1
9985   cat conftest.err >&5
9986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9987   (exit $ac_status); } >/dev/null && {
9988          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9989          test ! -s conftest.err
9990        }; then
9991   ac_header_preproc=yes
9992 else
9993   echo "$as_me: failed program was:" >&5
9994 sed 's/^/| /' conftest.$ac_ext >&5
9995
9996   ac_header_preproc=no
9997 fi
9998
9999 rm -f conftest.err conftest.$ac_ext
10000 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10001 echo "${ECHO_T}$ac_header_preproc" >&6; }
10002
10003 # So?  What about this header?
10004 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10005   yes:no: )
10006     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10007 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10008     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10009 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10010     ac_header_preproc=yes
10011     ;;
10012   no:yes:* )
10013     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10014 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10015     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10016 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10017     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10018 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10019     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10020 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10021     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10022 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10023     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10024 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10025     ( cat <<\_ASBOX
10026 ## ---------------------------------------- ##
10027 ## Report this to pgsql-bugs@postgresql.org ##
10028 ## ---------------------------------------- ##
10029 _ASBOX
10030      ) | sed "s/^/$as_me: WARNING:     /" >&2
10031     ;;
10032 esac
10033 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10034 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10035 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10036   echo $ECHO_N "(cached) $ECHO_C" >&6
10037 else
10038   eval "$as_ac_Header=\$ac_header_preproc"
10039 fi
10040 ac_res=`eval echo '${'$as_ac_Header'}'`
10041                { echo "$as_me:$LINENO: result: $ac_res" >&5
10042 echo "${ECHO_T}$ac_res" >&6; }
10043
10044 fi
10045 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10046   cat >>confdefs.h <<_ACEOF
10047 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10048 _ACEOF
10049
10050 else
10051
10052 for ac_header in history.h
10053 do
10054 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10055 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10056   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10057 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10058 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10059   echo $ECHO_N "(cached) $ECHO_C" >&6
10060 fi
10061 ac_res=`eval echo '${'$as_ac_Header'}'`
10062                { echo "$as_me:$LINENO: result: $ac_res" >&5
10063 echo "${ECHO_T}$ac_res" >&6; }
10064 else
10065   # Is the header compilable?
10066 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10067 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10068 cat >conftest.$ac_ext <<_ACEOF
10069 /* confdefs.h.  */
10070 _ACEOF
10071 cat confdefs.h >>conftest.$ac_ext
10072 cat >>conftest.$ac_ext <<_ACEOF
10073 /* end confdefs.h.  */
10074 $ac_includes_default
10075 #include <$ac_header>
10076 _ACEOF
10077 rm -f conftest.$ac_objext
10078 if { (ac_try="$ac_compile"
10079 case "(($ac_try" in
10080   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10081   *) ac_try_echo=$ac_try;;
10082 esac
10083 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10084   (eval "$ac_compile") 2>conftest.er1
10085   ac_status=$?
10086   grep -v '^ *+' conftest.er1 >conftest.err
10087   rm -f conftest.er1
10088   cat conftest.err >&5
10089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10090   (exit $ac_status); } && {
10091          test -z "$ac_c_werror_flag" ||
10092          test ! -s conftest.err
10093        } && test -s conftest.$ac_objext; then
10094   ac_header_compiler=yes
10095 else
10096   echo "$as_me: failed program was:" >&5
10097 sed 's/^/| /' conftest.$ac_ext >&5
10098
10099         ac_header_compiler=no
10100 fi
10101
10102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10103 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10104 echo "${ECHO_T}$ac_header_compiler" >&6; }
10105
10106 # Is the header present?
10107 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10108 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10109 cat >conftest.$ac_ext <<_ACEOF
10110 /* confdefs.h.  */
10111 _ACEOF
10112 cat confdefs.h >>conftest.$ac_ext
10113 cat >>conftest.$ac_ext <<_ACEOF
10114 /* end confdefs.h.  */
10115 #include <$ac_header>
10116 _ACEOF
10117 if { (ac_try="$ac_cpp conftest.$ac_ext"
10118 case "(($ac_try" in
10119   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10120   *) ac_try_echo=$ac_try;;
10121 esac
10122 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10123   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10124   ac_status=$?
10125   grep -v '^ *+' conftest.er1 >conftest.err
10126   rm -f conftest.er1
10127   cat conftest.err >&5
10128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10129   (exit $ac_status); } >/dev/null && {
10130          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10131          test ! -s conftest.err
10132        }; then
10133   ac_header_preproc=yes
10134 else
10135   echo "$as_me: failed program was:" >&5
10136 sed 's/^/| /' conftest.$ac_ext >&5
10137
10138   ac_header_preproc=no
10139 fi
10140
10141 rm -f conftest.err conftest.$ac_ext
10142 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10143 echo "${ECHO_T}$ac_header_preproc" >&6; }
10144
10145 # So?  What about this header?
10146 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10147   yes:no: )
10148     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10149 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10150     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10151 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10152     ac_header_preproc=yes
10153     ;;
10154   no:yes:* )
10155     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10156 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10157     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10158 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10159     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10160 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10161     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10162 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10163     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10164 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10165     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10166 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10167     ( cat <<\_ASBOX
10168 ## ---------------------------------------- ##
10169 ## Report this to pgsql-bugs@postgresql.org ##
10170 ## ---------------------------------------- ##
10171 _ASBOX
10172      ) | sed "s/^/$as_me: WARNING:     /" >&2
10173     ;;
10174 esac
10175 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10176 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10177 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10178   echo $ECHO_N "(cached) $ECHO_C" >&6
10179 else
10180   eval "$as_ac_Header=\$ac_header_preproc"
10181 fi
10182 ac_res=`eval echo '${'$as_ac_Header'}'`
10183                { echo "$as_me:$LINENO: result: $ac_res" >&5
10184 echo "${ECHO_T}$ac_res" >&6; }
10185
10186 fi
10187 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10188   cat >>confdefs.h <<_ACEOF
10189 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10190 _ACEOF
10191
10192 else
10193
10194 for ac_header in readline/history.h
10195 do
10196 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10197 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10198   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10199 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10200 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10201   echo $ECHO_N "(cached) $ECHO_C" >&6
10202 fi
10203 ac_res=`eval echo '${'$as_ac_Header'}'`
10204                { echo "$as_me:$LINENO: result: $ac_res" >&5
10205 echo "${ECHO_T}$ac_res" >&6; }
10206 else
10207   # Is the header compilable?
10208 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10209 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10210 cat >conftest.$ac_ext <<_ACEOF
10211 /* confdefs.h.  */
10212 _ACEOF
10213 cat confdefs.h >>conftest.$ac_ext
10214 cat >>conftest.$ac_ext <<_ACEOF
10215 /* end confdefs.h.  */
10216 $ac_includes_default
10217 #include <$ac_header>
10218 _ACEOF
10219 rm -f conftest.$ac_objext
10220 if { (ac_try="$ac_compile"
10221 case "(($ac_try" in
10222   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10223   *) ac_try_echo=$ac_try;;
10224 esac
10225 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10226   (eval "$ac_compile") 2>conftest.er1
10227   ac_status=$?
10228   grep -v '^ *+' conftest.er1 >conftest.err
10229   rm -f conftest.er1
10230   cat conftest.err >&5
10231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10232   (exit $ac_status); } && {
10233          test -z "$ac_c_werror_flag" ||
10234          test ! -s conftest.err
10235        } && test -s conftest.$ac_objext; then
10236   ac_header_compiler=yes
10237 else
10238   echo "$as_me: failed program was:" >&5
10239 sed 's/^/| /' conftest.$ac_ext >&5
10240
10241         ac_header_compiler=no
10242 fi
10243
10244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10245 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10246 echo "${ECHO_T}$ac_header_compiler" >&6; }
10247
10248 # Is the header present?
10249 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10250 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10251 cat >conftest.$ac_ext <<_ACEOF
10252 /* confdefs.h.  */
10253 _ACEOF
10254 cat confdefs.h >>conftest.$ac_ext
10255 cat >>conftest.$ac_ext <<_ACEOF
10256 /* end confdefs.h.  */
10257 #include <$ac_header>
10258 _ACEOF
10259 if { (ac_try="$ac_cpp conftest.$ac_ext"
10260 case "(($ac_try" in
10261   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10262   *) ac_try_echo=$ac_try;;
10263 esac
10264 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10265   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10266   ac_status=$?
10267   grep -v '^ *+' conftest.er1 >conftest.err
10268   rm -f conftest.er1
10269   cat conftest.err >&5
10270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10271   (exit $ac_status); } >/dev/null && {
10272          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10273          test ! -s conftest.err
10274        }; then
10275   ac_header_preproc=yes
10276 else
10277   echo "$as_me: failed program was:" >&5
10278 sed 's/^/| /' conftest.$ac_ext >&5
10279
10280   ac_header_preproc=no
10281 fi
10282
10283 rm -f conftest.err conftest.$ac_ext
10284 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10285 echo "${ECHO_T}$ac_header_preproc" >&6; }
10286
10287 # So?  What about this header?
10288 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10289   yes:no: )
10290     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10291 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10292     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10293 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10294     ac_header_preproc=yes
10295     ;;
10296   no:yes:* )
10297     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10298 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10299     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10300 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10301     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10302 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10303     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10304 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10305     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10306 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10307     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10308 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10309     ( cat <<\_ASBOX
10310 ## ---------------------------------------- ##
10311 ## Report this to pgsql-bugs@postgresql.org ##
10312 ## ---------------------------------------- ##
10313 _ASBOX
10314      ) | sed "s/^/$as_me: WARNING:     /" >&2
10315     ;;
10316 esac
10317 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10318 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10319 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10320   echo $ECHO_N "(cached) $ECHO_C" >&6
10321 else
10322   eval "$as_ac_Header=\$ac_header_preproc"
10323 fi
10324 ac_res=`eval echo '${'$as_ac_Header'}'`
10325                { echo "$as_me:$LINENO: result: $ac_res" >&5
10326 echo "${ECHO_T}$ac_res" >&6; }
10327
10328 fi
10329 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10330   cat >>confdefs.h <<_ACEOF
10331 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10332 _ACEOF
10333
10334 fi
10335
10336 done
10337
10338 fi
10339
10340 done
10341
10342 fi
10343
10344 done
10345
10346 fi
10347
10348 if test "$with_zlib" = yes; then
10349   if test "${ac_cv_header_zlib_h+set}" = set; then
10350   { echo "$as_me:$LINENO: checking for zlib.h" >&5
10351 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
10352 if test "${ac_cv_header_zlib_h+set}" = set; then
10353   echo $ECHO_N "(cached) $ECHO_C" >&6
10354 fi
10355 { echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
10356 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
10357 else
10358   # Is the header compilable?
10359 { echo "$as_me:$LINENO: checking zlib.h usability" >&5
10360 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; }
10361 cat >conftest.$ac_ext <<_ACEOF
10362 /* confdefs.h.  */
10363 _ACEOF
10364 cat confdefs.h >>conftest.$ac_ext
10365 cat >>conftest.$ac_ext <<_ACEOF
10366 /* end confdefs.h.  */
10367 $ac_includes_default
10368 #include <zlib.h>
10369 _ACEOF
10370 rm -f conftest.$ac_objext
10371 if { (ac_try="$ac_compile"
10372 case "(($ac_try" in
10373   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10374   *) ac_try_echo=$ac_try;;
10375 esac
10376 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10377   (eval "$ac_compile") 2>conftest.er1
10378   ac_status=$?
10379   grep -v '^ *+' conftest.er1 >conftest.err
10380   rm -f conftest.er1
10381   cat conftest.err >&5
10382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10383   (exit $ac_status); } && {
10384          test -z "$ac_c_werror_flag" ||
10385          test ! -s conftest.err
10386        } && test -s conftest.$ac_objext; then
10387   ac_header_compiler=yes
10388 else
10389   echo "$as_me: failed program was:" >&5
10390 sed 's/^/| /' conftest.$ac_ext >&5
10391
10392         ac_header_compiler=no
10393 fi
10394
10395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10396 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10397 echo "${ECHO_T}$ac_header_compiler" >&6; }
10398
10399 # Is the header present?
10400 { echo "$as_me:$LINENO: checking zlib.h presence" >&5
10401 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; }
10402 cat >conftest.$ac_ext <<_ACEOF
10403 /* confdefs.h.  */
10404 _ACEOF
10405 cat confdefs.h >>conftest.$ac_ext
10406 cat >>conftest.$ac_ext <<_ACEOF
10407 /* end confdefs.h.  */
10408 #include <zlib.h>
10409 _ACEOF
10410 if { (ac_try="$ac_cpp conftest.$ac_ext"
10411 case "(($ac_try" in
10412   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10413   *) ac_try_echo=$ac_try;;
10414 esac
10415 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10416   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10417   ac_status=$?
10418   grep -v '^ *+' conftest.er1 >conftest.err
10419   rm -f conftest.er1
10420   cat conftest.err >&5
10421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10422   (exit $ac_status); } >/dev/null && {
10423          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10424          test ! -s conftest.err
10425        }; then
10426   ac_header_preproc=yes
10427 else
10428   echo "$as_me: failed program was:" >&5
10429 sed 's/^/| /' conftest.$ac_ext >&5
10430
10431   ac_header_preproc=no
10432 fi
10433
10434 rm -f conftest.err conftest.$ac_ext
10435 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10436 echo "${ECHO_T}$ac_header_preproc" >&6; }
10437
10438 # So?  What about this header?
10439 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10440   yes:no: )
10441     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
10442 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10443     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
10444 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
10445     ac_header_preproc=yes
10446     ;;
10447   no:yes:* )
10448     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
10449 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
10450     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
10451 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
10452     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
10453 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
10454     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
10455 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10456     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
10457 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
10458     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
10459 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
10460     ( cat <<\_ASBOX
10461 ## ---------------------------------------- ##
10462 ## Report this to pgsql-bugs@postgresql.org ##
10463 ## ---------------------------------------- ##
10464 _ASBOX
10465      ) | sed "s/^/$as_me: WARNING:     /" >&2
10466     ;;
10467 esac
10468 { echo "$as_me:$LINENO: checking for zlib.h" >&5
10469 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
10470 if test "${ac_cv_header_zlib_h+set}" = set; then
10471   echo $ECHO_N "(cached) $ECHO_C" >&6
10472 else
10473   ac_cv_header_zlib_h=$ac_header_preproc
10474 fi
10475 { echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
10476 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
10477
10478 fi
10479 if test $ac_cv_header_zlib_h = yes; then
10480   :
10481 else
10482   { { echo "$as_me:$LINENO: error: zlib header not found
10483 If you have zlib already installed, see config.log for details on the
10484 failure.  It is possible the compiler isn't looking in the proper directory.
10485 Use --without-zlib to disable zlib support." >&5
10486 echo "$as_me: error: zlib header not found
10487 If you have zlib already installed, see config.log for details on the
10488 failure.  It is possible the compiler isn't looking in the proper directory.
10489 Use --without-zlib to disable zlib support." >&2;}
10490    { (exit 1); exit 1; }; }
10491 fi
10492
10493
10494 fi
10495
10496 if test "$with_gssapi" = yes ; then
10497
10498 for ac_header in gssapi/gssapi.h
10499 do
10500 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10501 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10502   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10503 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10504 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10505   echo $ECHO_N "(cached) $ECHO_C" >&6
10506 fi
10507 ac_res=`eval echo '${'$as_ac_Header'}'`
10508                { echo "$as_me:$LINENO: result: $ac_res" >&5
10509 echo "${ECHO_T}$ac_res" >&6; }
10510 else
10511   # Is the header compilable?
10512 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10513 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10514 cat >conftest.$ac_ext <<_ACEOF
10515 /* confdefs.h.  */
10516 _ACEOF
10517 cat confdefs.h >>conftest.$ac_ext
10518 cat >>conftest.$ac_ext <<_ACEOF
10519 /* end confdefs.h.  */
10520 $ac_includes_default
10521 #include <$ac_header>
10522 _ACEOF
10523 rm -f conftest.$ac_objext
10524 if { (ac_try="$ac_compile"
10525 case "(($ac_try" in
10526   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10527   *) ac_try_echo=$ac_try;;
10528 esac
10529 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10530   (eval "$ac_compile") 2>conftest.er1
10531   ac_status=$?
10532   grep -v '^ *+' conftest.er1 >conftest.err
10533   rm -f conftest.er1
10534   cat conftest.err >&5
10535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10536   (exit $ac_status); } && {
10537          test -z "$ac_c_werror_flag" ||
10538          test ! -s conftest.err
10539        } && test -s conftest.$ac_objext; then
10540   ac_header_compiler=yes
10541 else
10542   echo "$as_me: failed program was:" >&5
10543 sed 's/^/| /' conftest.$ac_ext >&5
10544
10545         ac_header_compiler=no
10546 fi
10547
10548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10549 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10550 echo "${ECHO_T}$ac_header_compiler" >&6; }
10551
10552 # Is the header present?
10553 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10554 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10555 cat >conftest.$ac_ext <<_ACEOF
10556 /* confdefs.h.  */
10557 _ACEOF
10558 cat confdefs.h >>conftest.$ac_ext
10559 cat >>conftest.$ac_ext <<_ACEOF
10560 /* end confdefs.h.  */
10561 #include <$ac_header>
10562 _ACEOF
10563 if { (ac_try="$ac_cpp conftest.$ac_ext"
10564 case "(($ac_try" in
10565   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10566   *) ac_try_echo=$ac_try;;
10567 esac
10568 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10569   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10570   ac_status=$?
10571   grep -v '^ *+' conftest.er1 >conftest.err
10572   rm -f conftest.er1
10573   cat conftest.err >&5
10574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10575   (exit $ac_status); } >/dev/null && {
10576          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10577          test ! -s conftest.err
10578        }; then
10579   ac_header_preproc=yes
10580 else
10581   echo "$as_me: failed program was:" >&5
10582 sed 's/^/| /' conftest.$ac_ext >&5
10583
10584   ac_header_preproc=no
10585 fi
10586
10587 rm -f conftest.err conftest.$ac_ext
10588 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10589 echo "${ECHO_T}$ac_header_preproc" >&6; }
10590
10591 # So?  What about this header?
10592 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10593   yes:no: )
10594     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10595 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10596     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10597 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10598     ac_header_preproc=yes
10599     ;;
10600   no:yes:* )
10601     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10602 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10603     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10604 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10605     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10606 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10607     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10608 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10609     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10610 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10611     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10612 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10613     ( cat <<\_ASBOX
10614 ## ---------------------------------------- ##
10615 ## Report this to pgsql-bugs@postgresql.org ##
10616 ## ---------------------------------------- ##
10617 _ASBOX
10618      ) | sed "s/^/$as_me: WARNING:     /" >&2
10619     ;;
10620 esac
10621 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10622 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10623 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10624   echo $ECHO_N "(cached) $ECHO_C" >&6
10625 else
10626   eval "$as_ac_Header=\$ac_header_preproc"
10627 fi
10628 ac_res=`eval echo '${'$as_ac_Header'}'`
10629                { echo "$as_me:$LINENO: result: $ac_res" >&5
10630 echo "${ECHO_T}$ac_res" >&6; }
10631
10632 fi
10633 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10634   cat >>confdefs.h <<_ACEOF
10635 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10636 _ACEOF
10637
10638 else
10639
10640 for ac_header in gssapi.h
10641 do
10642 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10643 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10644   { echo "$as_me:$LINENO: checking for $ac_header" >&5
10645 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10646 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10647   echo $ECHO_N "(cached) $ECHO_C" >&6
10648 fi
10649 ac_res=`eval echo '${'$as_ac_Header'}'`
10650                { echo "$as_me:$LINENO: result: $ac_res" >&5
10651 echo "${ECHO_T}$ac_res" >&6; }
10652 else
10653   # Is the header compilable?
10654 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
10655 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10656 cat >conftest.$ac_ext <<_ACEOF
10657 /* confdefs.h.  */
10658 _ACEOF
10659 cat confdefs.h >>conftest.$ac_ext
10660 cat >>conftest.$ac_ext <<_ACEOF
10661 /* end confdefs.h.  */
10662 $ac_includes_default
10663 #include <$ac_header>
10664 _ACEOF
10665 rm -f conftest.$ac_objext
10666 if { (ac_try="$ac_compile"
10667 case "(($ac_try" in
10668   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10669   *) ac_try_echo=$ac_try;;
10670 esac
10671 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10672   (eval "$ac_compile") 2>conftest.er1
10673   ac_status=$?
10674   grep -v '^ *+' conftest.er1 >conftest.err
10675   rm -f conftest.er1
10676   cat conftest.err >&5
10677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10678   (exit $ac_status); } && {
10679          test -z "$ac_c_werror_flag" ||
10680          test ! -s conftest.err
10681        } && test -s conftest.$ac_objext; then
10682   ac_header_compiler=yes
10683 else
10684   echo "$as_me: failed program was:" >&5
10685 sed 's/^/| /' conftest.$ac_ext >&5
10686
10687         ac_header_compiler=no
10688 fi
10689
10690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10691 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10692 echo "${ECHO_T}$ac_header_compiler" >&6; }
10693
10694 # Is the header present?
10695 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
10696 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10697 cat >conftest.$ac_ext <<_ACEOF
10698 /* confdefs.h.  */
10699 _ACEOF
10700 cat confdefs.h >>conftest.$ac_ext
10701 cat >>conftest.$ac_ext <<_ACEOF
10702 /* end confdefs.h.  */
10703 #include <$ac_header>
10704 _ACEOF
10705 if { (ac_try="$ac_cpp conftest.$ac_ext"
10706 case "(($ac_try" in
10707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10708   *) ac_try_echo=$ac_try;;
10709 esac
10710 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10711   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10712   ac_status=$?
10713   grep -v '^ *+' conftest.er1 >conftest.err
10714   rm -f conftest.er1
10715   cat conftest.err >&5
10716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10717   (exit $ac_status); } >/dev/null && {
10718          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10719          test ! -s conftest.err
10720        }; then
10721   ac_header_preproc=yes
10722 else
10723   echo "$as_me: failed program was:" >&5
10724 sed 's/^/| /' conftest.$ac_ext >&5
10725
10726   ac_header_preproc=no
10727 fi
10728
10729 rm -f conftest.err conftest.$ac_ext
10730 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10731 echo "${ECHO_T}$ac_header_preproc" >&6; }
10732
10733 # So?  What about this header?
10734 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10735   yes:no: )
10736     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10737 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10738     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10739 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10740     ac_header_preproc=yes
10741     ;;
10742   no:yes:* )
10743     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10744 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10745     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10746 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10747     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10748 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10749     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10750 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10751     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10752 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10753     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10754 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10755     ( cat <<\_ASBOX
10756 ## ---------------------------------------- ##
10757 ## Report this to pgsql-bugs@postgresql.org ##
10758 ## ---------------------------------------- ##
10759 _ASBOX
10760      ) | sed "s/^/$as_me: WARNING:     /" >&2
10761     ;;
10762 esac
10763 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10764 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10765 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10766   echo $ECHO_N "(cached) $ECHO_C" >&6
10767 else
10768   eval "$as_ac_Header=\$ac_header_preproc"
10769 fi
10770 ac_res=`eval echo '${'$as_ac_Header'}'`
10771                { echo "$as_me:$LINENO: result: $ac_res" >&5
10772 echo "${ECHO_T}$ac_res" >&6; }
10773
10774 fi
10775 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10776   cat >>confdefs.h <<_ACEOF
10777 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10778 _ACEOF
10779
10780 else
10781   { { echo "$as_me:$LINENO: error: gssapi.h header file is required for GSSAPI" >&5
10782 echo "$as_me: error: gssapi.h header file is required for GSSAPI" >&2;}
10783    { (exit 1); exit 1; }; }
10784 fi
10785
10786 done
10787
10788 fi
10789
10790 done
10791
10792 fi
10793
10794 if test "$with_krb5" = yes ; then
10795   if test "${ac_cv_header_krb5_h+set}" = set; then
10796   { echo "$as_me:$LINENO: checking for krb5.h" >&5
10797 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6; }
10798 if test "${ac_cv_header_krb5_h+set}" = set; then
10799   echo $ECHO_N "(cached) $ECHO_C" >&6
10800 fi
10801 { echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10802 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6; }
10803 else
10804   # Is the header compilable?
10805 { echo "$as_me:$LINENO: checking krb5.h usability" >&5
10806 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6; }
10807 cat >conftest.$ac_ext <<_ACEOF
10808 /* confdefs.h.  */
10809 _ACEOF
10810 cat confdefs.h >>conftest.$ac_ext
10811 cat >>conftest.$ac_ext <<_ACEOF
10812 /* end confdefs.h.  */
10813 $ac_includes_default
10814 #include <krb5.h>
10815 _ACEOF
10816 rm -f conftest.$ac_objext
10817 if { (ac_try="$ac_compile"
10818 case "(($ac_try" in
10819   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10820   *) ac_try_echo=$ac_try;;
10821 esac
10822 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10823   (eval "$ac_compile") 2>conftest.er1
10824   ac_status=$?
10825   grep -v '^ *+' conftest.er1 >conftest.err
10826   rm -f conftest.er1
10827   cat conftest.err >&5
10828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10829   (exit $ac_status); } && {
10830          test -z "$ac_c_werror_flag" ||
10831          test ! -s conftest.err
10832        } && test -s conftest.$ac_objext; then
10833   ac_header_compiler=yes
10834 else
10835   echo "$as_me: failed program was:" >&5
10836 sed 's/^/| /' conftest.$ac_ext >&5
10837
10838         ac_header_compiler=no
10839 fi
10840
10841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10842 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10843 echo "${ECHO_T}$ac_header_compiler" >&6; }
10844
10845 # Is the header present?
10846 { echo "$as_me:$LINENO: checking krb5.h presence" >&5
10847 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6; }
10848 cat >conftest.$ac_ext <<_ACEOF
10849 /* confdefs.h.  */
10850 _ACEOF
10851 cat confdefs.h >>conftest.$ac_ext
10852 cat >>conftest.$ac_ext <<_ACEOF
10853 /* end confdefs.h.  */
10854 #include <krb5.h>
10855 _ACEOF
10856 if { (ac_try="$ac_cpp conftest.$ac_ext"
10857 case "(($ac_try" in
10858   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10859   *) ac_try_echo=$ac_try;;
10860 esac
10861 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10862   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10863   ac_status=$?
10864   grep -v '^ *+' conftest.er1 >conftest.err
10865   rm -f conftest.er1
10866   cat conftest.err >&5
10867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10868   (exit $ac_status); } >/dev/null && {
10869          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10870          test ! -s conftest.err
10871        }; then
10872   ac_header_preproc=yes
10873 else
10874   echo "$as_me: failed program was:" >&5
10875 sed 's/^/| /' conftest.$ac_ext >&5
10876
10877   ac_header_preproc=no
10878 fi
10879
10880 rm -f conftest.err conftest.$ac_ext
10881 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10882 echo "${ECHO_T}$ac_header_preproc" >&6; }
10883
10884 # So?  What about this header?
10885 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10886   yes:no: )
10887     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
10888 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10889     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
10890 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
10891     ac_header_preproc=yes
10892     ;;
10893   no:yes:* )
10894     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
10895 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
10896     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
10897 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
10898     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
10899 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
10900     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
10901 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10902     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
10903 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
10904     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
10905 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
10906     ( cat <<\_ASBOX
10907 ## ---------------------------------------- ##
10908 ## Report this to pgsql-bugs@postgresql.org ##
10909 ## ---------------------------------------- ##
10910 _ASBOX
10911      ) | sed "s/^/$as_me: WARNING:     /" >&2
10912     ;;
10913 esac
10914 { echo "$as_me:$LINENO: checking for krb5.h" >&5
10915 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6; }
10916 if test "${ac_cv_header_krb5_h+set}" = set; then
10917   echo $ECHO_N "(cached) $ECHO_C" >&6
10918 else
10919   ac_cv_header_krb5_h=$ac_header_preproc
10920 fi
10921 { echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10922 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6; }
10923
10924 fi
10925 if test $ac_cv_header_krb5_h = yes; then
10926   :
10927 else
10928   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
10929 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
10930    { (exit 1); exit 1; }; }
10931 fi
10932
10933
10934 fi
10935
10936 if test "$with_openssl" = yes ; then
10937   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10938   { echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10939 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6; }
10940 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10941   echo $ECHO_N "(cached) $ECHO_C" >&6
10942 fi
10943 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10944 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6; }
10945 else
10946   # Is the header compilable?
10947 { echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
10948 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6; }
10949 cat >conftest.$ac_ext <<_ACEOF
10950 /* confdefs.h.  */
10951 _ACEOF
10952 cat confdefs.h >>conftest.$ac_ext
10953 cat >>conftest.$ac_ext <<_ACEOF
10954 /* end confdefs.h.  */
10955 $ac_includes_default
10956 #include <openssl/ssl.h>
10957 _ACEOF
10958 rm -f conftest.$ac_objext
10959 if { (ac_try="$ac_compile"
10960 case "(($ac_try" in
10961   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10962   *) ac_try_echo=$ac_try;;
10963 esac
10964 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10965   (eval "$ac_compile") 2>conftest.er1
10966   ac_status=$?
10967   grep -v '^ *+' conftest.er1 >conftest.err
10968   rm -f conftest.er1
10969   cat conftest.err >&5
10970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10971   (exit $ac_status); } && {
10972          test -z "$ac_c_werror_flag" ||
10973          test ! -s conftest.err
10974        } && test -s conftest.$ac_objext; then
10975   ac_header_compiler=yes
10976 else
10977   echo "$as_me: failed program was:" >&5
10978 sed 's/^/| /' conftest.$ac_ext >&5
10979
10980         ac_header_compiler=no
10981 fi
10982
10983 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10984 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10985 echo "${ECHO_T}$ac_header_compiler" >&6; }
10986
10987 # Is the header present?
10988 { echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
10989 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6; }
10990 cat >conftest.$ac_ext <<_ACEOF
10991 /* confdefs.h.  */
10992 _ACEOF
10993 cat confdefs.h >>conftest.$ac_ext
10994 cat >>conftest.$ac_ext <<_ACEOF
10995 /* end confdefs.h.  */
10996 #include <openssl/ssl.h>
10997 _ACEOF
10998 if { (ac_try="$ac_cpp conftest.$ac_ext"
10999 case "(($ac_try" in
11000   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11001   *) ac_try_echo=$ac_try;;
11002 esac
11003 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11004   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11005   ac_status=$?
11006   grep -v '^ *+' conftest.er1 >conftest.err
11007   rm -f conftest.er1
11008   cat conftest.err >&5
11009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11010   (exit $ac_status); } >/dev/null && {
11011          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11012          test ! -s conftest.err
11013        }; then
11014   ac_header_preproc=yes
11015 else
11016   echo "$as_me: failed program was:" >&5
11017 sed 's/^/| /' conftest.$ac_ext >&5
11018
11019   ac_header_preproc=no
11020 fi
11021
11022 rm -f conftest.err conftest.$ac_ext
11023 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11024 echo "${ECHO_T}$ac_header_preproc" >&6; }
11025
11026 # So?  What about this header?
11027 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11028   yes:no: )
11029     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
11030 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11031     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
11032 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
11033     ac_header_preproc=yes
11034     ;;
11035   no:yes:* )
11036     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
11037 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
11038     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
11039 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
11040     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
11041 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
11042     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
11043 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11044     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
11045 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
11046     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
11047 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
11048     ( cat <<\_ASBOX
11049 ## ---------------------------------------- ##
11050 ## Report this to pgsql-bugs@postgresql.org ##
11051 ## ---------------------------------------- ##
11052 _ASBOX
11053      ) | sed "s/^/$as_me: WARNING:     /" >&2
11054     ;;
11055 esac
11056 { echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
11057 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6; }
11058 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
11059   echo $ECHO_N "(cached) $ECHO_C" >&6
11060 else
11061   ac_cv_header_openssl_ssl_h=$ac_header_preproc
11062 fi
11063 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
11064 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6; }
11065
11066 fi
11067 if test $ac_cv_header_openssl_ssl_h = yes; then
11068   :
11069 else
11070   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
11071 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
11072    { (exit 1); exit 1; }; }
11073 fi
11074
11075
11076   if test "${ac_cv_header_openssl_err_h+set}" = set; then
11077   { echo "$as_me:$LINENO: checking for openssl/err.h" >&5
11078 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6; }
11079 if test "${ac_cv_header_openssl_err_h+set}" = set; then
11080   echo $ECHO_N "(cached) $ECHO_C" >&6
11081 fi
11082 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
11083 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6; }
11084 else
11085   # Is the header compilable?
11086 { echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
11087 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6; }
11088 cat >conftest.$ac_ext <<_ACEOF
11089 /* confdefs.h.  */
11090 _ACEOF
11091 cat confdefs.h >>conftest.$ac_ext
11092 cat >>conftest.$ac_ext <<_ACEOF
11093 /* end confdefs.h.  */
11094 $ac_includes_default
11095 #include <openssl/err.h>
11096 _ACEOF
11097 rm -f conftest.$ac_objext
11098 if { (ac_try="$ac_compile"
11099 case "(($ac_try" in
11100   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11101   *) ac_try_echo=$ac_try;;
11102 esac
11103 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11104   (eval "$ac_compile") 2>conftest.er1
11105   ac_status=$?
11106   grep -v '^ *+' conftest.er1 >conftest.err
11107   rm -f conftest.er1
11108   cat conftest.err >&5
11109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11110   (exit $ac_status); } && {
11111          test -z "$ac_c_werror_flag" ||
11112          test ! -s conftest.err
11113        } && test -s conftest.$ac_objext; then
11114   ac_header_compiler=yes
11115 else
11116   echo "$as_me: failed program was:" >&5
11117 sed 's/^/| /' conftest.$ac_ext >&5
11118
11119         ac_header_compiler=no
11120 fi
11121
11122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11123 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11124 echo "${ECHO_T}$ac_header_compiler" >&6; }
11125
11126 # Is the header present?
11127 { echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
11128 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6; }
11129 cat >conftest.$ac_ext <<_ACEOF
11130 /* confdefs.h.  */
11131 _ACEOF
11132 cat confdefs.h >>conftest.$ac_ext
11133 cat >>conftest.$ac_ext <<_ACEOF
11134 /* end confdefs.h.  */
11135 #include <openssl/err.h>
11136 _ACEOF
11137 if { (ac_try="$ac_cpp conftest.$ac_ext"
11138 case "(($ac_try" in
11139   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11140   *) ac_try_echo=$ac_try;;
11141 esac
11142 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11143   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11144   ac_status=$?
11145   grep -v '^ *+' conftest.er1 >conftest.err
11146   rm -f conftest.er1
11147   cat conftest.err >&5
11148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11149   (exit $ac_status); } >/dev/null && {
11150          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11151          test ! -s conftest.err
11152        }; then
11153   ac_header_preproc=yes
11154 else
11155   echo "$as_me: failed program was:" >&5
11156 sed 's/^/| /' conftest.$ac_ext >&5
11157
11158   ac_header_preproc=no
11159 fi
11160
11161 rm -f conftest.err conftest.$ac_ext
11162 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11163 echo "${ECHO_T}$ac_header_preproc" >&6; }
11164
11165 # So?  What about this header?
11166 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11167   yes:no: )
11168     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
11169 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11170     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
11171 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
11172     ac_header_preproc=yes
11173     ;;
11174   no:yes:* )
11175     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
11176 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
11177     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
11178 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
11179     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
11180 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
11181     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
11182 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11183     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
11184 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
11185     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
11186 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
11187     ( cat <<\_ASBOX
11188 ## ---------------------------------------- ##
11189 ## Report this to pgsql-bugs@postgresql.org ##
11190 ## ---------------------------------------- ##
11191 _ASBOX
11192      ) | sed "s/^/$as_me: WARNING:     /" >&2
11193     ;;
11194 esac
11195 { echo "$as_me:$LINENO: checking for openssl/err.h" >&5
11196 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6; }
11197 if test "${ac_cv_header_openssl_err_h+set}" = set; then
11198   echo $ECHO_N "(cached) $ECHO_C" >&6
11199 else
11200   ac_cv_header_openssl_err_h=$ac_header_preproc
11201 fi
11202 { echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
11203 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6; }
11204
11205 fi
11206 if test $ac_cv_header_openssl_err_h = yes; then
11207   :
11208 else
11209   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
11210 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
11211    { (exit 1); exit 1; }; }
11212 fi
11213
11214
11215
11216 for ac_func in ERR_set_mark
11217 do
11218 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11219 { echo "$as_me:$LINENO: checking for $ac_func" >&5
11220 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11221 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11222   echo $ECHO_N "(cached) $ECHO_C" >&6
11223 else
11224   cat >conftest.$ac_ext <<_ACEOF
11225 /* confdefs.h.  */
11226 _ACEOF
11227 cat confdefs.h >>conftest.$ac_ext
11228 cat >>conftest.$ac_ext <<_ACEOF
11229 /* end confdefs.h.  */
11230 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11231    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11232 #define $ac_func innocuous_$ac_func
11233
11234 /* System header to define __stub macros and hopefully few prototypes,
11235     which can conflict with char $ac_func (); below.
11236     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11237     <limits.h> exists even on freestanding compilers.  */
11238
11239 #ifdef __STDC__
11240 # include <limits.h>
11241 #else
11242 # include <assert.h>
11243 #endif
11244
11245 #undef $ac_func
11246
11247 /* Override any GCC internal prototype to avoid an error.
11248    Use char because int might match the return type of a GCC
11249    builtin and then its argument prototype would still apply.  */
11250 #ifdef __cplusplus
11251 extern "C"
11252 #endif
11253 char $ac_func ();
11254 /* The GNU C library defines this for functions which it implements
11255     to always fail with ENOSYS.  Some functions are actually named
11256     something starting with __ and the normal name is an alias.  */
11257 #if defined __stub_$ac_func || defined __stub___$ac_func
11258 choke me
11259 #endif
11260
11261 int
11262 main ()
11263 {
11264 return $ac_func ();
11265   ;
11266   return 0;
11267 }
11268 _ACEOF
11269 rm -f conftest.$ac_objext conftest$ac_exeext
11270 if { (ac_try="$ac_link"
11271 case "(($ac_try" in
11272   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11273   *) ac_try_echo=$ac_try;;
11274 esac
11275 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11276   (eval "$ac_link") 2>conftest.er1
11277   ac_status=$?
11278   grep -v '^ *+' conftest.er1 >conftest.err
11279   rm -f conftest.er1
11280   cat conftest.err >&5
11281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11282   (exit $ac_status); } && {
11283          test -z "$ac_c_werror_flag" ||
11284          test ! -s conftest.err
11285        } && test -s conftest$ac_exeext &&
11286        $as_test_x conftest$ac_exeext; then
11287   eval "$as_ac_var=yes"
11288 else
11289   echo "$as_me: failed program was:" >&5
11290 sed 's/^/| /' conftest.$ac_ext >&5
11291
11292         eval "$as_ac_var=no"
11293 fi
11294
11295 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11296       conftest$ac_exeext conftest.$ac_ext
11297 fi
11298 ac_res=`eval echo '${'$as_ac_var'}'`
11299                { echo "$as_me:$LINENO: result: $ac_res" >&5
11300 echo "${ECHO_T}$ac_res" >&6; }
11301 if test `eval echo '${'$as_ac_var'}'` = yes; then
11302   cat >>confdefs.h <<_ACEOF
11303 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11304 _ACEOF
11305
11306 fi
11307 done
11308
11309 fi
11310
11311 if test "$with_pam" = yes ; then
11312
11313 for ac_header in security/pam_appl.h
11314 do
11315 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11316 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11317   { echo "$as_me:$LINENO: checking for $ac_header" >&5
11318 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11319 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11320   echo $ECHO_N "(cached) $ECHO_C" >&6
11321 fi
11322 ac_res=`eval echo '${'$as_ac_Header'}'`
11323                { echo "$as_me:$LINENO: result: $ac_res" >&5
11324 echo "${ECHO_T}$ac_res" >&6; }
11325 else
11326   # Is the header compilable?
11327 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
11328 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11329 cat >conftest.$ac_ext <<_ACEOF
11330 /* confdefs.h.  */
11331 _ACEOF
11332 cat confdefs.h >>conftest.$ac_ext
11333 cat >>conftest.$ac_ext <<_ACEOF
11334 /* end confdefs.h.  */
11335 $ac_includes_default
11336 #include <$ac_header>
11337 _ACEOF
11338 rm -f conftest.$ac_objext
11339 if { (ac_try="$ac_compile"
11340 case "(($ac_try" in
11341   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11342   *) ac_try_echo=$ac_try;;
11343 esac
11344 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11345   (eval "$ac_compile") 2>conftest.er1
11346   ac_status=$?
11347   grep -v '^ *+' conftest.er1 >conftest.err
11348   rm -f conftest.er1
11349   cat conftest.err >&5
11350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11351   (exit $ac_status); } && {
11352          test -z "$ac_c_werror_flag" ||
11353          test ! -s conftest.err
11354        } && test -s conftest.$ac_objext; then
11355   ac_header_compiler=yes
11356 else
11357   echo "$as_me: failed program was:" >&5
11358 sed 's/^/| /' conftest.$ac_ext >&5
11359
11360         ac_header_compiler=no
11361 fi
11362
11363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11364 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11365 echo "${ECHO_T}$ac_header_compiler" >&6; }
11366
11367 # Is the header present?
11368 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
11369 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11370 cat >conftest.$ac_ext <<_ACEOF
11371 /* confdefs.h.  */
11372 _ACEOF
11373 cat confdefs.h >>conftest.$ac_ext
11374 cat >>conftest.$ac_ext <<_ACEOF
11375 /* end confdefs.h.  */
11376 #include <$ac_header>
11377 _ACEOF
11378 if { (ac_try="$ac_cpp conftest.$ac_ext"
11379 case "(($ac_try" in
11380   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11381   *) ac_try_echo=$ac_try;;
11382 esac
11383 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11384   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11385   ac_status=$?
11386   grep -v '^ *+' conftest.er1 >conftest.err
11387   rm -f conftest.er1
11388   cat conftest.err >&5
11389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11390   (exit $ac_status); } >/dev/null && {
11391          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11392          test ! -s conftest.err
11393        }; then
11394   ac_header_preproc=yes
11395 else
11396   echo "$as_me: failed program was:" >&5
11397 sed 's/^/| /' conftest.$ac_ext >&5
11398
11399   ac_header_preproc=no
11400 fi
11401
11402 rm -f conftest.err conftest.$ac_ext
11403 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11404 echo "${ECHO_T}$ac_header_preproc" >&6; }
11405
11406 # So?  What about this header?
11407 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11408   yes:no: )
11409     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11410 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11411     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11412 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11413     ac_header_preproc=yes
11414     ;;
11415   no:yes:* )
11416     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11417 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11418     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11419 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11420     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11421 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11422     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11423 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11424     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11425 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11426     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11427 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11428     ( cat <<\_ASBOX
11429 ## ---------------------------------------- ##
11430 ## Report this to pgsql-bugs@postgresql.org ##
11431 ## ---------------------------------------- ##
11432 _ASBOX
11433      ) | sed "s/^/$as_me: WARNING:     /" >&2
11434     ;;
11435 esac
11436 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11437 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11438 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11439   echo $ECHO_N "(cached) $ECHO_C" >&6
11440 else
11441   eval "$as_ac_Header=\$ac_header_preproc"
11442 fi
11443 ac_res=`eval echo '${'$as_ac_Header'}'`
11444                { echo "$as_me:$LINENO: result: $ac_res" >&5
11445 echo "${ECHO_T}$ac_res" >&6; }
11446
11447 fi
11448 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11449   cat >>confdefs.h <<_ACEOF
11450 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11451 _ACEOF
11452
11453 else
11454
11455 for ac_header in pam/pam_appl.h
11456 do
11457 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11458 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11459   { echo "$as_me:$LINENO: checking for $ac_header" >&5
11460 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11461 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11462   echo $ECHO_N "(cached) $ECHO_C" >&6
11463 fi
11464 ac_res=`eval echo '${'$as_ac_Header'}'`
11465                { echo "$as_me:$LINENO: result: $ac_res" >&5
11466 echo "${ECHO_T}$ac_res" >&6; }
11467 else
11468   # Is the header compilable?
11469 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
11470 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11471 cat >conftest.$ac_ext <<_ACEOF
11472 /* confdefs.h.  */
11473 _ACEOF
11474 cat confdefs.h >>conftest.$ac_ext
11475 cat >>conftest.$ac_ext <<_ACEOF
11476 /* end confdefs.h.  */
11477 $ac_includes_default
11478 #include <$ac_header>
11479 _ACEOF
11480 rm -f conftest.$ac_objext
11481 if { (ac_try="$ac_compile"
11482 case "(($ac_try" in
11483   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11484   *) ac_try_echo=$ac_try;;
11485 esac
11486 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11487   (eval "$ac_compile") 2>conftest.er1
11488   ac_status=$?
11489   grep -v '^ *+' conftest.er1 >conftest.err
11490   rm -f conftest.er1
11491   cat conftest.err >&5
11492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11493   (exit $ac_status); } && {
11494          test -z "$ac_c_werror_flag" ||
11495          test ! -s conftest.err
11496        } && test -s conftest.$ac_objext; then
11497   ac_header_compiler=yes
11498 else
11499   echo "$as_me: failed program was:" >&5
11500 sed 's/^/| /' conftest.$ac_ext >&5
11501
11502         ac_header_compiler=no
11503 fi
11504
11505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11506 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11507 echo "${ECHO_T}$ac_header_compiler" >&6; }
11508
11509 # Is the header present?
11510 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
11511 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11512 cat >conftest.$ac_ext <<_ACEOF
11513 /* confdefs.h.  */
11514 _ACEOF
11515 cat confdefs.h >>conftest.$ac_ext
11516 cat >>conftest.$ac_ext <<_ACEOF
11517 /* end confdefs.h.  */
11518 #include <$ac_header>
11519 _ACEOF
11520 if { (ac_try="$ac_cpp conftest.$ac_ext"
11521 case "(($ac_try" in
11522   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11523   *) ac_try_echo=$ac_try;;
11524 esac
11525 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11526   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11527   ac_status=$?
11528   grep -v '^ *+' conftest.er1 >conftest.err
11529   rm -f conftest.er1
11530   cat conftest.err >&5
11531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11532   (exit $ac_status); } >/dev/null && {
11533          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11534          test ! -s conftest.err
11535        }; then
11536   ac_header_preproc=yes
11537 else
11538   echo "$as_me: failed program was:" >&5
11539 sed 's/^/| /' conftest.$ac_ext >&5
11540
11541   ac_header_preproc=no
11542 fi
11543
11544 rm -f conftest.err conftest.$ac_ext
11545 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11546 echo "${ECHO_T}$ac_header_preproc" >&6; }
11547
11548 # So?  What about this header?
11549 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11550   yes:no: )
11551     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11552 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11553     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11554 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11555     ac_header_preproc=yes
11556     ;;
11557   no:yes:* )
11558     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11559 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11560     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11561 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11562     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11563 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11564     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11565 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11566     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11567 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11568     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11569 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11570     ( cat <<\_ASBOX
11571 ## ---------------------------------------- ##
11572 ## Report this to pgsql-bugs@postgresql.org ##
11573 ## ---------------------------------------- ##
11574 _ASBOX
11575      ) | sed "s/^/$as_me: WARNING:     /" >&2
11576     ;;
11577 esac
11578 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11579 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11580 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11581   echo $ECHO_N "(cached) $ECHO_C" >&6
11582 else
11583   eval "$as_ac_Header=\$ac_header_preproc"
11584 fi
11585 ac_res=`eval echo '${'$as_ac_Header'}'`
11586                { echo "$as_me:$LINENO: result: $ac_res" >&5
11587 echo "${ECHO_T}$ac_res" >&6; }
11588
11589 fi
11590 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11591   cat >>confdefs.h <<_ACEOF
11592 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11593 _ACEOF
11594
11595 else
11596   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
11597 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
11598    { (exit 1); exit 1; }; }
11599 fi
11600
11601 done
11602
11603 fi
11604
11605 done
11606
11607 fi
11608
11609 if test "$with_libxml" = yes ; then
11610   if test "${ac_cv_header_libxml_parser_h+set}" = set; then
11611   { echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
11612 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6; }
11613 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
11614   echo $ECHO_N "(cached) $ECHO_C" >&6
11615 fi
11616 { echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
11617 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6; }
11618 else
11619   # Is the header compilable?
11620 { echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
11621 echo $ECHO_N "checking libxml/parser.h usability... $ECHO_C" >&6; }
11622 cat >conftest.$ac_ext <<_ACEOF
11623 /* confdefs.h.  */
11624 _ACEOF
11625 cat confdefs.h >>conftest.$ac_ext
11626 cat >>conftest.$ac_ext <<_ACEOF
11627 /* end confdefs.h.  */
11628 $ac_includes_default
11629 #include <libxml/parser.h>
11630 _ACEOF
11631 rm -f conftest.$ac_objext
11632 if { (ac_try="$ac_compile"
11633 case "(($ac_try" in
11634   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11635   *) ac_try_echo=$ac_try;;
11636 esac
11637 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11638   (eval "$ac_compile") 2>conftest.er1
11639   ac_status=$?
11640   grep -v '^ *+' conftest.er1 >conftest.err
11641   rm -f conftest.er1
11642   cat conftest.err >&5
11643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11644   (exit $ac_status); } && {
11645          test -z "$ac_c_werror_flag" ||
11646          test ! -s conftest.err
11647        } && test -s conftest.$ac_objext; then
11648   ac_header_compiler=yes
11649 else
11650   echo "$as_me: failed program was:" >&5
11651 sed 's/^/| /' conftest.$ac_ext >&5
11652
11653         ac_header_compiler=no
11654 fi
11655
11656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11657 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11658 echo "${ECHO_T}$ac_header_compiler" >&6; }
11659
11660 # Is the header present?
11661 { echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
11662 echo $ECHO_N "checking libxml/parser.h presence... $ECHO_C" >&6; }
11663 cat >conftest.$ac_ext <<_ACEOF
11664 /* confdefs.h.  */
11665 _ACEOF
11666 cat confdefs.h >>conftest.$ac_ext
11667 cat >>conftest.$ac_ext <<_ACEOF
11668 /* end confdefs.h.  */
11669 #include <libxml/parser.h>
11670 _ACEOF
11671 if { (ac_try="$ac_cpp conftest.$ac_ext"
11672 case "(($ac_try" in
11673   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11674   *) ac_try_echo=$ac_try;;
11675 esac
11676 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11677   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11678   ac_status=$?
11679   grep -v '^ *+' conftest.er1 >conftest.err
11680   rm -f conftest.er1
11681   cat conftest.err >&5
11682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11683   (exit $ac_status); } >/dev/null && {
11684          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11685          test ! -s conftest.err
11686        }; then
11687   ac_header_preproc=yes
11688 else
11689   echo "$as_me: failed program was:" >&5
11690 sed 's/^/| /' conftest.$ac_ext >&5
11691
11692   ac_header_preproc=no
11693 fi
11694
11695 rm -f conftest.err conftest.$ac_ext
11696 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11697 echo "${ECHO_T}$ac_header_preproc" >&6; }
11698
11699 # So?  What about this header?
11700 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11701   yes:no: )
11702     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
11703 echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11704     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
11705 echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
11706     ac_header_preproc=yes
11707     ;;
11708   no:yes:* )
11709     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
11710 echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
11711     { echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
11712 echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
11713     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
11714 echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
11715     { echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
11716 echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11717     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
11718 echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
11719     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
11720 echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
11721     ( cat <<\_ASBOX
11722 ## ---------------------------------------- ##
11723 ## Report this to pgsql-bugs@postgresql.org ##
11724 ## ---------------------------------------- ##
11725 _ASBOX
11726      ) | sed "s/^/$as_me: WARNING:     /" >&2
11727     ;;
11728 esac
11729 { echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
11730 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6; }
11731 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
11732   echo $ECHO_N "(cached) $ECHO_C" >&6
11733 else
11734   ac_cv_header_libxml_parser_h=$ac_header_preproc
11735 fi
11736 { echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
11737 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6; }
11738
11739 fi
11740 if test $ac_cv_header_libxml_parser_h = yes; then
11741   :
11742 else
11743   { { echo "$as_me:$LINENO: error: header file <libxml/parser.h> is required for XML support" >&5
11744 echo "$as_me: error: header file <libxml/parser.h> is required for XML support" >&2;}
11745    { (exit 1); exit 1; }; }
11746 fi
11747
11748
11749 fi
11750
11751 if test "$with_libxslt" = yes ; then
11752   if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
11753   { echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
11754 echo $ECHO_N "checking for libxslt/xslt.h... $ECHO_C" >&6; }
11755 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
11756   echo $ECHO_N "(cached) $ECHO_C" >&6
11757 fi
11758 { echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
11759 echo "${ECHO_T}$ac_cv_header_libxslt_xslt_h" >&6; }
11760 else
11761   # Is the header compilable?
11762 { echo "$as_me:$LINENO: checking libxslt/xslt.h usability" >&5
11763 echo $ECHO_N "checking libxslt/xslt.h usability... $ECHO_C" >&6; }
11764 cat >conftest.$ac_ext <<_ACEOF
11765 /* confdefs.h.  */
11766 _ACEOF
11767 cat confdefs.h >>conftest.$ac_ext
11768 cat >>conftest.$ac_ext <<_ACEOF
11769 /* end confdefs.h.  */
11770 $ac_includes_default
11771 #include <libxslt/xslt.h>
11772 _ACEOF
11773 rm -f conftest.$ac_objext
11774 if { (ac_try="$ac_compile"
11775 case "(($ac_try" in
11776   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11777   *) ac_try_echo=$ac_try;;
11778 esac
11779 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11780   (eval "$ac_compile") 2>conftest.er1
11781   ac_status=$?
11782   grep -v '^ *+' conftest.er1 >conftest.err
11783   rm -f conftest.er1
11784   cat conftest.err >&5
11785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11786   (exit $ac_status); } && {
11787          test -z "$ac_c_werror_flag" ||
11788          test ! -s conftest.err
11789        } && test -s conftest.$ac_objext; then
11790   ac_header_compiler=yes
11791 else
11792   echo "$as_me: failed program was:" >&5
11793 sed 's/^/| /' conftest.$ac_ext >&5
11794
11795         ac_header_compiler=no
11796 fi
11797
11798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11799 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11800 echo "${ECHO_T}$ac_header_compiler" >&6; }
11801
11802 # Is the header present?
11803 { echo "$as_me:$LINENO: checking libxslt/xslt.h presence" >&5
11804 echo $ECHO_N "checking libxslt/xslt.h presence... $ECHO_C" >&6; }
11805 cat >conftest.$ac_ext <<_ACEOF
11806 /* confdefs.h.  */
11807 _ACEOF
11808 cat confdefs.h >>conftest.$ac_ext
11809 cat >>conftest.$ac_ext <<_ACEOF
11810 /* end confdefs.h.  */
11811 #include <libxslt/xslt.h>
11812 _ACEOF
11813 if { (ac_try="$ac_cpp conftest.$ac_ext"
11814 case "(($ac_try" in
11815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11816   *) ac_try_echo=$ac_try;;
11817 esac
11818 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11819   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11820   ac_status=$?
11821   grep -v '^ *+' conftest.er1 >conftest.err
11822   rm -f conftest.er1
11823   cat conftest.err >&5
11824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11825   (exit $ac_status); } >/dev/null && {
11826          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11827          test ! -s conftest.err
11828        }; then
11829   ac_header_preproc=yes
11830 else
11831   echo "$as_me: failed program was:" >&5
11832 sed 's/^/| /' conftest.$ac_ext >&5
11833
11834   ac_header_preproc=no
11835 fi
11836
11837 rm -f conftest.err conftest.$ac_ext
11838 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11839 echo "${ECHO_T}$ac_header_preproc" >&6; }
11840
11841 # So?  What about this header?
11842 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11843   yes:no: )
11844     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&5
11845 echo "$as_me: WARNING: libxslt/xslt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11846     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&5
11847 echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the compiler's result" >&2;}
11848     ac_header_preproc=yes
11849     ;;
11850   no:yes:* )
11851     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: present but cannot be compiled" >&5
11852 echo "$as_me: WARNING: libxslt/xslt.h: present but cannot be compiled" >&2;}
11853     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&5
11854 echo "$as_me: WARNING: libxslt/xslt.h:     check for missing prerequisite headers?" >&2;}
11855     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&5
11856 echo "$as_me: WARNING: libxslt/xslt.h: see the Autoconf documentation" >&2;}
11857     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&5
11858 echo "$as_me: WARNING: libxslt/xslt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11859     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&5
11860 echo "$as_me: WARNING: libxslt/xslt.h: proceeding with the preprocessor's result" >&2;}
11861     { echo "$as_me:$LINENO: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&5
11862 echo "$as_me: WARNING: libxslt/xslt.h: in the future, the compiler will take precedence" >&2;}
11863     ( cat <<\_ASBOX
11864 ## ---------------------------------------- ##
11865 ## Report this to pgsql-bugs@postgresql.org ##
11866 ## ---------------------------------------- ##
11867 _ASBOX
11868      ) | sed "s/^/$as_me: WARNING:     /" >&2
11869     ;;
11870 esac
11871 { echo "$as_me:$LINENO: checking for libxslt/xslt.h" >&5
11872 echo $ECHO_N "checking for libxslt/xslt.h... $ECHO_C" >&6; }
11873 if test "${ac_cv_header_libxslt_xslt_h+set}" = set; then
11874   echo $ECHO_N "(cached) $ECHO_C" >&6
11875 else
11876   ac_cv_header_libxslt_xslt_h=$ac_header_preproc
11877 fi
11878 { echo "$as_me:$LINENO: result: $ac_cv_header_libxslt_xslt_h" >&5
11879 echo "${ECHO_T}$ac_cv_header_libxslt_xslt_h" >&6; }
11880
11881 fi
11882 if test $ac_cv_header_libxslt_xslt_h = yes; then
11883   :
11884 else
11885   { { echo "$as_me:$LINENO: error: header file <libxslt/xslt.h> is required for XSLT support" >&5
11886 echo "$as_me: error: header file <libxslt/xslt.h> is required for XSLT support" >&2;}
11887    { (exit 1); exit 1; }; }
11888 fi
11889
11890
11891 fi
11892
11893 if test "$with_ldap" = yes ; then
11894   if test "$PORTNAME" != "win32"; then
11895
11896 for ac_header in ldap.h
11897 do
11898 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11899 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11900   { echo "$as_me:$LINENO: checking for $ac_header" >&5
11901 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11902 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11903   echo $ECHO_N "(cached) $ECHO_C" >&6
11904 fi
11905 ac_res=`eval echo '${'$as_ac_Header'}'`
11906                { echo "$as_me:$LINENO: result: $ac_res" >&5
11907 echo "${ECHO_T}$ac_res" >&6; }
11908 else
11909   # Is the header compilable?
11910 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
11911 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11912 cat >conftest.$ac_ext <<_ACEOF
11913 /* confdefs.h.  */
11914 _ACEOF
11915 cat confdefs.h >>conftest.$ac_ext
11916 cat >>conftest.$ac_ext <<_ACEOF
11917 /* end confdefs.h.  */
11918 $ac_includes_default
11919 #include <$ac_header>
11920 _ACEOF
11921 rm -f conftest.$ac_objext
11922 if { (ac_try="$ac_compile"
11923 case "(($ac_try" in
11924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11925   *) ac_try_echo=$ac_try;;
11926 esac
11927 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11928   (eval "$ac_compile") 2>conftest.er1
11929   ac_status=$?
11930   grep -v '^ *+' conftest.er1 >conftest.err
11931   rm -f conftest.er1
11932   cat conftest.err >&5
11933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11934   (exit $ac_status); } && {
11935          test -z "$ac_c_werror_flag" ||
11936          test ! -s conftest.err
11937        } && test -s conftest.$ac_objext; then
11938   ac_header_compiler=yes
11939 else
11940   echo "$as_me: failed program was:" >&5
11941 sed 's/^/| /' conftest.$ac_ext >&5
11942
11943         ac_header_compiler=no
11944 fi
11945
11946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11947 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11948 echo "${ECHO_T}$ac_header_compiler" >&6; }
11949
11950 # Is the header present?
11951 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
11952 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
11953 cat >conftest.$ac_ext <<_ACEOF
11954 /* confdefs.h.  */
11955 _ACEOF
11956 cat confdefs.h >>conftest.$ac_ext
11957 cat >>conftest.$ac_ext <<_ACEOF
11958 /* end confdefs.h.  */
11959 #include <$ac_header>
11960 _ACEOF
11961 if { (ac_try="$ac_cpp conftest.$ac_ext"
11962 case "(($ac_try" in
11963   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11964   *) ac_try_echo=$ac_try;;
11965 esac
11966 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11967   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11968   ac_status=$?
11969   grep -v '^ *+' conftest.er1 >conftest.err
11970   rm -f conftest.er1
11971   cat conftest.err >&5
11972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11973   (exit $ac_status); } >/dev/null && {
11974          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11975          test ! -s conftest.err
11976        }; then
11977   ac_header_preproc=yes
11978 else
11979   echo "$as_me: failed program was:" >&5
11980 sed 's/^/| /' conftest.$ac_ext >&5
11981
11982   ac_header_preproc=no
11983 fi
11984
11985 rm -f conftest.err conftest.$ac_ext
11986 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11987 echo "${ECHO_T}$ac_header_preproc" >&6; }
11988
11989 # So?  What about this header?
11990 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11991   yes:no: )
11992     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11993 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11994     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11995 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11996     ac_header_preproc=yes
11997     ;;
11998   no:yes:* )
11999     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12000 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12001     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12002 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12003     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12004 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12005     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12006 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12007     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12008 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12009     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12010 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12011     ( cat <<\_ASBOX
12012 ## ---------------------------------------- ##
12013 ## Report this to pgsql-bugs@postgresql.org ##
12014 ## ---------------------------------------- ##
12015 _ASBOX
12016      ) | sed "s/^/$as_me: WARNING:     /" >&2
12017     ;;
12018 esac
12019 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12020 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12021 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12022   echo $ECHO_N "(cached) $ECHO_C" >&6
12023 else
12024   eval "$as_ac_Header=\$ac_header_preproc"
12025 fi
12026 ac_res=`eval echo '${'$as_ac_Header'}'`
12027                { echo "$as_me:$LINENO: result: $ac_res" >&5
12028 echo "${ECHO_T}$ac_res" >&6; }
12029
12030 fi
12031 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12032   cat >>confdefs.h <<_ACEOF
12033 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12034 _ACEOF
12035
12036 else
12037   { { echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
12038 echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
12039    { (exit 1); exit 1; }; }
12040 fi
12041
12042 done
12043
12044   else
12045
12046 for ac_header in winldap.h
12047 do
12048 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12049 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12050 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12051 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12052   echo $ECHO_N "(cached) $ECHO_C" >&6
12053 else
12054   cat >conftest.$ac_ext <<_ACEOF
12055 /* confdefs.h.  */
12056 _ACEOF
12057 cat confdefs.h >>conftest.$ac_ext
12058 cat >>conftest.$ac_ext <<_ACEOF
12059 /* end confdefs.h.  */
12060 $ac_includes_default
12061 #include <windows.h>
12062
12063
12064 #include <$ac_header>
12065 _ACEOF
12066 rm -f conftest.$ac_objext
12067 if { (ac_try="$ac_compile"
12068 case "(($ac_try" in
12069   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12070   *) ac_try_echo=$ac_try;;
12071 esac
12072 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12073   (eval "$ac_compile") 2>conftest.er1
12074   ac_status=$?
12075   grep -v '^ *+' conftest.er1 >conftest.err
12076   rm -f conftest.er1
12077   cat conftest.err >&5
12078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12079   (exit $ac_status); } && {
12080          test -z "$ac_c_werror_flag" ||
12081          test ! -s conftest.err
12082        } && test -s conftest.$ac_objext; then
12083   eval "$as_ac_Header=yes"
12084 else
12085   echo "$as_me: failed program was:" >&5
12086 sed 's/^/| /' conftest.$ac_ext >&5
12087
12088         eval "$as_ac_Header=no"
12089 fi
12090
12091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12092 fi
12093 ac_res=`eval echo '${'$as_ac_Header'}'`
12094                { echo "$as_me:$LINENO: result: $ac_res" >&5
12095 echo "${ECHO_T}$ac_res" >&6; }
12096 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12097   cat >>confdefs.h <<_ACEOF
12098 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12099 _ACEOF
12100
12101 else
12102   { { echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
12103 echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
12104    { (exit 1); exit 1; }; }
12105 fi
12106
12107 done
12108
12109   fi
12110 fi
12111
12112 if test "$with_bonjour" = yes ; then
12113   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
12114   { echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
12115 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6; }
12116 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
12117   echo $ECHO_N "(cached) $ECHO_C" >&6
12118 fi
12119 { echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
12120 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6; }
12121 else
12122   # Is the header compilable?
12123 { echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
12124 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6; }
12125 cat >conftest.$ac_ext <<_ACEOF
12126 /* confdefs.h.  */
12127 _ACEOF
12128 cat confdefs.h >>conftest.$ac_ext
12129 cat >>conftest.$ac_ext <<_ACEOF
12130 /* end confdefs.h.  */
12131 $ac_includes_default
12132 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
12133 _ACEOF
12134 rm -f conftest.$ac_objext
12135 if { (ac_try="$ac_compile"
12136 case "(($ac_try" in
12137   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12138   *) ac_try_echo=$ac_try;;
12139 esac
12140 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12141   (eval "$ac_compile") 2>conftest.er1
12142   ac_status=$?
12143   grep -v '^ *+' conftest.er1 >conftest.err
12144   rm -f conftest.er1
12145   cat conftest.err >&5
12146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12147   (exit $ac_status); } && {
12148          test -z "$ac_c_werror_flag" ||
12149          test ! -s conftest.err
12150        } && test -s conftest.$ac_objext; then
12151   ac_header_compiler=yes
12152 else
12153   echo "$as_me: failed program was:" >&5
12154 sed 's/^/| /' conftest.$ac_ext >&5
12155
12156         ac_header_compiler=no
12157 fi
12158
12159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12160 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12161 echo "${ECHO_T}$ac_header_compiler" >&6; }
12162
12163 # Is the header present?
12164 { echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
12165 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6; }
12166 cat >conftest.$ac_ext <<_ACEOF
12167 /* confdefs.h.  */
12168 _ACEOF
12169 cat confdefs.h >>conftest.$ac_ext
12170 cat >>conftest.$ac_ext <<_ACEOF
12171 /* end confdefs.h.  */
12172 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
12173 _ACEOF
12174 if { (ac_try="$ac_cpp conftest.$ac_ext"
12175 case "(($ac_try" in
12176   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12177   *) ac_try_echo=$ac_try;;
12178 esac
12179 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12180   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12181   ac_status=$?
12182   grep -v '^ *+' conftest.er1 >conftest.err
12183   rm -f conftest.er1
12184   cat conftest.err >&5
12185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12186   (exit $ac_status); } >/dev/null && {
12187          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12188          test ! -s conftest.err
12189        }; then
12190   ac_header_preproc=yes
12191 else
12192   echo "$as_me: failed program was:" >&5
12193 sed 's/^/| /' conftest.$ac_ext >&5
12194
12195   ac_header_preproc=no
12196 fi
12197
12198 rm -f conftest.err conftest.$ac_ext
12199 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12200 echo "${ECHO_T}$ac_header_preproc" >&6; }
12201
12202 # So?  What about this header?
12203 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12204   yes:no: )
12205     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
12206 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12207     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
12208 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
12209     ac_header_preproc=yes
12210     ;;
12211   no:yes:* )
12212     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
12213 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
12214     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
12215 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
12216     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
12217 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
12218     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
12219 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
12220     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
12221 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
12222     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
12223 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
12224     ( cat <<\_ASBOX
12225 ## ---------------------------------------- ##
12226 ## Report this to pgsql-bugs@postgresql.org ##
12227 ## ---------------------------------------- ##
12228 _ASBOX
12229      ) | sed "s/^/$as_me: WARNING:     /" >&2
12230     ;;
12231 esac
12232 { echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
12233 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6; }
12234 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
12235   echo $ECHO_N "(cached) $ECHO_C" >&6
12236 else
12237   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
12238 fi
12239 { echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
12240 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6; }
12241
12242 fi
12243 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
12244   :
12245 else
12246   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
12247 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
12248    { (exit 1); exit 1; }; }
12249 fi
12250
12251
12252 fi
12253
12254 # for contrib/uuid-ossp
12255 if test "$with_ossp_uuid" = yes ; then
12256
12257 for ac_header in ossp/uuid.h
12258 do
12259 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12260 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12261   { echo "$as_me:$LINENO: checking for $ac_header" >&5
12262 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12263 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12264   echo $ECHO_N "(cached) $ECHO_C" >&6
12265 fi
12266 ac_res=`eval echo '${'$as_ac_Header'}'`
12267                { echo "$as_me:$LINENO: result: $ac_res" >&5
12268 echo "${ECHO_T}$ac_res" >&6; }
12269 else
12270   # Is the header compilable?
12271 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
12272 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
12273 cat >conftest.$ac_ext <<_ACEOF
12274 /* confdefs.h.  */
12275 _ACEOF
12276 cat confdefs.h >>conftest.$ac_ext
12277 cat >>conftest.$ac_ext <<_ACEOF
12278 /* end confdefs.h.  */
12279 $ac_includes_default
12280 #include <$ac_header>
12281 _ACEOF
12282 rm -f conftest.$ac_objext
12283 if { (ac_try="$ac_compile"
12284 case "(($ac_try" in
12285   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12286   *) ac_try_echo=$ac_try;;
12287 esac
12288 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12289   (eval "$ac_compile") 2>conftest.er1
12290   ac_status=$?
12291   grep -v '^ *+' conftest.er1 >conftest.err
12292   rm -f conftest.er1
12293   cat conftest.err >&5
12294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12295   (exit $ac_status); } && {
12296          test -z "$ac_c_werror_flag" ||
12297          test ! -s conftest.err
12298        } && test -s conftest.$ac_objext; then
12299   ac_header_compiler=yes
12300 else
12301   echo "$as_me: failed program was:" >&5
12302 sed 's/^/| /' conftest.$ac_ext >&5
12303
12304         ac_header_compiler=no
12305 fi
12306
12307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12308 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12309 echo "${ECHO_T}$ac_header_compiler" >&6; }
12310
12311 # Is the header present?
12312 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
12313 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
12314 cat >conftest.$ac_ext <<_ACEOF
12315 /* confdefs.h.  */
12316 _ACEOF
12317 cat confdefs.h >>conftest.$ac_ext
12318 cat >>conftest.$ac_ext <<_ACEOF
12319 /* end confdefs.h.  */
12320 #include <$ac_header>
12321 _ACEOF
12322 if { (ac_try="$ac_cpp conftest.$ac_ext"
12323 case "(($ac_try" in
12324   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12325   *) ac_try_echo=$ac_try;;
12326 esac
12327 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12328   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12329   ac_status=$?
12330   grep -v '^ *+' conftest.er1 >conftest.err
12331   rm -f conftest.er1
12332   cat conftest.err >&5
12333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12334   (exit $ac_status); } >/dev/null && {
12335          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12336          test ! -s conftest.err
12337        }; then
12338   ac_header_preproc=yes
12339 else
12340   echo "$as_me: failed program was:" >&5
12341 sed 's/^/| /' conftest.$ac_ext >&5
12342
12343   ac_header_preproc=no
12344 fi
12345
12346 rm -f conftest.err conftest.$ac_ext
12347 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12348 echo "${ECHO_T}$ac_header_preproc" >&6; }
12349
12350 # So?  What about this header?
12351 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12352   yes:no: )
12353     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12354 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12355     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12356 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12357     ac_header_preproc=yes
12358     ;;
12359   no:yes:* )
12360     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12361 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12362     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12363 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12364     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12365 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12366     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12367 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12368     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12369 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12370     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12371 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12372     ( cat <<\_ASBOX
12373 ## ---------------------------------------- ##
12374 ## Report this to pgsql-bugs@postgresql.org ##
12375 ## ---------------------------------------- ##
12376 _ASBOX
12377      ) | sed "s/^/$as_me: WARNING:     /" >&2
12378     ;;
12379 esac
12380 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12381 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12382 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12383   echo $ECHO_N "(cached) $ECHO_C" >&6
12384 else
12385   eval "$as_ac_Header=\$ac_header_preproc"
12386 fi
12387 ac_res=`eval echo '${'$as_ac_Header'}'`
12388                { echo "$as_me:$LINENO: result: $ac_res" >&5
12389 echo "${ECHO_T}$ac_res" >&6; }
12390
12391 fi
12392 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12393   cat >>confdefs.h <<_ACEOF
12394 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12395 _ACEOF
12396
12397 else
12398
12399
12400 for ac_header in uuid.h
12401 do
12402 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12403 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12404   { echo "$as_me:$LINENO: checking for $ac_header" >&5
12405 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12406 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12407   echo $ECHO_N "(cached) $ECHO_C" >&6
12408 fi
12409 ac_res=`eval echo '${'$as_ac_Header'}'`
12410                { echo "$as_me:$LINENO: result: $ac_res" >&5
12411 echo "${ECHO_T}$ac_res" >&6; }
12412 else
12413   # Is the header compilable?
12414 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
12415 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
12416 cat >conftest.$ac_ext <<_ACEOF
12417 /* confdefs.h.  */
12418 _ACEOF
12419 cat confdefs.h >>conftest.$ac_ext
12420 cat >>conftest.$ac_ext <<_ACEOF
12421 /* end confdefs.h.  */
12422 $ac_includes_default
12423 #include <$ac_header>
12424 _ACEOF
12425 rm -f conftest.$ac_objext
12426 if { (ac_try="$ac_compile"
12427 case "(($ac_try" in
12428   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12429   *) ac_try_echo=$ac_try;;
12430 esac
12431 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12432   (eval "$ac_compile") 2>conftest.er1
12433   ac_status=$?
12434   grep -v '^ *+' conftest.er1 >conftest.err
12435   rm -f conftest.er1
12436   cat conftest.err >&5
12437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12438   (exit $ac_status); } && {
12439          test -z "$ac_c_werror_flag" ||
12440          test ! -s conftest.err
12441        } && test -s conftest.$ac_objext; then
12442   ac_header_compiler=yes
12443 else
12444   echo "$as_me: failed program was:" >&5
12445 sed 's/^/| /' conftest.$ac_ext >&5
12446
12447         ac_header_compiler=no
12448 fi
12449
12450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12451 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12452 echo "${ECHO_T}$ac_header_compiler" >&6; }
12453
12454 # Is the header present?
12455 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
12456 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
12457 cat >conftest.$ac_ext <<_ACEOF
12458 /* confdefs.h.  */
12459 _ACEOF
12460 cat confdefs.h >>conftest.$ac_ext
12461 cat >>conftest.$ac_ext <<_ACEOF
12462 /* end confdefs.h.  */
12463 #include <$ac_header>
12464 _ACEOF
12465 if { (ac_try="$ac_cpp conftest.$ac_ext"
12466 case "(($ac_try" in
12467   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12468   *) ac_try_echo=$ac_try;;
12469 esac
12470 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12471   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12472   ac_status=$?
12473   grep -v '^ *+' conftest.er1 >conftest.err
12474   rm -f conftest.er1
12475   cat conftest.err >&5
12476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12477   (exit $ac_status); } >/dev/null && {
12478          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12479          test ! -s conftest.err
12480        }; then
12481   ac_header_preproc=yes
12482 else
12483   echo "$as_me: failed program was:" >&5
12484 sed 's/^/| /' conftest.$ac_ext >&5
12485
12486   ac_header_preproc=no
12487 fi
12488
12489 rm -f conftest.err conftest.$ac_ext
12490 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12491 echo "${ECHO_T}$ac_header_preproc" >&6; }
12492
12493 # So?  What about this header?
12494 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12495   yes:no: )
12496     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12497 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12498     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12499 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12500     ac_header_preproc=yes
12501     ;;
12502   no:yes:* )
12503     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12504 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12505     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
12506 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
12507     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12508 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12509     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
12510 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
12511     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12512 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12513     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12514 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12515     ( cat <<\_ASBOX
12516 ## ---------------------------------------- ##
12517 ## Report this to pgsql-bugs@postgresql.org ##
12518 ## ---------------------------------------- ##
12519 _ASBOX
12520      ) | sed "s/^/$as_me: WARNING:     /" >&2
12521     ;;
12522 esac
12523 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12524 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12525 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12526   echo $ECHO_N "(cached) $ECHO_C" >&6
12527 else
12528   eval "$as_ac_Header=\$ac_header_preproc"
12529 fi
12530 ac_res=`eval echo '${'$as_ac_Header'}'`
12531                { echo "$as_me:$LINENO: result: $ac_res" >&5
12532 echo "${ECHO_T}$ac_res" >&6; }
12533
12534 fi
12535 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12536   cat >>confdefs.h <<_ACEOF
12537 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12538 _ACEOF
12539
12540 else
12541   { { echo "$as_me:$LINENO: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&5
12542 echo "$as_me: error: header file <ossp/uuid.h> or <uuid.h> is required for OSSP-UUID" >&2;}
12543    { (exit 1); exit 1; }; }
12544 fi
12545
12546 done
12547
12548 fi
12549
12550 done
12551
12552 fi
12553
12554
12555 ##
12556 ## Types, structures, compiler characteristics
12557 ##
12558
12559  { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
12560 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
12561 if test "${ac_cv_c_bigendian+set}" = set; then
12562   echo $ECHO_N "(cached) $ECHO_C" >&6
12563 else
12564   # See if sys/param.h defines the BYTE_ORDER macro.
12565 cat >conftest.$ac_ext <<_ACEOF
12566 /* confdefs.h.  */
12567 _ACEOF
12568 cat confdefs.h >>conftest.$ac_ext
12569 cat >>conftest.$ac_ext <<_ACEOF
12570 /* end confdefs.h.  */
12571 #include <sys/types.h>
12572 #include <sys/param.h>
12573
12574 int
12575 main ()
12576 {
12577 #if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
12578         && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
12579  bogus endian macros
12580 #endif
12581
12582   ;
12583   return 0;
12584 }
12585 _ACEOF
12586 rm -f conftest.$ac_objext
12587 if { (ac_try="$ac_compile"
12588 case "(($ac_try" in
12589   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12590   *) ac_try_echo=$ac_try;;
12591 esac
12592 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12593   (eval "$ac_compile") 2>conftest.er1
12594   ac_status=$?
12595   grep -v '^ *+' conftest.er1 >conftest.err
12596   rm -f conftest.er1
12597   cat conftest.err >&5
12598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12599   (exit $ac_status); } && {
12600          test -z "$ac_c_werror_flag" ||
12601          test ! -s conftest.err
12602        } && test -s conftest.$ac_objext; then
12603   # It does; now see whether it defined to BIG_ENDIAN or not.
12604 cat >conftest.$ac_ext <<_ACEOF
12605 /* confdefs.h.  */
12606 _ACEOF
12607 cat confdefs.h >>conftest.$ac_ext
12608 cat >>conftest.$ac_ext <<_ACEOF
12609 /* end confdefs.h.  */
12610 #include <sys/types.h>
12611 #include <sys/param.h>
12612
12613 int
12614 main ()
12615 {
12616 #if BYTE_ORDER != BIG_ENDIAN
12617  not big endian
12618 #endif
12619
12620   ;
12621   return 0;
12622 }
12623 _ACEOF
12624 rm -f conftest.$ac_objext
12625 if { (ac_try="$ac_compile"
12626 case "(($ac_try" in
12627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12628   *) ac_try_echo=$ac_try;;
12629 esac
12630 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12631   (eval "$ac_compile") 2>conftest.er1
12632   ac_status=$?
12633   grep -v '^ *+' conftest.er1 >conftest.err
12634   rm -f conftest.er1
12635   cat conftest.err >&5
12636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12637   (exit $ac_status); } && {
12638          test -z "$ac_c_werror_flag" ||
12639          test ! -s conftest.err
12640        } && test -s conftest.$ac_objext; then
12641   ac_cv_c_bigendian=yes
12642 else
12643   echo "$as_me: failed program was:" >&5
12644 sed 's/^/| /' conftest.$ac_ext >&5
12645
12646         ac_cv_c_bigendian=no
12647 fi
12648
12649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12650 else
12651   echo "$as_me: failed program was:" >&5
12652 sed 's/^/| /' conftest.$ac_ext >&5
12653
12654         # It does not; compile a test program.
12655 if test "$cross_compiling" = yes; then
12656   # try to guess the endianness by grepping values into an object file
12657   ac_cv_c_bigendian=unknown
12658   cat >conftest.$ac_ext <<_ACEOF
12659 /* confdefs.h.  */
12660 _ACEOF
12661 cat confdefs.h >>conftest.$ac_ext
12662 cat >>conftest.$ac_ext <<_ACEOF
12663 /* end confdefs.h.  */
12664 short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12665 short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12666 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
12667 short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12668 short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12669 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
12670 int
12671 main ()
12672 {
12673  _ascii (); _ebcdic ();
12674   ;
12675   return 0;
12676 }
12677 _ACEOF
12678 rm -f conftest.$ac_objext
12679 if { (ac_try="$ac_compile"
12680 case "(($ac_try" in
12681   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12682   *) ac_try_echo=$ac_try;;
12683 esac
12684 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12685   (eval "$ac_compile") 2>conftest.er1
12686   ac_status=$?
12687   grep -v '^ *+' conftest.er1 >conftest.err
12688   rm -f conftest.er1
12689   cat conftest.err >&5
12690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12691   (exit $ac_status); } && {
12692          test -z "$ac_c_werror_flag" ||
12693          test ! -s conftest.err
12694        } && test -s conftest.$ac_objext; then
12695   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
12696   ac_cv_c_bigendian=yes
12697 fi
12698 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12699   if test "$ac_cv_c_bigendian" = unknown; then
12700     ac_cv_c_bigendian=no
12701   else
12702     # finding both strings is unlikely to happen, but who knows?
12703     ac_cv_c_bigendian=unknown
12704   fi
12705 fi
12706 else
12707   echo "$as_me: failed program was:" >&5
12708 sed 's/^/| /' conftest.$ac_ext >&5
12709
12710
12711 fi
12712
12713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12714 else
12715   cat >conftest.$ac_ext <<_ACEOF
12716 /* confdefs.h.  */
12717 _ACEOF
12718 cat confdefs.h >>conftest.$ac_ext
12719 cat >>conftest.$ac_ext <<_ACEOF
12720 /* end confdefs.h.  */
12721 $ac_includes_default
12722 int
12723 main ()
12724 {
12725
12726   /* Are we little or big endian?  From Harbison&Steele.  */
12727   union
12728   {
12729     long int l;
12730     char c[sizeof (long int)];
12731   } u;
12732   u.l = 1;
12733   return u.c[sizeof (long int) - 1] == 1;
12734
12735   ;
12736   return 0;
12737 }
12738 _ACEOF
12739 rm -f conftest$ac_exeext
12740 if { (ac_try="$ac_link"
12741 case "(($ac_try" in
12742   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12743   *) ac_try_echo=$ac_try;;
12744 esac
12745 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12746   (eval "$ac_link") 2>&5
12747   ac_status=$?
12748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12749   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12750   { (case "(($ac_try" in
12751   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12752   *) ac_try_echo=$ac_try;;
12753 esac
12754 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12755   (eval "$ac_try") 2>&5
12756   ac_status=$?
12757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12758   (exit $ac_status); }; }; then
12759   ac_cv_c_bigendian=no
12760 else
12761   echo "$as_me: program exited with status $ac_status" >&5
12762 echo "$as_me: failed program was:" >&5
12763 sed 's/^/| /' conftest.$ac_ext >&5
12764
12765 ( exit $ac_status )
12766 ac_cv_c_bigendian=yes
12767 fi
12768 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12769 fi
12770
12771
12772 fi
12773
12774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12775 fi
12776 { echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
12777 echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
12778 case $ac_cv_c_bigendian in
12779   yes)
12780
12781 cat >>confdefs.h <<\_ACEOF
12782 #define WORDS_BIGENDIAN 1
12783 _ACEOF
12784  ;;
12785   no)
12786      ;;
12787   *)
12788     { { echo "$as_me:$LINENO: error: unknown endianness
12789 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
12790 echo "$as_me: error: unknown endianness
12791 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
12792    { (exit 1); exit 1; }; } ;;
12793 esac
12794
12795 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
12796 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
12797 if test "${ac_cv_c_const+set}" = set; then
12798   echo $ECHO_N "(cached) $ECHO_C" >&6
12799 else
12800   cat >conftest.$ac_ext <<_ACEOF
12801 /* confdefs.h.  */
12802 _ACEOF
12803 cat confdefs.h >>conftest.$ac_ext
12804 cat >>conftest.$ac_ext <<_ACEOF
12805 /* end confdefs.h.  */
12806
12807 int
12808 main ()
12809 {
12810 /* FIXME: Include the comments suggested by Paul. */
12811 #ifndef __cplusplus
12812   /* Ultrix mips cc rejects this.  */
12813   typedef int charset[2];
12814   const charset cs;
12815   /* SunOS 4.1.1 cc rejects this.  */
12816   char const *const *pcpcc;
12817   char **ppc;
12818   /* NEC SVR4.0.2 mips cc rejects this.  */
12819   struct point {int x, y;};
12820   static struct point const zero = {0,0};
12821   /* AIX XL C 1.02.0.0 rejects this.
12822      It does not let you subtract one const X* pointer from another in
12823      an arm of an if-expression whose if-part is not a constant
12824      expression */
12825   const char *g = "string";
12826   pcpcc = &g + (g ? g-g : 0);
12827   /* HPUX 7.0 cc rejects these. */
12828   ++pcpcc;
12829   ppc = (char**) pcpcc;
12830   pcpcc = (char const *const *) ppc;
12831   { /* SCO 3.2v4 cc rejects this.  */
12832     char *t;
12833     char const *s = 0 ? (char *) 0 : (char const *) 0;
12834
12835     *t++ = 0;
12836     if (s) return 0;
12837   }
12838   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12839     int x[] = {25, 17};
12840     const int *foo = &x[0];
12841     ++foo;
12842   }
12843   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12844     typedef const int *iptr;
12845     iptr p = 0;
12846     ++p;
12847   }
12848   { /* AIX XL C 1.02.0.0 rejects this saying
12849        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12850     struct s { int j; const int *ap[3]; };
12851     struct s *b; b->j = 5;
12852   }
12853   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12854     const int foo = 10;
12855     if (!foo) return 0;
12856   }
12857   return !cs[0] && !zero.x;
12858 #endif
12859
12860   ;
12861   return 0;
12862 }
12863 _ACEOF
12864 rm -f conftest.$ac_objext
12865 if { (ac_try="$ac_compile"
12866 case "(($ac_try" in
12867   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12868   *) ac_try_echo=$ac_try;;
12869 esac
12870 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12871   (eval "$ac_compile") 2>conftest.er1
12872   ac_status=$?
12873   grep -v '^ *+' conftest.er1 >conftest.err
12874   rm -f conftest.er1
12875   cat conftest.err >&5
12876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12877   (exit $ac_status); } && {
12878          test -z "$ac_c_werror_flag" ||
12879          test ! -s conftest.err
12880        } && test -s conftest.$ac_objext; then
12881   ac_cv_c_const=yes
12882 else
12883   echo "$as_me: failed program was:" >&5
12884 sed 's/^/| /' conftest.$ac_ext >&5
12885
12886         ac_cv_c_const=no
12887 fi
12888
12889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12890 fi
12891 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
12892 echo "${ECHO_T}$ac_cv_c_const" >&6; }
12893 if test $ac_cv_c_const = no; then
12894
12895 cat >>confdefs.h <<\_ACEOF
12896 #define const
12897 _ACEOF
12898
12899 fi
12900
12901 { echo "$as_me:$LINENO: checking for inline" >&5
12902 echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
12903 if test "${ac_cv_c_inline+set}" = set; then
12904   echo $ECHO_N "(cached) $ECHO_C" >&6
12905 else
12906   ac_cv_c_inline=no
12907 for ac_kw in inline __inline__ __inline; do
12908   cat >conftest.$ac_ext <<_ACEOF
12909 /* confdefs.h.  */
12910 _ACEOF
12911 cat confdefs.h >>conftest.$ac_ext
12912 cat >>conftest.$ac_ext <<_ACEOF
12913 /* end confdefs.h.  */
12914 #ifndef __cplusplus
12915 typedef int foo_t;
12916 static $ac_kw foo_t static_foo () {return 0; }
12917 $ac_kw foo_t foo () {return 0; }
12918 #endif
12919
12920 _ACEOF
12921 rm -f conftest.$ac_objext
12922 if { (ac_try="$ac_compile"
12923 case "(($ac_try" in
12924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12925   *) ac_try_echo=$ac_try;;
12926 esac
12927 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12928   (eval "$ac_compile") 2>conftest.er1
12929   ac_status=$?
12930   grep -v '^ *+' conftest.er1 >conftest.err
12931   rm -f conftest.er1
12932   cat conftest.err >&5
12933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12934   (exit $ac_status); } && {
12935          test -z "$ac_c_werror_flag" ||
12936          test ! -s conftest.err
12937        } && test -s conftest.$ac_objext; then
12938   ac_cv_c_inline=$ac_kw
12939 else
12940   echo "$as_me: failed program was:" >&5
12941 sed 's/^/| /' conftest.$ac_ext >&5
12942
12943
12944 fi
12945
12946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12947   test "$ac_cv_c_inline" != no && break
12948 done
12949
12950 fi
12951 { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
12952 echo "${ECHO_T}$ac_cv_c_inline" >&6; }
12953
12954
12955 case $ac_cv_c_inline in
12956   inline | yes) ;;
12957   *)
12958     case $ac_cv_c_inline in
12959       no) ac_val=;;
12960       *) ac_val=$ac_cv_c_inline;;
12961     esac
12962     cat >>confdefs.h <<_ACEOF
12963 #ifndef __cplusplus
12964 #define inline $ac_val
12965 #endif
12966 _ACEOF
12967     ;;
12968 esac
12969
12970 { echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
12971 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6; }
12972 if test "${ac_cv_c_stringize+set}" = set; then
12973   echo $ECHO_N "(cached) $ECHO_C" >&6
12974 else
12975   cat >conftest.$ac_ext <<_ACEOF
12976 /* confdefs.h.  */
12977 _ACEOF
12978 cat confdefs.h >>conftest.$ac_ext
12979 cat >>conftest.$ac_ext <<_ACEOF
12980 /* end confdefs.h.  */
12981 #define x(y) #y
12982
12983 char *s = x(teststring);
12984 _ACEOF
12985 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12986   $EGREP "#teststring" >/dev/null 2>&1; then
12987   ac_cv_c_stringize=no
12988 else
12989   ac_cv_c_stringize=yes
12990 fi
12991 rm -f conftest*
12992
12993 fi
12994 { echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
12995 echo "${ECHO_T}$ac_cv_c_stringize" >&6; }
12996 if test $ac_cv_c_stringize = yes; then
12997
12998 cat >>confdefs.h <<\_ACEOF
12999 #define HAVE_STRINGIZE 1
13000 _ACEOF
13001
13002 fi
13003
13004 { echo "$as_me:$LINENO: checking for signed types" >&5
13005 echo $ECHO_N "checking for signed types... $ECHO_C" >&6; }
13006 if test "${pgac_cv_c_signed+set}" = set; then
13007   echo $ECHO_N "(cached) $ECHO_C" >&6
13008 else
13009   cat >conftest.$ac_ext <<_ACEOF
13010 /* confdefs.h.  */
13011 _ACEOF
13012 cat confdefs.h >>conftest.$ac_ext
13013 cat >>conftest.$ac_ext <<_ACEOF
13014 /* end confdefs.h.  */
13015
13016 int
13017 main ()
13018 {
13019 signed char c; signed short s; signed int i;
13020   ;
13021   return 0;
13022 }
13023 _ACEOF
13024 rm -f conftest.$ac_objext
13025 if { (ac_try="$ac_compile"
13026 case "(($ac_try" in
13027   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13028   *) ac_try_echo=$ac_try;;
13029 esac
13030 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13031   (eval "$ac_compile") 2>conftest.er1
13032   ac_status=$?
13033   grep -v '^ *+' conftest.er1 >conftest.err
13034   rm -f conftest.er1
13035   cat conftest.err >&5
13036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13037   (exit $ac_status); } && {
13038          test -z "$ac_c_werror_flag" ||
13039          test ! -s conftest.err
13040        } && test -s conftest.$ac_objext; then
13041   pgac_cv_c_signed=yes
13042 else
13043   echo "$as_me: failed program was:" >&5
13044 sed 's/^/| /' conftest.$ac_ext >&5
13045
13046         pgac_cv_c_signed=no
13047 fi
13048
13049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13050 fi
13051 { echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
13052 echo "${ECHO_T}$pgac_cv_c_signed" >&6; }
13053 if test x"$pgac_cv_c_signed" = xno ; then
13054
13055 cat >>confdefs.h <<\_ACEOF
13056 #define signed
13057 _ACEOF
13058
13059 fi
13060 { echo "$as_me:$LINENO: checking for working volatile" >&5
13061 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
13062 if test "${ac_cv_c_volatile+set}" = set; then
13063   echo $ECHO_N "(cached) $ECHO_C" >&6
13064 else
13065   cat >conftest.$ac_ext <<_ACEOF
13066 /* confdefs.h.  */
13067 _ACEOF
13068 cat confdefs.h >>conftest.$ac_ext
13069 cat >>conftest.$ac_ext <<_ACEOF
13070 /* end confdefs.h.  */
13071
13072 int
13073 main ()
13074 {
13075
13076 volatile int x;
13077 int * volatile y = (int *) 0;
13078 return !x && !y;
13079   ;
13080   return 0;
13081 }
13082 _ACEOF
13083 rm -f conftest.$ac_objext
13084 if { (ac_try="$ac_compile"
13085 case "(($ac_try" in
13086   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13087   *) ac_try_echo=$ac_try;;
13088 esac
13089 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13090   (eval "$ac_compile") 2>conftest.er1
13091   ac_status=$?
13092   grep -v '^ *+' conftest.er1 >conftest.err
13093   rm -f conftest.er1
13094   cat conftest.err >&5
13095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13096   (exit $ac_status); } && {
13097          test -z "$ac_c_werror_flag" ||
13098          test ! -s conftest.err
13099        } && test -s conftest.$ac_objext; then
13100   ac_cv_c_volatile=yes
13101 else
13102   echo "$as_me: failed program was:" >&5
13103 sed 's/^/| /' conftest.$ac_ext >&5
13104
13105         ac_cv_c_volatile=no
13106 fi
13107
13108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13109 fi
13110 { echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
13111 echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
13112 if test $ac_cv_c_volatile = no; then
13113
13114 cat >>confdefs.h <<\_ACEOF
13115 #define volatile
13116 _ACEOF
13117
13118 fi
13119
13120 { echo "$as_me:$LINENO: checking for __func__" >&5
13121 echo $ECHO_N "checking for __func__... $ECHO_C" >&6; }
13122 if test "${pgac_cv_funcname_func_support+set}" = set; then
13123   echo $ECHO_N "(cached) $ECHO_C" >&6
13124 else
13125   cat >conftest.$ac_ext <<_ACEOF
13126 /* confdefs.h.  */
13127 _ACEOF
13128 cat confdefs.h >>conftest.$ac_ext
13129 cat >>conftest.$ac_ext <<_ACEOF
13130 /* end confdefs.h.  */
13131 #include <stdio.h>
13132 int
13133 main ()
13134 {
13135 printf("%s\n", __func__);
13136   ;
13137   return 0;
13138 }
13139 _ACEOF
13140 rm -f conftest.$ac_objext
13141 if { (ac_try="$ac_compile"
13142 case "(($ac_try" in
13143   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13144   *) ac_try_echo=$ac_try;;
13145 esac
13146 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13147   (eval "$ac_compile") 2>conftest.er1
13148   ac_status=$?
13149   grep -v '^ *+' conftest.er1 >conftest.err
13150   rm -f conftest.er1
13151   cat conftest.err >&5
13152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13153   (exit $ac_status); } && {
13154          test -z "$ac_c_werror_flag" ||
13155          test ! -s conftest.err
13156        } && test -s conftest.$ac_objext; then
13157   pgac_cv_funcname_func_support=yes
13158 else
13159   echo "$as_me: failed program was:" >&5
13160 sed 's/^/| /' conftest.$ac_ext >&5
13161
13162         pgac_cv_funcname_func_support=no
13163 fi
13164
13165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13166 fi
13167 { echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
13168 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6; }
13169 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13170
13171 cat >>confdefs.h <<\_ACEOF
13172 #define HAVE_FUNCNAME__FUNC 1
13173 _ACEOF
13174
13175 else
13176 { echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
13177 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6; }
13178 if test "${pgac_cv_funcname_function_support+set}" = set; then
13179   echo $ECHO_N "(cached) $ECHO_C" >&6
13180 else
13181   cat >conftest.$ac_ext <<_ACEOF
13182 /* confdefs.h.  */
13183 _ACEOF
13184 cat confdefs.h >>conftest.$ac_ext
13185 cat >>conftest.$ac_ext <<_ACEOF
13186 /* end confdefs.h.  */
13187 #include <stdio.h>
13188 int
13189 main ()
13190 {
13191 printf("%s\n", __FUNCTION__);
13192   ;
13193   return 0;
13194 }
13195 _ACEOF
13196 rm -f conftest.$ac_objext
13197 if { (ac_try="$ac_compile"
13198 case "(($ac_try" in
13199   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13200   *) ac_try_echo=$ac_try;;
13201 esac
13202 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13203   (eval "$ac_compile") 2>conftest.er1
13204   ac_status=$?
13205   grep -v '^ *+' conftest.er1 >conftest.err
13206   rm -f conftest.er1
13207   cat conftest.err >&5
13208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13209   (exit $ac_status); } && {
13210          test -z "$ac_c_werror_flag" ||
13211          test ! -s conftest.err
13212        } && test -s conftest.$ac_objext; then
13213   pgac_cv_funcname_function_support=yes
13214 else
13215   echo "$as_me: failed program was:" >&5
13216 sed 's/^/| /' conftest.$ac_ext >&5
13217
13218         pgac_cv_funcname_function_support=no
13219 fi
13220
13221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13222 fi
13223 { echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
13224 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6; }
13225 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13226
13227 cat >>confdefs.h <<\_ACEOF
13228 #define HAVE_FUNCNAME__FUNCTION 1
13229 _ACEOF
13230
13231 fi
13232 fi
13233 { echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13234 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
13235 if test "${ac_cv_struct_tm+set}" = set; then
13236   echo $ECHO_N "(cached) $ECHO_C" >&6
13237 else
13238   cat >conftest.$ac_ext <<_ACEOF
13239 /* confdefs.h.  */
13240 _ACEOF
13241 cat confdefs.h >>conftest.$ac_ext
13242 cat >>conftest.$ac_ext <<_ACEOF
13243 /* end confdefs.h.  */
13244 #include <sys/types.h>
13245 #include <time.h>
13246
13247 int
13248 main ()
13249 {
13250 struct tm tm;
13251                                      int *p = &tm.tm_sec;
13252                                      return !p;
13253   ;
13254   return 0;
13255 }
13256 _ACEOF
13257 rm -f conftest.$ac_objext
13258 if { (ac_try="$ac_compile"
13259 case "(($ac_try" in
13260   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13261   *) ac_try_echo=$ac_try;;
13262 esac
13263 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13264   (eval "$ac_compile") 2>conftest.er1
13265   ac_status=$?
13266   grep -v '^ *+' conftest.er1 >conftest.err
13267   rm -f conftest.er1
13268   cat conftest.err >&5
13269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13270   (exit $ac_status); } && {
13271          test -z "$ac_c_werror_flag" ||
13272          test ! -s conftest.err
13273        } && test -s conftest.$ac_objext; then
13274   ac_cv_struct_tm=time.h
13275 else
13276   echo "$as_me: failed program was:" >&5
13277 sed 's/^/| /' conftest.$ac_ext >&5
13278
13279         ac_cv_struct_tm=sys/time.h
13280 fi
13281
13282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13283 fi
13284 { echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13285 echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
13286 if test $ac_cv_struct_tm = sys/time.h; then
13287
13288 cat >>confdefs.h <<\_ACEOF
13289 #define TM_IN_SYS_TIME 1
13290 _ACEOF
13291
13292 fi
13293
13294 { echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13295 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
13296 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13297   echo $ECHO_N "(cached) $ECHO_C" >&6
13298 else
13299   cat >conftest.$ac_ext <<_ACEOF
13300 /* confdefs.h.  */
13301 _ACEOF
13302 cat confdefs.h >>conftest.$ac_ext
13303 cat >>conftest.$ac_ext <<_ACEOF
13304 /* end confdefs.h.  */
13305 #include <sys/types.h>
13306 #include <$ac_cv_struct_tm>
13307
13308
13309 int
13310 main ()
13311 {
13312 static struct tm ac_aggr;
13313 if (ac_aggr.tm_zone)
13314 return 0;
13315   ;
13316   return 0;
13317 }
13318 _ACEOF
13319 rm -f conftest.$ac_objext
13320 if { (ac_try="$ac_compile"
13321 case "(($ac_try" in
13322   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13323   *) ac_try_echo=$ac_try;;
13324 esac
13325 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13326   (eval "$ac_compile") 2>conftest.er1
13327   ac_status=$?
13328   grep -v '^ *+' conftest.er1 >conftest.err
13329   rm -f conftest.er1
13330   cat conftest.err >&5
13331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13332   (exit $ac_status); } && {
13333          test -z "$ac_c_werror_flag" ||
13334          test ! -s conftest.err
13335        } && test -s conftest.$ac_objext; then
13336   ac_cv_member_struct_tm_tm_zone=yes
13337 else
13338   echo "$as_me: failed program was:" >&5
13339 sed 's/^/| /' conftest.$ac_ext >&5
13340
13341         cat >conftest.$ac_ext <<_ACEOF
13342 /* confdefs.h.  */
13343 _ACEOF
13344 cat confdefs.h >>conftest.$ac_ext
13345 cat >>conftest.$ac_ext <<_ACEOF
13346 /* end confdefs.h.  */
13347 #include <sys/types.h>
13348 #include <$ac_cv_struct_tm>
13349
13350
13351 int
13352 main ()
13353 {
13354 static struct tm ac_aggr;
13355 if (sizeof ac_aggr.tm_zone)
13356 return 0;
13357   ;
13358   return 0;
13359 }
13360 _ACEOF
13361 rm -f conftest.$ac_objext
13362 if { (ac_try="$ac_compile"
13363 case "(($ac_try" in
13364   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13365   *) ac_try_echo=$ac_try;;
13366 esac
13367 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13368   (eval "$ac_compile") 2>conftest.er1
13369   ac_status=$?
13370   grep -v '^ *+' conftest.er1 >conftest.err
13371   rm -f conftest.er1
13372   cat conftest.err >&5
13373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13374   (exit $ac_status); } && {
13375          test -z "$ac_c_werror_flag" ||
13376          test ! -s conftest.err
13377        } && test -s conftest.$ac_objext; then
13378   ac_cv_member_struct_tm_tm_zone=yes
13379 else
13380   echo "$as_me: failed program was:" >&5
13381 sed 's/^/| /' conftest.$ac_ext >&5
13382
13383         ac_cv_member_struct_tm_tm_zone=no
13384 fi
13385
13386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13387 fi
13388
13389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13390 fi
13391 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13392 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
13393 if test $ac_cv_member_struct_tm_tm_zone = yes; then
13394
13395 cat >>confdefs.h <<_ACEOF
13396 #define HAVE_STRUCT_TM_TM_ZONE 1
13397 _ACEOF
13398
13399
13400 fi
13401
13402 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13403
13404 cat >>confdefs.h <<\_ACEOF
13405 #define HAVE_TM_ZONE 1
13406 _ACEOF
13407
13408 fi
13409 { echo "$as_me:$LINENO: checking for tzname" >&5
13410 echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
13411 if test "${ac_cv_var_tzname+set}" = set; then
13412   echo $ECHO_N "(cached) $ECHO_C" >&6
13413 else
13414   cat >conftest.$ac_ext <<_ACEOF
13415 /* confdefs.h.  */
13416 _ACEOF
13417 cat confdefs.h >>conftest.$ac_ext
13418 cat >>conftest.$ac_ext <<_ACEOF
13419 /* end confdefs.h.  */
13420 #include <time.h>
13421 #ifndef tzname /* For SGI.  */
13422 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
13423 #endif
13424
13425 int
13426 main ()
13427 {
13428 atoi(*tzname);
13429   ;
13430   return 0;
13431 }
13432 _ACEOF
13433 rm -f conftest.$ac_objext conftest$ac_exeext
13434 if { (ac_try="$ac_link"
13435 case "(($ac_try" in
13436   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13437   *) ac_try_echo=$ac_try;;
13438 esac
13439 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13440   (eval "$ac_link") 2>conftest.er1
13441   ac_status=$?
13442   grep -v '^ *+' conftest.er1 >conftest.err
13443   rm -f conftest.er1
13444   cat conftest.err >&5
13445   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13446   (exit $ac_status); } && {
13447          test -z "$ac_c_werror_flag" ||
13448          test ! -s conftest.err
13449        } && test -s conftest$ac_exeext &&
13450        $as_test_x conftest$ac_exeext; then
13451   ac_cv_var_tzname=yes
13452 else
13453   echo "$as_me: failed program was:" >&5
13454 sed 's/^/| /' conftest.$ac_ext >&5
13455
13456         ac_cv_var_tzname=no
13457 fi
13458
13459 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13460       conftest$ac_exeext conftest.$ac_ext
13461 fi
13462 { echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13463 echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
13464 if test $ac_cv_var_tzname = yes; then
13465
13466 cat >>confdefs.h <<\_ACEOF
13467 #define HAVE_TZNAME 1
13468 _ACEOF
13469
13470 fi
13471
13472 { echo "$as_me:$LINENO: checking for union semun" >&5
13473 echo $ECHO_N "checking for union semun... $ECHO_C" >&6; }
13474 if test "${ac_cv_type_union_semun+set}" = set; then
13475   echo $ECHO_N "(cached) $ECHO_C" >&6
13476 else
13477   cat >conftest.$ac_ext <<_ACEOF
13478 /* confdefs.h.  */
13479 _ACEOF
13480 cat confdefs.h >>conftest.$ac_ext
13481 cat >>conftest.$ac_ext <<_ACEOF
13482 /* end confdefs.h.  */
13483 #include <sys/types.h>
13484 #include <sys/ipc.h>
13485 #include <sys/sem.h>
13486
13487 typedef union semun ac__type_new_;
13488 int
13489 main ()
13490 {
13491 if ((ac__type_new_ *) 0)
13492   return 0;
13493 if (sizeof (ac__type_new_))
13494   return 0;
13495   ;
13496   return 0;
13497 }
13498 _ACEOF
13499 rm -f conftest.$ac_objext
13500 if { (ac_try="$ac_compile"
13501 case "(($ac_try" in
13502   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13503   *) ac_try_echo=$ac_try;;
13504 esac
13505 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13506   (eval "$ac_compile") 2>conftest.er1
13507   ac_status=$?
13508   grep -v '^ *+' conftest.er1 >conftest.err
13509   rm -f conftest.er1
13510   cat conftest.err >&5
13511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13512   (exit $ac_status); } && {
13513          test -z "$ac_c_werror_flag" ||
13514          test ! -s conftest.err
13515        } && test -s conftest.$ac_objext; then
13516   ac_cv_type_union_semun=yes
13517 else
13518   echo "$as_me: failed program was:" >&5
13519 sed 's/^/| /' conftest.$ac_ext >&5
13520
13521         ac_cv_type_union_semun=no
13522 fi
13523
13524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13525 fi
13526 { echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
13527 echo "${ECHO_T}$ac_cv_type_union_semun" >&6; }
13528 if test $ac_cv_type_union_semun = yes; then
13529
13530 cat >>confdefs.h <<_ACEOF
13531 #define HAVE_UNION_SEMUN 1
13532 _ACEOF
13533
13534
13535 fi
13536
13537 { echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
13538 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6; }
13539 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
13540   echo $ECHO_N "(cached) $ECHO_C" >&6
13541 else
13542   cat >conftest.$ac_ext <<_ACEOF
13543 /* confdefs.h.  */
13544 _ACEOF
13545 cat confdefs.h >>conftest.$ac_ext
13546 cat >>conftest.$ac_ext <<_ACEOF
13547 /* end confdefs.h.  */
13548 #include <sys/types.h>
13549 #ifdef HAVE_SYS_UN_H
13550 #include <sys/un.h>
13551 #endif
13552
13553
13554 typedef struct sockaddr_un ac__type_new_;
13555 int
13556 main ()
13557 {
13558 if ((ac__type_new_ *) 0)
13559   return 0;
13560 if (sizeof (ac__type_new_))
13561   return 0;
13562   ;
13563   return 0;
13564 }
13565 _ACEOF
13566 rm -f conftest.$ac_objext
13567 if { (ac_try="$ac_compile"
13568 case "(($ac_try" in
13569   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13570   *) ac_try_echo=$ac_try;;
13571 esac
13572 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13573   (eval "$ac_compile") 2>conftest.er1
13574   ac_status=$?
13575   grep -v '^ *+' conftest.er1 >conftest.err
13576   rm -f conftest.er1
13577   cat conftest.err >&5
13578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13579   (exit $ac_status); } && {
13580          test -z "$ac_c_werror_flag" ||
13581          test ! -s conftest.err
13582        } && test -s conftest.$ac_objext; then
13583   ac_cv_type_struct_sockaddr_un=yes
13584 else
13585   echo "$as_me: failed program was:" >&5
13586 sed 's/^/| /' conftest.$ac_ext >&5
13587
13588         ac_cv_type_struct_sockaddr_un=no
13589 fi
13590
13591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13592 fi
13593 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
13594 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6; }
13595 if test $ac_cv_type_struct_sockaddr_un = yes; then
13596
13597 cat >>confdefs.h <<_ACEOF
13598 #define HAVE_STRUCT_SOCKADDR_UN 1
13599 _ACEOF
13600
13601
13602 cat >>confdefs.h <<\_ACEOF
13603 #define HAVE_UNIX_SOCKETS 1
13604 _ACEOF
13605
13606 fi
13607
13608 { echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
13609 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6; }
13610 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
13611   echo $ECHO_N "(cached) $ECHO_C" >&6
13612 else
13613   cat >conftest.$ac_ext <<_ACEOF
13614 /* confdefs.h.  */
13615 _ACEOF
13616 cat confdefs.h >>conftest.$ac_ext
13617 cat >>conftest.$ac_ext <<_ACEOF
13618 /* end confdefs.h.  */
13619 #include <sys/types.h>
13620 #ifdef HAVE_SYS_SOCKET_H
13621 #include <sys/socket.h>
13622 #endif
13623
13624
13625 typedef struct sockaddr_storage ac__type_new_;
13626 int
13627 main ()
13628 {
13629 if ((ac__type_new_ *) 0)
13630   return 0;
13631 if (sizeof (ac__type_new_))
13632   return 0;
13633   ;
13634   return 0;
13635 }
13636 _ACEOF
13637 rm -f conftest.$ac_objext
13638 if { (ac_try="$ac_compile"
13639 case "(($ac_try" in
13640   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13641   *) ac_try_echo=$ac_try;;
13642 esac
13643 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13644   (eval "$ac_compile") 2>conftest.er1
13645   ac_status=$?
13646   grep -v '^ *+' conftest.er1 >conftest.err
13647   rm -f conftest.er1
13648   cat conftest.err >&5
13649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13650   (exit $ac_status); } && {
13651          test -z "$ac_c_werror_flag" ||
13652          test ! -s conftest.err
13653        } && test -s conftest.$ac_objext; then
13654   ac_cv_type_struct_sockaddr_storage=yes
13655 else
13656   echo "$as_me: failed program was:" >&5
13657 sed 's/^/| /' conftest.$ac_ext >&5
13658
13659         ac_cv_type_struct_sockaddr_storage=no
13660 fi
13661
13662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13663 fi
13664 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
13665 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6; }
13666 if test $ac_cv_type_struct_sockaddr_storage = yes; then
13667
13668 cat >>confdefs.h <<_ACEOF
13669 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
13670 _ACEOF
13671
13672
13673 fi
13674
13675 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
13676 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6; }
13677 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
13678   echo $ECHO_N "(cached) $ECHO_C" >&6
13679 else
13680   cat >conftest.$ac_ext <<_ACEOF
13681 /* confdefs.h.  */
13682 _ACEOF
13683 cat confdefs.h >>conftest.$ac_ext
13684 cat >>conftest.$ac_ext <<_ACEOF
13685 /* end confdefs.h.  */
13686 #include <sys/types.h>
13687 #ifdef HAVE_SYS_SOCKET_H
13688 #include <sys/socket.h>
13689 #endif
13690
13691
13692 int
13693 main ()
13694 {
13695 static struct sockaddr_storage ac_aggr;
13696 if (ac_aggr.ss_family)
13697 return 0;
13698   ;
13699   return 0;
13700 }
13701 _ACEOF
13702 rm -f conftest.$ac_objext
13703 if { (ac_try="$ac_compile"
13704 case "(($ac_try" in
13705   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13706   *) ac_try_echo=$ac_try;;
13707 esac
13708 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13709   (eval "$ac_compile") 2>conftest.er1
13710   ac_status=$?
13711   grep -v '^ *+' conftest.er1 >conftest.err
13712   rm -f conftest.er1
13713   cat conftest.err >&5
13714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13715   (exit $ac_status); } && {
13716          test -z "$ac_c_werror_flag" ||
13717          test ! -s conftest.err
13718        } && test -s conftest.$ac_objext; then
13719   ac_cv_member_struct_sockaddr_storage_ss_family=yes
13720 else
13721   echo "$as_me: failed program was:" >&5
13722 sed 's/^/| /' conftest.$ac_ext >&5
13723
13724         cat >conftest.$ac_ext <<_ACEOF
13725 /* confdefs.h.  */
13726 _ACEOF
13727 cat confdefs.h >>conftest.$ac_ext
13728 cat >>conftest.$ac_ext <<_ACEOF
13729 /* end confdefs.h.  */
13730 #include <sys/types.h>
13731 #ifdef HAVE_SYS_SOCKET_H
13732 #include <sys/socket.h>
13733 #endif
13734
13735
13736 int
13737 main ()
13738 {
13739 static struct sockaddr_storage ac_aggr;
13740 if (sizeof ac_aggr.ss_family)
13741 return 0;
13742   ;
13743   return 0;
13744 }
13745 _ACEOF
13746 rm -f conftest.$ac_objext
13747 if { (ac_try="$ac_compile"
13748 case "(($ac_try" in
13749   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13750   *) ac_try_echo=$ac_try;;
13751 esac
13752 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13753   (eval "$ac_compile") 2>conftest.er1
13754   ac_status=$?
13755   grep -v '^ *+' conftest.er1 >conftest.err
13756   rm -f conftest.er1
13757   cat conftest.err >&5
13758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13759   (exit $ac_status); } && {
13760          test -z "$ac_c_werror_flag" ||
13761          test ! -s conftest.err
13762        } && test -s conftest.$ac_objext; then
13763   ac_cv_member_struct_sockaddr_storage_ss_family=yes
13764 else
13765   echo "$as_me: failed program was:" >&5
13766 sed 's/^/| /' conftest.$ac_ext >&5
13767
13768         ac_cv_member_struct_sockaddr_storage_ss_family=no
13769 fi
13770
13771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13772 fi
13773
13774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13775 fi
13776 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
13777 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6; }
13778 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
13779
13780 cat >>confdefs.h <<_ACEOF
13781 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
13782 _ACEOF
13783
13784
13785 fi
13786 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
13787 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6; }
13788 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
13789   echo $ECHO_N "(cached) $ECHO_C" >&6
13790 else
13791   cat >conftest.$ac_ext <<_ACEOF
13792 /* confdefs.h.  */
13793 _ACEOF
13794 cat confdefs.h >>conftest.$ac_ext
13795 cat >>conftest.$ac_ext <<_ACEOF
13796 /* end confdefs.h.  */
13797 #include <sys/types.h>
13798 #ifdef HAVE_SYS_SOCKET_H
13799 #include <sys/socket.h>
13800 #endif
13801
13802
13803 int
13804 main ()
13805 {
13806 static struct sockaddr_storage ac_aggr;
13807 if (ac_aggr.__ss_family)
13808 return 0;
13809   ;
13810   return 0;
13811 }
13812 _ACEOF
13813 rm -f conftest.$ac_objext
13814 if { (ac_try="$ac_compile"
13815 case "(($ac_try" in
13816   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13817   *) ac_try_echo=$ac_try;;
13818 esac
13819 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13820   (eval "$ac_compile") 2>conftest.er1
13821   ac_status=$?
13822   grep -v '^ *+' conftest.er1 >conftest.err
13823   rm -f conftest.er1
13824   cat conftest.err >&5
13825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13826   (exit $ac_status); } && {
13827          test -z "$ac_c_werror_flag" ||
13828          test ! -s conftest.err
13829        } && test -s conftest.$ac_objext; then
13830   ac_cv_member_struct_sockaddr_storage___ss_family=yes
13831 else
13832   echo "$as_me: failed program was:" >&5
13833 sed 's/^/| /' conftest.$ac_ext >&5
13834
13835         cat >conftest.$ac_ext <<_ACEOF
13836 /* confdefs.h.  */
13837 _ACEOF
13838 cat confdefs.h >>conftest.$ac_ext
13839 cat >>conftest.$ac_ext <<_ACEOF
13840 /* end confdefs.h.  */
13841 #include <sys/types.h>
13842 #ifdef HAVE_SYS_SOCKET_H
13843 #include <sys/socket.h>
13844 #endif
13845
13846
13847 int
13848 main ()
13849 {
13850 static struct sockaddr_storage ac_aggr;
13851 if (sizeof ac_aggr.__ss_family)
13852 return 0;
13853   ;
13854   return 0;
13855 }
13856 _ACEOF
13857 rm -f conftest.$ac_objext
13858 if { (ac_try="$ac_compile"
13859 case "(($ac_try" in
13860   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13861   *) ac_try_echo=$ac_try;;
13862 esac
13863 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13864   (eval "$ac_compile") 2>conftest.er1
13865   ac_status=$?
13866   grep -v '^ *+' conftest.er1 >conftest.err
13867   rm -f conftest.er1
13868   cat conftest.err >&5
13869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13870   (exit $ac_status); } && {
13871          test -z "$ac_c_werror_flag" ||
13872          test ! -s conftest.err
13873        } && test -s conftest.$ac_objext; then
13874   ac_cv_member_struct_sockaddr_storage___ss_family=yes
13875 else
13876   echo "$as_me: failed program was:" >&5
13877 sed 's/^/| /' conftest.$ac_ext >&5
13878
13879         ac_cv_member_struct_sockaddr_storage___ss_family=no
13880 fi
13881
13882 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13883 fi
13884
13885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13886 fi
13887 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
13888 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6; }
13889 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
13890
13891 cat >>confdefs.h <<_ACEOF
13892 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
13893 _ACEOF
13894
13895
13896 fi
13897 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
13898 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6; }
13899 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
13900   echo $ECHO_N "(cached) $ECHO_C" >&6
13901 else
13902   cat >conftest.$ac_ext <<_ACEOF
13903 /* confdefs.h.  */
13904 _ACEOF
13905 cat confdefs.h >>conftest.$ac_ext
13906 cat >>conftest.$ac_ext <<_ACEOF
13907 /* end confdefs.h.  */
13908 #include <sys/types.h>
13909 #ifdef HAVE_SYS_SOCKET_H
13910 #include <sys/socket.h>
13911 #endif
13912
13913
13914 int
13915 main ()
13916 {
13917 static struct sockaddr_storage ac_aggr;
13918 if (ac_aggr.ss_len)
13919 return 0;
13920   ;
13921   return 0;
13922 }
13923 _ACEOF
13924 rm -f conftest.$ac_objext
13925 if { (ac_try="$ac_compile"
13926 case "(($ac_try" in
13927   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13928   *) ac_try_echo=$ac_try;;
13929 esac
13930 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13931   (eval "$ac_compile") 2>conftest.er1
13932   ac_status=$?
13933   grep -v '^ *+' conftest.er1 >conftest.err
13934   rm -f conftest.er1
13935   cat conftest.err >&5
13936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13937   (exit $ac_status); } && {
13938          test -z "$ac_c_werror_flag" ||
13939          test ! -s conftest.err
13940        } && test -s conftest.$ac_objext; then
13941   ac_cv_member_struct_sockaddr_storage_ss_len=yes
13942 else
13943   echo "$as_me: failed program was:" >&5
13944 sed 's/^/| /' conftest.$ac_ext >&5
13945
13946         cat >conftest.$ac_ext <<_ACEOF
13947 /* confdefs.h.  */
13948 _ACEOF
13949 cat confdefs.h >>conftest.$ac_ext
13950 cat >>conftest.$ac_ext <<_ACEOF
13951 /* end confdefs.h.  */
13952 #include <sys/types.h>
13953 #ifdef HAVE_SYS_SOCKET_H
13954 #include <sys/socket.h>
13955 #endif
13956
13957
13958 int
13959 main ()
13960 {
13961 static struct sockaddr_storage ac_aggr;
13962 if (sizeof ac_aggr.ss_len)
13963 return 0;
13964   ;
13965   return 0;
13966 }
13967 _ACEOF
13968 rm -f conftest.$ac_objext
13969 if { (ac_try="$ac_compile"
13970 case "(($ac_try" in
13971   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13972   *) ac_try_echo=$ac_try;;
13973 esac
13974 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13975   (eval "$ac_compile") 2>conftest.er1
13976   ac_status=$?
13977   grep -v '^ *+' conftest.er1 >conftest.err
13978   rm -f conftest.er1
13979   cat conftest.err >&5
13980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13981   (exit $ac_status); } && {
13982          test -z "$ac_c_werror_flag" ||
13983          test ! -s conftest.err
13984        } && test -s conftest.$ac_objext; then
13985   ac_cv_member_struct_sockaddr_storage_ss_len=yes
13986 else
13987   echo "$as_me: failed program was:" >&5
13988 sed 's/^/| /' conftest.$ac_ext >&5
13989
13990         ac_cv_member_struct_sockaddr_storage_ss_len=no
13991 fi
13992
13993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13994 fi
13995
13996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13997 fi
13998 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
13999 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6; }
14000 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
14001
14002 cat >>confdefs.h <<_ACEOF
14003 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14004 _ACEOF
14005
14006
14007 fi
14008 { echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
14009 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6; }
14010 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
14011   echo $ECHO_N "(cached) $ECHO_C" >&6
14012 else
14013   cat >conftest.$ac_ext <<_ACEOF
14014 /* confdefs.h.  */
14015 _ACEOF
14016 cat confdefs.h >>conftest.$ac_ext
14017 cat >>conftest.$ac_ext <<_ACEOF
14018 /* end confdefs.h.  */
14019 #include <sys/types.h>
14020 #ifdef HAVE_SYS_SOCKET_H
14021 #include <sys/socket.h>
14022 #endif
14023
14024
14025 int
14026 main ()
14027 {
14028 static struct sockaddr_storage ac_aggr;
14029 if (ac_aggr.__ss_len)
14030 return 0;
14031   ;
14032   return 0;
14033 }
14034 _ACEOF
14035 rm -f conftest.$ac_objext
14036 if { (ac_try="$ac_compile"
14037 case "(($ac_try" in
14038   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14039   *) ac_try_echo=$ac_try;;
14040 esac
14041 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14042   (eval "$ac_compile") 2>conftest.er1
14043   ac_status=$?
14044   grep -v '^ *+' conftest.er1 >conftest.err
14045   rm -f conftest.er1
14046   cat conftest.err >&5
14047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14048   (exit $ac_status); } && {
14049          test -z "$ac_c_werror_flag" ||
14050          test ! -s conftest.err
14051        } && test -s conftest.$ac_objext; then
14052   ac_cv_member_struct_sockaddr_storage___ss_len=yes
14053 else
14054   echo "$as_me: failed program was:" >&5
14055 sed 's/^/| /' conftest.$ac_ext >&5
14056
14057         cat >conftest.$ac_ext <<_ACEOF
14058 /* confdefs.h.  */
14059 _ACEOF
14060 cat confdefs.h >>conftest.$ac_ext
14061 cat >>conftest.$ac_ext <<_ACEOF
14062 /* end confdefs.h.  */
14063 #include <sys/types.h>
14064 #ifdef HAVE_SYS_SOCKET_H
14065 #include <sys/socket.h>
14066 #endif
14067
14068
14069 int
14070 main ()
14071 {
14072 static struct sockaddr_storage ac_aggr;
14073 if (sizeof ac_aggr.__ss_len)
14074 return 0;
14075   ;
14076   return 0;
14077 }
14078 _ACEOF
14079 rm -f conftest.$ac_objext
14080 if { (ac_try="$ac_compile"
14081 case "(($ac_try" in
14082   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14083   *) ac_try_echo=$ac_try;;
14084 esac
14085 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14086   (eval "$ac_compile") 2>conftest.er1
14087   ac_status=$?
14088   grep -v '^ *+' conftest.er1 >conftest.err
14089   rm -f conftest.er1
14090   cat conftest.err >&5
14091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14092   (exit $ac_status); } && {
14093          test -z "$ac_c_werror_flag" ||
14094          test ! -s conftest.err
14095        } && test -s conftest.$ac_objext; then
14096   ac_cv_member_struct_sockaddr_storage___ss_len=yes
14097 else
14098   echo "$as_me: failed program was:" >&5
14099 sed 's/^/| /' conftest.$ac_ext >&5
14100
14101         ac_cv_member_struct_sockaddr_storage___ss_len=no
14102 fi
14103
14104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14105 fi
14106
14107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14108 fi
14109 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
14110 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6; }
14111 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
14112
14113 cat >>confdefs.h <<_ACEOF
14114 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14115 _ACEOF
14116
14117
14118 fi
14119 { echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
14120 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6; }
14121 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
14122   echo $ECHO_N "(cached) $ECHO_C" >&6
14123 else
14124   cat >conftest.$ac_ext <<_ACEOF
14125 /* confdefs.h.  */
14126 _ACEOF
14127 cat confdefs.h >>conftest.$ac_ext
14128 cat >>conftest.$ac_ext <<_ACEOF
14129 /* end confdefs.h.  */
14130 #include <sys/types.h>
14131 #ifdef HAVE_SYS_SOCKET_H
14132 #include <sys/socket.h>
14133 #endif
14134
14135
14136 int
14137 main ()
14138 {
14139 static struct sockaddr ac_aggr;
14140 if (ac_aggr.sa_len)
14141 return 0;
14142   ;
14143   return 0;
14144 }
14145 _ACEOF
14146 rm -f conftest.$ac_objext
14147 if { (ac_try="$ac_compile"
14148 case "(($ac_try" in
14149   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14150   *) ac_try_echo=$ac_try;;
14151 esac
14152 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14153   (eval "$ac_compile") 2>conftest.er1
14154   ac_status=$?
14155   grep -v '^ *+' conftest.er1 >conftest.err
14156   rm -f conftest.er1
14157   cat conftest.err >&5
14158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14159   (exit $ac_status); } && {
14160          test -z "$ac_c_werror_flag" ||
14161          test ! -s conftest.err
14162        } && test -s conftest.$ac_objext; then
14163   ac_cv_member_struct_sockaddr_sa_len=yes
14164 else
14165   echo "$as_me: failed program was:" >&5
14166 sed 's/^/| /' conftest.$ac_ext >&5
14167
14168         cat >conftest.$ac_ext <<_ACEOF
14169 /* confdefs.h.  */
14170 _ACEOF
14171 cat confdefs.h >>conftest.$ac_ext
14172 cat >>conftest.$ac_ext <<_ACEOF
14173 /* end confdefs.h.  */
14174 #include <sys/types.h>
14175 #ifdef HAVE_SYS_SOCKET_H
14176 #include <sys/socket.h>
14177 #endif
14178
14179
14180 int
14181 main ()
14182 {
14183 static struct sockaddr ac_aggr;
14184 if (sizeof ac_aggr.sa_len)
14185 return 0;
14186   ;
14187   return 0;
14188 }
14189 _ACEOF
14190 rm -f conftest.$ac_objext
14191 if { (ac_try="$ac_compile"
14192 case "(($ac_try" in
14193   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14194   *) ac_try_echo=$ac_try;;
14195 esac
14196 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14197   (eval "$ac_compile") 2>conftest.er1
14198   ac_status=$?
14199   grep -v '^ *+' conftest.er1 >conftest.err
14200   rm -f conftest.er1
14201   cat conftest.err >&5
14202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14203   (exit $ac_status); } && {
14204          test -z "$ac_c_werror_flag" ||
14205          test ! -s conftest.err
14206        } && test -s conftest.$ac_objext; then
14207   ac_cv_member_struct_sockaddr_sa_len=yes
14208 else
14209   echo "$as_me: failed program was:" >&5
14210 sed 's/^/| /' conftest.$ac_ext >&5
14211
14212         ac_cv_member_struct_sockaddr_sa_len=no
14213 fi
14214
14215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14216 fi
14217
14218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14219 fi
14220 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
14221 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6; }
14222 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
14223
14224 cat >>confdefs.h <<_ACEOF
14225 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14226 _ACEOF
14227
14228
14229 fi
14230
14231 { echo "$as_me:$LINENO: checking for struct addrinfo" >&5
14232 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6; }
14233 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
14234   echo $ECHO_N "(cached) $ECHO_C" >&6
14235 else
14236   cat >conftest.$ac_ext <<_ACEOF
14237 /* confdefs.h.  */
14238 _ACEOF
14239 cat confdefs.h >>conftest.$ac_ext
14240 cat >>conftest.$ac_ext <<_ACEOF
14241 /* end confdefs.h.  */
14242 #include <sys/types.h>
14243 #include <sys/socket.h>
14244 #include <netdb.h>
14245
14246
14247 typedef struct addrinfo ac__type_new_;
14248 int
14249 main ()
14250 {
14251 if ((ac__type_new_ *) 0)
14252   return 0;
14253 if (sizeof (ac__type_new_))
14254   return 0;
14255   ;
14256   return 0;
14257 }
14258 _ACEOF
14259 rm -f conftest.$ac_objext
14260 if { (ac_try="$ac_compile"
14261 case "(($ac_try" in
14262   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14263   *) ac_try_echo=$ac_try;;
14264 esac
14265 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14266   (eval "$ac_compile") 2>conftest.er1
14267   ac_status=$?
14268   grep -v '^ *+' conftest.er1 >conftest.err
14269   rm -f conftest.er1
14270   cat conftest.err >&5
14271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14272   (exit $ac_status); } && {
14273          test -z "$ac_c_werror_flag" ||
14274          test ! -s conftest.err
14275        } && test -s conftest.$ac_objext; then
14276   ac_cv_type_struct_addrinfo=yes
14277 else
14278   echo "$as_me: failed program was:" >&5
14279 sed 's/^/| /' conftest.$ac_ext >&5
14280
14281         ac_cv_type_struct_addrinfo=no
14282 fi
14283
14284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14285 fi
14286 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
14287 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6; }
14288 if test $ac_cv_type_struct_addrinfo = yes; then
14289
14290 cat >>confdefs.h <<_ACEOF
14291 #define HAVE_STRUCT_ADDRINFO 1
14292 _ACEOF
14293
14294
14295 fi
14296
14297
14298 { echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
14299 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6; }
14300 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
14301   echo $ECHO_N "(cached) $ECHO_C" >&6
14302 else
14303   cat >conftest.$ac_ext <<_ACEOF
14304 /* confdefs.h.  */
14305 _ACEOF
14306 cat confdefs.h >>conftest.$ac_ext
14307 cat >>conftest.$ac_ext <<_ACEOF
14308 /* end confdefs.h.  */
14309 #include <sys/param.h>
14310 #include <sys/types.h>
14311 #include <sys/socket.h>
14312 #include <sys/ucred.h>
14313
14314 typedef struct cmsgcred ac__type_new_;
14315 int
14316 main ()
14317 {
14318 if ((ac__type_new_ *) 0)
14319   return 0;
14320 if (sizeof (ac__type_new_))
14321   return 0;
14322   ;
14323   return 0;
14324 }
14325 _ACEOF
14326 rm -f conftest.$ac_objext
14327 if { (ac_try="$ac_compile"
14328 case "(($ac_try" in
14329   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14330   *) ac_try_echo=$ac_try;;
14331 esac
14332 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14333   (eval "$ac_compile") 2>conftest.er1
14334   ac_status=$?
14335   grep -v '^ *+' conftest.er1 >conftest.err
14336   rm -f conftest.er1
14337   cat conftest.err >&5
14338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14339   (exit $ac_status); } && {
14340          test -z "$ac_c_werror_flag" ||
14341          test ! -s conftest.err
14342        } && test -s conftest.$ac_objext; then
14343   ac_cv_type_struct_cmsgcred=yes
14344 else
14345   echo "$as_me: failed program was:" >&5
14346 sed 's/^/| /' conftest.$ac_ext >&5
14347
14348         ac_cv_type_struct_cmsgcred=no
14349 fi
14350
14351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14352 fi
14353 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
14354 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6; }
14355 if test $ac_cv_type_struct_cmsgcred = yes; then
14356
14357 cat >>confdefs.h <<_ACEOF
14358 #define HAVE_STRUCT_CMSGCRED 1
14359 _ACEOF
14360
14361
14362 fi
14363 { echo "$as_me:$LINENO: checking for struct fcred" >&5
14364 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6; }
14365 if test "${ac_cv_type_struct_fcred+set}" = set; then
14366   echo $ECHO_N "(cached) $ECHO_C" >&6
14367 else
14368   cat >conftest.$ac_ext <<_ACEOF
14369 /* confdefs.h.  */
14370 _ACEOF
14371 cat confdefs.h >>conftest.$ac_ext
14372 cat >>conftest.$ac_ext <<_ACEOF
14373 /* end confdefs.h.  */
14374 #include <sys/param.h>
14375 #include <sys/types.h>
14376 #include <sys/socket.h>
14377 #include <sys/ucred.h>
14378
14379 typedef struct fcred ac__type_new_;
14380 int
14381 main ()
14382 {
14383 if ((ac__type_new_ *) 0)
14384   return 0;
14385 if (sizeof (ac__type_new_))
14386   return 0;
14387   ;
14388   return 0;
14389 }
14390 _ACEOF
14391 rm -f conftest.$ac_objext
14392 if { (ac_try="$ac_compile"
14393 case "(($ac_try" in
14394   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14395   *) ac_try_echo=$ac_try;;
14396 esac
14397 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14398   (eval "$ac_compile") 2>conftest.er1
14399   ac_status=$?
14400   grep -v '^ *+' conftest.er1 >conftest.err
14401   rm -f conftest.er1
14402   cat conftest.err >&5
14403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14404   (exit $ac_status); } && {
14405          test -z "$ac_c_werror_flag" ||
14406          test ! -s conftest.err
14407        } && test -s conftest.$ac_objext; then
14408   ac_cv_type_struct_fcred=yes
14409 else
14410   echo "$as_me: failed program was:" >&5
14411 sed 's/^/| /' conftest.$ac_ext >&5
14412
14413         ac_cv_type_struct_fcred=no
14414 fi
14415
14416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14417 fi
14418 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
14419 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6; }
14420 if test $ac_cv_type_struct_fcred = yes; then
14421
14422 cat >>confdefs.h <<_ACEOF
14423 #define HAVE_STRUCT_FCRED 1
14424 _ACEOF
14425
14426
14427 fi
14428 { echo "$as_me:$LINENO: checking for struct sockcred" >&5
14429 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6; }
14430 if test "${ac_cv_type_struct_sockcred+set}" = set; then
14431   echo $ECHO_N "(cached) $ECHO_C" >&6
14432 else
14433   cat >conftest.$ac_ext <<_ACEOF
14434 /* confdefs.h.  */
14435 _ACEOF
14436 cat confdefs.h >>conftest.$ac_ext
14437 cat >>conftest.$ac_ext <<_ACEOF
14438 /* end confdefs.h.  */
14439 #include <sys/param.h>
14440 #include <sys/types.h>
14441 #include <sys/socket.h>
14442 #include <sys/ucred.h>
14443
14444 typedef struct sockcred ac__type_new_;
14445 int
14446 main ()
14447 {
14448 if ((ac__type_new_ *) 0)
14449   return 0;
14450 if (sizeof (ac__type_new_))
14451   return 0;
14452   ;
14453   return 0;
14454 }
14455 _ACEOF
14456 rm -f conftest.$ac_objext
14457 if { (ac_try="$ac_compile"
14458 case "(($ac_try" in
14459   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14460   *) ac_try_echo=$ac_try;;
14461 esac
14462 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14463   (eval "$ac_compile") 2>conftest.er1
14464   ac_status=$?
14465   grep -v '^ *+' conftest.er1 >conftest.err
14466   rm -f conftest.er1
14467   cat conftest.err >&5
14468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14469   (exit $ac_status); } && {
14470          test -z "$ac_c_werror_flag" ||
14471          test ! -s conftest.err
14472        } && test -s conftest.$ac_objext; then
14473   ac_cv_type_struct_sockcred=yes
14474 else
14475   echo "$as_me: failed program was:" >&5
14476 sed 's/^/| /' conftest.$ac_ext >&5
14477
14478         ac_cv_type_struct_sockcred=no
14479 fi
14480
14481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14482 fi
14483 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
14484 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6; }
14485 if test $ac_cv_type_struct_sockcred = yes; then
14486
14487 cat >>confdefs.h <<_ACEOF
14488 #define HAVE_STRUCT_SOCKCRED 1
14489 _ACEOF
14490
14491
14492 fi
14493
14494
14495 { echo "$as_me:$LINENO: checking for struct option" >&5
14496 echo $ECHO_N "checking for struct option... $ECHO_C" >&6; }
14497 if test "${ac_cv_type_struct_option+set}" = set; then
14498   echo $ECHO_N "(cached) $ECHO_C" >&6
14499 else
14500   cat >conftest.$ac_ext <<_ACEOF
14501 /* confdefs.h.  */
14502 _ACEOF
14503 cat confdefs.h >>conftest.$ac_ext
14504 cat >>conftest.$ac_ext <<_ACEOF
14505 /* end confdefs.h.  */
14506 #ifdef HAVE_GETOPT_H
14507 #include <getopt.h>
14508 #endif
14509
14510 typedef struct option ac__type_new_;
14511 int
14512 main ()
14513 {
14514 if ((ac__type_new_ *) 0)
14515   return 0;
14516 if (sizeof (ac__type_new_))
14517   return 0;
14518   ;
14519   return 0;
14520 }
14521 _ACEOF
14522 rm -f conftest.$ac_objext
14523 if { (ac_try="$ac_compile"
14524 case "(($ac_try" in
14525   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14526   *) ac_try_echo=$ac_try;;
14527 esac
14528 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14529   (eval "$ac_compile") 2>conftest.er1
14530   ac_status=$?
14531   grep -v '^ *+' conftest.er1 >conftest.err
14532   rm -f conftest.er1
14533   cat conftest.err >&5
14534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14535   (exit $ac_status); } && {
14536          test -z "$ac_c_werror_flag" ||
14537          test ! -s conftest.err
14538        } && test -s conftest.$ac_objext; then
14539   ac_cv_type_struct_option=yes
14540 else
14541   echo "$as_me: failed program was:" >&5
14542 sed 's/^/| /' conftest.$ac_ext >&5
14543
14544         ac_cv_type_struct_option=no
14545 fi
14546
14547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14548 fi
14549 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
14550 echo "${ECHO_T}$ac_cv_type_struct_option" >&6; }
14551 if test $ac_cv_type_struct_option = yes; then
14552
14553 cat >>confdefs.h <<_ACEOF
14554 #define HAVE_STRUCT_OPTION 1
14555 _ACEOF
14556
14557
14558 fi
14559
14560
14561 if test "$with_zlib" = yes; then
14562   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14563   # did not).  While we could work around the lack of z_streamp, it
14564   # seems unwise to encourage people to use such old zlib versions...
14565   { echo "$as_me:$LINENO: checking for z_streamp" >&5
14566 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6; }
14567 if test "${ac_cv_type_z_streamp+set}" = set; then
14568   echo $ECHO_N "(cached) $ECHO_C" >&6
14569 else
14570   cat >conftest.$ac_ext <<_ACEOF
14571 /* confdefs.h.  */
14572 _ACEOF
14573 cat confdefs.h >>conftest.$ac_ext
14574 cat >>conftest.$ac_ext <<_ACEOF
14575 /* end confdefs.h.  */
14576 #include <zlib.h>
14577
14578 typedef z_streamp ac__type_new_;
14579 int
14580 main ()
14581 {
14582 if ((ac__type_new_ *) 0)
14583   return 0;
14584 if (sizeof (ac__type_new_))
14585   return 0;
14586   ;
14587   return 0;
14588 }
14589 _ACEOF
14590 rm -f conftest.$ac_objext
14591 if { (ac_try="$ac_compile"
14592 case "(($ac_try" in
14593   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14594   *) ac_try_echo=$ac_try;;
14595 esac
14596 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14597   (eval "$ac_compile") 2>conftest.er1
14598   ac_status=$?
14599   grep -v '^ *+' conftest.er1 >conftest.err
14600   rm -f conftest.er1
14601   cat conftest.err >&5
14602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14603   (exit $ac_status); } && {
14604          test -z "$ac_c_werror_flag" ||
14605          test ! -s conftest.err
14606        } && test -s conftest.$ac_objext; then
14607   ac_cv_type_z_streamp=yes
14608 else
14609   echo "$as_me: failed program was:" >&5
14610 sed 's/^/| /' conftest.$ac_ext >&5
14611
14612         ac_cv_type_z_streamp=no
14613 fi
14614
14615 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14616 fi
14617 { echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
14618 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6; }
14619 if test $ac_cv_type_z_streamp = yes; then
14620   :
14621 else
14622   { { echo "$as_me:$LINENO: error: zlib version is too old
14623 Use --without-zlib to disable zlib support." >&5
14624 echo "$as_me: error: zlib version is too old
14625 Use --without-zlib to disable zlib support." >&2;}
14626    { (exit 1); exit 1; }; }
14627 fi
14628
14629 fi
14630
14631 if test "$with_krb5" = yes; then
14632 # Check for differences between MIT and Heimdal (KTH) releases
14633   { echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
14634 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6; }
14635 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
14636   echo $ECHO_N "(cached) $ECHO_C" >&6
14637 else
14638   cat >conftest.$ac_ext <<_ACEOF
14639 /* confdefs.h.  */
14640 _ACEOF
14641 cat confdefs.h >>conftest.$ac_ext
14642 cat >>conftest.$ac_ext <<_ACEOF
14643 /* end confdefs.h.  */
14644 #include <krb5.h>
14645
14646 int
14647 main ()
14648 {
14649 static krb5_ticket ac_aggr;
14650 if (ac_aggr.enc_part2)
14651 return 0;
14652   ;
14653   return 0;
14654 }
14655 _ACEOF
14656 rm -f conftest.$ac_objext
14657 if { (ac_try="$ac_compile"
14658 case "(($ac_try" in
14659   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14660   *) ac_try_echo=$ac_try;;
14661 esac
14662 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14663   (eval "$ac_compile") 2>conftest.er1
14664   ac_status=$?
14665   grep -v '^ *+' conftest.er1 >conftest.err
14666   rm -f conftest.er1
14667   cat conftest.err >&5
14668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14669   (exit $ac_status); } && {
14670          test -z "$ac_c_werror_flag" ||
14671          test ! -s conftest.err
14672        } && test -s conftest.$ac_objext; then
14673   ac_cv_member_krb5_ticket_enc_part2=yes
14674 else
14675   echo "$as_me: failed program was:" >&5
14676 sed 's/^/| /' conftest.$ac_ext >&5
14677
14678         cat >conftest.$ac_ext <<_ACEOF
14679 /* confdefs.h.  */
14680 _ACEOF
14681 cat confdefs.h >>conftest.$ac_ext
14682 cat >>conftest.$ac_ext <<_ACEOF
14683 /* end confdefs.h.  */
14684 #include <krb5.h>
14685
14686 int
14687 main ()
14688 {
14689 static krb5_ticket ac_aggr;
14690 if (sizeof ac_aggr.enc_part2)
14691 return 0;
14692   ;
14693   return 0;
14694 }
14695 _ACEOF
14696 rm -f conftest.$ac_objext
14697 if { (ac_try="$ac_compile"
14698 case "(($ac_try" in
14699   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14700   *) ac_try_echo=$ac_try;;
14701 esac
14702 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14703   (eval "$ac_compile") 2>conftest.er1
14704   ac_status=$?
14705   grep -v '^ *+' conftest.er1 >conftest.err
14706   rm -f conftest.er1
14707   cat conftest.err >&5
14708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14709   (exit $ac_status); } && {
14710          test -z "$ac_c_werror_flag" ||
14711          test ! -s conftest.err
14712        } && test -s conftest.$ac_objext; then
14713   ac_cv_member_krb5_ticket_enc_part2=yes
14714 else
14715   echo "$as_me: failed program was:" >&5
14716 sed 's/^/| /' conftest.$ac_ext >&5
14717
14718         ac_cv_member_krb5_ticket_enc_part2=no
14719 fi
14720
14721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14722 fi
14723
14724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14725 fi
14726 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
14727 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6; }
14728 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
14729
14730 cat >>confdefs.h <<_ACEOF
14731 #define HAVE_KRB5_TICKET_ENC_PART2 1
14732 _ACEOF
14733
14734
14735 else
14736   { echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
14737 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6; }
14738 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
14739   echo $ECHO_N "(cached) $ECHO_C" >&6
14740 else
14741   cat >conftest.$ac_ext <<_ACEOF
14742 /* confdefs.h.  */
14743 _ACEOF
14744 cat confdefs.h >>conftest.$ac_ext
14745 cat >>conftest.$ac_ext <<_ACEOF
14746 /* end confdefs.h.  */
14747 #include <krb5.h>
14748
14749 int
14750 main ()
14751 {
14752 static krb5_ticket ac_aggr;
14753 if (ac_aggr.client)
14754 return 0;
14755   ;
14756   return 0;
14757 }
14758 _ACEOF
14759 rm -f conftest.$ac_objext
14760 if { (ac_try="$ac_compile"
14761 case "(($ac_try" in
14762   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14763   *) ac_try_echo=$ac_try;;
14764 esac
14765 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14766   (eval "$ac_compile") 2>conftest.er1
14767   ac_status=$?
14768   grep -v '^ *+' conftest.er1 >conftest.err
14769   rm -f conftest.er1
14770   cat conftest.err >&5
14771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14772   (exit $ac_status); } && {
14773          test -z "$ac_c_werror_flag" ||
14774          test ! -s conftest.err
14775        } && test -s conftest.$ac_objext; then
14776   ac_cv_member_krb5_ticket_client=yes
14777 else
14778   echo "$as_me: failed program was:" >&5
14779 sed 's/^/| /' conftest.$ac_ext >&5
14780
14781         cat >conftest.$ac_ext <<_ACEOF
14782 /* confdefs.h.  */
14783 _ACEOF
14784 cat confdefs.h >>conftest.$ac_ext
14785 cat >>conftest.$ac_ext <<_ACEOF
14786 /* end confdefs.h.  */
14787 #include <krb5.h>
14788
14789 int
14790 main ()
14791 {
14792 static krb5_ticket ac_aggr;
14793 if (sizeof ac_aggr.client)
14794 return 0;
14795   ;
14796   return 0;
14797 }
14798 _ACEOF
14799 rm -f conftest.$ac_objext
14800 if { (ac_try="$ac_compile"
14801 case "(($ac_try" in
14802   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14803   *) ac_try_echo=$ac_try;;
14804 esac
14805 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14806   (eval "$ac_compile") 2>conftest.er1
14807   ac_status=$?
14808   grep -v '^ *+' conftest.er1 >conftest.err
14809   rm -f conftest.er1
14810   cat conftest.err >&5
14811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14812   (exit $ac_status); } && {
14813          test -z "$ac_c_werror_flag" ||
14814          test ! -s conftest.err
14815        } && test -s conftest.$ac_objext; then
14816   ac_cv_member_krb5_ticket_client=yes
14817 else
14818   echo "$as_me: failed program was:" >&5
14819 sed 's/^/| /' conftest.$ac_ext >&5
14820
14821         ac_cv_member_krb5_ticket_client=no
14822 fi
14823
14824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14825 fi
14826
14827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14828 fi
14829 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
14830 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6; }
14831 if test $ac_cv_member_krb5_ticket_client = yes; then
14832
14833 cat >>confdefs.h <<_ACEOF
14834 #define HAVE_KRB5_TICKET_CLIENT 1
14835 _ACEOF
14836
14837
14838 else
14839   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
14840 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
14841    { (exit 1); exit 1; }; }
14842 fi
14843
14844 fi
14845
14846   { echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
14847 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6; }
14848 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
14849   echo $ECHO_N "(cached) $ECHO_C" >&6
14850 else
14851   cat >conftest.$ac_ext <<_ACEOF
14852 /* confdefs.h.  */
14853 _ACEOF
14854 cat confdefs.h >>conftest.$ac_ext
14855 cat >>conftest.$ac_ext <<_ACEOF
14856 /* end confdefs.h.  */
14857 #include <krb5.h>
14858
14859 int
14860 main ()
14861 {
14862 static krb5_error ac_aggr;
14863 if (ac_aggr.text.data)
14864 return 0;
14865   ;
14866   return 0;
14867 }
14868 _ACEOF
14869 rm -f conftest.$ac_objext
14870 if { (ac_try="$ac_compile"
14871 case "(($ac_try" in
14872   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14873   *) ac_try_echo=$ac_try;;
14874 esac
14875 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14876   (eval "$ac_compile") 2>conftest.er1
14877   ac_status=$?
14878   grep -v '^ *+' conftest.er1 >conftest.err
14879   rm -f conftest.er1
14880   cat conftest.err >&5
14881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14882   (exit $ac_status); } && {
14883          test -z "$ac_c_werror_flag" ||
14884          test ! -s conftest.err
14885        } && test -s conftest.$ac_objext; then
14886   ac_cv_member_krb5_error_text_data=yes
14887 else
14888   echo "$as_me: failed program was:" >&5
14889 sed 's/^/| /' conftest.$ac_ext >&5
14890
14891         cat >conftest.$ac_ext <<_ACEOF
14892 /* confdefs.h.  */
14893 _ACEOF
14894 cat confdefs.h >>conftest.$ac_ext
14895 cat >>conftest.$ac_ext <<_ACEOF
14896 /* end confdefs.h.  */
14897 #include <krb5.h>
14898
14899 int
14900 main ()
14901 {
14902 static krb5_error ac_aggr;
14903 if (sizeof ac_aggr.text.data)
14904 return 0;
14905   ;
14906   return 0;
14907 }
14908 _ACEOF
14909 rm -f conftest.$ac_objext
14910 if { (ac_try="$ac_compile"
14911 case "(($ac_try" in
14912   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14913   *) ac_try_echo=$ac_try;;
14914 esac
14915 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14916   (eval "$ac_compile") 2>conftest.er1
14917   ac_status=$?
14918   grep -v '^ *+' conftest.er1 >conftest.err
14919   rm -f conftest.er1
14920   cat conftest.err >&5
14921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14922   (exit $ac_status); } && {
14923          test -z "$ac_c_werror_flag" ||
14924          test ! -s conftest.err
14925        } && test -s conftest.$ac_objext; then
14926   ac_cv_member_krb5_error_text_data=yes
14927 else
14928   echo "$as_me: failed program was:" >&5
14929 sed 's/^/| /' conftest.$ac_ext >&5
14930
14931         ac_cv_member_krb5_error_text_data=no
14932 fi
14933
14934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14935 fi
14936
14937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14938 fi
14939 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
14940 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6; }
14941 if test $ac_cv_member_krb5_error_text_data = yes; then
14942
14943 cat >>confdefs.h <<_ACEOF
14944 #define HAVE_KRB5_ERROR_TEXT_DATA 1
14945 _ACEOF
14946
14947
14948 else
14949   { echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
14950 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6; }
14951 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
14952   echo $ECHO_N "(cached) $ECHO_C" >&6
14953 else
14954   cat >conftest.$ac_ext <<_ACEOF
14955 /* confdefs.h.  */
14956 _ACEOF
14957 cat confdefs.h >>conftest.$ac_ext
14958 cat >>conftest.$ac_ext <<_ACEOF
14959 /* end confdefs.h.  */
14960 #include <krb5.h>
14961
14962 int
14963 main ()
14964 {
14965 static krb5_error ac_aggr;
14966 if (ac_aggr.e_data)
14967 return 0;
14968   ;
14969   return 0;
14970 }
14971 _ACEOF
14972 rm -f conftest.$ac_objext
14973 if { (ac_try="$ac_compile"
14974 case "(($ac_try" in
14975   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14976   *) ac_try_echo=$ac_try;;
14977 esac
14978 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14979   (eval "$ac_compile") 2>conftest.er1
14980   ac_status=$?
14981   grep -v '^ *+' conftest.er1 >conftest.err
14982   rm -f conftest.er1
14983   cat conftest.err >&5
14984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14985   (exit $ac_status); } && {
14986          test -z "$ac_c_werror_flag" ||
14987          test ! -s conftest.err
14988        } && test -s conftest.$ac_objext; then
14989   ac_cv_member_krb5_error_e_data=yes
14990 else
14991   echo "$as_me: failed program was:" >&5
14992 sed 's/^/| /' conftest.$ac_ext >&5
14993
14994         cat >conftest.$ac_ext <<_ACEOF
14995 /* confdefs.h.  */
14996 _ACEOF
14997 cat confdefs.h >>conftest.$ac_ext
14998 cat >>conftest.$ac_ext <<_ACEOF
14999 /* end confdefs.h.  */
15000 #include <krb5.h>
15001
15002 int
15003 main ()
15004 {
15005 static krb5_error ac_aggr;
15006 if (sizeof ac_aggr.e_data)
15007 return 0;
15008   ;
15009   return 0;
15010 }
15011 _ACEOF
15012 rm -f conftest.$ac_objext
15013 if { (ac_try="$ac_compile"
15014 case "(($ac_try" in
15015   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15016   *) ac_try_echo=$ac_try;;
15017 esac
15018 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15019   (eval "$ac_compile") 2>conftest.er1
15020   ac_status=$?
15021   grep -v '^ *+' conftest.er1 >conftest.err
15022   rm -f conftest.er1
15023   cat conftest.err >&5
15024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15025   (exit $ac_status); } && {
15026          test -z "$ac_c_werror_flag" ||
15027          test ! -s conftest.err
15028        } && test -s conftest.$ac_objext; then
15029   ac_cv_member_krb5_error_e_data=yes
15030 else
15031   echo "$as_me: failed program was:" >&5
15032 sed 's/^/| /' conftest.$ac_ext >&5
15033
15034         ac_cv_member_krb5_error_e_data=no
15035 fi
15036
15037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15038 fi
15039
15040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15041 fi
15042 { echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
15043 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6; }
15044 if test $ac_cv_member_krb5_error_e_data = yes; then
15045
15046 cat >>confdefs.h <<_ACEOF
15047 #define HAVE_KRB5_ERROR_E_DATA 1
15048 _ACEOF
15049
15050
15051 else
15052   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
15053 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
15054    { (exit 1); exit 1; }; }
15055 fi
15056
15057 fi
15058
15059
15060 # Win32 requires headers to be loaded for __stdcall, so can't use
15061 # AC_CHECK_FUNCS here.
15062   { echo "$as_me:$LINENO: checking for krb5_free_unparsed_name" >&5
15063 echo $ECHO_N "checking for krb5_free_unparsed_name... $ECHO_C" >&6; }
15064   cat >conftest.$ac_ext <<_ACEOF
15065 /* confdefs.h.  */
15066 _ACEOF
15067 cat confdefs.h >>conftest.$ac_ext
15068 cat >>conftest.$ac_ext <<_ACEOF
15069 /* end confdefs.h.  */
15070 #include <krb5.h>
15071 int
15072 main ()
15073 {
15074 krb5_free_unparsed_name(NULL,NULL);
15075   ;
15076   return 0;
15077 }
15078 _ACEOF
15079 rm -f conftest.$ac_objext conftest$ac_exeext
15080 if { (ac_try="$ac_link"
15081 case "(($ac_try" in
15082   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15083   *) ac_try_echo=$ac_try;;
15084 esac
15085 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15086   (eval "$ac_link") 2>conftest.er1
15087   ac_status=$?
15088   grep -v '^ *+' conftest.er1 >conftest.err
15089   rm -f conftest.er1
15090   cat conftest.err >&5
15091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15092   (exit $ac_status); } && {
15093          test -z "$ac_c_werror_flag" ||
15094          test ! -s conftest.err
15095        } && test -s conftest$ac_exeext &&
15096        $as_test_x conftest$ac_exeext; then
15097
15098 cat >>confdefs.h <<\_ACEOF
15099 #define HAVE_KRB5_FREE_UNPARSED_NAME 1
15100 _ACEOF
15101
15102 { echo "$as_me:$LINENO: result: yes" >&5
15103 echo "${ECHO_T}yes" >&6; }
15104 else
15105   echo "$as_me: failed program was:" >&5
15106 sed 's/^/| /' conftest.$ac_ext >&5
15107
15108         { echo "$as_me:$LINENO: result: no" >&5
15109 echo "${ECHO_T}no" >&6; }
15110 fi
15111
15112 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15113       conftest$ac_exeext conftest.$ac_ext
15114 fi
15115
15116
15117 ##
15118 ## Functions, global variables
15119 ##
15120
15121 { echo "$as_me:$LINENO: checking for int timezone" >&5
15122 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6; }
15123 if test "${pgac_cv_var_int_timezone+set}" = set; then
15124   echo $ECHO_N "(cached) $ECHO_C" >&6
15125 else
15126   cat >conftest.$ac_ext <<_ACEOF
15127 /* confdefs.h.  */
15128 _ACEOF
15129 cat confdefs.h >>conftest.$ac_ext
15130 cat >>conftest.$ac_ext <<_ACEOF
15131 /* end confdefs.h.  */
15132 #include <time.h>
15133 int res;
15134 int
15135 main ()
15136 {
15137 #ifndef __CYGWIN__
15138 res = timezone / 60;
15139 #else
15140 res = _timezone / 60;
15141 #endif
15142   ;
15143   return 0;
15144 }
15145 _ACEOF
15146 rm -f conftest.$ac_objext conftest$ac_exeext
15147 if { (ac_try="$ac_link"
15148 case "(($ac_try" in
15149   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15150   *) ac_try_echo=$ac_try;;
15151 esac
15152 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15153   (eval "$ac_link") 2>conftest.er1
15154   ac_status=$?
15155   grep -v '^ *+' conftest.er1 >conftest.err
15156   rm -f conftest.er1
15157   cat conftest.err >&5
15158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15159   (exit $ac_status); } && {
15160          test -z "$ac_c_werror_flag" ||
15161          test ! -s conftest.err
15162        } && test -s conftest$ac_exeext &&
15163        $as_test_x conftest$ac_exeext; then
15164   pgac_cv_var_int_timezone=yes
15165 else
15166   echo "$as_me: failed program was:" >&5
15167 sed 's/^/| /' conftest.$ac_ext >&5
15168
15169         pgac_cv_var_int_timezone=no
15170 fi
15171
15172 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15173       conftest$ac_exeext conftest.$ac_ext
15174 fi
15175 { echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
15176 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6; }
15177 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15178
15179 cat >>confdefs.h <<\_ACEOF
15180 #define HAVE_INT_TIMEZONE
15181 _ACEOF
15182
15183 fi
15184 { echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
15185 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6; }
15186  if test "${ac_cv_func_accept_return+set}" = set; then
15187   echo $ECHO_N "(cached) $ECHO_C" >&6
15188 else
15189    if test "${ac_cv_func_accept_arg1+set}" = set; then
15190   echo $ECHO_N "(cached) $ECHO_C" >&6
15191 else
15192     if test "${ac_cv_func_accept_arg2+set}" = set; then
15193   echo $ECHO_N "(cached) $ECHO_C" >&6
15194 else
15195      if test "${ac_cv_func_accept_arg3+set}" = set; then
15196   echo $ECHO_N "(cached) $ECHO_C" >&6
15197 else
15198       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
15199       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
15200        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15201         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15202          cat >conftest.$ac_ext <<_ACEOF
15203 /* confdefs.h.  */
15204 _ACEOF
15205 cat confdefs.h >>conftest.$ac_ext
15206 cat >>conftest.$ac_ext <<_ACEOF
15207 /* end confdefs.h.  */
15208 #ifdef HAVE_SYS_TYPES_H
15209 #include <sys/types.h>
15210 #endif
15211 #ifdef HAVE_SYS_SOCKET_H
15212 #include <sys/socket.h>
15213 #endif
15214 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15215 int
15216 main ()
15217 {
15218
15219   ;
15220   return 0;
15221 }
15222 _ACEOF
15223 rm -f conftest.$ac_objext
15224 if { (ac_try="$ac_compile"
15225 case "(($ac_try" in
15226   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15227   *) ac_try_echo=$ac_try;;
15228 esac
15229 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15230   (eval "$ac_compile") 2>conftest.er1
15231   ac_status=$?
15232   grep -v '^ *+' conftest.er1 >conftest.err
15233   rm -f conftest.er1
15234   cat conftest.err >&5
15235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15236   (exit $ac_status); } && {
15237          test -z "$ac_c_werror_flag" ||
15238          test ! -s conftest.err
15239        } && test -s conftest.$ac_objext; then
15240   ac_not_found=no; break 4
15241 else
15242   echo "$as_me: failed program was:" >&5
15243 sed 's/^/| /' conftest.$ac_ext >&5
15244
15245         ac_not_found=yes
15246 fi
15247
15248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15249        done
15250       done
15251      done
15252     done
15253     if test "$ac_not_found" = yes; then
15254       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
15255 echo "$as_me: error: could not determine argument types" >&2;}
15256    { (exit 1); exit 1; }; }
15257     fi
15258     if test "$ac_cv_func_accept_arg3" = "void"; then
15259       ac_cv_func_accept_arg3=int
15260     fi
15261
15262 fi
15263
15264 fi
15265
15266 fi
15267
15268 fi
15269  { 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
15270 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15271
15272 cat >>confdefs.h <<_ACEOF
15273 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15274 _ACEOF
15275
15276
15277 cat >>confdefs.h <<_ACEOF
15278 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15279 _ACEOF
15280
15281
15282 cat >>confdefs.h <<_ACEOF
15283 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15284 _ACEOF
15285
15286
15287 cat >>confdefs.h <<_ACEOF
15288 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15289 _ACEOF
15290
15291
15292 { echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
15293 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6; }
15294 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
15295   echo $ECHO_N "(cached) $ECHO_C" >&6
15296 else
15297   cat >conftest.$ac_ext <<_ACEOF
15298 /* confdefs.h.  */
15299 _ACEOF
15300 cat confdefs.h >>conftest.$ac_ext
15301 cat >>conftest.$ac_ext <<_ACEOF
15302 /* end confdefs.h.  */
15303 #include <sys/time.h>
15304 int
15305 main ()
15306 {
15307 struct timeval *tp;
15308 struct timezone *tzp;
15309 gettimeofday(tp,tzp);
15310   ;
15311   return 0;
15312 }
15313 _ACEOF
15314 rm -f conftest.$ac_objext
15315 if { (ac_try="$ac_compile"
15316 case "(($ac_try" in
15317   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15318   *) ac_try_echo=$ac_try;;
15319 esac
15320 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15321   (eval "$ac_compile") 2>conftest.er1
15322   ac_status=$?
15323   grep -v '^ *+' conftest.er1 >conftest.err
15324   rm -f conftest.er1
15325   cat conftest.err >&5
15326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15327   (exit $ac_status); } && {
15328          test -z "$ac_c_werror_flag" ||
15329          test ! -s conftest.err
15330        } && test -s conftest.$ac_objext; then
15331   pgac_cv_func_gettimeofday_1arg=no
15332 else
15333   echo "$as_me: failed program was:" >&5
15334 sed 's/^/| /' conftest.$ac_ext >&5
15335
15336         pgac_cv_func_gettimeofday_1arg=yes
15337 fi
15338
15339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15340 fi
15341 { echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
15342 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6; }
15343 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15344
15345 cat >>confdefs.h <<\_ACEOF
15346 #define GETTIMEOFDAY_1ARG
15347 _ACEOF
15348
15349 fi
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373 for ac_func in cbrt dlopen fcvt fdatasync getpeereid getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
15374 do
15375 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15376 { echo "$as_me:$LINENO: checking for $ac_func" >&5
15377 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15378 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15379   echo $ECHO_N "(cached) $ECHO_C" >&6
15380 else
15381   cat >conftest.$ac_ext <<_ACEOF
15382 /* confdefs.h.  */
15383 _ACEOF
15384 cat confdefs.h >>conftest.$ac_ext
15385 cat >>conftest.$ac_ext <<_ACEOF
15386 /* end confdefs.h.  */
15387 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15388    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15389 #define $ac_func innocuous_$ac_func
15390
15391 /* System header to define __stub macros and hopefully few prototypes,
15392     which can conflict with char $ac_func (); below.
15393     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15394     <limits.h> exists even on freestanding compilers.  */
15395
15396 #ifdef __STDC__
15397 # include <limits.h>
15398 #else
15399 # include <assert.h>
15400 #endif
15401
15402 #undef $ac_func
15403
15404 /* Override any GCC internal prototype to avoid an error.
15405    Use char because int might match the return type of a GCC
15406    builtin and then its argument prototype would still apply.  */
15407 #ifdef __cplusplus
15408 extern "C"
15409 #endif
15410 char $ac_func ();
15411 /* The GNU C library defines this for functions which it implements
15412     to always fail with ENOSYS.  Some functions are actually named
15413     something starting with __ and the normal name is an alias.  */
15414 #if defined __stub_$ac_func || defined __stub___$ac_func
15415 choke me
15416 #endif
15417
15418 int
15419 main ()
15420 {
15421 return $ac_func ();
15422   ;
15423   return 0;
15424 }
15425 _ACEOF
15426 rm -f conftest.$ac_objext conftest$ac_exeext
15427 if { (ac_try="$ac_link"
15428 case "(($ac_try" in
15429   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15430   *) ac_try_echo=$ac_try;;
15431 esac
15432 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15433   (eval "$ac_link") 2>conftest.er1
15434   ac_status=$?
15435   grep -v '^ *+' conftest.er1 >conftest.err
15436   rm -f conftest.er1
15437   cat conftest.err >&5
15438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15439   (exit $ac_status); } && {
15440          test -z "$ac_c_werror_flag" ||
15441          test ! -s conftest.err
15442        } && test -s conftest$ac_exeext &&
15443        $as_test_x conftest$ac_exeext; then
15444   eval "$as_ac_var=yes"
15445 else
15446   echo "$as_me: failed program was:" >&5
15447 sed 's/^/| /' conftest.$ac_ext >&5
15448
15449         eval "$as_ac_var=no"
15450 fi
15451
15452 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15453       conftest$ac_exeext conftest.$ac_ext
15454 fi
15455 ac_res=`eval echo '${'$as_ac_var'}'`
15456                { echo "$as_me:$LINENO: result: $ac_res" >&5
15457 echo "${ECHO_T}$ac_res" >&6; }
15458 if test `eval echo '${'$as_ac_var'}'` = yes; then
15459   cat >>confdefs.h <<_ACEOF
15460 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15461 _ACEOF
15462
15463 fi
15464 done
15465
15466
15467 { echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
15468 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6; }
15469 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
15470   echo $ECHO_N "(cached) $ECHO_C" >&6
15471 else
15472   cat >conftest.$ac_ext <<_ACEOF
15473 /* confdefs.h.  */
15474 _ACEOF
15475 cat confdefs.h >>conftest.$ac_ext
15476 cat >>conftest.$ac_ext <<_ACEOF
15477 /* end confdefs.h.  */
15478 #include <unistd.h>
15479
15480 int
15481 main ()
15482 {
15483 #ifndef fdatasync
15484   (void) fdatasync;
15485 #endif
15486
15487   ;
15488   return 0;
15489 }
15490 _ACEOF
15491 rm -f conftest.$ac_objext
15492 if { (ac_try="$ac_compile"
15493 case "(($ac_try" in
15494   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15495   *) ac_try_echo=$ac_try;;
15496 esac
15497 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15498   (eval "$ac_compile") 2>conftest.er1
15499   ac_status=$?
15500   grep -v '^ *+' conftest.er1 >conftest.err
15501   rm -f conftest.er1
15502   cat conftest.err >&5
15503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15504   (exit $ac_status); } && {
15505          test -z "$ac_c_werror_flag" ||
15506          test ! -s conftest.err
15507        } && test -s conftest.$ac_objext; then
15508   ac_cv_have_decl_fdatasync=yes
15509 else
15510   echo "$as_me: failed program was:" >&5
15511 sed 's/^/| /' conftest.$ac_ext >&5
15512
15513         ac_cv_have_decl_fdatasync=no
15514 fi
15515
15516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15517 fi
15518 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
15519 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6; }
15520 if test $ac_cv_have_decl_fdatasync = yes; then
15521
15522 cat >>confdefs.h <<_ACEOF
15523 #define HAVE_DECL_FDATASYNC 1
15524 _ACEOF
15525
15526
15527 else
15528   cat >>confdefs.h <<_ACEOF
15529 #define HAVE_DECL_FDATASYNC 0
15530 _ACEOF
15531
15532
15533 fi
15534
15535
15536 { echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
15537 echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6; }
15538 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
15539   echo $ECHO_N "(cached) $ECHO_C" >&6
15540 else
15541   cat >conftest.$ac_ext <<_ACEOF
15542 /* confdefs.h.  */
15543 _ACEOF
15544 cat confdefs.h >>conftest.$ac_ext
15545 cat >>conftest.$ac_ext <<_ACEOF
15546 /* end confdefs.h.  */
15547 #include <fcntl.h>
15548
15549 int
15550 main ()
15551 {
15552 #ifndef posix_fadvise
15553   (void) posix_fadvise;
15554 #endif
15555
15556   ;
15557   return 0;
15558 }
15559 _ACEOF
15560 rm -f conftest.$ac_objext
15561 if { (ac_try="$ac_compile"
15562 case "(($ac_try" in
15563   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15564   *) ac_try_echo=$ac_try;;
15565 esac
15566 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15567   (eval "$ac_compile") 2>conftest.er1
15568   ac_status=$?
15569   grep -v '^ *+' conftest.er1 >conftest.err
15570   rm -f conftest.er1
15571   cat conftest.err >&5
15572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15573   (exit $ac_status); } && {
15574          test -z "$ac_c_werror_flag" ||
15575          test ! -s conftest.err
15576        } && test -s conftest.$ac_objext; then
15577   ac_cv_have_decl_posix_fadvise=yes
15578 else
15579   echo "$as_me: failed program was:" >&5
15580 sed 's/^/| /' conftest.$ac_ext >&5
15581
15582         ac_cv_have_decl_posix_fadvise=no
15583 fi
15584
15585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15586 fi
15587 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
15588 echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6; }
15589 if test $ac_cv_have_decl_posix_fadvise = yes; then
15590
15591 cat >>confdefs.h <<_ACEOF
15592 #define HAVE_DECL_POSIX_FADVISE 1
15593 _ACEOF
15594
15595
15596 else
15597   cat >>confdefs.h <<_ACEOF
15598 #define HAVE_DECL_POSIX_FADVISE 0
15599 _ACEOF
15600
15601
15602 fi
15603
15604
15605 { echo "$as_me:$LINENO: checking whether strlcat is declared" >&5
15606 echo $ECHO_N "checking whether strlcat is declared... $ECHO_C" >&6; }
15607 if test "${ac_cv_have_decl_strlcat+set}" = set; then
15608   echo $ECHO_N "(cached) $ECHO_C" >&6
15609 else
15610   cat >conftest.$ac_ext <<_ACEOF
15611 /* confdefs.h.  */
15612 _ACEOF
15613 cat confdefs.h >>conftest.$ac_ext
15614 cat >>conftest.$ac_ext <<_ACEOF
15615 /* end confdefs.h.  */
15616 $ac_includes_default
15617 int
15618 main ()
15619 {
15620 #ifndef strlcat
15621   (void) strlcat;
15622 #endif
15623
15624   ;
15625   return 0;
15626 }
15627 _ACEOF
15628 rm -f conftest.$ac_objext
15629 if { (ac_try="$ac_compile"
15630 case "(($ac_try" in
15631   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15632   *) ac_try_echo=$ac_try;;
15633 esac
15634 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15635   (eval "$ac_compile") 2>conftest.er1
15636   ac_status=$?
15637   grep -v '^ *+' conftest.er1 >conftest.err
15638   rm -f conftest.er1
15639   cat conftest.err >&5
15640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15641   (exit $ac_status); } && {
15642          test -z "$ac_c_werror_flag" ||
15643          test ! -s conftest.err
15644        } && test -s conftest.$ac_objext; then
15645   ac_cv_have_decl_strlcat=yes
15646 else
15647   echo "$as_me: failed program was:" >&5
15648 sed 's/^/| /' conftest.$ac_ext >&5
15649
15650         ac_cv_have_decl_strlcat=no
15651 fi
15652
15653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15654 fi
15655 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcat" >&5
15656 echo "${ECHO_T}$ac_cv_have_decl_strlcat" >&6; }
15657 if test $ac_cv_have_decl_strlcat = yes; then
15658
15659 cat >>confdefs.h <<_ACEOF
15660 #define HAVE_DECL_STRLCAT 1
15661 _ACEOF
15662
15663
15664 else
15665   cat >>confdefs.h <<_ACEOF
15666 #define HAVE_DECL_STRLCAT 0
15667 _ACEOF
15668
15669
15670 fi
15671 { echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
15672 echo $ECHO_N "checking whether strlcpy is declared... $ECHO_C" >&6; }
15673 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
15674   echo $ECHO_N "(cached) $ECHO_C" >&6
15675 else
15676   cat >conftest.$ac_ext <<_ACEOF
15677 /* confdefs.h.  */
15678 _ACEOF
15679 cat confdefs.h >>conftest.$ac_ext
15680 cat >>conftest.$ac_ext <<_ACEOF
15681 /* end confdefs.h.  */
15682 $ac_includes_default
15683 int
15684 main ()
15685 {
15686 #ifndef strlcpy
15687   (void) strlcpy;
15688 #endif
15689
15690   ;
15691   return 0;
15692 }
15693 _ACEOF
15694 rm -f conftest.$ac_objext
15695 if { (ac_try="$ac_compile"
15696 case "(($ac_try" in
15697   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15698   *) ac_try_echo=$ac_try;;
15699 esac
15700 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15701   (eval "$ac_compile") 2>conftest.er1
15702   ac_status=$?
15703   grep -v '^ *+' conftest.er1 >conftest.err
15704   rm -f conftest.er1
15705   cat conftest.err >&5
15706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15707   (exit $ac_status); } && {
15708          test -z "$ac_c_werror_flag" ||
15709          test ! -s conftest.err
15710        } && test -s conftest.$ac_objext; then
15711   ac_cv_have_decl_strlcpy=yes
15712 else
15713   echo "$as_me: failed program was:" >&5
15714 sed 's/^/| /' conftest.$ac_ext >&5
15715
15716         ac_cv_have_decl_strlcpy=no
15717 fi
15718
15719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15720 fi
15721 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
15722 echo "${ECHO_T}$ac_cv_have_decl_strlcpy" >&6; }
15723 if test $ac_cv_have_decl_strlcpy = yes; then
15724
15725 cat >>confdefs.h <<_ACEOF
15726 #define HAVE_DECL_STRLCPY 1
15727 _ACEOF
15728
15729
15730 else
15731   cat >>confdefs.h <<_ACEOF
15732 #define HAVE_DECL_STRLCPY 0
15733 _ACEOF
15734
15735
15736 fi
15737
15738
15739 # This is probably only present on Darwin, but may as well check always
15740 { echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
15741 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6; }
15742 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
15743   echo $ECHO_N "(cached) $ECHO_C" >&6
15744 else
15745   cat >conftest.$ac_ext <<_ACEOF
15746 /* confdefs.h.  */
15747 _ACEOF
15748 cat confdefs.h >>conftest.$ac_ext
15749 cat >>conftest.$ac_ext <<_ACEOF
15750 /* end confdefs.h.  */
15751 #include <fcntl.h>
15752
15753 int
15754 main ()
15755 {
15756 #ifndef F_FULLFSYNC
15757   (void) F_FULLFSYNC;
15758 #endif
15759
15760   ;
15761   return 0;
15762 }
15763 _ACEOF
15764 rm -f conftest.$ac_objext
15765 if { (ac_try="$ac_compile"
15766 case "(($ac_try" in
15767   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15768   *) ac_try_echo=$ac_try;;
15769 esac
15770 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15771   (eval "$ac_compile") 2>conftest.er1
15772   ac_status=$?
15773   grep -v '^ *+' conftest.er1 >conftest.err
15774   rm -f conftest.er1
15775   cat conftest.err >&5
15776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15777   (exit $ac_status); } && {
15778          test -z "$ac_c_werror_flag" ||
15779          test ! -s conftest.err
15780        } && test -s conftest.$ac_objext; then
15781   ac_cv_have_decl_F_FULLFSYNC=yes
15782 else
15783   echo "$as_me: failed program was:" >&5
15784 sed 's/^/| /' conftest.$ac_ext >&5
15785
15786         ac_cv_have_decl_F_FULLFSYNC=no
15787 fi
15788
15789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15790 fi
15791 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
15792 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6; }
15793 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
15794
15795 cat >>confdefs.h <<_ACEOF
15796 #define HAVE_DECL_F_FULLFSYNC 1
15797 _ACEOF
15798
15799
15800 else
15801   cat >>confdefs.h <<_ACEOF
15802 #define HAVE_DECL_F_FULLFSYNC 0
15803 _ACEOF
15804
15805
15806 fi
15807
15808
15809
15810 HAVE_IPV6=no
15811 { echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
15812 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6; }
15813 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
15814   echo $ECHO_N "(cached) $ECHO_C" >&6
15815 else
15816   cat >conftest.$ac_ext <<_ACEOF
15817 /* confdefs.h.  */
15818 _ACEOF
15819 cat confdefs.h >>conftest.$ac_ext
15820 cat >>conftest.$ac_ext <<_ACEOF
15821 /* end confdefs.h.  */
15822 $ac_includes_default
15823 #include <netinet/in.h>
15824
15825 typedef struct sockaddr_in6 ac__type_new_;
15826 int
15827 main ()
15828 {
15829 if ((ac__type_new_ *) 0)
15830   return 0;
15831 if (sizeof (ac__type_new_))
15832   return 0;
15833   ;
15834   return 0;
15835 }
15836 _ACEOF
15837 rm -f conftest.$ac_objext
15838 if { (ac_try="$ac_compile"
15839 case "(($ac_try" in
15840   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15841   *) ac_try_echo=$ac_try;;
15842 esac
15843 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15844   (eval "$ac_compile") 2>conftest.er1
15845   ac_status=$?
15846   grep -v '^ *+' conftest.er1 >conftest.err
15847   rm -f conftest.er1
15848   cat conftest.err >&5
15849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15850   (exit $ac_status); } && {
15851          test -z "$ac_c_werror_flag" ||
15852          test ! -s conftest.err
15853        } && test -s conftest.$ac_objext; then
15854   ac_cv_type_struct_sockaddr_in6=yes
15855 else
15856   echo "$as_me: failed program was:" >&5
15857 sed 's/^/| /' conftest.$ac_ext >&5
15858
15859         ac_cv_type_struct_sockaddr_in6=no
15860 fi
15861
15862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15863 fi
15864 { echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
15865 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6; }
15866 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
15867
15868 cat >>confdefs.h <<\_ACEOF
15869 #define HAVE_IPV6 1
15870 _ACEOF
15871
15872          HAVE_IPV6=yes
15873 fi
15874
15875
15876
15877 { echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
15878 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6; }
15879 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
15880   echo $ECHO_N "(cached) $ECHO_C" >&6
15881 else
15882   cat >conftest.$ac_ext <<_ACEOF
15883 /* confdefs.h.  */
15884 _ACEOF
15885 cat confdefs.h >>conftest.$ac_ext
15886 cat >>conftest.$ac_ext <<_ACEOF
15887 /* end confdefs.h.  */
15888 #include <machine/vmparam.h>
15889 #include <sys/exec.h>
15890
15891 int
15892 main ()
15893 {
15894 PS_STRINGS->ps_nargvstr = 1;
15895 PS_STRINGS->ps_argvstr = "foo";
15896   ;
15897   return 0;
15898 }
15899 _ACEOF
15900 rm -f conftest.$ac_objext conftest$ac_exeext
15901 if { (ac_try="$ac_link"
15902 case "(($ac_try" in
15903   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15904   *) ac_try_echo=$ac_try;;
15905 esac
15906 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15907   (eval "$ac_link") 2>conftest.er1
15908   ac_status=$?
15909   grep -v '^ *+' conftest.er1 >conftest.err
15910   rm -f conftest.er1
15911   cat conftest.err >&5
15912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15913   (exit $ac_status); } && {
15914          test -z "$ac_c_werror_flag" ||
15915          test ! -s conftest.err
15916        } && test -s conftest$ac_exeext &&
15917        $as_test_x conftest$ac_exeext; then
15918   pgac_cv_var_PS_STRINGS=yes
15919 else
15920   echo "$as_me: failed program was:" >&5
15921 sed 's/^/| /' conftest.$ac_ext >&5
15922
15923         pgac_cv_var_PS_STRINGS=no
15924 fi
15925
15926 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15927       conftest$ac_exeext conftest.$ac_ext
15928 fi
15929 { echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
15930 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6; }
15931 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15932
15933 cat >>confdefs.h <<\_ACEOF
15934 #define HAVE_PS_STRINGS
15935 _ACEOF
15936
15937 fi
15938
15939
15940 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
15941 # is missing.  Yes, there are machines that have only one.  We may
15942 # also decide to use snprintf.c if snprintf() is present but does not
15943 # have all the features we need --- see below.
15944
15945 if test "$PORTNAME" = "win32"; then
15946   # Win32 gets snprintf.c built unconditionally.
15947   #
15948   # To properly translate all NLS languages strings, we must support the
15949   # *printf() %$ format, which allows *printf() arguments to be selected
15950   # by position in the translated string.
15951   #
15952   # libintl versions < 0.13 use the native *printf() functions, and Win32
15953   # *printf() doesn't understand %$, so we must use our /port versions,
15954   # which do understand %$. libintl versions >= 0.13 include their own
15955   # *printf versions on Win32.  The libintl 0.13 release note text is:
15956   #
15957   #   C format strings with positions, as they arise when a translator
15958   #   needs to reorder a sentence, are now supported on all platforms.
15959   #   On those few platforms (NetBSD and Woe32) for which the native
15960   #   printf()/fprintf()/... functions don't support such format
15961   #   strings, replacements are provided through <libintl.h>.
15962   #
15963   # We could use libintl >= 0.13's *printf() if we were sure that we had
15964   # a litint >= 0.13 at runtime, but seeing that there is no clean way
15965   # to guarantee that, it is best to just use our own, so we are sure to
15966   # get %$ support. In include/port.h we disable the *printf() macros
15967   # that might have been defined by libintl.
15968   #
15969   # We do this unconditionally whether NLS is used or not so we are sure
15970   # that all Win32 libraries and binaries behave the same.
15971   pgac_need_repl_snprintf=yes
15972 else
15973   pgac_need_repl_snprintf=no
15974
15975 for ac_func in snprintf
15976 do
15977 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15978 { echo "$as_me:$LINENO: checking for $ac_func" >&5
15979 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15980 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15981   echo $ECHO_N "(cached) $ECHO_C" >&6
15982 else
15983   cat >conftest.$ac_ext <<_ACEOF
15984 /* confdefs.h.  */
15985 _ACEOF
15986 cat confdefs.h >>conftest.$ac_ext
15987 cat >>conftest.$ac_ext <<_ACEOF
15988 /* end confdefs.h.  */
15989 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15990    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15991 #define $ac_func innocuous_$ac_func
15992
15993 /* System header to define __stub macros and hopefully few prototypes,
15994     which can conflict with char $ac_func (); below.
15995     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15996     <limits.h> exists even on freestanding compilers.  */
15997
15998 #ifdef __STDC__
15999 # include <limits.h>
16000 #else
16001 # include <assert.h>
16002 #endif
16003
16004 #undef $ac_func
16005
16006 /* Override any GCC internal prototype to avoid an error.
16007    Use char because int might match the return type of a GCC
16008    builtin and then its argument prototype would still apply.  */
16009 #ifdef __cplusplus
16010 extern "C"
16011 #endif
16012 char $ac_func ();
16013 /* The GNU C library defines this for functions which it implements
16014     to always fail with ENOSYS.  Some functions are actually named
16015     something starting with __ and the normal name is an alias.  */
16016 #if defined __stub_$ac_func || defined __stub___$ac_func
16017 choke me
16018 #endif
16019
16020 int
16021 main ()
16022 {
16023 return $ac_func ();
16024   ;
16025   return 0;
16026 }
16027 _ACEOF
16028 rm -f conftest.$ac_objext conftest$ac_exeext
16029 if { (ac_try="$ac_link"
16030 case "(($ac_try" in
16031   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16032   *) ac_try_echo=$ac_try;;
16033 esac
16034 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16035   (eval "$ac_link") 2>conftest.er1
16036   ac_status=$?
16037   grep -v '^ *+' conftest.er1 >conftest.err
16038   rm -f conftest.er1
16039   cat conftest.err >&5
16040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16041   (exit $ac_status); } && {
16042          test -z "$ac_c_werror_flag" ||
16043          test ! -s conftest.err
16044        } && test -s conftest$ac_exeext &&
16045        $as_test_x conftest$ac_exeext; then
16046   eval "$as_ac_var=yes"
16047 else
16048   echo "$as_me: failed program was:" >&5
16049 sed 's/^/| /' conftest.$ac_ext >&5
16050
16051         eval "$as_ac_var=no"
16052 fi
16053
16054 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16055       conftest$ac_exeext conftest.$ac_ext
16056 fi
16057 ac_res=`eval echo '${'$as_ac_var'}'`
16058                { echo "$as_me:$LINENO: result: $ac_res" >&5
16059 echo "${ECHO_T}$ac_res" >&6; }
16060 if test `eval echo '${'$as_ac_var'}'` = yes; then
16061   cat >>confdefs.h <<_ACEOF
16062 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16063 _ACEOF
16064
16065 else
16066   pgac_need_repl_snprintf=yes
16067 fi
16068 done
16069
16070
16071 for ac_func in vsnprintf
16072 do
16073 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16074 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16075 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16076 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16077   echo $ECHO_N "(cached) $ECHO_C" >&6
16078 else
16079   cat >conftest.$ac_ext <<_ACEOF
16080 /* confdefs.h.  */
16081 _ACEOF
16082 cat confdefs.h >>conftest.$ac_ext
16083 cat >>conftest.$ac_ext <<_ACEOF
16084 /* end confdefs.h.  */
16085 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16086    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16087 #define $ac_func innocuous_$ac_func
16088
16089 /* System header to define __stub macros and hopefully few prototypes,
16090     which can conflict with char $ac_func (); below.
16091     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16092     <limits.h> exists even on freestanding compilers.  */
16093
16094 #ifdef __STDC__
16095 # include <limits.h>
16096 #else
16097 # include <assert.h>
16098 #endif
16099
16100 #undef $ac_func
16101
16102 /* Override any GCC internal prototype to avoid an error.
16103    Use char because int might match the return type of a GCC
16104    builtin and then its argument prototype would still apply.  */
16105 #ifdef __cplusplus
16106 extern "C"
16107 #endif
16108 char $ac_func ();
16109 /* The GNU C library defines this for functions which it implements
16110     to always fail with ENOSYS.  Some functions are actually named
16111     something starting with __ and the normal name is an alias.  */
16112 #if defined __stub_$ac_func || defined __stub___$ac_func
16113 choke me
16114 #endif
16115
16116 int
16117 main ()
16118 {
16119 return $ac_func ();
16120   ;
16121   return 0;
16122 }
16123 _ACEOF
16124 rm -f conftest.$ac_objext conftest$ac_exeext
16125 if { (ac_try="$ac_link"
16126 case "(($ac_try" in
16127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16128   *) ac_try_echo=$ac_try;;
16129 esac
16130 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16131   (eval "$ac_link") 2>conftest.er1
16132   ac_status=$?
16133   grep -v '^ *+' conftest.er1 >conftest.err
16134   rm -f conftest.er1
16135   cat conftest.err >&5
16136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16137   (exit $ac_status); } && {
16138          test -z "$ac_c_werror_flag" ||
16139          test ! -s conftest.err
16140        } && test -s conftest$ac_exeext &&
16141        $as_test_x conftest$ac_exeext; then
16142   eval "$as_ac_var=yes"
16143 else
16144   echo "$as_me: failed program was:" >&5
16145 sed 's/^/| /' conftest.$ac_ext >&5
16146
16147         eval "$as_ac_var=no"
16148 fi
16149
16150 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16151       conftest$ac_exeext conftest.$ac_ext
16152 fi
16153 ac_res=`eval echo '${'$as_ac_var'}'`
16154                { echo "$as_me:$LINENO: result: $ac_res" >&5
16155 echo "${ECHO_T}$ac_res" >&6; }
16156 if test `eval echo '${'$as_ac_var'}'` = yes; then
16157   cat >>confdefs.h <<_ACEOF
16158 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16159 _ACEOF
16160
16161 else
16162   pgac_need_repl_snprintf=yes
16163 fi
16164 done
16165
16166 fi
16167
16168
16169 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
16170 # include/c.h will provide declarations.  Note this is a separate test
16171 # from whether the functions exist in the C library --- there are
16172 # systems that have the functions but don't bother to declare them :-(
16173
16174 { echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
16175 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6; }
16176 if test "${ac_cv_have_decl_snprintf+set}" = set; then
16177   echo $ECHO_N "(cached) $ECHO_C" >&6
16178 else
16179   cat >conftest.$ac_ext <<_ACEOF
16180 /* confdefs.h.  */
16181 _ACEOF
16182 cat confdefs.h >>conftest.$ac_ext
16183 cat >>conftest.$ac_ext <<_ACEOF
16184 /* end confdefs.h.  */
16185 $ac_includes_default
16186 int
16187 main ()
16188 {
16189 #ifndef snprintf
16190   (void) snprintf;
16191 #endif
16192
16193   ;
16194   return 0;
16195 }
16196 _ACEOF
16197 rm -f conftest.$ac_objext
16198 if { (ac_try="$ac_compile"
16199 case "(($ac_try" in
16200   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16201   *) ac_try_echo=$ac_try;;
16202 esac
16203 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16204   (eval "$ac_compile") 2>conftest.er1
16205   ac_status=$?
16206   grep -v '^ *+' conftest.er1 >conftest.err
16207   rm -f conftest.er1
16208   cat conftest.err >&5
16209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16210   (exit $ac_status); } && {
16211          test -z "$ac_c_werror_flag" ||
16212          test ! -s conftest.err
16213        } && test -s conftest.$ac_objext; then
16214   ac_cv_have_decl_snprintf=yes
16215 else
16216   echo "$as_me: failed program was:" >&5
16217 sed 's/^/| /' conftest.$ac_ext >&5
16218
16219         ac_cv_have_decl_snprintf=no
16220 fi
16221
16222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16223 fi
16224 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
16225 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6; }
16226 if test $ac_cv_have_decl_snprintf = yes; then
16227
16228 cat >>confdefs.h <<_ACEOF
16229 #define HAVE_DECL_SNPRINTF 1
16230 _ACEOF
16231
16232
16233 else
16234   cat >>confdefs.h <<_ACEOF
16235 #define HAVE_DECL_SNPRINTF 0
16236 _ACEOF
16237
16238
16239 fi
16240 { echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
16241 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6; }
16242 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
16243   echo $ECHO_N "(cached) $ECHO_C" >&6
16244 else
16245   cat >conftest.$ac_ext <<_ACEOF
16246 /* confdefs.h.  */
16247 _ACEOF
16248 cat confdefs.h >>conftest.$ac_ext
16249 cat >>conftest.$ac_ext <<_ACEOF
16250 /* end confdefs.h.  */
16251 $ac_includes_default
16252 int
16253 main ()
16254 {
16255 #ifndef vsnprintf
16256   (void) vsnprintf;
16257 #endif
16258
16259   ;
16260   return 0;
16261 }
16262 _ACEOF
16263 rm -f conftest.$ac_objext
16264 if { (ac_try="$ac_compile"
16265 case "(($ac_try" in
16266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16267   *) ac_try_echo=$ac_try;;
16268 esac
16269 eval "echo \"\$as_me:$LINENO: $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   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   ac_cv_have_decl_vsnprintf=yes
16281 else
16282   echo "$as_me: failed program was:" >&5
16283 sed 's/^/| /' conftest.$ac_ext >&5
16284
16285         ac_cv_have_decl_vsnprintf=no
16286 fi
16287
16288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16289 fi
16290 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
16291 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6; }
16292 if test $ac_cv_have_decl_vsnprintf = yes; then
16293
16294 cat >>confdefs.h <<_ACEOF
16295 #define HAVE_DECL_VSNPRINTF 1
16296 _ACEOF
16297
16298
16299 else
16300   cat >>confdefs.h <<_ACEOF
16301 #define HAVE_DECL_VSNPRINTF 0
16302 _ACEOF
16303
16304
16305 fi
16306
16307
16308
16309
16310 { echo "$as_me:$LINENO: checking for isinf" >&5
16311 echo $ECHO_N "checking for isinf... $ECHO_C" >&6; }
16312 if test "${ac_cv_func_isinf+set}" = set; then
16313   echo $ECHO_N "(cached) $ECHO_C" >&6
16314 else
16315   cat >conftest.$ac_ext <<_ACEOF
16316 /* confdefs.h.  */
16317 _ACEOF
16318 cat confdefs.h >>conftest.$ac_ext
16319 cat >>conftest.$ac_ext <<_ACEOF
16320 /* end confdefs.h.  */
16321
16322 #include <math.h>
16323 double glob_double;
16324
16325 int
16326 main ()
16327 {
16328 return isinf(glob_double) ? 0 : 1;
16329   ;
16330   return 0;
16331 }
16332 _ACEOF
16333 rm -f conftest.$ac_objext conftest$ac_exeext
16334 if { (ac_try="$ac_link"
16335 case "(($ac_try" in
16336   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16337   *) ac_try_echo=$ac_try;;
16338 esac
16339 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16340   (eval "$ac_link") 2>conftest.er1
16341   ac_status=$?
16342   grep -v '^ *+' conftest.er1 >conftest.err
16343   rm -f conftest.er1
16344   cat conftest.err >&5
16345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16346   (exit $ac_status); } && {
16347          test -z "$ac_c_werror_flag" ||
16348          test ! -s conftest.err
16349        } && test -s conftest$ac_exeext &&
16350        $as_test_x conftest$ac_exeext; then
16351   ac_cv_func_isinf=yes
16352 else
16353   echo "$as_me: failed program was:" >&5
16354 sed 's/^/| /' conftest.$ac_ext >&5
16355
16356         ac_cv_func_isinf=no
16357 fi
16358
16359 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16360       conftest$ac_exeext conftest.$ac_ext
16361 fi
16362 { echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
16363 echo "${ECHO_T}$ac_cv_func_isinf" >&6; }
16364
16365 if test $ac_cv_func_isinf = yes ; then
16366
16367 cat >>confdefs.h <<\_ACEOF
16368 #define HAVE_ISINF 1
16369 _ACEOF
16370
16371 else
16372   case " $LIBOBJS " in
16373   *" isinf.$ac_objext "* ) ;;
16374   *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
16375  ;;
16376 esac
16377
16378   # Look for a way to implement a substitute for isinf()
16379
16380
16381
16382
16383 for ac_func in fpclass fp_class fp_class_d class
16384 do
16385 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16386 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16387 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16388 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16389   echo $ECHO_N "(cached) $ECHO_C" >&6
16390 else
16391   cat >conftest.$ac_ext <<_ACEOF
16392 /* confdefs.h.  */
16393 _ACEOF
16394 cat confdefs.h >>conftest.$ac_ext
16395 cat >>conftest.$ac_ext <<_ACEOF
16396 /* end confdefs.h.  */
16397 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16398    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16399 #define $ac_func innocuous_$ac_func
16400
16401 /* System header to define __stub macros and hopefully few prototypes,
16402     which can conflict with char $ac_func (); below.
16403     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16404     <limits.h> exists even on freestanding compilers.  */
16405
16406 #ifdef __STDC__
16407 # include <limits.h>
16408 #else
16409 # include <assert.h>
16410 #endif
16411
16412 #undef $ac_func
16413
16414 /* Override any GCC internal prototype to avoid an error.
16415    Use char because int might match the return type of a GCC
16416    builtin and then its argument prototype would still apply.  */
16417 #ifdef __cplusplus
16418 extern "C"
16419 #endif
16420 char $ac_func ();
16421 /* The GNU C library defines this for functions which it implements
16422     to always fail with ENOSYS.  Some functions are actually named
16423     something starting with __ and the normal name is an alias.  */
16424 #if defined __stub_$ac_func || defined __stub___$ac_func
16425 choke me
16426 #endif
16427
16428 int
16429 main ()
16430 {
16431 return $ac_func ();
16432   ;
16433   return 0;
16434 }
16435 _ACEOF
16436 rm -f conftest.$ac_objext conftest$ac_exeext
16437 if { (ac_try="$ac_link"
16438 case "(($ac_try" in
16439   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16440   *) ac_try_echo=$ac_try;;
16441 esac
16442 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16443   (eval "$ac_link") 2>conftest.er1
16444   ac_status=$?
16445   grep -v '^ *+' conftest.er1 >conftest.err
16446   rm -f conftest.er1
16447   cat conftest.err >&5
16448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16449   (exit $ac_status); } && {
16450          test -z "$ac_c_werror_flag" ||
16451          test ! -s conftest.err
16452        } && test -s conftest$ac_exeext &&
16453        $as_test_x conftest$ac_exeext; then
16454   eval "$as_ac_var=yes"
16455 else
16456   echo "$as_me: failed program was:" >&5
16457 sed 's/^/| /' conftest.$ac_ext >&5
16458
16459         eval "$as_ac_var=no"
16460 fi
16461
16462 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16463       conftest$ac_exeext conftest.$ac_ext
16464 fi
16465 ac_res=`eval echo '${'$as_ac_var'}'`
16466                { echo "$as_me:$LINENO: result: $ac_res" >&5
16467 echo "${ECHO_T}$ac_res" >&6; }
16468 if test `eval echo '${'$as_ac_var'}'` = yes; then
16469   cat >>confdefs.h <<_ACEOF
16470 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16471 _ACEOF
16472  break
16473 fi
16474 done
16475
16476 fi
16477
16478 # Some versions of libedit contain strlcpy(); so disregard that library while
16479 # checking for these standard libc functions.
16480 pgac_save_LIBS="$LIBS"
16481 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497 for ac_func in crypt getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul unsetenv
16498 do
16499 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16500 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16501 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16502 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16503   echo $ECHO_N "(cached) $ECHO_C" >&6
16504 else
16505   cat >conftest.$ac_ext <<_ACEOF
16506 /* confdefs.h.  */
16507 _ACEOF
16508 cat confdefs.h >>conftest.$ac_ext
16509 cat >>conftest.$ac_ext <<_ACEOF
16510 /* end confdefs.h.  */
16511 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16512    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16513 #define $ac_func innocuous_$ac_func
16514
16515 /* System header to define __stub macros and hopefully few prototypes,
16516     which can conflict with char $ac_func (); below.
16517     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16518     <limits.h> exists even on freestanding compilers.  */
16519
16520 #ifdef __STDC__
16521 # include <limits.h>
16522 #else
16523 # include <assert.h>
16524 #endif
16525
16526 #undef $ac_func
16527
16528 /* Override any GCC internal prototype to avoid an error.
16529    Use char because int might match the return type of a GCC
16530    builtin and then its argument prototype would still apply.  */
16531 #ifdef __cplusplus
16532 extern "C"
16533 #endif
16534 char $ac_func ();
16535 /* The GNU C library defines this for functions which it implements
16536     to always fail with ENOSYS.  Some functions are actually named
16537     something starting with __ and the normal name is an alias.  */
16538 #if defined __stub_$ac_func || defined __stub___$ac_func
16539 choke me
16540 #endif
16541
16542 int
16543 main ()
16544 {
16545 return $ac_func ();
16546   ;
16547   return 0;
16548 }
16549 _ACEOF
16550 rm -f conftest.$ac_objext conftest$ac_exeext
16551 if { (ac_try="$ac_link"
16552 case "(($ac_try" in
16553   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16554   *) ac_try_echo=$ac_try;;
16555 esac
16556 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16557   (eval "$ac_link") 2>conftest.er1
16558   ac_status=$?
16559   grep -v '^ *+' conftest.er1 >conftest.err
16560   rm -f conftest.er1
16561   cat conftest.err >&5
16562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16563   (exit $ac_status); } && {
16564          test -z "$ac_c_werror_flag" ||
16565          test ! -s conftest.err
16566        } && test -s conftest$ac_exeext &&
16567        $as_test_x conftest$ac_exeext; then
16568   eval "$as_ac_var=yes"
16569 else
16570   echo "$as_me: failed program was:" >&5
16571 sed 's/^/| /' conftest.$ac_ext >&5
16572
16573         eval "$as_ac_var=no"
16574 fi
16575
16576 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16577       conftest$ac_exeext conftest.$ac_ext
16578 fi
16579 ac_res=`eval echo '${'$as_ac_var'}'`
16580                { echo "$as_me:$LINENO: result: $ac_res" >&5
16581 echo "${ECHO_T}$ac_res" >&6; }
16582 if test `eval echo '${'$as_ac_var'}'` = yes; then
16583   cat >>confdefs.h <<_ACEOF
16584 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16585 _ACEOF
16586
16587 else
16588   case " $LIBOBJS " in
16589   *" $ac_func.$ac_objext "* ) ;;
16590   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16591  ;;
16592 esac
16593
16594 fi
16595 done
16596
16597
16598
16599 LIBS="$pgac_save_LIBS"
16600
16601 # System's version of getaddrinfo(), if any, may be used only if we found
16602 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16603 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
16604 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
16605 # because we want to use our own getaddrinfo.c on Windows anyway.)
16606 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
16607
16608 for ac_func in getaddrinfo
16609 do
16610 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16611 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16612 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16613 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16614   echo $ECHO_N "(cached) $ECHO_C" >&6
16615 else
16616   cat >conftest.$ac_ext <<_ACEOF
16617 /* confdefs.h.  */
16618 _ACEOF
16619 cat confdefs.h >>conftest.$ac_ext
16620 cat >>conftest.$ac_ext <<_ACEOF
16621 /* end confdefs.h.  */
16622 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16623    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16624 #define $ac_func innocuous_$ac_func
16625
16626 /* System header to define __stub macros and hopefully few prototypes,
16627     which can conflict with char $ac_func (); below.
16628     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16629     <limits.h> exists even on freestanding compilers.  */
16630
16631 #ifdef __STDC__
16632 # include <limits.h>
16633 #else
16634 # include <assert.h>
16635 #endif
16636
16637 #undef $ac_func
16638
16639 /* Override any GCC internal prototype to avoid an error.
16640    Use char because int might match the return type of a GCC
16641    builtin and then its argument prototype would still apply.  */
16642 #ifdef __cplusplus
16643 extern "C"
16644 #endif
16645 char $ac_func ();
16646 /* The GNU C library defines this for functions which it implements
16647     to always fail with ENOSYS.  Some functions are actually named
16648     something starting with __ and the normal name is an alias.  */
16649 #if defined __stub_$ac_func || defined __stub___$ac_func
16650 choke me
16651 #endif
16652
16653 int
16654 main ()
16655 {
16656 return $ac_func ();
16657   ;
16658   return 0;
16659 }
16660 _ACEOF
16661 rm -f conftest.$ac_objext conftest$ac_exeext
16662 if { (ac_try="$ac_link"
16663 case "(($ac_try" in
16664   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16665   *) ac_try_echo=$ac_try;;
16666 esac
16667 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16668   (eval "$ac_link") 2>conftest.er1
16669   ac_status=$?
16670   grep -v '^ *+' conftest.er1 >conftest.err
16671   rm -f conftest.er1
16672   cat conftest.err >&5
16673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16674   (exit $ac_status); } && {
16675          test -z "$ac_c_werror_flag" ||
16676          test ! -s conftest.err
16677        } && test -s conftest$ac_exeext &&
16678        $as_test_x conftest$ac_exeext; then
16679   eval "$as_ac_var=yes"
16680 else
16681   echo "$as_me: failed program was:" >&5
16682 sed 's/^/| /' conftest.$ac_ext >&5
16683
16684         eval "$as_ac_var=no"
16685 fi
16686
16687 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16688       conftest$ac_exeext conftest.$ac_ext
16689 fi
16690 ac_res=`eval echo '${'$as_ac_var'}'`
16691                { echo "$as_me:$LINENO: result: $ac_res" >&5
16692 echo "${ECHO_T}$ac_res" >&6; }
16693 if test `eval echo '${'$as_ac_var'}'` = yes; then
16694   cat >>confdefs.h <<_ACEOF
16695 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16696 _ACEOF
16697
16698 else
16699   case " $LIBOBJS " in
16700   *" $ac_func.$ac_objext "* ) ;;
16701   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16702  ;;
16703 esac
16704
16705 fi
16706 done
16707
16708
16709 else
16710   case " $LIBOBJS " in
16711   *" getaddrinfo.$ac_objext "* ) ;;
16712   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16713  ;;
16714 esac
16715
16716 fi
16717
16718 # Similarly, use system's getopt_long() only if system provides struct option.
16719 # Solaris' getopt() doesn't do what we want for long options, so always use
16720 # our versions on that platform.
16721 if test "$PORTNAME" = "solaris"; then
16722   case " $LIBOBJS " in
16723   *" getopt.$ac_objext "* ) ;;
16724   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16725  ;;
16726 esac
16727
16728   case " $LIBOBJS " in
16729   *" getopt_long.$ac_objext "* ) ;;
16730   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16731  ;;
16732 esac
16733
16734 elif test x"$ac_cv_type_struct_option" = xyes ; then
16735
16736 for ac_func in getopt_long
16737 do
16738 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16739 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16740 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16741 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16742   echo $ECHO_N "(cached) $ECHO_C" >&6
16743 else
16744   cat >conftest.$ac_ext <<_ACEOF
16745 /* confdefs.h.  */
16746 _ACEOF
16747 cat confdefs.h >>conftest.$ac_ext
16748 cat >>conftest.$ac_ext <<_ACEOF
16749 /* end confdefs.h.  */
16750 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16751    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16752 #define $ac_func innocuous_$ac_func
16753
16754 /* System header to define __stub macros and hopefully few prototypes,
16755     which can conflict with char $ac_func (); below.
16756     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16757     <limits.h> exists even on freestanding compilers.  */
16758
16759 #ifdef __STDC__
16760 # include <limits.h>
16761 #else
16762 # include <assert.h>
16763 #endif
16764
16765 #undef $ac_func
16766
16767 /* Override any GCC internal prototype to avoid an error.
16768    Use char because int might match the return type of a GCC
16769    builtin and then its argument prototype would still apply.  */
16770 #ifdef __cplusplus
16771 extern "C"
16772 #endif
16773 char $ac_func ();
16774 /* The GNU C library defines this for functions which it implements
16775     to always fail with ENOSYS.  Some functions are actually named
16776     something starting with __ and the normal name is an alias.  */
16777 #if defined __stub_$ac_func || defined __stub___$ac_func
16778 choke me
16779 #endif
16780
16781 int
16782 main ()
16783 {
16784 return $ac_func ();
16785   ;
16786   return 0;
16787 }
16788 _ACEOF
16789 rm -f conftest.$ac_objext conftest$ac_exeext
16790 if { (ac_try="$ac_link"
16791 case "(($ac_try" in
16792   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16793   *) ac_try_echo=$ac_try;;
16794 esac
16795 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16796   (eval "$ac_link") 2>conftest.er1
16797   ac_status=$?
16798   grep -v '^ *+' conftest.er1 >conftest.err
16799   rm -f conftest.er1
16800   cat conftest.err >&5
16801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16802   (exit $ac_status); } && {
16803          test -z "$ac_c_werror_flag" ||
16804          test ! -s conftest.err
16805        } && test -s conftest$ac_exeext &&
16806        $as_test_x conftest$ac_exeext; then
16807   eval "$as_ac_var=yes"
16808 else
16809   echo "$as_me: failed program was:" >&5
16810 sed 's/^/| /' conftest.$ac_ext >&5
16811
16812         eval "$as_ac_var=no"
16813 fi
16814
16815 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16816       conftest$ac_exeext conftest.$ac_ext
16817 fi
16818 ac_res=`eval echo '${'$as_ac_var'}'`
16819                { echo "$as_me:$LINENO: result: $ac_res" >&5
16820 echo "${ECHO_T}$ac_res" >&6; }
16821 if test `eval echo '${'$as_ac_var'}'` = yes; then
16822   cat >>confdefs.h <<_ACEOF
16823 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16824 _ACEOF
16825
16826 else
16827   case " $LIBOBJS " in
16828   *" $ac_func.$ac_objext "* ) ;;
16829   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16830  ;;
16831 esac
16832
16833 fi
16834 done
16835
16836
16837 else
16838   case " $LIBOBJS " in
16839   *" getopt_long.$ac_objext "* ) ;;
16840   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16841  ;;
16842 esac
16843
16844 fi
16845
16846 # Win32 support
16847 if test "$PORTNAME" = "win32"; then
16848
16849 for ac_func in gettimeofday
16850 do
16851 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16852 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16853 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16854 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16855   echo $ECHO_N "(cached) $ECHO_C" >&6
16856 else
16857   cat >conftest.$ac_ext <<_ACEOF
16858 /* confdefs.h.  */
16859 _ACEOF
16860 cat confdefs.h >>conftest.$ac_ext
16861 cat >>conftest.$ac_ext <<_ACEOF
16862 /* end confdefs.h.  */
16863 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16864    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16865 #define $ac_func innocuous_$ac_func
16866
16867 /* System header to define __stub macros and hopefully few prototypes,
16868     which can conflict with char $ac_func (); below.
16869     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16870     <limits.h> exists even on freestanding compilers.  */
16871
16872 #ifdef __STDC__
16873 # include <limits.h>
16874 #else
16875 # include <assert.h>
16876 #endif
16877
16878 #undef $ac_func
16879
16880 /* Override any GCC internal prototype to avoid an error.
16881    Use char because int might match the return type of a GCC
16882    builtin and then its argument prototype would still apply.  */
16883 #ifdef __cplusplus
16884 extern "C"
16885 #endif
16886 char $ac_func ();
16887 /* The GNU C library defines this for functions which it implements
16888     to always fail with ENOSYS.  Some functions are actually named
16889     something starting with __ and the normal name is an alias.  */
16890 #if defined __stub_$ac_func || defined __stub___$ac_func
16891 choke me
16892 #endif
16893
16894 int
16895 main ()
16896 {
16897 return $ac_func ();
16898   ;
16899   return 0;
16900 }
16901 _ACEOF
16902 rm -f conftest.$ac_objext conftest$ac_exeext
16903 if { (ac_try="$ac_link"
16904 case "(($ac_try" in
16905   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16906   *) ac_try_echo=$ac_try;;
16907 esac
16908 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16909   (eval "$ac_link") 2>conftest.er1
16910   ac_status=$?
16911   grep -v '^ *+' conftest.er1 >conftest.err
16912   rm -f conftest.er1
16913   cat conftest.err >&5
16914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16915   (exit $ac_status); } && {
16916          test -z "$ac_c_werror_flag" ||
16917          test ! -s conftest.err
16918        } && test -s conftest$ac_exeext &&
16919        $as_test_x conftest$ac_exeext; then
16920   eval "$as_ac_var=yes"
16921 else
16922   echo "$as_me: failed program was:" >&5
16923 sed 's/^/| /' conftest.$ac_ext >&5
16924
16925         eval "$as_ac_var=no"
16926 fi
16927
16928 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16929       conftest$ac_exeext conftest.$ac_ext
16930 fi
16931 ac_res=`eval echo '${'$as_ac_var'}'`
16932                { echo "$as_me:$LINENO: result: $ac_res" >&5
16933 echo "${ECHO_T}$ac_res" >&6; }
16934 if test `eval echo '${'$as_ac_var'}'` = yes; then
16935   cat >>confdefs.h <<_ACEOF
16936 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16937 _ACEOF
16938
16939 else
16940   case " $LIBOBJS " in
16941   *" $ac_func.$ac_objext "* ) ;;
16942   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16943  ;;
16944 esac
16945
16946 fi
16947 done
16948
16949
16950 case " $LIBOBJS " in
16951   *" kill.$ac_objext "* ) ;;
16952   *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16953  ;;
16954 esac
16955
16956 case " $LIBOBJS " in
16957   *" open.$ac_objext "* ) ;;
16958   *) LIBOBJS="$LIBOBJS open.$ac_objext"
16959  ;;
16960 esac
16961
16962 case " $LIBOBJS " in
16963   *" rand.$ac_objext "* ) ;;
16964   *) LIBOBJS="$LIBOBJS rand.$ac_objext"
16965  ;;
16966 esac
16967
16968 case " $LIBOBJS " in
16969   *" win32error.$ac_objext "* ) ;;
16970   *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16971  ;;
16972 esac
16973
16974
16975 cat >>confdefs.h <<\_ACEOF
16976 #define HAVE_SYMLINK 1
16977 _ACEOF
16978
16979 fi
16980
16981 if test "$with_readline" = yes; then
16982   { echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
16983 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6; }
16984 cat >conftest.$ac_ext <<_ACEOF
16985 /* confdefs.h.  */
16986 _ACEOF
16987 cat confdefs.h >>conftest.$ac_ext
16988 cat >>conftest.$ac_ext <<_ACEOF
16989 /* end confdefs.h.  */
16990 #include <stdio.h>
16991 #ifdef HAVE_READLINE_READLINE_H
16992 # include <readline/readline.h>
16993 #elif defined(HAVE_READLINE_H)
16994 # include <readline.h>
16995 #endif
16996
16997 int
16998 main ()
16999 {
17000 rl_completion_append_character = 'x';
17001   ;
17002   return 0;
17003 }
17004 _ACEOF
17005 rm -f conftest.$ac_objext conftest$ac_exeext
17006 if { (ac_try="$ac_link"
17007 case "(($ac_try" in
17008   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17009   *) ac_try_echo=$ac_try;;
17010 esac
17011 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17012   (eval "$ac_link") 2>conftest.er1
17013   ac_status=$?
17014   grep -v '^ *+' conftest.er1 >conftest.err
17015   rm -f conftest.er1
17016   cat conftest.err >&5
17017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17018   (exit $ac_status); } && {
17019          test -z "$ac_c_werror_flag" ||
17020          test ! -s conftest.err
17021        } && test -s conftest$ac_exeext &&
17022        $as_test_x conftest$ac_exeext; then
17023   { echo "$as_me:$LINENO: result: yes" >&5
17024 echo "${ECHO_T}yes" >&6; }
17025
17026 cat >>confdefs.h <<\_ACEOF
17027 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17028 _ACEOF
17029
17030 else
17031   echo "$as_me: failed program was:" >&5
17032 sed 's/^/| /' conftest.$ac_ext >&5
17033
17034         { echo "$as_me:$LINENO: result: no" >&5
17035 echo "${ECHO_T}no" >&6; }
17036 fi
17037
17038 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17039       conftest$ac_exeext conftest.$ac_ext
17040
17041
17042 for ac_func in rl_completion_matches rl_filename_completion_function
17043 do
17044 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17045 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17046 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17047 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17048   echo $ECHO_N "(cached) $ECHO_C" >&6
17049 else
17050   cat >conftest.$ac_ext <<_ACEOF
17051 /* confdefs.h.  */
17052 _ACEOF
17053 cat confdefs.h >>conftest.$ac_ext
17054 cat >>conftest.$ac_ext <<_ACEOF
17055 /* end confdefs.h.  */
17056 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17057    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17058 #define $ac_func innocuous_$ac_func
17059
17060 /* System header to define __stub macros and hopefully few prototypes,
17061     which can conflict with char $ac_func (); below.
17062     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17063     <limits.h> exists even on freestanding compilers.  */
17064
17065 #ifdef __STDC__
17066 # include <limits.h>
17067 #else
17068 # include <assert.h>
17069 #endif
17070
17071 #undef $ac_func
17072
17073 /* Override any GCC internal prototype to avoid an error.
17074    Use char because int might match the return type of a GCC
17075    builtin and then its argument prototype would still apply.  */
17076 #ifdef __cplusplus
17077 extern "C"
17078 #endif
17079 char $ac_func ();
17080 /* The GNU C library defines this for functions which it implements
17081     to always fail with ENOSYS.  Some functions are actually named
17082     something starting with __ and the normal name is an alias.  */
17083 #if defined __stub_$ac_func || defined __stub___$ac_func
17084 choke me
17085 #endif
17086
17087 int
17088 main ()
17089 {
17090 return $ac_func ();
17091   ;
17092   return 0;
17093 }
17094 _ACEOF
17095 rm -f conftest.$ac_objext conftest$ac_exeext
17096 if { (ac_try="$ac_link"
17097 case "(($ac_try" in
17098   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17099   *) ac_try_echo=$ac_try;;
17100 esac
17101 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17102   (eval "$ac_link") 2>conftest.er1
17103   ac_status=$?
17104   grep -v '^ *+' conftest.er1 >conftest.err
17105   rm -f conftest.er1
17106   cat conftest.err >&5
17107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17108   (exit $ac_status); } && {
17109          test -z "$ac_c_werror_flag" ||
17110          test ! -s conftest.err
17111        } && test -s conftest$ac_exeext &&
17112        $as_test_x conftest$ac_exeext; then
17113   eval "$as_ac_var=yes"
17114 else
17115   echo "$as_me: failed program was:" >&5
17116 sed 's/^/| /' conftest.$ac_ext >&5
17117
17118         eval "$as_ac_var=no"
17119 fi
17120
17121 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17122       conftest$ac_exeext conftest.$ac_ext
17123 fi
17124 ac_res=`eval echo '${'$as_ac_var'}'`
17125                { echo "$as_me:$LINENO: result: $ac_res" >&5
17126 echo "${ECHO_T}$ac_res" >&6; }
17127 if test `eval echo '${'$as_ac_var'}'` = yes; then
17128   cat >>confdefs.h <<_ACEOF
17129 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17130 _ACEOF
17131
17132 fi
17133 done
17134
17135
17136 for ac_func in replace_history_entry
17137 do
17138 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17139 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17140 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17141 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17142   echo $ECHO_N "(cached) $ECHO_C" >&6
17143 else
17144   cat >conftest.$ac_ext <<_ACEOF
17145 /* confdefs.h.  */
17146 _ACEOF
17147 cat confdefs.h >>conftest.$ac_ext
17148 cat >>conftest.$ac_ext <<_ACEOF
17149 /* end confdefs.h.  */
17150 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17151    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17152 #define $ac_func innocuous_$ac_func
17153
17154 /* System header to define __stub macros and hopefully few prototypes,
17155     which can conflict with char $ac_func (); below.
17156     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17157     <limits.h> exists even on freestanding compilers.  */
17158
17159 #ifdef __STDC__
17160 # include <limits.h>
17161 #else
17162 # include <assert.h>
17163 #endif
17164
17165 #undef $ac_func
17166
17167 /* Override any GCC internal prototype to avoid an error.
17168    Use char because int might match the return type of a GCC
17169    builtin and then its argument prototype would still apply.  */
17170 #ifdef __cplusplus
17171 extern "C"
17172 #endif
17173 char $ac_func ();
17174 /* The GNU C library defines this for functions which it implements
17175     to always fail with ENOSYS.  Some functions are actually named
17176     something starting with __ and the normal name is an alias.  */
17177 #if defined __stub_$ac_func || defined __stub___$ac_func
17178 choke me
17179 #endif
17180
17181 int
17182 main ()
17183 {
17184 return $ac_func ();
17185   ;
17186   return 0;
17187 }
17188 _ACEOF
17189 rm -f conftest.$ac_objext conftest$ac_exeext
17190 if { (ac_try="$ac_link"
17191 case "(($ac_try" in
17192   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17193   *) ac_try_echo=$ac_try;;
17194 esac
17195 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17196   (eval "$ac_link") 2>conftest.er1
17197   ac_status=$?
17198   grep -v '^ *+' conftest.er1 >conftest.err
17199   rm -f conftest.er1
17200   cat conftest.err >&5
17201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17202   (exit $ac_status); } && {
17203          test -z "$ac_c_werror_flag" ||
17204          test ! -s conftest.err
17205        } && test -s conftest$ac_exeext &&
17206        $as_test_x conftest$ac_exeext; then
17207   eval "$as_ac_var=yes"
17208 else
17209   echo "$as_me: failed program was:" >&5
17210 sed 's/^/| /' conftest.$ac_ext >&5
17211
17212         eval "$as_ac_var=no"
17213 fi
17214
17215 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17216       conftest$ac_exeext conftest.$ac_ext
17217 fi
17218 ac_res=`eval echo '${'$as_ac_var'}'`
17219                { echo "$as_me:$LINENO: result: $ac_res" >&5
17220 echo "${ECHO_T}$ac_res" >&6; }
17221 if test `eval echo '${'$as_ac_var'}'` = yes; then
17222   cat >>confdefs.h <<_ACEOF
17223 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17224 _ACEOF
17225
17226 fi
17227 done
17228
17229 fi
17230
17231
17232 { echo "$as_me:$LINENO: checking for sigsetjmp" >&5
17233 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6; }
17234 cat >conftest.$ac_ext <<_ACEOF
17235 /* confdefs.h.  */
17236 _ACEOF
17237 cat confdefs.h >>conftest.$ac_ext
17238 cat >>conftest.$ac_ext <<_ACEOF
17239 /* end confdefs.h.  */
17240 #include <setjmp.h>
17241 int
17242 main ()
17243 {
17244 sigjmp_buf x; sigsetjmp(x, 1);
17245   ;
17246   return 0;
17247 }
17248 _ACEOF
17249 rm -f conftest.$ac_objext conftest$ac_exeext
17250 if { (ac_try="$ac_link"
17251 case "(($ac_try" in
17252   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17253   *) ac_try_echo=$ac_try;;
17254 esac
17255 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17256   (eval "$ac_link") 2>conftest.er1
17257   ac_status=$?
17258   grep -v '^ *+' conftest.er1 >conftest.err
17259   rm -f conftest.er1
17260   cat conftest.err >&5
17261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17262   (exit $ac_status); } && {
17263          test -z "$ac_c_werror_flag" ||
17264          test ! -s conftest.err
17265        } && test -s conftest$ac_exeext &&
17266        $as_test_x conftest$ac_exeext; then
17267
17268 cat >>confdefs.h <<\_ACEOF
17269 #define HAVE_SIGSETJMP 1
17270 _ACEOF
17271
17272 { echo "$as_me:$LINENO: result: yes" >&5
17273 echo "${ECHO_T}yes" >&6; }
17274 else
17275   echo "$as_me: failed program was:" >&5
17276 sed 's/^/| /' conftest.$ac_ext >&5
17277
17278         { echo "$as_me:$LINENO: result: no" >&5
17279 echo "${ECHO_T}no" >&6; }
17280 fi
17281
17282 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17283       conftest$ac_exeext conftest.$ac_ext
17284
17285 { echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
17286 echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
17287 if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
17288   echo $ECHO_N "(cached) $ECHO_C" >&6
17289 else
17290   cat >conftest.$ac_ext <<_ACEOF
17291 /* confdefs.h.  */
17292 _ACEOF
17293 cat confdefs.h >>conftest.$ac_ext
17294 cat >>conftest.$ac_ext <<_ACEOF
17295 /* end confdefs.h.  */
17296 #include <signal.h>
17297 /* NetBSD declares sys_siglist in unistd.h.  */
17298 #ifdef HAVE_UNISTD_H
17299 # include <unistd.h>
17300 #endif
17301
17302
17303 int
17304 main ()
17305 {
17306 #ifndef sys_siglist
17307   (void) sys_siglist;
17308 #endif
17309
17310   ;
17311   return 0;
17312 }
17313 _ACEOF
17314 rm -f conftest.$ac_objext
17315 if { (ac_try="$ac_compile"
17316 case "(($ac_try" in
17317   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17318   *) ac_try_echo=$ac_try;;
17319 esac
17320 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17321   (eval "$ac_compile") 2>conftest.er1
17322   ac_status=$?
17323   grep -v '^ *+' conftest.er1 >conftest.err
17324   rm -f conftest.er1
17325   cat conftest.err >&5
17326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17327   (exit $ac_status); } && {
17328          test -z "$ac_c_werror_flag" ||
17329          test ! -s conftest.err
17330        } && test -s conftest.$ac_objext; then
17331   ac_cv_have_decl_sys_siglist=yes
17332 else
17333   echo "$as_me: failed program was:" >&5
17334 sed 's/^/| /' conftest.$ac_ext >&5
17335
17336         ac_cv_have_decl_sys_siglist=no
17337 fi
17338
17339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17340 fi
17341 { echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
17342 echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
17343 if test $ac_cv_have_decl_sys_siglist = yes; then
17344
17345 cat >>confdefs.h <<_ACEOF
17346 #define HAVE_DECL_SYS_SIGLIST 1
17347 _ACEOF
17348
17349
17350 else
17351   cat >>confdefs.h <<_ACEOF
17352 #define HAVE_DECL_SYS_SIGLIST 0
17353 _ACEOF
17354
17355
17356 fi
17357
17358
17359
17360
17361 { echo "$as_me:$LINENO: checking for syslog" >&5
17362 echo $ECHO_N "checking for syslog... $ECHO_C" >&6; }
17363 if test "${ac_cv_func_syslog+set}" = set; then
17364   echo $ECHO_N "(cached) $ECHO_C" >&6
17365 else
17366   cat >conftest.$ac_ext <<_ACEOF
17367 /* confdefs.h.  */
17368 _ACEOF
17369 cat confdefs.h >>conftest.$ac_ext
17370 cat >>conftest.$ac_ext <<_ACEOF
17371 /* end confdefs.h.  */
17372 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
17373    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17374 #define syslog innocuous_syslog
17375
17376 /* System header to define __stub macros and hopefully few prototypes,
17377     which can conflict with char syslog (); below.
17378     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17379     <limits.h> exists even on freestanding compilers.  */
17380
17381 #ifdef __STDC__
17382 # include <limits.h>
17383 #else
17384 # include <assert.h>
17385 #endif
17386
17387 #undef syslog
17388
17389 /* Override any GCC internal prototype to avoid an error.
17390    Use char because int might match the return type of a GCC
17391    builtin and then its argument prototype would still apply.  */
17392 #ifdef __cplusplus
17393 extern "C"
17394 #endif
17395 char syslog ();
17396 /* The GNU C library defines this for functions which it implements
17397     to always fail with ENOSYS.  Some functions are actually named
17398     something starting with __ and the normal name is an alias.  */
17399 #if defined __stub_syslog || defined __stub___syslog
17400 choke me
17401 #endif
17402
17403 int
17404 main ()
17405 {
17406 return syslog ();
17407   ;
17408   return 0;
17409 }
17410 _ACEOF
17411 rm -f conftest.$ac_objext conftest$ac_exeext
17412 if { (ac_try="$ac_link"
17413 case "(($ac_try" in
17414   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17415   *) ac_try_echo=$ac_try;;
17416 esac
17417 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17418   (eval "$ac_link") 2>conftest.er1
17419   ac_status=$?
17420   grep -v '^ *+' conftest.er1 >conftest.err
17421   rm -f conftest.er1
17422   cat conftest.err >&5
17423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17424   (exit $ac_status); } && {
17425          test -z "$ac_c_werror_flag" ||
17426          test ! -s conftest.err
17427        } && test -s conftest$ac_exeext &&
17428        $as_test_x conftest$ac_exeext; then
17429   ac_cv_func_syslog=yes
17430 else
17431   echo "$as_me: failed program was:" >&5
17432 sed 's/^/| /' conftest.$ac_ext >&5
17433
17434         ac_cv_func_syslog=no
17435 fi
17436
17437 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17438       conftest$ac_exeext conftest.$ac_ext
17439 fi
17440 { echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
17441 echo "${ECHO_T}$ac_cv_func_syslog" >&6; }
17442 if test $ac_cv_func_syslog = yes; then
17443   if test "${ac_cv_header_syslog_h+set}" = set; then
17444   { echo "$as_me:$LINENO: checking for syslog.h" >&5
17445 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6; }
17446 if test "${ac_cv_header_syslog_h+set}" = set; then
17447   echo $ECHO_N "(cached) $ECHO_C" >&6
17448 fi
17449 { echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
17450 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6; }
17451 else
17452   # Is the header compilable?
17453 { echo "$as_me:$LINENO: checking syslog.h usability" >&5
17454 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6; }
17455 cat >conftest.$ac_ext <<_ACEOF
17456 /* confdefs.h.  */
17457 _ACEOF
17458 cat confdefs.h >>conftest.$ac_ext
17459 cat >>conftest.$ac_ext <<_ACEOF
17460 /* end confdefs.h.  */
17461 $ac_includes_default
17462 #include <syslog.h>
17463 _ACEOF
17464 rm -f conftest.$ac_objext
17465 if { (ac_try="$ac_compile"
17466 case "(($ac_try" in
17467   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17468   *) ac_try_echo=$ac_try;;
17469 esac
17470 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17471   (eval "$ac_compile") 2>conftest.er1
17472   ac_status=$?
17473   grep -v '^ *+' conftest.er1 >conftest.err
17474   rm -f conftest.er1
17475   cat conftest.err >&5
17476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17477   (exit $ac_status); } && {
17478          test -z "$ac_c_werror_flag" ||
17479          test ! -s conftest.err
17480        } && test -s conftest.$ac_objext; then
17481   ac_header_compiler=yes
17482 else
17483   echo "$as_me: failed program was:" >&5
17484 sed 's/^/| /' conftest.$ac_ext >&5
17485
17486         ac_header_compiler=no
17487 fi
17488
17489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17490 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17491 echo "${ECHO_T}$ac_header_compiler" >&6; }
17492
17493 # Is the header present?
17494 { echo "$as_me:$LINENO: checking syslog.h presence" >&5
17495 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6; }
17496 cat >conftest.$ac_ext <<_ACEOF
17497 /* confdefs.h.  */
17498 _ACEOF
17499 cat confdefs.h >>conftest.$ac_ext
17500 cat >>conftest.$ac_ext <<_ACEOF
17501 /* end confdefs.h.  */
17502 #include <syslog.h>
17503 _ACEOF
17504 if { (ac_try="$ac_cpp conftest.$ac_ext"
17505 case "(($ac_try" in
17506   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17507   *) ac_try_echo=$ac_try;;
17508 esac
17509 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17510   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17511   ac_status=$?
17512   grep -v '^ *+' conftest.er1 >conftest.err
17513   rm -f conftest.er1
17514   cat conftest.err >&5
17515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17516   (exit $ac_status); } >/dev/null && {
17517          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17518          test ! -s conftest.err
17519        }; then
17520   ac_header_preproc=yes
17521 else
17522   echo "$as_me: failed program was:" >&5
17523 sed 's/^/| /' conftest.$ac_ext >&5
17524
17525   ac_header_preproc=no
17526 fi
17527
17528 rm -f conftest.err conftest.$ac_ext
17529 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17530 echo "${ECHO_T}$ac_header_preproc" >&6; }
17531
17532 # So?  What about this header?
17533 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17534   yes:no: )
17535     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
17536 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17537     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
17538 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
17539     ac_header_preproc=yes
17540     ;;
17541   no:yes:* )
17542     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
17543 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
17544     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
17545 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
17546     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
17547 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
17548     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
17549 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17550     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
17551 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
17552     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
17553 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
17554     ( cat <<\_ASBOX
17555 ## ---------------------------------------- ##
17556 ## Report this to pgsql-bugs@postgresql.org ##
17557 ## ---------------------------------------- ##
17558 _ASBOX
17559      ) | sed "s/^/$as_me: WARNING:     /" >&2
17560     ;;
17561 esac
17562 { echo "$as_me:$LINENO: checking for syslog.h" >&5
17563 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6; }
17564 if test "${ac_cv_header_syslog_h+set}" = set; then
17565   echo $ECHO_N "(cached) $ECHO_C" >&6
17566 else
17567   ac_cv_header_syslog_h=$ac_header_preproc
17568 fi
17569 { echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
17570 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6; }
17571
17572 fi
17573 if test $ac_cv_header_syslog_h = yes; then
17574
17575 cat >>confdefs.h <<\_ACEOF
17576 #define HAVE_SYSLOG 1
17577 _ACEOF
17578
17579 fi
17580
17581
17582 fi
17583
17584
17585 { echo "$as_me:$LINENO: checking for optreset" >&5
17586 echo $ECHO_N "checking for optreset... $ECHO_C" >&6; }
17587 if test "${pgac_cv_var_int_optreset+set}" = set; then
17588   echo $ECHO_N "(cached) $ECHO_C" >&6
17589 else
17590   cat >conftest.$ac_ext <<_ACEOF
17591 /* confdefs.h.  */
17592 _ACEOF
17593 cat confdefs.h >>conftest.$ac_ext
17594 cat >>conftest.$ac_ext <<_ACEOF
17595 /* end confdefs.h.  */
17596 #include <unistd.h>
17597 int
17598 main ()
17599 {
17600 extern int optreset; optreset = 1;
17601   ;
17602   return 0;
17603 }
17604 _ACEOF
17605 rm -f conftest.$ac_objext conftest$ac_exeext
17606 if { (ac_try="$ac_link"
17607 case "(($ac_try" in
17608   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17609   *) ac_try_echo=$ac_try;;
17610 esac
17611 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17612   (eval "$ac_link") 2>conftest.er1
17613   ac_status=$?
17614   grep -v '^ *+' conftest.er1 >conftest.err
17615   rm -f conftest.er1
17616   cat conftest.err >&5
17617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17618   (exit $ac_status); } && {
17619          test -z "$ac_c_werror_flag" ||
17620          test ! -s conftest.err
17621        } && test -s conftest$ac_exeext &&
17622        $as_test_x conftest$ac_exeext; then
17623   pgac_cv_var_int_optreset=yes
17624 else
17625   echo "$as_me: failed program was:" >&5
17626 sed 's/^/| /' conftest.$ac_ext >&5
17627
17628         pgac_cv_var_int_optreset=no
17629 fi
17630
17631 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17632       conftest$ac_exeext conftest.$ac_ext
17633 fi
17634 { echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
17635 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6; }
17636 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
17637
17638 cat >>confdefs.h <<\_ACEOF
17639 #define HAVE_INT_OPTRESET 1
17640 _ACEOF
17641
17642 fi
17643
17644
17645
17646 for ac_func in strtoll strtoq
17647 do
17648 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17649 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17650 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17651 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17652   echo $ECHO_N "(cached) $ECHO_C" >&6
17653 else
17654   cat >conftest.$ac_ext <<_ACEOF
17655 /* confdefs.h.  */
17656 _ACEOF
17657 cat confdefs.h >>conftest.$ac_ext
17658 cat >>conftest.$ac_ext <<_ACEOF
17659 /* end confdefs.h.  */
17660 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17661    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17662 #define $ac_func innocuous_$ac_func
17663
17664 /* System header to define __stub macros and hopefully few prototypes,
17665     which can conflict with char $ac_func (); below.
17666     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17667     <limits.h> exists even on freestanding compilers.  */
17668
17669 #ifdef __STDC__
17670 # include <limits.h>
17671 #else
17672 # include <assert.h>
17673 #endif
17674
17675 #undef $ac_func
17676
17677 /* Override any GCC internal prototype to avoid an error.
17678    Use char because int might match the return type of a GCC
17679    builtin and then its argument prototype would still apply.  */
17680 #ifdef __cplusplus
17681 extern "C"
17682 #endif
17683 char $ac_func ();
17684 /* The GNU C library defines this for functions which it implements
17685     to always fail with ENOSYS.  Some functions are actually named
17686     something starting with __ and the normal name is an alias.  */
17687 #if defined __stub_$ac_func || defined __stub___$ac_func
17688 choke me
17689 #endif
17690
17691 int
17692 main ()
17693 {
17694 return $ac_func ();
17695   ;
17696   return 0;
17697 }
17698 _ACEOF
17699 rm -f conftest.$ac_objext conftest$ac_exeext
17700 if { (ac_try="$ac_link"
17701 case "(($ac_try" in
17702   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17703   *) ac_try_echo=$ac_try;;
17704 esac
17705 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17706   (eval "$ac_link") 2>conftest.er1
17707   ac_status=$?
17708   grep -v '^ *+' conftest.er1 >conftest.err
17709   rm -f conftest.er1
17710   cat conftest.err >&5
17711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17712   (exit $ac_status); } && {
17713          test -z "$ac_c_werror_flag" ||
17714          test ! -s conftest.err
17715        } && test -s conftest$ac_exeext &&
17716        $as_test_x conftest$ac_exeext; then
17717   eval "$as_ac_var=yes"
17718 else
17719   echo "$as_me: failed program was:" >&5
17720 sed 's/^/| /' conftest.$ac_ext >&5
17721
17722         eval "$as_ac_var=no"
17723 fi
17724
17725 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17726       conftest$ac_exeext conftest.$ac_ext
17727 fi
17728 ac_res=`eval echo '${'$as_ac_var'}'`
17729                { echo "$as_me:$LINENO: result: $ac_res" >&5
17730 echo "${ECHO_T}$ac_res" >&6; }
17731 if test `eval echo '${'$as_ac_var'}'` = yes; then
17732   cat >>confdefs.h <<_ACEOF
17733 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17734 _ACEOF
17735  break
17736 fi
17737 done
17738
17739
17740
17741 for ac_func in strtoull strtouq
17742 do
17743 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17744 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17745 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17746 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17747   echo $ECHO_N "(cached) $ECHO_C" >&6
17748 else
17749   cat >conftest.$ac_ext <<_ACEOF
17750 /* confdefs.h.  */
17751 _ACEOF
17752 cat confdefs.h >>conftest.$ac_ext
17753 cat >>conftest.$ac_ext <<_ACEOF
17754 /* end confdefs.h.  */
17755 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17756    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17757 #define $ac_func innocuous_$ac_func
17758
17759 /* System header to define __stub macros and hopefully few prototypes,
17760     which can conflict with char $ac_func (); below.
17761     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17762     <limits.h> exists even on freestanding compilers.  */
17763
17764 #ifdef __STDC__
17765 # include <limits.h>
17766 #else
17767 # include <assert.h>
17768 #endif
17769
17770 #undef $ac_func
17771
17772 /* Override any GCC internal prototype to avoid an error.
17773    Use char because int might match the return type of a GCC
17774    builtin and then its argument prototype would still apply.  */
17775 #ifdef __cplusplus
17776 extern "C"
17777 #endif
17778 char $ac_func ();
17779 /* The GNU C library defines this for functions which it implements
17780     to always fail with ENOSYS.  Some functions are actually named
17781     something starting with __ and the normal name is an alias.  */
17782 #if defined __stub_$ac_func || defined __stub___$ac_func
17783 choke me
17784 #endif
17785
17786 int
17787 main ()
17788 {
17789 return $ac_func ();
17790   ;
17791   return 0;
17792 }
17793 _ACEOF
17794 rm -f conftest.$ac_objext conftest$ac_exeext
17795 if { (ac_try="$ac_link"
17796 case "(($ac_try" in
17797   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17798   *) ac_try_echo=$ac_try;;
17799 esac
17800 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17801   (eval "$ac_link") 2>conftest.er1
17802   ac_status=$?
17803   grep -v '^ *+' conftest.er1 >conftest.err
17804   rm -f conftest.er1
17805   cat conftest.err >&5
17806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17807   (exit $ac_status); } && {
17808          test -z "$ac_c_werror_flag" ||
17809          test ! -s conftest.err
17810        } && test -s conftest$ac_exeext &&
17811        $as_test_x conftest$ac_exeext; then
17812   eval "$as_ac_var=yes"
17813 else
17814   echo "$as_me: failed program was:" >&5
17815 sed 's/^/| /' conftest.$ac_ext >&5
17816
17817         eval "$as_ac_var=no"
17818 fi
17819
17820 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17821       conftest$ac_exeext conftest.$ac_ext
17822 fi
17823 ac_res=`eval echo '${'$as_ac_var'}'`
17824                { echo "$as_me:$LINENO: result: $ac_res" >&5
17825 echo "${ECHO_T}$ac_res" >&6; }
17826 if test `eval echo '${'$as_ac_var'}'` = yes; then
17827   cat >>confdefs.h <<_ACEOF
17828 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17829 _ACEOF
17830  break
17831 fi
17832 done
17833
17834
17835 # Check for one of atexit() or on_exit()
17836
17837 for ac_func in atexit
17838 do
17839 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17840 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17841 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17842 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17843   echo $ECHO_N "(cached) $ECHO_C" >&6
17844 else
17845   cat >conftest.$ac_ext <<_ACEOF
17846 /* confdefs.h.  */
17847 _ACEOF
17848 cat confdefs.h >>conftest.$ac_ext
17849 cat >>conftest.$ac_ext <<_ACEOF
17850 /* end confdefs.h.  */
17851 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17852    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17853 #define $ac_func innocuous_$ac_func
17854
17855 /* System header to define __stub macros and hopefully few prototypes,
17856     which can conflict with char $ac_func (); below.
17857     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17858     <limits.h> exists even on freestanding compilers.  */
17859
17860 #ifdef __STDC__
17861 # include <limits.h>
17862 #else
17863 # include <assert.h>
17864 #endif
17865
17866 #undef $ac_func
17867
17868 /* Override any GCC internal prototype to avoid an error.
17869    Use char because int might match the return type of a GCC
17870    builtin and then its argument prototype would still apply.  */
17871 #ifdef __cplusplus
17872 extern "C"
17873 #endif
17874 char $ac_func ();
17875 /* The GNU C library defines this for functions which it implements
17876     to always fail with ENOSYS.  Some functions are actually named
17877     something starting with __ and the normal name is an alias.  */
17878 #if defined __stub_$ac_func || defined __stub___$ac_func
17879 choke me
17880 #endif
17881
17882 int
17883 main ()
17884 {
17885 return $ac_func ();
17886   ;
17887   return 0;
17888 }
17889 _ACEOF
17890 rm -f conftest.$ac_objext conftest$ac_exeext
17891 if { (ac_try="$ac_link"
17892 case "(($ac_try" in
17893   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17894   *) ac_try_echo=$ac_try;;
17895 esac
17896 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17897   (eval "$ac_link") 2>conftest.er1
17898   ac_status=$?
17899   grep -v '^ *+' conftest.er1 >conftest.err
17900   rm -f conftest.er1
17901   cat conftest.err >&5
17902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17903   (exit $ac_status); } && {
17904          test -z "$ac_c_werror_flag" ||
17905          test ! -s conftest.err
17906        } && test -s conftest$ac_exeext &&
17907        $as_test_x conftest$ac_exeext; then
17908   eval "$as_ac_var=yes"
17909 else
17910   echo "$as_me: failed program was:" >&5
17911 sed 's/^/| /' conftest.$ac_ext >&5
17912
17913         eval "$as_ac_var=no"
17914 fi
17915
17916 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17917       conftest$ac_exeext conftest.$ac_ext
17918 fi
17919 ac_res=`eval echo '${'$as_ac_var'}'`
17920                { echo "$as_me:$LINENO: result: $ac_res" >&5
17921 echo "${ECHO_T}$ac_res" >&6; }
17922 if test `eval echo '${'$as_ac_var'}'` = yes; then
17923   cat >>confdefs.h <<_ACEOF
17924 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17925 _ACEOF
17926
17927 else
17928
17929 for ac_func in on_exit
17930 do
17931 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17932 { echo "$as_me:$LINENO: checking for $ac_func" >&5
17933 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17934 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17935   echo $ECHO_N "(cached) $ECHO_C" >&6
17936 else
17937   cat >conftest.$ac_ext <<_ACEOF
17938 /* confdefs.h.  */
17939 _ACEOF
17940 cat confdefs.h >>conftest.$ac_ext
17941 cat >>conftest.$ac_ext <<_ACEOF
17942 /* end confdefs.h.  */
17943 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17944    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17945 #define $ac_func innocuous_$ac_func
17946
17947 /* System header to define __stub macros and hopefully few prototypes,
17948     which can conflict with char $ac_func (); below.
17949     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17950     <limits.h> exists even on freestanding compilers.  */
17951
17952 #ifdef __STDC__
17953 # include <limits.h>
17954 #else
17955 # include <assert.h>
17956 #endif
17957
17958 #undef $ac_func
17959
17960 /* Override any GCC internal prototype to avoid an error.
17961    Use char because int might match the return type of a GCC
17962    builtin and then its argument prototype would still apply.  */
17963 #ifdef __cplusplus
17964 extern "C"
17965 #endif
17966 char $ac_func ();
17967 /* The GNU C library defines this for functions which it implements
17968     to always fail with ENOSYS.  Some functions are actually named
17969     something starting with __ and the normal name is an alias.  */
17970 #if defined __stub_$ac_func || defined __stub___$ac_func
17971 choke me
17972 #endif
17973
17974 int
17975 main ()
17976 {
17977 return $ac_func ();
17978   ;
17979   return 0;
17980 }
17981 _ACEOF
17982 rm -f conftest.$ac_objext conftest$ac_exeext
17983 if { (ac_try="$ac_link"
17984 case "(($ac_try" in
17985   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17986   *) ac_try_echo=$ac_try;;
17987 esac
17988 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17989   (eval "$ac_link") 2>conftest.er1
17990   ac_status=$?
17991   grep -v '^ *+' conftest.er1 >conftest.err
17992   rm -f conftest.er1
17993   cat conftest.err >&5
17994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17995   (exit $ac_status); } && {
17996          test -z "$ac_c_werror_flag" ||
17997          test ! -s conftest.err
17998        } && test -s conftest$ac_exeext &&
17999        $as_test_x conftest$ac_exeext; then
18000   eval "$as_ac_var=yes"
18001 else
18002   echo "$as_me: failed program was:" >&5
18003 sed 's/^/| /' conftest.$ac_ext >&5
18004
18005         eval "$as_ac_var=no"
18006 fi
18007
18008 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18009       conftest$ac_exeext conftest.$ac_ext
18010 fi
18011 ac_res=`eval echo '${'$as_ac_var'}'`
18012                { echo "$as_me:$LINENO: result: $ac_res" >&5
18013 echo "${ECHO_T}$ac_res" >&6; }
18014 if test `eval echo '${'$as_ac_var'}'` = yes; then
18015   cat >>confdefs.h <<_ACEOF
18016 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18017 _ACEOF
18018
18019 else
18020   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
18021 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
18022    { (exit 1); exit 1; }; }
18023 fi
18024 done
18025
18026 fi
18027 done
18028
18029
18030
18031 for ac_func in fseeko
18032 do
18033 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18034 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18035 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18036 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18037   echo $ECHO_N "(cached) $ECHO_C" >&6
18038 else
18039   cat >conftest.$ac_ext <<_ACEOF
18040 /* confdefs.h.  */
18041 _ACEOF
18042 cat confdefs.h >>conftest.$ac_ext
18043 cat >>conftest.$ac_ext <<_ACEOF
18044 /* end confdefs.h.  */
18045 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18046    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18047 #define $ac_func innocuous_$ac_func
18048
18049 /* System header to define __stub macros and hopefully few prototypes,
18050     which can conflict with char $ac_func (); below.
18051     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18052     <limits.h> exists even on freestanding compilers.  */
18053
18054 #ifdef __STDC__
18055 # include <limits.h>
18056 #else
18057 # include <assert.h>
18058 #endif
18059
18060 #undef $ac_func
18061
18062 /* Override any GCC internal prototype to avoid an error.
18063    Use char because int might match the return type of a GCC
18064    builtin and then its argument prototype would still apply.  */
18065 #ifdef __cplusplus
18066 extern "C"
18067 #endif
18068 char $ac_func ();
18069 /* The GNU C library defines this for functions which it implements
18070     to always fail with ENOSYS.  Some functions are actually named
18071     something starting with __ and the normal name is an alias.  */
18072 #if defined __stub_$ac_func || defined __stub___$ac_func
18073 choke me
18074 #endif
18075
18076 int
18077 main ()
18078 {
18079 return $ac_func ();
18080   ;
18081   return 0;
18082 }
18083 _ACEOF
18084 rm -f conftest.$ac_objext conftest$ac_exeext
18085 if { (ac_try="$ac_link"
18086 case "(($ac_try" in
18087   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18088   *) ac_try_echo=$ac_try;;
18089 esac
18090 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18091   (eval "$ac_link") 2>conftest.er1
18092   ac_status=$?
18093   grep -v '^ *+' conftest.er1 >conftest.err
18094   rm -f conftest.er1
18095   cat conftest.err >&5
18096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18097   (exit $ac_status); } && {
18098          test -z "$ac_c_werror_flag" ||
18099          test ! -s conftest.err
18100        } && test -s conftest$ac_exeext &&
18101        $as_test_x conftest$ac_exeext; then
18102   eval "$as_ac_var=yes"
18103 else
18104   echo "$as_me: failed program was:" >&5
18105 sed 's/^/| /' conftest.$ac_ext >&5
18106
18107         eval "$as_ac_var=no"
18108 fi
18109
18110 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18111       conftest$ac_exeext conftest.$ac_ext
18112 fi
18113 ac_res=`eval echo '${'$as_ac_var'}'`
18114                { echo "$as_me:$LINENO: result: $ac_res" >&5
18115 echo "${ECHO_T}$ac_res" >&6; }
18116 if test `eval echo '${'$as_ac_var'}'` = yes; then
18117   cat >>confdefs.h <<_ACEOF
18118 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18119 _ACEOF
18120
18121 else
18122   case " $LIBOBJS " in
18123   *" $ac_func.$ac_objext "* ) ;;
18124   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18125  ;;
18126 esac
18127
18128 fi
18129 done
18130
18131
18132 case $host_os in
18133         # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
18134         bsdi*|netbsd*)
18135
18136 cat >>confdefs.h <<\_ACEOF
18137 #define HAVE_FSEEKO 1
18138 _ACEOF
18139
18140                 ac_cv_func_fseeko=yes;;
18141         *)
18142                 { echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18143 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
18144 if test "${ac_cv_sys_largefile_source+set}" = set; then
18145   echo $ECHO_N "(cached) $ECHO_C" >&6
18146 else
18147   while :; do
18148   cat >conftest.$ac_ext <<_ACEOF
18149 /* confdefs.h.  */
18150 _ACEOF
18151 cat confdefs.h >>conftest.$ac_ext
18152 cat >>conftest.$ac_ext <<_ACEOF
18153 /* end confdefs.h.  */
18154 #include <sys/types.h> /* for off_t */
18155      #include <stdio.h>
18156 int
18157 main ()
18158 {
18159 int (*fp) (FILE *, off_t, int) = fseeko;
18160      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
18161   ;
18162   return 0;
18163 }
18164 _ACEOF
18165 rm -f conftest.$ac_objext conftest$ac_exeext
18166 if { (ac_try="$ac_link"
18167 case "(($ac_try" in
18168   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18169   *) ac_try_echo=$ac_try;;
18170 esac
18171 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18172   (eval "$ac_link") 2>conftest.er1
18173   ac_status=$?
18174   grep -v '^ *+' conftest.er1 >conftest.err
18175   rm -f conftest.er1
18176   cat conftest.err >&5
18177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18178   (exit $ac_status); } && {
18179          test -z "$ac_c_werror_flag" ||
18180          test ! -s conftest.err
18181        } && test -s conftest$ac_exeext &&
18182        $as_test_x conftest$ac_exeext; then
18183   ac_cv_sys_largefile_source=no; break
18184 else
18185   echo "$as_me: failed program was:" >&5
18186 sed 's/^/| /' conftest.$ac_ext >&5
18187
18188
18189 fi
18190
18191 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18192       conftest$ac_exeext conftest.$ac_ext
18193   cat >conftest.$ac_ext <<_ACEOF
18194 /* confdefs.h.  */
18195 _ACEOF
18196 cat confdefs.h >>conftest.$ac_ext
18197 cat >>conftest.$ac_ext <<_ACEOF
18198 /* end confdefs.h.  */
18199 #define _LARGEFILE_SOURCE 1
18200 #include <sys/types.h> /* for off_t */
18201      #include <stdio.h>
18202 int
18203 main ()
18204 {
18205 int (*fp) (FILE *, off_t, int) = fseeko;
18206      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
18207   ;
18208   return 0;
18209 }
18210 _ACEOF
18211 rm -f conftest.$ac_objext conftest$ac_exeext
18212 if { (ac_try="$ac_link"
18213 case "(($ac_try" in
18214   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18215   *) ac_try_echo=$ac_try;;
18216 esac
18217 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18218   (eval "$ac_link") 2>conftest.er1
18219   ac_status=$?
18220   grep -v '^ *+' conftest.er1 >conftest.err
18221   rm -f conftest.er1
18222   cat conftest.err >&5
18223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18224   (exit $ac_status); } && {
18225          test -z "$ac_c_werror_flag" ||
18226          test ! -s conftest.err
18227        } && test -s conftest$ac_exeext &&
18228        $as_test_x conftest$ac_exeext; then
18229   ac_cv_sys_largefile_source=1; break
18230 else
18231   echo "$as_me: failed program was:" >&5
18232 sed 's/^/| /' conftest.$ac_ext >&5
18233
18234
18235 fi
18236
18237 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18238       conftest$ac_exeext conftest.$ac_ext
18239   ac_cv_sys_largefile_source=unknown
18240   break
18241 done
18242 fi
18243 { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18244 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
18245 case $ac_cv_sys_largefile_source in #(
18246   no | unknown) ;;
18247   *)
18248 cat >>confdefs.h <<_ACEOF
18249 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
18250 _ACEOF
18251 ;;
18252 esac
18253 rm -f conftest*
18254
18255 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18256 # in glibc 2.1.3, but that breaks too many other things.
18257 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
18258 if test $ac_cv_sys_largefile_source != unknown; then
18259
18260 cat >>confdefs.h <<\_ACEOF
18261 #define HAVE_FSEEKO 1
18262 _ACEOF
18263
18264 fi
18265 ;;
18266 esac
18267
18268
18269 #
18270 # Pthreads
18271 #
18272 # For each platform, we need to know about any special compile and link
18273 # libraries, and whether the normal C function names are thread-safe.
18274 # See the comment at the top of src/port/thread.c for more information.
18275 # WIN32 doesn't need the pthread tests;  it always uses threads
18276 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
18277
18278
18279
18280 ac_ext=c
18281 ac_cpp='$CPP $CPPFLAGS'
18282 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18283 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18284 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18285
18286 acx_pthread_ok=no
18287
18288 # We used to check for pthread.h first, but this fails if pthread.h
18289 # requires special compiler flags (e.g. on True64 or Sequent).
18290 # It gets checked for in the link test anyway.
18291
18292 # First of all, check if the user has set any of the PTHREAD_LIBS,
18293 # etcetera environment variables, and if threads linking works using
18294 # them:
18295 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
18296         save_CFLAGS="$CFLAGS"
18297         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18298         save_LIBS="$LIBS"
18299         LIBS="$PTHREAD_LIBS $LIBS"
18300         { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
18301 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; }
18302         cat >conftest.$ac_ext <<_ACEOF
18303 /* confdefs.h.  */
18304 _ACEOF
18305 cat confdefs.h >>conftest.$ac_ext
18306 cat >>conftest.$ac_ext <<_ACEOF
18307 /* end confdefs.h.  */
18308
18309 /* Override any GCC internal prototype to avoid an error.
18310    Use char because int might match the return type of a GCC
18311    builtin and then its argument prototype would still apply.  */
18312 #ifdef __cplusplus
18313 extern "C"
18314 #endif
18315 char pthread_join ();
18316 int
18317 main ()
18318 {
18319 return pthread_join ();
18320   ;
18321   return 0;
18322 }
18323 _ACEOF
18324 rm -f conftest.$ac_objext conftest$ac_exeext
18325 if { (ac_try="$ac_link"
18326 case "(($ac_try" in
18327   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18328   *) ac_try_echo=$ac_try;;
18329 esac
18330 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18331   (eval "$ac_link") 2>conftest.er1
18332   ac_status=$?
18333   grep -v '^ *+' conftest.er1 >conftest.err
18334   rm -f conftest.er1
18335   cat conftest.err >&5
18336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18337   (exit $ac_status); } && {
18338          test -z "$ac_c_werror_flag" ||
18339          test ! -s conftest.err
18340        } && test -s conftest$ac_exeext &&
18341        $as_test_x conftest$ac_exeext; then
18342   acx_pthread_ok=yes
18343 else
18344   echo "$as_me: failed program was:" >&5
18345 sed 's/^/| /' conftest.$ac_ext >&5
18346
18347
18348 fi
18349
18350 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18351       conftest$ac_exeext conftest.$ac_ext
18352         { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
18353 echo "${ECHO_T}$acx_pthread_ok" >&6; }
18354         if test x"$acx_pthread_ok" = xno; then
18355                 PTHREAD_LIBS=""
18356                 PTHREAD_CFLAGS=""
18357         fi
18358         LIBS="$save_LIBS"
18359         CFLAGS="$save_CFLAGS"
18360 fi
18361
18362 # We must check for the threads library under a number of different
18363 # names; the ordering is very important because some systems
18364 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
18365 # libraries is broken (non-POSIX).
18366
18367 # Create a list of thread flags to try.  Items starting with a "-" are
18368 # C compiler flags, and other items are library names, except for "none"
18369 # which indicates that we try without any flags at all, and "pthread-config"
18370 # which is a program returning the flags for the Pth emulation library.
18371
18372 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
18373
18374 # The ordering *is* (sometimes) important.  Some notes on the
18375 # individual items follow:
18376
18377 # pthreads: AIX (must check this before -lpthread)
18378 # none: in case threads are in libc; should be tried before -Kthread and
18379 #       other compiler flags to prevent continual compiler warnings
18380 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
18381 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
18382 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
18383 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
18384 # -pthreads: Solaris/gcc
18385 # -mthreads: Mingw32/gcc, Lynx/gcc
18386 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
18387 #      doesn't hurt to check since this sometimes defines pthreads too;
18388 #      also defines -D_REENTRANT)
18389 # pthread: Linux, etcetera
18390 # --thread-safe: KAI C++
18391 # pthread-config: use pthread-config program (for GNU Pth library)
18392
18393 case "${host_cpu}-${host_os}" in
18394         *solaris*)
18395
18396         # On Solaris (at least, for some versions), libc contains stubbed
18397         # (non-functional) versions of the pthreads routines, so link-based
18398         # tests will erroneously succeed.  (We need to link with -pthread or
18399         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
18400         # a function called by this macro, so we could check for that, but
18401         # who knows whether they'll stub that too in a future libc.)  So,
18402         # we'll just look for -pthreads and -lpthread first:
18403
18404         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
18405         ;;
18406 esac
18407
18408 if test x"$acx_pthread_ok" = xno; then
18409 for flag in $acx_pthread_flags; do
18410
18411         tryPTHREAD_CFLAGS=""
18412         tryPTHREAD_LIBS=""
18413         case $flag in
18414                 none)
18415                 { echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
18416 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6; }
18417                 ;;
18418
18419                 -*)
18420                 { echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
18421 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6; }
18422                 tryPTHREAD_CFLAGS="$flag"
18423                 ;;
18424
18425                 pthread-config)
18426                 # skip this if we already have flags defined, for PostgreSQL
18427                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
18428                 # Extract the first word of "pthread-config", so it can be a program name with args.
18429 set dummy pthread-config; ac_word=$2
18430 { echo "$as_me:$LINENO: checking for $ac_word" >&5
18431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
18432 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
18433   echo $ECHO_N "(cached) $ECHO_C" >&6
18434 else
18435   if test -n "$acx_pthread_config"; then
18436   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
18437 else
18438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18439 for as_dir in $PATH
18440 do
18441   IFS=$as_save_IFS
18442   test -z "$as_dir" && as_dir=.
18443   for ac_exec_ext in '' $ac_executable_extensions; do
18444   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18445     ac_cv_prog_acx_pthread_config="yes"
18446     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18447     break 2
18448   fi
18449 done
18450 done
18451 IFS=$as_save_IFS
18452
18453   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
18454 fi
18455 fi
18456 acx_pthread_config=$ac_cv_prog_acx_pthread_config
18457 if test -n "$acx_pthread_config"; then
18458   { echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
18459 echo "${ECHO_T}$acx_pthread_config" >&6; }
18460 else
18461   { echo "$as_me:$LINENO: result: no" >&5
18462 echo "${ECHO_T}no" >&6; }
18463 fi
18464
18465
18466                 if test x"$acx_pthread_config" = xno; then continue; fi
18467                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
18468                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
18469                 ;;
18470
18471                 *)
18472                 { echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
18473 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6; }
18474                 tryPTHREAD_LIBS="-l$flag"
18475                 ;;
18476         esac
18477
18478         save_LIBS="$LIBS"
18479         save_CFLAGS="$CFLAGS"
18480         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
18481         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
18482
18483         # Check for various functions.  We must include pthread.h,
18484         # since some functions may be macros.  (On the Sequent, we
18485         # need a special flag -Kthread to make this header compile.)
18486         # We check for pthread_join because it is in -lpthread on IRIX
18487         # while pthread_create is in libc.  We check for pthread_attr_init
18488         # due to DEC craziness with -lpthreads.  We check for
18489         # pthread_cleanup_push because it is one of the few pthread
18490         # functions on Solaris that doesn't have a non-functional libc stub.
18491         # We try pthread_create on general principles.
18492         cat >conftest.$ac_ext <<_ACEOF
18493 /* confdefs.h.  */
18494 _ACEOF
18495 cat confdefs.h >>conftest.$ac_ext
18496 cat >>conftest.$ac_ext <<_ACEOF
18497 /* end confdefs.h.  */
18498 #include <pthread.h>
18499 int
18500 main ()
18501 {
18502 pthread_t th; pthread_join(th, 0);
18503                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
18504                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
18505   ;
18506   return 0;
18507 }
18508 _ACEOF
18509 rm -f conftest.$ac_objext conftest$ac_exeext
18510 if { (ac_try="$ac_link"
18511 case "(($ac_try" in
18512   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18513   *) ac_try_echo=$ac_try;;
18514 esac
18515 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18516   (eval "$ac_link") 2>conftest.er1
18517   ac_status=$?
18518   grep -v '^ *+' conftest.er1 >conftest.err
18519   rm -f conftest.er1
18520   cat conftest.err >&5
18521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18522   (exit $ac_status); } && {
18523          test -z "$ac_c_werror_flag" ||
18524          test ! -s conftest.err
18525        } && test -s conftest$ac_exeext &&
18526        $as_test_x conftest$ac_exeext; then
18527   acx_pthread_ok=yes
18528 else
18529   echo "$as_me: failed program was:" >&5
18530 sed 's/^/| /' conftest.$ac_ext >&5
18531
18532         acx_pthread_ok=no
18533 fi
18534
18535 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18536       conftest$ac_exeext conftest.$ac_ext
18537
18538         if test "x$acx_pthread_ok" = xyes; then
18539             # Don't use options that are ignored by the compiler.
18540             # We find them by checking stderror.
18541             cat >conftest.$ac_ext <<_ACEOF
18542 int
18543 main (int argc, char **argv)
18544 {
18545   (void) argc;
18546   (void) argv;
18547   return 0;
18548 }
18549 _ACEOF
18550             rm -f conftest.$ac_objext conftest$ac_exeext
18551             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
18552                 # we continue with more flags because Linux needs -lpthread
18553                 # for libpq builds on PostgreSQL.  The test above only
18554                 # tests for building binaries, not shared libraries.
18555                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
18556                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
18557             else   acx_pthread_ok=no
18558             fi
18559         fi
18560
18561         LIBS="$save_LIBS"
18562         CFLAGS="$save_CFLAGS"
18563
18564         { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
18565 echo "${ECHO_T}$acx_pthread_ok" >&6; }
18566 done
18567 fi
18568
18569 # Various other checks:
18570 if test "x$acx_pthread_ok" = xyes; then
18571         save_LIBS="$LIBS"
18572         LIBS="$PTHREAD_LIBS $LIBS"
18573         save_CFLAGS="$CFLAGS"
18574         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18575
18576         # Detect AIX lossage: threads are created detached by default
18577         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
18578         { echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
18579 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6; }
18580         cat >conftest.$ac_ext <<_ACEOF
18581 /* confdefs.h.  */
18582 _ACEOF
18583 cat confdefs.h >>conftest.$ac_ext
18584 cat >>conftest.$ac_ext <<_ACEOF
18585 /* end confdefs.h.  */
18586 #include <pthread.h>
18587 int
18588 main ()
18589 {
18590 int attr=PTHREAD_CREATE_JOINABLE;
18591   ;
18592   return 0;
18593 }
18594 _ACEOF
18595 rm -f conftest.$ac_objext conftest$ac_exeext
18596 if { (ac_try="$ac_link"
18597 case "(($ac_try" in
18598   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18599   *) ac_try_echo=$ac_try;;
18600 esac
18601 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18602   (eval "$ac_link") 2>conftest.er1
18603   ac_status=$?
18604   grep -v '^ *+' conftest.er1 >conftest.err
18605   rm -f conftest.er1
18606   cat conftest.err >&5
18607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18608   (exit $ac_status); } && {
18609          test -z "$ac_c_werror_flag" ||
18610          test ! -s conftest.err
18611        } && test -s conftest$ac_exeext &&
18612        $as_test_x conftest$ac_exeext; then
18613   ok=PTHREAD_CREATE_JOINABLE
18614 else
18615   echo "$as_me: failed program was:" >&5
18616 sed 's/^/| /' conftest.$ac_ext >&5
18617
18618         ok=unknown
18619 fi
18620
18621 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18622       conftest$ac_exeext conftest.$ac_ext
18623         if test x"$ok" = xunknown; then
18624                 cat >conftest.$ac_ext <<_ACEOF
18625 /* confdefs.h.  */
18626 _ACEOF
18627 cat confdefs.h >>conftest.$ac_ext
18628 cat >>conftest.$ac_ext <<_ACEOF
18629 /* end confdefs.h.  */
18630 #include <pthread.h>
18631 int
18632 main ()
18633 {
18634 int attr=PTHREAD_CREATE_UNDETACHED;
18635   ;
18636   return 0;
18637 }
18638 _ACEOF
18639 rm -f conftest.$ac_objext conftest$ac_exeext
18640 if { (ac_try="$ac_link"
18641 case "(($ac_try" in
18642   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18643   *) ac_try_echo=$ac_try;;
18644 esac
18645 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18646   (eval "$ac_link") 2>conftest.er1
18647   ac_status=$?
18648   grep -v '^ *+' conftest.er1 >conftest.err
18649   rm -f conftest.er1
18650   cat conftest.err >&5
18651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18652   (exit $ac_status); } && {
18653          test -z "$ac_c_werror_flag" ||
18654          test ! -s conftest.err
18655        } && test -s conftest$ac_exeext &&
18656        $as_test_x conftest$ac_exeext; then
18657   ok=PTHREAD_CREATE_UNDETACHED
18658 else
18659   echo "$as_me: failed program was:" >&5
18660 sed 's/^/| /' conftest.$ac_ext >&5
18661
18662         ok=unknown
18663 fi
18664
18665 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18666       conftest$ac_exeext conftest.$ac_ext
18667         fi
18668         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
18669
18670 cat >>confdefs.h <<\_ACEOF
18671 #define PTHREAD_CREATE_JOINABLE $ok
18672 _ACEOF
18673
18674         fi
18675         { echo "$as_me:$LINENO: result: ${ok}" >&5
18676 echo "${ECHO_T}${ok}" >&6; }
18677         if test x"$ok" = xunknown; then
18678                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
18679 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
18680         fi
18681
18682         { echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
18683 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; }
18684         flag=no
18685 # We always add these in PostgreSQL
18686 #       case "${host_cpu}-${host_os}" in
18687 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
18688 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
18689 #       esac
18690         { echo "$as_me:$LINENO: result: ${flag}" >&5
18691 echo "${ECHO_T}${flag}" >&6; }
18692         if test "x$flag" != xno; then
18693                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
18694         fi
18695
18696         LIBS="$save_LIBS"
18697         CFLAGS="$save_CFLAGS"
18698
18699 # Supporting cc_r would require a special CC in all places that
18700 # use libpq, and that is ugly, so we don't do it.  Users can still
18701 # define their compiler as cc_r to do thread builds of everything.
18702         # More AIX lossage: must compile with cc_r
18703         # Extract the first word of "cc_r", so it can be a program name with args.
18704 set dummy cc_r; ac_word=$2
18705 { echo "$as_me:$LINENO: checking for $ac_word" >&5
18706 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
18707 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
18708   echo $ECHO_N "(cached) $ECHO_C" >&6
18709 else
18710   if test -n "$PTHREAD_CC"; then
18711   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
18712 else
18713 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18714 for as_dir in $PATH
18715 do
18716   IFS=$as_save_IFS
18717   test -z "$as_dir" && as_dir=.
18718   for ac_exec_ext in '' $ac_executable_extensions; do
18719   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18720     ac_cv_prog_PTHREAD_CC="cc_r"
18721     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
18722     break 2
18723   fi
18724 done
18725 done
18726 IFS=$as_save_IFS
18727
18728   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
18729 fi
18730 fi
18731 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
18732 if test -n "$PTHREAD_CC"; then
18733   { echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
18734 echo "${ECHO_T}$PTHREAD_CC" >&6; }
18735 else
18736   { echo "$as_me:$LINENO: result: no" >&5
18737 echo "${ECHO_T}no" >&6; }
18738 fi
18739
18740
18741 else
18742         PTHREAD_CC="$CC"
18743 fi
18744
18745
18746
18747
18748
18749 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
18750 if test x"$acx_pthread_ok" = xyes; then
18751
18752 cat >>confdefs.h <<\_ACEOF
18753 #define HAVE_PTHREAD 1
18754 _ACEOF
18755
18756         :
18757 else
18758         acx_pthread_ok=no
18759
18760 fi
18761 ac_ext=c
18762 ac_cpp='$CPP $CPPFLAGS'
18763 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18764 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18765 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18766
18767         # set thread flags
18768
18769 # Some platforms use these, so just defineed them.  They can't hurt if they
18770 # are not supported.
18771 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
18772
18773
18774 # At this point, we don't want to muck with the compiler name for threading.
18775 # Let's see who fails, perhaps AIX.  2004-04-23
18776 if test "$PTHREAD_CC" != "$CC"; then
18777 { { echo "$as_me:$LINENO: error:
18778 PostgreSQL does not support platforms that require a special compiler
18779 for thread safety." >&5
18780 echo "$as_me: error:
18781 PostgreSQL does not support platforms that require a special compiler
18782 for thread safety." >&2;}
18783    { (exit 1); exit 1; }; }
18784 fi
18785
18786 if test "$THREAD_SUPPORT" = no; then
18787 { { echo "$as_me:$LINENO: error: cannot enable threads on this platform
18788 This platform is known to not support thread-safe programs.  For details,
18789 compile and run src/bin/pg_thread_test." >&5
18790 echo "$as_me: error: cannot enable threads on this platform
18791 This platform is known to not support thread-safe programs.  For details,
18792 compile and run src/bin/pg_thread_test." >&2;}
18793    { (exit 1); exit 1; }; }
18794 fi
18795
18796 # Check for *_r functions
18797 _CFLAGS="$CFLAGS"
18798 _LIBS="$LIBS"
18799 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
18800 LIBS="$LIBS $PTHREAD_LIBS"
18801
18802 if test "$PORTNAME" != "win32"; then
18803 if test "${ac_cv_header_pthread_h+set}" = set; then
18804   { echo "$as_me:$LINENO: checking for pthread.h" >&5
18805 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
18806 if test "${ac_cv_header_pthread_h+set}" = set; then
18807   echo $ECHO_N "(cached) $ECHO_C" >&6
18808 fi
18809 { echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
18810 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
18811 else
18812   # Is the header compilable?
18813 { echo "$as_me:$LINENO: checking pthread.h usability" >&5
18814 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6; }
18815 cat >conftest.$ac_ext <<_ACEOF
18816 /* confdefs.h.  */
18817 _ACEOF
18818 cat confdefs.h >>conftest.$ac_ext
18819 cat >>conftest.$ac_ext <<_ACEOF
18820 /* end confdefs.h.  */
18821 $ac_includes_default
18822 #include <pthread.h>
18823 _ACEOF
18824 rm -f conftest.$ac_objext
18825 if { (ac_try="$ac_compile"
18826 case "(($ac_try" in
18827   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18828   *) ac_try_echo=$ac_try;;
18829 esac
18830 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18831   (eval "$ac_compile") 2>conftest.er1
18832   ac_status=$?
18833   grep -v '^ *+' conftest.er1 >conftest.err
18834   rm -f conftest.er1
18835   cat conftest.err >&5
18836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18837   (exit $ac_status); } && {
18838          test -z "$ac_c_werror_flag" ||
18839          test ! -s conftest.err
18840        } && test -s conftest.$ac_objext; then
18841   ac_header_compiler=yes
18842 else
18843   echo "$as_me: failed program was:" >&5
18844 sed 's/^/| /' conftest.$ac_ext >&5
18845
18846         ac_header_compiler=no
18847 fi
18848
18849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18850 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18851 echo "${ECHO_T}$ac_header_compiler" >&6; }
18852
18853 # Is the header present?
18854 { echo "$as_me:$LINENO: checking pthread.h presence" >&5
18855 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6; }
18856 cat >conftest.$ac_ext <<_ACEOF
18857 /* confdefs.h.  */
18858 _ACEOF
18859 cat confdefs.h >>conftest.$ac_ext
18860 cat >>conftest.$ac_ext <<_ACEOF
18861 /* end confdefs.h.  */
18862 #include <pthread.h>
18863 _ACEOF
18864 if { (ac_try="$ac_cpp conftest.$ac_ext"
18865 case "(($ac_try" in
18866   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18867   *) ac_try_echo=$ac_try;;
18868 esac
18869 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18870   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18871   ac_status=$?
18872   grep -v '^ *+' conftest.er1 >conftest.err
18873   rm -f conftest.er1
18874   cat conftest.err >&5
18875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18876   (exit $ac_status); } >/dev/null && {
18877          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18878          test ! -s conftest.err
18879        }; then
18880   ac_header_preproc=yes
18881 else
18882   echo "$as_me: failed program was:" >&5
18883 sed 's/^/| /' conftest.$ac_ext >&5
18884
18885   ac_header_preproc=no
18886 fi
18887
18888 rm -f conftest.err conftest.$ac_ext
18889 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18890 echo "${ECHO_T}$ac_header_preproc" >&6; }
18891
18892 # So?  What about this header?
18893 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18894   yes:no: )
18895     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
18896 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18897     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
18898 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
18899     ac_header_preproc=yes
18900     ;;
18901   no:yes:* )
18902     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
18903 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
18904     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
18905 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
18906     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
18907 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
18908     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
18909 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
18910     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
18911 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
18912     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
18913 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
18914     ( cat <<\_ASBOX
18915 ## ---------------------------------------- ##
18916 ## Report this to pgsql-bugs@postgresql.org ##
18917 ## ---------------------------------------- ##
18918 _ASBOX
18919      ) | sed "s/^/$as_me: WARNING:     /" >&2
18920     ;;
18921 esac
18922 { echo "$as_me:$LINENO: checking for pthread.h" >&5
18923 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6; }
18924 if test "${ac_cv_header_pthread_h+set}" = set; then
18925   echo $ECHO_N "(cached) $ECHO_C" >&6
18926 else
18927   ac_cv_header_pthread_h=$ac_header_preproc
18928 fi
18929 { echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
18930 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6; }
18931
18932 fi
18933 if test $ac_cv_header_pthread_h = yes; then
18934   :
18935 else
18936   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
18937 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
18938    { (exit 1); exit 1; }; }
18939 fi
18940
18941
18942 fi
18943
18944
18945
18946
18947 for ac_func in strerror_r getpwuid_r gethostbyname_r
18948 do
18949 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18950 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18951 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18952 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18953   echo $ECHO_N "(cached) $ECHO_C" >&6
18954 else
18955   cat >conftest.$ac_ext <<_ACEOF
18956 /* confdefs.h.  */
18957 _ACEOF
18958 cat confdefs.h >>conftest.$ac_ext
18959 cat >>conftest.$ac_ext <<_ACEOF
18960 /* end confdefs.h.  */
18961 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18962    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18963 #define $ac_func innocuous_$ac_func
18964
18965 /* System header to define __stub macros and hopefully few prototypes,
18966     which can conflict with char $ac_func (); below.
18967     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18968     <limits.h> exists even on freestanding compilers.  */
18969
18970 #ifdef __STDC__
18971 # include <limits.h>
18972 #else
18973 # include <assert.h>
18974 #endif
18975
18976 #undef $ac_func
18977
18978 /* Override any GCC internal prototype to avoid an error.
18979    Use char because int might match the return type of a GCC
18980    builtin and then its argument prototype would still apply.  */
18981 #ifdef __cplusplus
18982 extern "C"
18983 #endif
18984 char $ac_func ();
18985 /* The GNU C library defines this for functions which it implements
18986     to always fail with ENOSYS.  Some functions are actually named
18987     something starting with __ and the normal name is an alias.  */
18988 #if defined __stub_$ac_func || defined __stub___$ac_func
18989 choke me
18990 #endif
18991
18992 int
18993 main ()
18994 {
18995 return $ac_func ();
18996   ;
18997   return 0;
18998 }
18999 _ACEOF
19000 rm -f conftest.$ac_objext conftest$ac_exeext
19001 if { (ac_try="$ac_link"
19002 case "(($ac_try" in
19003   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19004   *) ac_try_echo=$ac_try;;
19005 esac
19006 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19007   (eval "$ac_link") 2>conftest.er1
19008   ac_status=$?
19009   grep -v '^ *+' conftest.er1 >conftest.err
19010   rm -f conftest.er1
19011   cat conftest.err >&5
19012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19013   (exit $ac_status); } && {
19014          test -z "$ac_c_werror_flag" ||
19015          test ! -s conftest.err
19016        } && test -s conftest$ac_exeext &&
19017        $as_test_x conftest$ac_exeext; then
19018   eval "$as_ac_var=yes"
19019 else
19020   echo "$as_me: failed program was:" >&5
19021 sed 's/^/| /' conftest.$ac_ext >&5
19022
19023         eval "$as_ac_var=no"
19024 fi
19025
19026 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19027       conftest$ac_exeext conftest.$ac_ext
19028 fi
19029 ac_res=`eval echo '${'$as_ac_var'}'`
19030                { echo "$as_me:$LINENO: result: $ac_res" >&5
19031 echo "${ECHO_T}$ac_res" >&6; }
19032 if test `eval echo '${'$as_ac_var'}'` = yes; then
19033   cat >>confdefs.h <<_ACEOF
19034 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19035 _ACEOF
19036
19037 fi
19038 done
19039
19040
19041 # Do test here with the proper thread flags
19042 { echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
19043 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6; }
19044 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
19045   echo $ECHO_N "(cached) $ECHO_C" >&6
19046 else
19047   cat >conftest.$ac_ext <<_ACEOF
19048 /* confdefs.h.  */
19049 _ACEOF
19050 cat confdefs.h >>conftest.$ac_ext
19051 cat >>conftest.$ac_ext <<_ACEOF
19052 /* end confdefs.h.  */
19053 #include <sys/types.h>
19054 #include <pwd.h>
19055 int
19056 main ()
19057 {
19058 uid_t uid;
19059 struct passwd *space;
19060 char *buf;
19061 size_t bufsize;
19062 struct passwd **result;
19063 getpwuid_r(uid, space, buf, bufsize, result);
19064   ;
19065   return 0;
19066 }
19067 _ACEOF
19068 rm -f conftest.$ac_objext
19069 if { (ac_try="$ac_compile"
19070 case "(($ac_try" in
19071   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19072   *) ac_try_echo=$ac_try;;
19073 esac
19074 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19075   (eval "$ac_compile") 2>conftest.er1
19076   ac_status=$?
19077   grep -v '^ *+' conftest.er1 >conftest.err
19078   rm -f conftest.er1
19079   cat conftest.err >&5
19080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19081   (exit $ac_status); } && {
19082          test -z "$ac_c_werror_flag" ||
19083          test ! -s conftest.err
19084        } && test -s conftest.$ac_objext; then
19085   pgac_func_getpwuid_r_5arg=yes
19086 else
19087   echo "$as_me: failed program was:" >&5
19088 sed 's/^/| /' conftest.$ac_ext >&5
19089
19090         pgac_func_getpwuid_r_5arg=no
19091 fi
19092
19093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19094 fi
19095 { echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
19096 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6; }
19097 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
19098
19099 cat >>confdefs.h <<\_ACEOF
19100 #define GETPWUID_R_5ARG
19101 _ACEOF
19102
19103 fi
19104
19105 { echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
19106 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6; }
19107 if test "${pgac_func_strerror_r_int+set}" = set; then
19108   echo $ECHO_N "(cached) $ECHO_C" >&6
19109 else
19110   cat >conftest.$ac_ext <<_ACEOF
19111 /* confdefs.h.  */
19112 _ACEOF
19113 cat confdefs.h >>conftest.$ac_ext
19114 cat >>conftest.$ac_ext <<_ACEOF
19115 /* end confdefs.h.  */
19116 #include <string.h>
19117 int
19118 main ()
19119 {
19120 #ifndef _AIX
19121 int strerror_r(int, char *, size_t);
19122 #else
19123 /* Older AIX has 'int' for the third argument so we don't test the args. */
19124 int strerror_r();
19125 #endif
19126   ;
19127   return 0;
19128 }
19129 _ACEOF
19130 rm -f conftest.$ac_objext
19131 if { (ac_try="$ac_compile"
19132 case "(($ac_try" in
19133   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19134   *) ac_try_echo=$ac_try;;
19135 esac
19136 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19137   (eval "$ac_compile") 2>conftest.er1
19138   ac_status=$?
19139   grep -v '^ *+' conftest.er1 >conftest.err
19140   rm -f conftest.er1
19141   cat conftest.err >&5
19142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19143   (exit $ac_status); } && {
19144          test -z "$ac_c_werror_flag" ||
19145          test ! -s conftest.err
19146        } && test -s conftest.$ac_objext; then
19147   pgac_func_strerror_r_int=yes
19148 else
19149   echo "$as_me: failed program was:" >&5
19150 sed 's/^/| /' conftest.$ac_ext >&5
19151
19152         pgac_func_strerror_r_int=no
19153 fi
19154
19155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19156 fi
19157 { echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
19158 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6; }
19159 if test x"$pgac_func_strerror_r_int" = xyes ; then
19160
19161 cat >>confdefs.h <<\_ACEOF
19162 #define STRERROR_R_INT
19163 _ACEOF
19164
19165 fi
19166
19167
19168 CFLAGS="$_CFLAGS"
19169 LIBS="$_LIBS"
19170
19171 else
19172 # do not use values from template file
19173 PTHREAD_CFLAGS=
19174 PTHREAD_LIBS=
19175 fi
19176
19177
19178
19179
19180
19181 # We can test for libldap_r only after we know PTHREAD_LIBS
19182 if test "$with_ldap" = yes ; then
19183   _LIBS="$LIBS"
19184   if test "$PORTNAME" != "win32"; then
19185
19186 { echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
19187 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6; }
19188 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
19189   echo $ECHO_N "(cached) $ECHO_C" >&6
19190 else
19191   ac_check_lib_save_LIBS=$LIBS
19192 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
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
19200 /* Override any GCC internal prototype to avoid an error.
19201    Use char because int might match the return type of a GCC
19202    builtin and then its argument prototype would still apply.  */
19203 #ifdef __cplusplus
19204 extern "C"
19205 #endif
19206 char ldap_bind ();
19207 int
19208 main ()
19209 {
19210 return ldap_bind ();
19211   ;
19212   return 0;
19213 }
19214 _ACEOF
19215 rm -f conftest.$ac_objext conftest$ac_exeext
19216 if { (ac_try="$ac_link"
19217 case "(($ac_try" in
19218   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19219   *) ac_try_echo=$ac_try;;
19220 esac
19221 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19222   (eval "$ac_link") 2>conftest.er1
19223   ac_status=$?
19224   grep -v '^ *+' conftest.er1 >conftest.err
19225   rm -f conftest.er1
19226   cat conftest.err >&5
19227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19228   (exit $ac_status); } && {
19229          test -z "$ac_c_werror_flag" ||
19230          test ! -s conftest.err
19231        } && test -s conftest$ac_exeext &&
19232        $as_test_x conftest$ac_exeext; then
19233   ac_cv_lib_ldap_ldap_bind=yes
19234 else
19235   echo "$as_me: failed program was:" >&5
19236 sed 's/^/| /' conftest.$ac_ext >&5
19237
19238         ac_cv_lib_ldap_ldap_bind=no
19239 fi
19240
19241 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19242       conftest$ac_exeext conftest.$ac_ext
19243 LIBS=$ac_check_lib_save_LIBS
19244 fi
19245 { echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
19246 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6; }
19247 if test $ac_cv_lib_ldap_ldap_bind = yes; then
19248   cat >>confdefs.h <<_ACEOF
19249 #define HAVE_LIBLDAP 1
19250 _ACEOF
19251
19252   LIBS="-lldap $LIBS"
19253
19254 else
19255   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
19256 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
19257    { (exit 1); exit 1; }; }
19258 fi
19259
19260     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
19261     if test "$enable_thread_safety" = yes; then
19262       # on some platforms ldap_r fails to link without PTHREAD_LIBS
19263
19264 { echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
19265 echo $ECHO_N "checking for ldap_simple_bind in -lldap_r... $ECHO_C" >&6; }
19266 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
19267   echo $ECHO_N "(cached) $ECHO_C" >&6
19268 else
19269   ac_check_lib_save_LIBS=$LIBS
19270 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
19271 cat >conftest.$ac_ext <<_ACEOF
19272 /* confdefs.h.  */
19273 _ACEOF
19274 cat confdefs.h >>conftest.$ac_ext
19275 cat >>conftest.$ac_ext <<_ACEOF
19276 /* end confdefs.h.  */
19277
19278 /* Override any GCC internal prototype to avoid an error.
19279    Use char because int might match the return type of a GCC
19280    builtin and then its argument prototype would still apply.  */
19281 #ifdef __cplusplus
19282 extern "C"
19283 #endif
19284 char ldap_simple_bind ();
19285 int
19286 main ()
19287 {
19288 return ldap_simple_bind ();
19289   ;
19290   return 0;
19291 }
19292 _ACEOF
19293 rm -f conftest.$ac_objext conftest$ac_exeext
19294 if { (ac_try="$ac_link"
19295 case "(($ac_try" in
19296   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19297   *) ac_try_echo=$ac_try;;
19298 esac
19299 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19300   (eval "$ac_link") 2>conftest.er1
19301   ac_status=$?
19302   grep -v '^ *+' conftest.er1 >conftest.err
19303   rm -f conftest.er1
19304   cat conftest.err >&5
19305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19306   (exit $ac_status); } && {
19307          test -z "$ac_c_werror_flag" ||
19308          test ! -s conftest.err
19309        } && test -s conftest$ac_exeext &&
19310        $as_test_x conftest$ac_exeext; then
19311   ac_cv_lib_ldap_r_ldap_simple_bind=yes
19312 else
19313   echo "$as_me: failed program was:" >&5
19314 sed 's/^/| /' conftest.$ac_ext >&5
19315
19316         ac_cv_lib_ldap_r_ldap_simple_bind=no
19317 fi
19318
19319 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19320       conftest$ac_exeext conftest.$ac_ext
19321 LIBS=$ac_check_lib_save_LIBS
19322 fi
19323 { echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
19324 echo "${ECHO_T}$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
19325 if test $ac_cv_lib_ldap_r_ldap_simple_bind = yes; then
19326   cat >>confdefs.h <<_ACEOF
19327 #define HAVE_LIBLDAP_R 1
19328 _ACEOF
19329
19330   LIBS="-lldap_r $LIBS"
19331
19332 else
19333   { { echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
19334 echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
19335    { (exit 1); exit 1; }; }
19336 fi
19337
19338       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
19339     else
19340       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
19341     fi
19342   else
19343
19344 { echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
19345 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6; }
19346 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
19347   echo $ECHO_N "(cached) $ECHO_C" >&6
19348 else
19349   ac_check_lib_save_LIBS=$LIBS
19350 LIBS="-lwldap32  $LIBS"
19351 cat >conftest.$ac_ext <<_ACEOF
19352 /* confdefs.h.  */
19353 _ACEOF
19354 cat confdefs.h >>conftest.$ac_ext
19355 cat >>conftest.$ac_ext <<_ACEOF
19356 /* end confdefs.h.  */
19357
19358 /* Override any GCC internal prototype to avoid an error.
19359    Use char because int might match the return type of a GCC
19360    builtin and then its argument prototype would still apply.  */
19361 #ifdef __cplusplus
19362 extern "C"
19363 #endif
19364 char ldap_bind ();
19365 int
19366 main ()
19367 {
19368 return ldap_bind ();
19369   ;
19370   return 0;
19371 }
19372 _ACEOF
19373 rm -f conftest.$ac_objext conftest$ac_exeext
19374 if { (ac_try="$ac_link"
19375 case "(($ac_try" in
19376   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19377   *) ac_try_echo=$ac_try;;
19378 esac
19379 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19380   (eval "$ac_link") 2>conftest.er1
19381   ac_status=$?
19382   grep -v '^ *+' conftest.er1 >conftest.err
19383   rm -f conftest.er1
19384   cat conftest.err >&5
19385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19386   (exit $ac_status); } && {
19387          test -z "$ac_c_werror_flag" ||
19388          test ! -s conftest.err
19389        } && test -s conftest$ac_exeext &&
19390        $as_test_x conftest$ac_exeext; then
19391   ac_cv_lib_wldap32_ldap_bind=yes
19392 else
19393   echo "$as_me: failed program was:" >&5
19394 sed 's/^/| /' conftest.$ac_ext >&5
19395
19396         ac_cv_lib_wldap32_ldap_bind=no
19397 fi
19398
19399 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19400       conftest$ac_exeext conftest.$ac_ext
19401 LIBS=$ac_check_lib_save_LIBS
19402 fi
19403 { echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
19404 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6; }
19405 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
19406   cat >>confdefs.h <<_ACEOF
19407 #define HAVE_LIBWLDAP32 1
19408 _ACEOF
19409
19410   LIBS="-lwldap32 $LIBS"
19411
19412 else
19413   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
19414 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
19415    { (exit 1); exit 1; }; }
19416 fi
19417
19418     LDAP_LIBS_FE="-lwldap32"
19419     LDAP_LIBS_BE="-lwldap32"
19420   fi
19421   LIBS="$_LIBS"
19422 fi
19423
19424
19425
19426
19427 # This test makes sure that run tests work at all.  Sometimes a shared
19428 # library is found by the linker, but the runtime linker can't find it.
19429 # This check should come after all modifications of compiler or linker
19430 # variables, and before any other run tests.
19431 { echo "$as_me:$LINENO: checking test program" >&5
19432 echo $ECHO_N "checking test program... $ECHO_C" >&6; }
19433 if test "$cross_compiling" = yes; then
19434   { echo "$as_me:$LINENO: result: cross-compiling" >&5
19435 echo "${ECHO_T}cross-compiling" >&6; }
19436 else
19437   cat >conftest.$ac_ext <<_ACEOF
19438 /* confdefs.h.  */
19439 _ACEOF
19440 cat confdefs.h >>conftest.$ac_ext
19441 cat >>conftest.$ac_ext <<_ACEOF
19442 /* end confdefs.h.  */
19443 int main() { return 0; }
19444 _ACEOF
19445 rm -f conftest$ac_exeext
19446 if { (ac_try="$ac_link"
19447 case "(($ac_try" in
19448   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19449   *) ac_try_echo=$ac_try;;
19450 esac
19451 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19452   (eval "$ac_link") 2>&5
19453   ac_status=$?
19454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19455   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19456   { (case "(($ac_try" in
19457   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19458   *) ac_try_echo=$ac_try;;
19459 esac
19460 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19461   (eval "$ac_try") 2>&5
19462   ac_status=$?
19463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19464   (exit $ac_status); }; }; then
19465   { echo "$as_me:$LINENO: result: ok" >&5
19466 echo "${ECHO_T}ok" >&6; }
19467 else
19468   echo "$as_me: program exited with status $ac_status" >&5
19469 echo "$as_me: failed program was:" >&5
19470 sed 's/^/| /' conftest.$ac_ext >&5
19471
19472 ( exit $ac_status )
19473 { echo "$as_me:$LINENO: result: failed" >&5
19474 echo "${ECHO_T}failed" >&6; }
19475 { { echo "$as_me:$LINENO: error:
19476 Could not execute a simple test program.  This may be a problem
19477 related to locating shared libraries.  Check the file 'config.log'
19478 for the exact reason." >&5
19479 echo "$as_me: error:
19480 Could not execute a simple test program.  This may be a problem
19481 related to locating shared libraries.  Check the file 'config.log'
19482 for the exact reason." >&2;}
19483    { (exit 1); exit 1; }; }
19484 fi
19485 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19486 fi
19487
19488
19489
19490 # --------------------
19491 # Run tests below here
19492 # --------------------
19493
19494 # Force use of our snprintf if system's doesn't do arg control
19495 # See comment above at snprintf test for details.
19496 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
19497   { echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
19498 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6; }
19499 if test "${pgac_cv_printf_arg_control+set}" = set; then
19500   echo $ECHO_N "(cached) $ECHO_C" >&6
19501 else
19502   if test "$cross_compiling" = yes; then
19503   pgac_cv_printf_arg_control=cross
19504 else
19505   cat >conftest.$ac_ext <<_ACEOF
19506 /* confdefs.h.  */
19507 _ACEOF
19508 cat confdefs.h >>conftest.$ac_ext
19509 cat >>conftest.$ac_ext <<_ACEOF
19510 /* end confdefs.h.  */
19511 #include <stdio.h>
19512 #include <string.h>
19513
19514 int main()
19515 {
19516   char buf[100];
19517
19518   /* can it swap arguments? */
19519   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
19520   if (strcmp(buf, "4 3") != 0)
19521     return 1;
19522   return 0;
19523 }
19524 _ACEOF
19525 rm -f conftest$ac_exeext
19526 if { (ac_try="$ac_link"
19527 case "(($ac_try" in
19528   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19529   *) ac_try_echo=$ac_try;;
19530 esac
19531 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19532   (eval "$ac_link") 2>&5
19533   ac_status=$?
19534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19535   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19536   { (case "(($ac_try" in
19537   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19538   *) ac_try_echo=$ac_try;;
19539 esac
19540 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19541   (eval "$ac_try") 2>&5
19542   ac_status=$?
19543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19544   (exit $ac_status); }; }; then
19545   pgac_cv_printf_arg_control=yes
19546 else
19547   echo "$as_me: program exited with status $ac_status" >&5
19548 echo "$as_me: failed program was:" >&5
19549 sed 's/^/| /' conftest.$ac_ext >&5
19550
19551 ( exit $ac_status )
19552 pgac_cv_printf_arg_control=no
19553 fi
19554 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19555 fi
19556
19557
19558
19559 fi
19560 { echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
19561 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6; }
19562
19563   if test $pgac_cv_printf_arg_control != yes ; then
19564     pgac_need_repl_snprintf=yes
19565   fi
19566 fi
19567
19568
19569
19570 { echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
19571 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6; }
19572 if test "${pgac_cv_type_long_int_64+set}" = set; then
19573   echo $ECHO_N "(cached) $ECHO_C" >&6
19574 else
19575   if test "$cross_compiling" = yes; then
19576   # If cross-compiling, check the size reported by the compiler and
19577 # trust that the arithmetic works.
19578 cat >conftest.$ac_ext <<_ACEOF
19579 /* confdefs.h.  */
19580 _ACEOF
19581 cat confdefs.h >>conftest.$ac_ext
19582 cat >>conftest.$ac_ext <<_ACEOF
19583 /* end confdefs.h.  */
19584
19585 int
19586 main ()
19587 {
19588 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
19589 test_array [0] = 0
19590
19591   ;
19592   return 0;
19593 }
19594 _ACEOF
19595 rm -f conftest.$ac_objext
19596 if { (ac_try="$ac_compile"
19597 case "(($ac_try" in
19598   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19599   *) ac_try_echo=$ac_try;;
19600 esac
19601 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19602   (eval "$ac_compile") 2>conftest.er1
19603   ac_status=$?
19604   grep -v '^ *+' conftest.er1 >conftest.err
19605   rm -f conftest.er1
19606   cat conftest.err >&5
19607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19608   (exit $ac_status); } && {
19609          test -z "$ac_c_werror_flag" ||
19610          test ! -s conftest.err
19611        } && test -s conftest.$ac_objext; then
19612   pgac_cv_type_long_int_64=yes
19613 else
19614   echo "$as_me: failed program was:" >&5
19615 sed 's/^/| /' conftest.$ac_ext >&5
19616
19617         pgac_cv_type_long_int_64=no
19618 fi
19619
19620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19621 else
19622   cat >conftest.$ac_ext <<_ACEOF
19623 /* confdefs.h.  */
19624 _ACEOF
19625 cat confdefs.h >>conftest.$ac_ext
19626 cat >>conftest.$ac_ext <<_ACEOF
19627 /* end confdefs.h.  */
19628 typedef long int ac_int64;
19629
19630 /*
19631  * These are globals to discourage the compiler from folding all the
19632  * arithmetic tests down to compile-time constants.
19633  */
19634 ac_int64 a = 20000001;
19635 ac_int64 b = 40000005;
19636
19637 int does_int64_work()
19638 {
19639   ac_int64 c,d;
19640
19641   if (sizeof(ac_int64) != 8)
19642     return 0;                   /* definitely not the right size */
19643
19644   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
19645   c = a * b;
19646   d = (c + b) / b;
19647   if (d != a+1)
19648     return 0;
19649   return 1;
19650 }
19651 main() {
19652   exit(! does_int64_work());
19653 }
19654 _ACEOF
19655 rm -f conftest$ac_exeext
19656 if { (ac_try="$ac_link"
19657 case "(($ac_try" in
19658   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19659   *) ac_try_echo=$ac_try;;
19660 esac
19661 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19662   (eval "$ac_link") 2>&5
19663   ac_status=$?
19664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19665   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19666   { (case "(($ac_try" in
19667   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19668   *) ac_try_echo=$ac_try;;
19669 esac
19670 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19671   (eval "$ac_try") 2>&5
19672   ac_status=$?
19673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19674   (exit $ac_status); }; }; then
19675   pgac_cv_type_long_int_64=yes
19676 else
19677   echo "$as_me: program exited with status $ac_status" >&5
19678 echo "$as_me: failed program was:" >&5
19679 sed 's/^/| /' conftest.$ac_ext >&5
19680
19681 ( exit $ac_status )
19682 pgac_cv_type_long_int_64=no
19683 fi
19684 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19685 fi
19686
19687
19688 fi
19689 { echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
19690 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6; }
19691
19692 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
19693 if test x"$pgac_cv_type_long_int_64" = xyes ; then
19694
19695 cat >>confdefs.h <<\_ACEOF
19696 #define HAVE_LONG_INT_64 1
19697 _ACEOF
19698
19699 fi
19700
19701
19702 if test x"$HAVE_LONG_INT_64" = x"no" ; then
19703   { echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
19704 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6; }
19705 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
19706   echo $ECHO_N "(cached) $ECHO_C" >&6
19707 else
19708   if test "$cross_compiling" = yes; then
19709   # If cross-compiling, check the size reported by the compiler and
19710 # trust that the arithmetic works.
19711 cat >conftest.$ac_ext <<_ACEOF
19712 /* confdefs.h.  */
19713 _ACEOF
19714 cat confdefs.h >>conftest.$ac_ext
19715 cat >>conftest.$ac_ext <<_ACEOF
19716 /* end confdefs.h.  */
19717
19718 int
19719 main ()
19720 {
19721 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
19722 test_array [0] = 0
19723
19724   ;
19725   return 0;
19726 }
19727 _ACEOF
19728 rm -f conftest.$ac_objext
19729 if { (ac_try="$ac_compile"
19730 case "(($ac_try" in
19731   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19732   *) ac_try_echo=$ac_try;;
19733 esac
19734 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19735   (eval "$ac_compile") 2>conftest.er1
19736   ac_status=$?
19737   grep -v '^ *+' conftest.er1 >conftest.err
19738   rm -f conftest.er1
19739   cat conftest.err >&5
19740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19741   (exit $ac_status); } && {
19742          test -z "$ac_c_werror_flag" ||
19743          test ! -s conftest.err
19744        } && test -s conftest.$ac_objext; then
19745   pgac_cv_type_long_long_int_64=yes
19746 else
19747   echo "$as_me: failed program was:" >&5
19748 sed 's/^/| /' conftest.$ac_ext >&5
19749
19750         pgac_cv_type_long_long_int_64=no
19751 fi
19752
19753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19754 else
19755   cat >conftest.$ac_ext <<_ACEOF
19756 /* confdefs.h.  */
19757 _ACEOF
19758 cat confdefs.h >>conftest.$ac_ext
19759 cat >>conftest.$ac_ext <<_ACEOF
19760 /* end confdefs.h.  */
19761 typedef long long int ac_int64;
19762
19763 /*
19764  * These are globals to discourage the compiler from folding all the
19765  * arithmetic tests down to compile-time constants.
19766  */
19767 ac_int64 a = 20000001;
19768 ac_int64 b = 40000005;
19769
19770 int does_int64_work()
19771 {
19772   ac_int64 c,d;
19773
19774   if (sizeof(ac_int64) != 8)
19775     return 0;                   /* definitely not the right size */
19776
19777   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
19778   c = a * b;
19779   d = (c + b) / b;
19780   if (d != a+1)
19781     return 0;
19782   return 1;
19783 }
19784 main() {
19785   exit(! does_int64_work());
19786 }
19787 _ACEOF
19788 rm -f conftest$ac_exeext
19789 if { (ac_try="$ac_link"
19790 case "(($ac_try" in
19791   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19792   *) ac_try_echo=$ac_try;;
19793 esac
19794 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19795   (eval "$ac_link") 2>&5
19796   ac_status=$?
19797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19798   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19799   { (case "(($ac_try" in
19800   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19801   *) ac_try_echo=$ac_try;;
19802 esac
19803 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19804   (eval "$ac_try") 2>&5
19805   ac_status=$?
19806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19807   (exit $ac_status); }; }; then
19808   pgac_cv_type_long_long_int_64=yes
19809 else
19810   echo "$as_me: program exited with status $ac_status" >&5
19811 echo "$as_me: failed program was:" >&5
19812 sed 's/^/| /' conftest.$ac_ext >&5
19813
19814 ( exit $ac_status )
19815 pgac_cv_type_long_long_int_64=no
19816 fi
19817 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19818 fi
19819
19820
19821 fi
19822 { echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
19823 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6; }
19824
19825 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
19826 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
19827
19828 cat >>confdefs.h <<\_ACEOF
19829 #define HAVE_LONG_LONG_INT_64 1
19830 _ACEOF
19831
19832 fi
19833
19834 fi
19835
19836
19837
19838 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
19839   cat >conftest.$ac_ext <<_ACEOF
19840 /* confdefs.h.  */
19841 _ACEOF
19842 cat confdefs.h >>conftest.$ac_ext
19843 cat >>conftest.$ac_ext <<_ACEOF
19844 /* end confdefs.h.  */
19845
19846 #define INT64CONST(x)  x##LL
19847 long long int foo = INT64CONST(0x1234567890123456);
19848
19849 int
19850 main ()
19851 {
19852
19853   ;
19854   return 0;
19855 }
19856 _ACEOF
19857 rm -f conftest.$ac_objext
19858 if { (ac_try="$ac_compile"
19859 case "(($ac_try" in
19860   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19861   *) ac_try_echo=$ac_try;;
19862 esac
19863 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19864   (eval "$ac_compile") 2>conftest.er1
19865   ac_status=$?
19866   grep -v '^ *+' conftest.er1 >conftest.err
19867   rm -f conftest.er1
19868   cat conftest.err >&5
19869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19870   (exit $ac_status); } && {
19871          test -z "$ac_c_werror_flag" ||
19872          test ! -s conftest.err
19873        } && test -s conftest.$ac_objext; then
19874
19875 cat >>confdefs.h <<\_ACEOF
19876 #define HAVE_LL_CONSTANTS 1
19877 _ACEOF
19878
19879 else
19880   echo "$as_me: failed program was:" >&5
19881 sed 's/^/| /' conftest.$ac_ext >&5
19882
19883
19884 fi
19885
19886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19887 fi
19888
19889
19890 # If we found "long int" is 64 bits, assume snprintf handles it.  If
19891 # we found we need to use "long long int", better check.  We cope with
19892 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
19893 # work, fall back to our own snprintf emulation (which we know uses %lld).
19894
19895 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
19896   if test $pgac_need_repl_snprintf = no; then
19897     { echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
19898 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6; }
19899 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
19900   echo $ECHO_N "(cached) $ECHO_C" >&6
19901 else
19902   for pgac_format in '%lld' '%qd' '%I64d'; do
19903 if test "$cross_compiling" = yes; then
19904   pgac_cv_snprintf_long_long_int_format=cross; break
19905 else
19906   cat >conftest.$ac_ext <<_ACEOF
19907 /* confdefs.h.  */
19908 _ACEOF
19909 cat confdefs.h >>conftest.$ac_ext
19910 cat >>conftest.$ac_ext <<_ACEOF
19911 /* end confdefs.h.  */
19912 #include <stdio.h>
19913 typedef long long int ac_int64;
19914 #define INT64_FORMAT "$pgac_format"
19915
19916 ac_int64 a = 20000001;
19917 ac_int64 b = 40000005;
19918
19919 int does_int64_snprintf_work()
19920 {
19921   ac_int64 c;
19922   char buf[100];
19923
19924   if (sizeof(ac_int64) != 8)
19925     return 0;                   /* doesn't look like the right size */
19926
19927   c = a * b;
19928   snprintf(buf, 100, INT64_FORMAT, c);
19929   if (strcmp(buf, "800000140000005") != 0)
19930     return 0;                   /* either multiply or snprintf is busted */
19931   return 1;
19932 }
19933 main() {
19934   exit(! does_int64_snprintf_work());
19935 }
19936 _ACEOF
19937 rm -f conftest$ac_exeext
19938 if { (ac_try="$ac_link"
19939 case "(($ac_try" in
19940   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19941   *) ac_try_echo=$ac_try;;
19942 esac
19943 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19944   (eval "$ac_link") 2>&5
19945   ac_status=$?
19946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19947   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19948   { (case "(($ac_try" in
19949   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19950   *) ac_try_echo=$ac_try;;
19951 esac
19952 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19953   (eval "$ac_try") 2>&5
19954   ac_status=$?
19955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19956   (exit $ac_status); }; }; then
19957   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
19958 else
19959   echo "$as_me: program exited with status $ac_status" >&5
19960 echo "$as_me: failed program was:" >&5
19961 sed 's/^/| /' conftest.$ac_ext >&5
19962
19963 fi
19964 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19965 fi
19966
19967
19968 done
19969 fi
19970
19971 LONG_LONG_INT_FORMAT=''
19972
19973 case $pgac_cv_snprintf_long_long_int_format in
19974   cross) { echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
19975 echo "${ECHO_T}cannot test (not on host machine)" >&6; };;
19976   ?*)    { echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
19977 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6; }
19978          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
19979   *)     { echo "$as_me:$LINENO: result: none" >&5
19980 echo "${ECHO_T}none" >&6; };;
19981 esac
19982     if test "$LONG_LONG_INT_FORMAT" = ""; then
19983       # Force usage of our own snprintf, since system snprintf is broken
19984       pgac_need_repl_snprintf=yes
19985       LONG_LONG_INT_FORMAT='%lld'
19986     fi
19987   else
19988     # Here if we previously decided we needed to use our own snprintf
19989     LONG_LONG_INT_FORMAT='%lld'
19990   fi
19991   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
19992   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
19993   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
19994 else
19995   # Here if we are not using 'long long int' at all
19996   INT64_FORMAT='"%ld"'
19997   UINT64_FORMAT='"%lu"'
19998 fi
19999
20000
20001 cat >>confdefs.h <<_ACEOF
20002 #define INT64_FORMAT $INT64_FORMAT
20003 _ACEOF
20004
20005
20006
20007 cat >>confdefs.h <<_ACEOF
20008 #define UINT64_FORMAT $UINT64_FORMAT
20009 _ACEOF
20010
20011
20012 # Now we have checked all the reasons to replace snprintf
20013 if test $pgac_need_repl_snprintf = yes; then
20014
20015 cat >>confdefs.h <<\_ACEOF
20016 #define USE_REPL_SNPRINTF 1
20017 _ACEOF
20018
20019   case " $LIBOBJS " in
20020   *" snprintf.$ac_objext "* ) ;;
20021   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
20022  ;;
20023 esac
20024
20025 fi
20026
20027 # Need a #define for the size of Datum (unsigned long)
20028 { echo "$as_me:$LINENO: checking for unsigned long" >&5
20029 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6; }
20030 if test "${ac_cv_type_unsigned_long+set}" = set; then
20031   echo $ECHO_N "(cached) $ECHO_C" >&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 $ac_includes_default
20040 typedef unsigned long ac__type_new_;
20041 int
20042 main ()
20043 {
20044 if ((ac__type_new_ *) 0)
20045   return 0;
20046 if (sizeof (ac__type_new_))
20047   return 0;
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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20059   (eval "$ac_compile") 2>conftest.er1
20060   ac_status=$?
20061   grep -v '^ *+' conftest.er1 >conftest.err
20062   rm -f conftest.er1
20063   cat conftest.err >&5
20064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20065   (exit $ac_status); } && {
20066          test -z "$ac_c_werror_flag" ||
20067          test ! -s conftest.err
20068        } && test -s conftest.$ac_objext; then
20069   ac_cv_type_unsigned_long=yes
20070 else
20071   echo "$as_me: failed program was:" >&5
20072 sed 's/^/| /' conftest.$ac_ext >&5
20073
20074         ac_cv_type_unsigned_long=no
20075 fi
20076
20077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20078 fi
20079 { echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
20080 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6; }
20081
20082 # The cast to long int works around a bug in the HP C Compiler
20083 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20084 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20085 # This bug is HP SR number 8606223364.
20086 { echo "$as_me:$LINENO: checking size of unsigned long" >&5
20087 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6; }
20088 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
20089   echo $ECHO_N "(cached) $ECHO_C" >&6
20090 else
20091   if test "$cross_compiling" = yes; then
20092   # Depending upon the size, compute the lo and hi bounds.
20093 cat >conftest.$ac_ext <<_ACEOF
20094 /* confdefs.h.  */
20095 _ACEOF
20096 cat confdefs.h >>conftest.$ac_ext
20097 cat >>conftest.$ac_ext <<_ACEOF
20098 /* end confdefs.h.  */
20099 $ac_includes_default
20100    typedef unsigned long ac__type_sizeof_;
20101 int
20102 main ()
20103 {
20104 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20105 test_array [0] = 0
20106
20107   ;
20108   return 0;
20109 }
20110 _ACEOF
20111 rm -f conftest.$ac_objext
20112 if { (ac_try="$ac_compile"
20113 case "(($ac_try" in
20114   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20115   *) ac_try_echo=$ac_try;;
20116 esac
20117 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20118   (eval "$ac_compile") 2>conftest.er1
20119   ac_status=$?
20120   grep -v '^ *+' conftest.er1 >conftest.err
20121   rm -f conftest.er1
20122   cat conftest.err >&5
20123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20124   (exit $ac_status); } && {
20125          test -z "$ac_c_werror_flag" ||
20126          test ! -s conftest.err
20127        } && test -s conftest.$ac_objext; then
20128   ac_lo=0 ac_mid=0
20129   while :; do
20130     cat >conftest.$ac_ext <<_ACEOF
20131 /* confdefs.h.  */
20132 _ACEOF
20133 cat confdefs.h >>conftest.$ac_ext
20134 cat >>conftest.$ac_ext <<_ACEOF
20135 /* end confdefs.h.  */
20136 $ac_includes_default
20137    typedef unsigned long ac__type_sizeof_;
20138 int
20139 main ()
20140 {
20141 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20142 test_array [0] = 0
20143
20144   ;
20145   return 0;
20146 }
20147 _ACEOF
20148 rm -f conftest.$ac_objext
20149 if { (ac_try="$ac_compile"
20150 case "(($ac_try" in
20151   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20152   *) ac_try_echo=$ac_try;;
20153 esac
20154 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20155   (eval "$ac_compile") 2>conftest.er1
20156   ac_status=$?
20157   grep -v '^ *+' conftest.er1 >conftest.err
20158   rm -f conftest.er1
20159   cat conftest.err >&5
20160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20161   (exit $ac_status); } && {
20162          test -z "$ac_c_werror_flag" ||
20163          test ! -s conftest.err
20164        } && test -s conftest.$ac_objext; then
20165   ac_hi=$ac_mid; break
20166 else
20167   echo "$as_me: failed program was:" >&5
20168 sed 's/^/| /' conftest.$ac_ext >&5
20169
20170         ac_lo=`expr $ac_mid + 1`
20171                         if test $ac_lo -le $ac_mid; then
20172                           ac_lo= ac_hi=
20173                           break
20174                         fi
20175                         ac_mid=`expr 2 '*' $ac_mid + 1`
20176 fi
20177
20178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20179   done
20180 else
20181   echo "$as_me: failed program was:" >&5
20182 sed 's/^/| /' conftest.$ac_ext >&5
20183
20184         cat >conftest.$ac_ext <<_ACEOF
20185 /* confdefs.h.  */
20186 _ACEOF
20187 cat confdefs.h >>conftest.$ac_ext
20188 cat >>conftest.$ac_ext <<_ACEOF
20189 /* end confdefs.h.  */
20190 $ac_includes_default
20191    typedef unsigned long ac__type_sizeof_;
20192 int
20193 main ()
20194 {
20195 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20196 test_array [0] = 0
20197
20198   ;
20199   return 0;
20200 }
20201 _ACEOF
20202 rm -f conftest.$ac_objext
20203 if { (ac_try="$ac_compile"
20204 case "(($ac_try" in
20205   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20206   *) ac_try_echo=$ac_try;;
20207 esac
20208 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20209   (eval "$ac_compile") 2>conftest.er1
20210   ac_status=$?
20211   grep -v '^ *+' conftest.er1 >conftest.err
20212   rm -f conftest.er1
20213   cat conftest.err >&5
20214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20215   (exit $ac_status); } && {
20216          test -z "$ac_c_werror_flag" ||
20217          test ! -s conftest.err
20218        } && test -s conftest.$ac_objext; then
20219   ac_hi=-1 ac_mid=-1
20220   while :; do
20221     cat >conftest.$ac_ext <<_ACEOF
20222 /* confdefs.h.  */
20223 _ACEOF
20224 cat confdefs.h >>conftest.$ac_ext
20225 cat >>conftest.$ac_ext <<_ACEOF
20226 /* end confdefs.h.  */
20227 $ac_includes_default
20228    typedef unsigned long ac__type_sizeof_;
20229 int
20230 main ()
20231 {
20232 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
20233 test_array [0] = 0
20234
20235   ;
20236   return 0;
20237 }
20238 _ACEOF
20239 rm -f conftest.$ac_objext
20240 if { (ac_try="$ac_compile"
20241 case "(($ac_try" in
20242   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20243   *) ac_try_echo=$ac_try;;
20244 esac
20245 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20246   (eval "$ac_compile") 2>conftest.er1
20247   ac_status=$?
20248   grep -v '^ *+' conftest.er1 >conftest.err
20249   rm -f conftest.er1
20250   cat conftest.err >&5
20251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20252   (exit $ac_status); } && {
20253          test -z "$ac_c_werror_flag" ||
20254          test ! -s conftest.err
20255        } && test -s conftest.$ac_objext; then
20256   ac_lo=$ac_mid; break
20257 else
20258   echo "$as_me: failed program was:" >&5
20259 sed 's/^/| /' conftest.$ac_ext >&5
20260
20261         ac_hi=`expr '(' $ac_mid ')' - 1`
20262                         if test $ac_mid -le $ac_hi; then
20263                           ac_lo= ac_hi=
20264                           break
20265                         fi
20266                         ac_mid=`expr 2 '*' $ac_mid`
20267 fi
20268
20269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20270   done
20271 else
20272   echo "$as_me: failed program was:" >&5
20273 sed 's/^/| /' conftest.$ac_ext >&5
20274
20275         ac_lo= ac_hi=
20276 fi
20277
20278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20279 fi
20280
20281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20282 # Binary search between lo and hi bounds.
20283 while test "x$ac_lo" != "x$ac_hi"; do
20284   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20285   cat >conftest.$ac_ext <<_ACEOF
20286 /* confdefs.h.  */
20287 _ACEOF
20288 cat confdefs.h >>conftest.$ac_ext
20289 cat >>conftest.$ac_ext <<_ACEOF
20290 /* end confdefs.h.  */
20291 $ac_includes_default
20292    typedef unsigned long ac__type_sizeof_;
20293 int
20294 main ()
20295 {
20296 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20297 test_array [0] = 0
20298
20299   ;
20300   return 0;
20301 }
20302 _ACEOF
20303 rm -f conftest.$ac_objext
20304 if { (ac_try="$ac_compile"
20305 case "(($ac_try" in
20306   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20307   *) ac_try_echo=$ac_try;;
20308 esac
20309 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20310   (eval "$ac_compile") 2>conftest.er1
20311   ac_status=$?
20312   grep -v '^ *+' conftest.er1 >conftest.err
20313   rm -f conftest.er1
20314   cat conftest.err >&5
20315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20316   (exit $ac_status); } && {
20317          test -z "$ac_c_werror_flag" ||
20318          test ! -s conftest.err
20319        } && test -s conftest.$ac_objext; then
20320   ac_hi=$ac_mid
20321 else
20322   echo "$as_me: failed program was:" >&5
20323 sed 's/^/| /' conftest.$ac_ext >&5
20324
20325         ac_lo=`expr '(' $ac_mid ')' + 1`
20326 fi
20327
20328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20329 done
20330 case $ac_lo in
20331 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
20332 '') if test "$ac_cv_type_unsigned_long" = yes; then
20333      { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long)
20334 See \`config.log' for more details." >&5
20335 echo "$as_me: error: cannot compute sizeof (unsigned long)
20336 See \`config.log' for more details." >&2;}
20337    { (exit 77); exit 77; }; }
20338    else
20339      ac_cv_sizeof_unsigned_long=0
20340    fi ;;
20341 esac
20342 else
20343   cat >conftest.$ac_ext <<_ACEOF
20344 /* confdefs.h.  */
20345 _ACEOF
20346 cat confdefs.h >>conftest.$ac_ext
20347 cat >>conftest.$ac_ext <<_ACEOF
20348 /* end confdefs.h.  */
20349 $ac_includes_default
20350    typedef unsigned long ac__type_sizeof_;
20351 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
20352 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
20353 #include <stdio.h>
20354 #include <stdlib.h>
20355 int
20356 main ()
20357 {
20358
20359   FILE *f = fopen ("conftest.val", "w");
20360   if (! f)
20361     return 1;
20362   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
20363     {
20364       long int i = longval ();
20365       if (i != ((long int) (sizeof (ac__type_sizeof_))))
20366         return 1;
20367       fprintf (f, "%ld\n", i);
20368     }
20369   else
20370     {
20371       unsigned long int i = ulongval ();
20372       if (i != ((long int) (sizeof (ac__type_sizeof_))))
20373         return 1;
20374       fprintf (f, "%lu\n", i);
20375     }
20376   return ferror (f) || fclose (f) != 0;
20377
20378   ;
20379   return 0;
20380 }
20381 _ACEOF
20382 rm -f conftest$ac_exeext
20383 if { (ac_try="$ac_link"
20384 case "(($ac_try" in
20385   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20386   *) ac_try_echo=$ac_try;;
20387 esac
20388 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20389   (eval "$ac_link") 2>&5
20390   ac_status=$?
20391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20392   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20393   { (case "(($ac_try" in
20394   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20395   *) ac_try_echo=$ac_try;;
20396 esac
20397 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20398   (eval "$ac_try") 2>&5
20399   ac_status=$?
20400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20401   (exit $ac_status); }; }; then
20402   ac_cv_sizeof_unsigned_long=`cat conftest.val`
20403 else
20404   echo "$as_me: program exited with status $ac_status" >&5
20405 echo "$as_me: failed program was:" >&5
20406 sed 's/^/| /' conftest.$ac_ext >&5
20407
20408 ( exit $ac_status )
20409 if test "$ac_cv_type_unsigned_long" = yes; then
20410      { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long)
20411 See \`config.log' for more details." >&5
20412 echo "$as_me: error: cannot compute sizeof (unsigned long)
20413 See \`config.log' for more details." >&2;}
20414    { (exit 77); exit 77; }; }
20415    else
20416      ac_cv_sizeof_unsigned_long=0
20417    fi
20418 fi
20419 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20420 fi
20421 rm -f conftest.val
20422 fi
20423 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
20424 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6; }
20425
20426
20427
20428 cat >>confdefs.h <<_ACEOF
20429 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
20430 _ACEOF
20431
20432
20433
20434 # And one for the size of size_t (enables tweaks for > 32bit address space)
20435 { echo "$as_me:$LINENO: checking for size_t" >&5
20436 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
20437 if test "${ac_cv_type_size_t+set}" = set; then
20438   echo $ECHO_N "(cached) $ECHO_C" >&6
20439 else
20440   cat >conftest.$ac_ext <<_ACEOF
20441 /* confdefs.h.  */
20442 _ACEOF
20443 cat confdefs.h >>conftest.$ac_ext
20444 cat >>conftest.$ac_ext <<_ACEOF
20445 /* end confdefs.h.  */
20446 $ac_includes_default
20447 typedef size_t ac__type_new_;
20448 int
20449 main ()
20450 {
20451 if ((ac__type_new_ *) 0)
20452   return 0;
20453 if (sizeof (ac__type_new_))
20454   return 0;
20455   ;
20456   return 0;
20457 }
20458 _ACEOF
20459 rm -f conftest.$ac_objext
20460 if { (ac_try="$ac_compile"
20461 case "(($ac_try" in
20462   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20463   *) ac_try_echo=$ac_try;;
20464 esac
20465 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20466   (eval "$ac_compile") 2>conftest.er1
20467   ac_status=$?
20468   grep -v '^ *+' conftest.er1 >conftest.err
20469   rm -f conftest.er1
20470   cat conftest.err >&5
20471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20472   (exit $ac_status); } && {
20473          test -z "$ac_c_werror_flag" ||
20474          test ! -s conftest.err
20475        } && test -s conftest.$ac_objext; then
20476   ac_cv_type_size_t=yes
20477 else
20478   echo "$as_me: failed program was:" >&5
20479 sed 's/^/| /' conftest.$ac_ext >&5
20480
20481         ac_cv_type_size_t=no
20482 fi
20483
20484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20485 fi
20486 { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
20487 echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
20488
20489 # The cast to long int works around a bug in the HP C Compiler
20490 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20491 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20492 # This bug is HP SR number 8606223364.
20493 { echo "$as_me:$LINENO: checking size of size_t" >&5
20494 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
20495 if test "${ac_cv_sizeof_size_t+set}" = set; then
20496   echo $ECHO_N "(cached) $ECHO_C" >&6
20497 else
20498   if test "$cross_compiling" = yes; then
20499   # Depending upon the size, compute the lo and hi bounds.
20500 cat >conftest.$ac_ext <<_ACEOF
20501 /* confdefs.h.  */
20502 _ACEOF
20503 cat confdefs.h >>conftest.$ac_ext
20504 cat >>conftest.$ac_ext <<_ACEOF
20505 /* end confdefs.h.  */
20506 $ac_includes_default
20507    typedef size_t ac__type_sizeof_;
20508 int
20509 main ()
20510 {
20511 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20512 test_array [0] = 0
20513
20514   ;
20515   return 0;
20516 }
20517 _ACEOF
20518 rm -f conftest.$ac_objext
20519 if { (ac_try="$ac_compile"
20520 case "(($ac_try" in
20521   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20522   *) ac_try_echo=$ac_try;;
20523 esac
20524 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20525   (eval "$ac_compile") 2>conftest.er1
20526   ac_status=$?
20527   grep -v '^ *+' conftest.er1 >conftest.err
20528   rm -f conftest.er1
20529   cat conftest.err >&5
20530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20531   (exit $ac_status); } && {
20532          test -z "$ac_c_werror_flag" ||
20533          test ! -s conftest.err
20534        } && test -s conftest.$ac_objext; then
20535   ac_lo=0 ac_mid=0
20536   while :; do
20537     cat >conftest.$ac_ext <<_ACEOF
20538 /* confdefs.h.  */
20539 _ACEOF
20540 cat confdefs.h >>conftest.$ac_ext
20541 cat >>conftest.$ac_ext <<_ACEOF
20542 /* end confdefs.h.  */
20543 $ac_includes_default
20544    typedef size_t ac__type_sizeof_;
20545 int
20546 main ()
20547 {
20548 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20549 test_array [0] = 0
20550
20551   ;
20552   return 0;
20553 }
20554 _ACEOF
20555 rm -f conftest.$ac_objext
20556 if { (ac_try="$ac_compile"
20557 case "(($ac_try" in
20558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20559   *) ac_try_echo=$ac_try;;
20560 esac
20561 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20562   (eval "$ac_compile") 2>conftest.er1
20563   ac_status=$?
20564   grep -v '^ *+' conftest.er1 >conftest.err
20565   rm -f conftest.er1
20566   cat conftest.err >&5
20567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20568   (exit $ac_status); } && {
20569          test -z "$ac_c_werror_flag" ||
20570          test ! -s conftest.err
20571        } && test -s conftest.$ac_objext; then
20572   ac_hi=$ac_mid; break
20573 else
20574   echo "$as_me: failed program was:" >&5
20575 sed 's/^/| /' conftest.$ac_ext >&5
20576
20577         ac_lo=`expr $ac_mid + 1`
20578                         if test $ac_lo -le $ac_mid; then
20579                           ac_lo= ac_hi=
20580                           break
20581                         fi
20582                         ac_mid=`expr 2 '*' $ac_mid + 1`
20583 fi
20584
20585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20586   done
20587 else
20588   echo "$as_me: failed program was:" >&5
20589 sed 's/^/| /' conftest.$ac_ext >&5
20590
20591         cat >conftest.$ac_ext <<_ACEOF
20592 /* confdefs.h.  */
20593 _ACEOF
20594 cat confdefs.h >>conftest.$ac_ext
20595 cat >>conftest.$ac_ext <<_ACEOF
20596 /* end confdefs.h.  */
20597 $ac_includes_default
20598    typedef size_t ac__type_sizeof_;
20599 int
20600 main ()
20601 {
20602 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20603 test_array [0] = 0
20604
20605   ;
20606   return 0;
20607 }
20608 _ACEOF
20609 rm -f conftest.$ac_objext
20610 if { (ac_try="$ac_compile"
20611 case "(($ac_try" in
20612   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20613   *) ac_try_echo=$ac_try;;
20614 esac
20615 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20616   (eval "$ac_compile") 2>conftest.er1
20617   ac_status=$?
20618   grep -v '^ *+' conftest.er1 >conftest.err
20619   rm -f conftest.er1
20620   cat conftest.err >&5
20621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20622   (exit $ac_status); } && {
20623          test -z "$ac_c_werror_flag" ||
20624          test ! -s conftest.err
20625        } && test -s conftest.$ac_objext; then
20626   ac_hi=-1 ac_mid=-1
20627   while :; do
20628     cat >conftest.$ac_ext <<_ACEOF
20629 /* confdefs.h.  */
20630 _ACEOF
20631 cat confdefs.h >>conftest.$ac_ext
20632 cat >>conftest.$ac_ext <<_ACEOF
20633 /* end confdefs.h.  */
20634 $ac_includes_default
20635    typedef size_t ac__type_sizeof_;
20636 int
20637 main ()
20638 {
20639 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
20640 test_array [0] = 0
20641
20642   ;
20643   return 0;
20644 }
20645 _ACEOF
20646 rm -f conftest.$ac_objext
20647 if { (ac_try="$ac_compile"
20648 case "(($ac_try" in
20649   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20650   *) ac_try_echo=$ac_try;;
20651 esac
20652 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20653   (eval "$ac_compile") 2>conftest.er1
20654   ac_status=$?
20655   grep -v '^ *+' conftest.er1 >conftest.err
20656   rm -f conftest.er1
20657   cat conftest.err >&5
20658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20659   (exit $ac_status); } && {
20660          test -z "$ac_c_werror_flag" ||
20661          test ! -s conftest.err
20662        } && test -s conftest.$ac_objext; then
20663   ac_lo=$ac_mid; break
20664 else
20665   echo "$as_me: failed program was:" >&5
20666 sed 's/^/| /' conftest.$ac_ext >&5
20667
20668         ac_hi=`expr '(' $ac_mid ')' - 1`
20669                         if test $ac_mid -le $ac_hi; then
20670                           ac_lo= ac_hi=
20671                           break
20672                         fi
20673                         ac_mid=`expr 2 '*' $ac_mid`
20674 fi
20675
20676 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20677   done
20678 else
20679   echo "$as_me: failed program was:" >&5
20680 sed 's/^/| /' conftest.$ac_ext >&5
20681
20682         ac_lo= ac_hi=
20683 fi
20684
20685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20686 fi
20687
20688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20689 # Binary search between lo and hi bounds.
20690 while test "x$ac_lo" != "x$ac_hi"; do
20691   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20692   cat >conftest.$ac_ext <<_ACEOF
20693 /* confdefs.h.  */
20694 _ACEOF
20695 cat confdefs.h >>conftest.$ac_ext
20696 cat >>conftest.$ac_ext <<_ACEOF
20697 /* end confdefs.h.  */
20698 $ac_includes_default
20699    typedef size_t ac__type_sizeof_;
20700 int
20701 main ()
20702 {
20703 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20704 test_array [0] = 0
20705
20706   ;
20707   return 0;
20708 }
20709 _ACEOF
20710 rm -f conftest.$ac_objext
20711 if { (ac_try="$ac_compile"
20712 case "(($ac_try" in
20713   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20714   *) ac_try_echo=$ac_try;;
20715 esac
20716 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20717   (eval "$ac_compile") 2>conftest.er1
20718   ac_status=$?
20719   grep -v '^ *+' conftest.er1 >conftest.err
20720   rm -f conftest.er1
20721   cat conftest.err >&5
20722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20723   (exit $ac_status); } && {
20724          test -z "$ac_c_werror_flag" ||
20725          test ! -s conftest.err
20726        } && test -s conftest.$ac_objext; then
20727   ac_hi=$ac_mid
20728 else
20729   echo "$as_me: failed program was:" >&5
20730 sed 's/^/| /' conftest.$ac_ext >&5
20731
20732         ac_lo=`expr '(' $ac_mid ')' + 1`
20733 fi
20734
20735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20736 done
20737 case $ac_lo in
20738 ?*) ac_cv_sizeof_size_t=$ac_lo;;
20739 '') if test "$ac_cv_type_size_t" = yes; then
20740      { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
20741 See \`config.log' for more details." >&5
20742 echo "$as_me: error: cannot compute sizeof (size_t)
20743 See \`config.log' for more details." >&2;}
20744    { (exit 77); exit 77; }; }
20745    else
20746      ac_cv_sizeof_size_t=0
20747    fi ;;
20748 esac
20749 else
20750   cat >conftest.$ac_ext <<_ACEOF
20751 /* confdefs.h.  */
20752 _ACEOF
20753 cat confdefs.h >>conftest.$ac_ext
20754 cat >>conftest.$ac_ext <<_ACEOF
20755 /* end confdefs.h.  */
20756 $ac_includes_default
20757    typedef size_t ac__type_sizeof_;
20758 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
20759 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
20760 #include <stdio.h>
20761 #include <stdlib.h>
20762 int
20763 main ()
20764 {
20765
20766   FILE *f = fopen ("conftest.val", "w");
20767   if (! f)
20768     return 1;
20769   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
20770     {
20771       long int i = longval ();
20772       if (i != ((long int) (sizeof (ac__type_sizeof_))))
20773         return 1;
20774       fprintf (f, "%ld\n", i);
20775     }
20776   else
20777     {
20778       unsigned long int i = ulongval ();
20779       if (i != ((long int) (sizeof (ac__type_sizeof_))))
20780         return 1;
20781       fprintf (f, "%lu\n", i);
20782     }
20783   return ferror (f) || fclose (f) != 0;
20784
20785   ;
20786   return 0;
20787 }
20788 _ACEOF
20789 rm -f conftest$ac_exeext
20790 if { (ac_try="$ac_link"
20791 case "(($ac_try" in
20792   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20793   *) ac_try_echo=$ac_try;;
20794 esac
20795 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20796   (eval "$ac_link") 2>&5
20797   ac_status=$?
20798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20799   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20800   { (case "(($ac_try" in
20801   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20802   *) ac_try_echo=$ac_try;;
20803 esac
20804 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20805   (eval "$ac_try") 2>&5
20806   ac_status=$?
20807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20808   (exit $ac_status); }; }; then
20809   ac_cv_sizeof_size_t=`cat conftest.val`
20810 else
20811   echo "$as_me: program exited with status $ac_status" >&5
20812 echo "$as_me: failed program was:" >&5
20813 sed 's/^/| /' conftest.$ac_ext >&5
20814
20815 ( exit $ac_status )
20816 if test "$ac_cv_type_size_t" = yes; then
20817      { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
20818 See \`config.log' for more details." >&5
20819 echo "$as_me: error: cannot compute sizeof (size_t)
20820 See \`config.log' for more details." >&2;}
20821    { (exit 77); exit 77; }; }
20822    else
20823      ac_cv_sizeof_size_t=0
20824    fi
20825 fi
20826 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20827 fi
20828 rm -f conftest.val
20829 fi
20830 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
20831 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
20832
20833
20834
20835 cat >>confdefs.h <<_ACEOF
20836 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
20837 _ACEOF
20838
20839
20840
20841 # Determine memory alignment requirements for the basic C data types.
20842
20843 { echo "$as_me:$LINENO: checking for short" >&5
20844 echo $ECHO_N "checking for short... $ECHO_C" >&6; }
20845 if test "${ac_cv_type_short+set}" = set; then
20846   echo $ECHO_N "(cached) $ECHO_C" >&6
20847 else
20848   cat >conftest.$ac_ext <<_ACEOF
20849 /* confdefs.h.  */
20850 _ACEOF
20851 cat confdefs.h >>conftest.$ac_ext
20852 cat >>conftest.$ac_ext <<_ACEOF
20853 /* end confdefs.h.  */
20854 $ac_includes_default
20855 typedef short ac__type_new_;
20856 int
20857 main ()
20858 {
20859 if ((ac__type_new_ *) 0)
20860   return 0;
20861 if (sizeof (ac__type_new_))
20862   return 0;
20863   ;
20864   return 0;
20865 }
20866 _ACEOF
20867 rm -f conftest.$ac_objext
20868 if { (ac_try="$ac_compile"
20869 case "(($ac_try" in
20870   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20871   *) ac_try_echo=$ac_try;;
20872 esac
20873 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20874   (eval "$ac_compile") 2>conftest.er1
20875   ac_status=$?
20876   grep -v '^ *+' conftest.er1 >conftest.err
20877   rm -f conftest.er1
20878   cat conftest.err >&5
20879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20880   (exit $ac_status); } && {
20881          test -z "$ac_c_werror_flag" ||
20882          test ! -s conftest.err
20883        } && test -s conftest.$ac_objext; then
20884   ac_cv_type_short=yes
20885 else
20886   echo "$as_me: failed program was:" >&5
20887 sed 's/^/| /' conftest.$ac_ext >&5
20888
20889         ac_cv_type_short=no
20890 fi
20891
20892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20893 fi
20894 { echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
20895 echo "${ECHO_T}$ac_cv_type_short" >&6; }
20896
20897 # The cast to long int works around a bug in the HP C Compiler,
20898 # see AC_CHECK_SIZEOF for more information.
20899 { echo "$as_me:$LINENO: checking alignment of short" >&5
20900 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6; }
20901 if test "${ac_cv_alignof_short+set}" = set; then
20902   echo $ECHO_N "(cached) $ECHO_C" >&6
20903 else
20904   if test "$cross_compiling" = yes; then
20905   # Depending upon the size, compute the lo and hi bounds.
20906 cat >conftest.$ac_ext <<_ACEOF
20907 /* confdefs.h.  */
20908 _ACEOF
20909 cat confdefs.h >>conftest.$ac_ext
20910 cat >>conftest.$ac_ext <<_ACEOF
20911 /* end confdefs.h.  */
20912 $ac_includes_default
20913 #ifndef offsetof
20914 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
20915 #endif
20916 typedef struct { char x; short y; } ac__type_alignof_;
20917 int
20918 main ()
20919 {
20920 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
20921 test_array [0] = 0
20922
20923   ;
20924   return 0;
20925 }
20926 _ACEOF
20927 rm -f conftest.$ac_objext
20928 if { (ac_try="$ac_compile"
20929 case "(($ac_try" in
20930   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20931   *) ac_try_echo=$ac_try;;
20932 esac
20933 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20934   (eval "$ac_compile") 2>conftest.er1
20935   ac_status=$?
20936   grep -v '^ *+' conftest.er1 >conftest.err
20937   rm -f conftest.er1
20938   cat conftest.err >&5
20939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20940   (exit $ac_status); } && {
20941          test -z "$ac_c_werror_flag" ||
20942          test ! -s conftest.err
20943        } && test -s conftest.$ac_objext; then
20944   ac_lo=0 ac_mid=0
20945   while :; do
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 $ac_includes_default
20953 #ifndef offsetof
20954 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
20955 #endif
20956 typedef struct { char x; short y; } ac__type_alignof_;
20957 int
20958 main ()
20959 {
20960 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
20961 test_array [0] = 0
20962
20963   ;
20964   return 0;
20965 }
20966 _ACEOF
20967 rm -f conftest.$ac_objext
20968 if { (ac_try="$ac_compile"
20969 case "(($ac_try" in
20970   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20971   *) ac_try_echo=$ac_try;;
20972 esac
20973 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20974   (eval "$ac_compile") 2>conftest.er1
20975   ac_status=$?
20976   grep -v '^ *+' conftest.er1 >conftest.err
20977   rm -f conftest.er1
20978   cat conftest.err >&5
20979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20980   (exit $ac_status); } && {
20981          test -z "$ac_c_werror_flag" ||
20982          test ! -s conftest.err
20983        } && test -s conftest.$ac_objext; then
20984   ac_hi=$ac_mid; break
20985 else
20986   echo "$as_me: failed program was:" >&5
20987 sed 's/^/| /' conftest.$ac_ext >&5
20988
20989         ac_lo=`expr $ac_mid + 1`
20990                         if test $ac_lo -le $ac_mid; then
20991                           ac_lo= ac_hi=
20992                           break
20993                         fi
20994                         ac_mid=`expr 2 '*' $ac_mid + 1`
20995 fi
20996
20997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20998   done
20999 else
21000   echo "$as_me: failed program was:" >&5
21001 sed 's/^/| /' conftest.$ac_ext >&5
21002
21003         cat >conftest.$ac_ext <<_ACEOF
21004 /* confdefs.h.  */
21005 _ACEOF
21006 cat confdefs.h >>conftest.$ac_ext
21007 cat >>conftest.$ac_ext <<_ACEOF
21008 /* end confdefs.h.  */
21009 $ac_includes_default
21010 #ifndef offsetof
21011 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21012 #endif
21013 typedef struct { char x; short y; } ac__type_alignof_;
21014 int
21015 main ()
21016 {
21017 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
21018 test_array [0] = 0
21019
21020   ;
21021   return 0;
21022 }
21023 _ACEOF
21024 rm -f conftest.$ac_objext
21025 if { (ac_try="$ac_compile"
21026 case "(($ac_try" in
21027   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21028   *) ac_try_echo=$ac_try;;
21029 esac
21030 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21031   (eval "$ac_compile") 2>conftest.er1
21032   ac_status=$?
21033   grep -v '^ *+' conftest.er1 >conftest.err
21034   rm -f conftest.er1
21035   cat conftest.err >&5
21036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21037   (exit $ac_status); } && {
21038          test -z "$ac_c_werror_flag" ||
21039          test ! -s conftest.err
21040        } && test -s conftest.$ac_objext; then
21041   ac_hi=-1 ac_mid=-1
21042   while :; do
21043     cat >conftest.$ac_ext <<_ACEOF
21044 /* confdefs.h.  */
21045 _ACEOF
21046 cat confdefs.h >>conftest.$ac_ext
21047 cat >>conftest.$ac_ext <<_ACEOF
21048 /* end confdefs.h.  */
21049 $ac_includes_default
21050 #ifndef offsetof
21051 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21052 #endif
21053 typedef struct { char x; short y; } ac__type_alignof_;
21054 int
21055 main ()
21056 {
21057 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
21058 test_array [0] = 0
21059
21060   ;
21061   return 0;
21062 }
21063 _ACEOF
21064 rm -f conftest.$ac_objext
21065 if { (ac_try="$ac_compile"
21066 case "(($ac_try" in
21067   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21068   *) ac_try_echo=$ac_try;;
21069 esac
21070 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21071   (eval "$ac_compile") 2>conftest.er1
21072   ac_status=$?
21073   grep -v '^ *+' conftest.er1 >conftest.err
21074   rm -f conftest.er1
21075   cat conftest.err >&5
21076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21077   (exit $ac_status); } && {
21078          test -z "$ac_c_werror_flag" ||
21079          test ! -s conftest.err
21080        } && test -s conftest.$ac_objext; then
21081   ac_lo=$ac_mid; break
21082 else
21083   echo "$as_me: failed program was:" >&5
21084 sed 's/^/| /' conftest.$ac_ext >&5
21085
21086         ac_hi=`expr '(' $ac_mid ')' - 1`
21087                         if test $ac_mid -le $ac_hi; then
21088                           ac_lo= ac_hi=
21089                           break
21090                         fi
21091                         ac_mid=`expr 2 '*' $ac_mid`
21092 fi
21093
21094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21095   done
21096 else
21097   echo "$as_me: failed program was:" >&5
21098 sed 's/^/| /' conftest.$ac_ext >&5
21099
21100         ac_lo= ac_hi=
21101 fi
21102
21103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21104 fi
21105
21106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21107 # Binary search between lo and hi bounds.
21108 while test "x$ac_lo" != "x$ac_hi"; do
21109   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21110   cat >conftest.$ac_ext <<_ACEOF
21111 /* confdefs.h.  */
21112 _ACEOF
21113 cat confdefs.h >>conftest.$ac_ext
21114 cat >>conftest.$ac_ext <<_ACEOF
21115 /* end confdefs.h.  */
21116 $ac_includes_default
21117 #ifndef offsetof
21118 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21119 #endif
21120 typedef struct { char x; short y; } ac__type_alignof_;
21121 int
21122 main ()
21123 {
21124 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21125 test_array [0] = 0
21126
21127   ;
21128   return 0;
21129 }
21130 _ACEOF
21131 rm -f conftest.$ac_objext
21132 if { (ac_try="$ac_compile"
21133 case "(($ac_try" in
21134   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21135   *) ac_try_echo=$ac_try;;
21136 esac
21137 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21138   (eval "$ac_compile") 2>conftest.er1
21139   ac_status=$?
21140   grep -v '^ *+' conftest.er1 >conftest.err
21141   rm -f conftest.er1
21142   cat conftest.err >&5
21143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21144   (exit $ac_status); } && {
21145          test -z "$ac_c_werror_flag" ||
21146          test ! -s conftest.err
21147        } && test -s conftest.$ac_objext; then
21148   ac_hi=$ac_mid
21149 else
21150   echo "$as_me: failed program was:" >&5
21151 sed 's/^/| /' conftest.$ac_ext >&5
21152
21153         ac_lo=`expr '(' $ac_mid ')' + 1`
21154 fi
21155
21156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21157 done
21158 case $ac_lo in
21159 ?*) ac_cv_alignof_short=$ac_lo;;
21160 '') if test "$ac_cv_type_short" = yes; then
21161      { { echo "$as_me:$LINENO: error: cannot compute alignment of short
21162 See \`config.log' for more details." >&5
21163 echo "$as_me: error: cannot compute alignment of short
21164 See \`config.log' for more details." >&2;}
21165    { (exit 77); exit 77; }; }
21166    else
21167      ac_cv_alignof_short=0
21168    fi ;;
21169 esac
21170 else
21171   cat >conftest.$ac_ext <<_ACEOF
21172 /* confdefs.h.  */
21173 _ACEOF
21174 cat confdefs.h >>conftest.$ac_ext
21175 cat >>conftest.$ac_ext <<_ACEOF
21176 /* end confdefs.h.  */
21177 $ac_includes_default
21178 #ifndef offsetof
21179 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21180 #endif
21181 typedef struct { char x; short y; } ac__type_alignof_;
21182 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
21183 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
21184 #include <stdio.h>
21185 #include <stdlib.h>
21186 int
21187 main ()
21188 {
21189
21190   FILE *f = fopen ("conftest.val", "w");
21191   if (! f)
21192     return 1;
21193   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
21194     {
21195       long int i = longval ();
21196       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21197         return 1;
21198       fprintf (f, "%ld\n", i);
21199     }
21200   else
21201     {
21202       unsigned long int i = ulongval ();
21203       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21204         return 1;
21205       fprintf (f, "%lu\n", i);
21206     }
21207   return ferror (f) || fclose (f) != 0;
21208
21209   ;
21210   return 0;
21211 }
21212 _ACEOF
21213 rm -f conftest$ac_exeext
21214 if { (ac_try="$ac_link"
21215 case "(($ac_try" in
21216   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21217   *) ac_try_echo=$ac_try;;
21218 esac
21219 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21220   (eval "$ac_link") 2>&5
21221   ac_status=$?
21222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21223   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21224   { (case "(($ac_try" in
21225   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21226   *) ac_try_echo=$ac_try;;
21227 esac
21228 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21229   (eval "$ac_try") 2>&5
21230   ac_status=$?
21231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21232   (exit $ac_status); }; }; then
21233   ac_cv_alignof_short=`cat conftest.val`
21234 else
21235   echo "$as_me: program exited with status $ac_status" >&5
21236 echo "$as_me: failed program was:" >&5
21237 sed 's/^/| /' conftest.$ac_ext >&5
21238
21239 ( exit $ac_status )
21240 if test "$ac_cv_type_short" = yes; then
21241      { { echo "$as_me:$LINENO: error: cannot compute alignment of short
21242 See \`config.log' for more details." >&5
21243 echo "$as_me: error: cannot compute alignment of short
21244 See \`config.log' for more details." >&2;}
21245    { (exit 77); exit 77; }; }
21246    else
21247      ac_cv_alignof_short=0
21248    fi
21249 fi
21250 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21251 fi
21252 rm -f conftest.val
21253 fi
21254 { echo "$as_me:$LINENO: result: $ac_cv_alignof_short" >&5
21255 echo "${ECHO_T}$ac_cv_alignof_short" >&6; }
21256
21257
21258
21259 cat >>confdefs.h <<_ACEOF
21260 #define ALIGNOF_SHORT $ac_cv_alignof_short
21261 _ACEOF
21262
21263
21264 { echo "$as_me:$LINENO: checking for int" >&5
21265 echo $ECHO_N "checking for int... $ECHO_C" >&6; }
21266 if test "${ac_cv_type_int+set}" = set; then
21267   echo $ECHO_N "(cached) $ECHO_C" >&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 $ac_includes_default
21276 typedef int ac__type_new_;
21277 int
21278 main ()
21279 {
21280 if ((ac__type_new_ *) 0)
21281   return 0;
21282 if (sizeof (ac__type_new_))
21283   return 0;
21284   ;
21285   return 0;
21286 }
21287 _ACEOF
21288 rm -f conftest.$ac_objext
21289 if { (ac_try="$ac_compile"
21290 case "(($ac_try" in
21291   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21292   *) ac_try_echo=$ac_try;;
21293 esac
21294 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21295   (eval "$ac_compile") 2>conftest.er1
21296   ac_status=$?
21297   grep -v '^ *+' conftest.er1 >conftest.err
21298   rm -f conftest.er1
21299   cat conftest.err >&5
21300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21301   (exit $ac_status); } && {
21302          test -z "$ac_c_werror_flag" ||
21303          test ! -s conftest.err
21304        } && test -s conftest.$ac_objext; then
21305   ac_cv_type_int=yes
21306 else
21307   echo "$as_me: failed program was:" >&5
21308 sed 's/^/| /' conftest.$ac_ext >&5
21309
21310         ac_cv_type_int=no
21311 fi
21312
21313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21314 fi
21315 { echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
21316 echo "${ECHO_T}$ac_cv_type_int" >&6; }
21317
21318 # The cast to long int works around a bug in the HP C Compiler,
21319 # see AC_CHECK_SIZEOF for more information.
21320 { echo "$as_me:$LINENO: checking alignment of int" >&5
21321 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6; }
21322 if test "${ac_cv_alignof_int+set}" = set; then
21323   echo $ECHO_N "(cached) $ECHO_C" >&6
21324 else
21325   if test "$cross_compiling" = yes; then
21326   # Depending upon the size, compute the lo and hi bounds.
21327 cat >conftest.$ac_ext <<_ACEOF
21328 /* confdefs.h.  */
21329 _ACEOF
21330 cat confdefs.h >>conftest.$ac_ext
21331 cat >>conftest.$ac_ext <<_ACEOF
21332 /* end confdefs.h.  */
21333 $ac_includes_default
21334 #ifndef offsetof
21335 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21336 #endif
21337 typedef struct { char x; int y; } ac__type_alignof_;
21338 int
21339 main ()
21340 {
21341 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
21342 test_array [0] = 0
21343
21344   ;
21345   return 0;
21346 }
21347 _ACEOF
21348 rm -f conftest.$ac_objext
21349 if { (ac_try="$ac_compile"
21350 case "(($ac_try" in
21351   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21352   *) ac_try_echo=$ac_try;;
21353 esac
21354 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21355   (eval "$ac_compile") 2>conftest.er1
21356   ac_status=$?
21357   grep -v '^ *+' conftest.er1 >conftest.err
21358   rm -f conftest.er1
21359   cat conftest.err >&5
21360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21361   (exit $ac_status); } && {
21362          test -z "$ac_c_werror_flag" ||
21363          test ! -s conftest.err
21364        } && test -s conftest.$ac_objext; then
21365   ac_lo=0 ac_mid=0
21366   while :; do
21367     cat >conftest.$ac_ext <<_ACEOF
21368 /* confdefs.h.  */
21369 _ACEOF
21370 cat confdefs.h >>conftest.$ac_ext
21371 cat >>conftest.$ac_ext <<_ACEOF
21372 /* end confdefs.h.  */
21373 $ac_includes_default
21374 #ifndef offsetof
21375 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21376 #endif
21377 typedef struct { char x; int y; } ac__type_alignof_;
21378 int
21379 main ()
21380 {
21381 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21382 test_array [0] = 0
21383
21384   ;
21385   return 0;
21386 }
21387 _ACEOF
21388 rm -f conftest.$ac_objext
21389 if { (ac_try="$ac_compile"
21390 case "(($ac_try" in
21391   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21392   *) ac_try_echo=$ac_try;;
21393 esac
21394 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21395   (eval "$ac_compile") 2>conftest.er1
21396   ac_status=$?
21397   grep -v '^ *+' conftest.er1 >conftest.err
21398   rm -f conftest.er1
21399   cat conftest.err >&5
21400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21401   (exit $ac_status); } && {
21402          test -z "$ac_c_werror_flag" ||
21403          test ! -s conftest.err
21404        } && test -s conftest.$ac_objext; then
21405   ac_hi=$ac_mid; break
21406 else
21407   echo "$as_me: failed program was:" >&5
21408 sed 's/^/| /' conftest.$ac_ext >&5
21409
21410         ac_lo=`expr $ac_mid + 1`
21411                         if test $ac_lo -le $ac_mid; then
21412                           ac_lo= ac_hi=
21413                           break
21414                         fi
21415                         ac_mid=`expr 2 '*' $ac_mid + 1`
21416 fi
21417
21418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21419   done
21420 else
21421   echo "$as_me: failed program was:" >&5
21422 sed 's/^/| /' conftest.$ac_ext >&5
21423
21424         cat >conftest.$ac_ext <<_ACEOF
21425 /* confdefs.h.  */
21426 _ACEOF
21427 cat confdefs.h >>conftest.$ac_ext
21428 cat >>conftest.$ac_ext <<_ACEOF
21429 /* end confdefs.h.  */
21430 $ac_includes_default
21431 #ifndef offsetof
21432 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21433 #endif
21434 typedef struct { char x; int y; } ac__type_alignof_;
21435 int
21436 main ()
21437 {
21438 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
21439 test_array [0] = 0
21440
21441   ;
21442   return 0;
21443 }
21444 _ACEOF
21445 rm -f conftest.$ac_objext
21446 if { (ac_try="$ac_compile"
21447 case "(($ac_try" in
21448   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21449   *) ac_try_echo=$ac_try;;
21450 esac
21451 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21452   (eval "$ac_compile") 2>conftest.er1
21453   ac_status=$?
21454   grep -v '^ *+' conftest.er1 >conftest.err
21455   rm -f conftest.er1
21456   cat conftest.err >&5
21457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21458   (exit $ac_status); } && {
21459          test -z "$ac_c_werror_flag" ||
21460          test ! -s conftest.err
21461        } && test -s conftest.$ac_objext; then
21462   ac_hi=-1 ac_mid=-1
21463   while :; do
21464     cat >conftest.$ac_ext <<_ACEOF
21465 /* confdefs.h.  */
21466 _ACEOF
21467 cat confdefs.h >>conftest.$ac_ext
21468 cat >>conftest.$ac_ext <<_ACEOF
21469 /* end confdefs.h.  */
21470 $ac_includes_default
21471 #ifndef offsetof
21472 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21473 #endif
21474 typedef struct { char x; int y; } ac__type_alignof_;
21475 int
21476 main ()
21477 {
21478 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
21479 test_array [0] = 0
21480
21481   ;
21482   return 0;
21483 }
21484 _ACEOF
21485 rm -f conftest.$ac_objext
21486 if { (ac_try="$ac_compile"
21487 case "(($ac_try" in
21488   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21489   *) ac_try_echo=$ac_try;;
21490 esac
21491 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21492   (eval "$ac_compile") 2>conftest.er1
21493   ac_status=$?
21494   grep -v '^ *+' conftest.er1 >conftest.err
21495   rm -f conftest.er1
21496   cat conftest.err >&5
21497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21498   (exit $ac_status); } && {
21499          test -z "$ac_c_werror_flag" ||
21500          test ! -s conftest.err
21501        } && test -s conftest.$ac_objext; then
21502   ac_lo=$ac_mid; break
21503 else
21504   echo "$as_me: failed program was:" >&5
21505 sed 's/^/| /' conftest.$ac_ext >&5
21506
21507         ac_hi=`expr '(' $ac_mid ')' - 1`
21508                         if test $ac_mid -le $ac_hi; then
21509                           ac_lo= ac_hi=
21510                           break
21511                         fi
21512                         ac_mid=`expr 2 '*' $ac_mid`
21513 fi
21514
21515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21516   done
21517 else
21518   echo "$as_me: failed program was:" >&5
21519 sed 's/^/| /' conftest.$ac_ext >&5
21520
21521         ac_lo= ac_hi=
21522 fi
21523
21524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21525 fi
21526
21527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21528 # Binary search between lo and hi bounds.
21529 while test "x$ac_lo" != "x$ac_hi"; do
21530   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21531   cat >conftest.$ac_ext <<_ACEOF
21532 /* confdefs.h.  */
21533 _ACEOF
21534 cat confdefs.h >>conftest.$ac_ext
21535 cat >>conftest.$ac_ext <<_ACEOF
21536 /* end confdefs.h.  */
21537 $ac_includes_default
21538 #ifndef offsetof
21539 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21540 #endif
21541 typedef struct { char x; int y; } ac__type_alignof_;
21542 int
21543 main ()
21544 {
21545 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21546 test_array [0] = 0
21547
21548   ;
21549   return 0;
21550 }
21551 _ACEOF
21552 rm -f conftest.$ac_objext
21553 if { (ac_try="$ac_compile"
21554 case "(($ac_try" in
21555   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21556   *) ac_try_echo=$ac_try;;
21557 esac
21558 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21559   (eval "$ac_compile") 2>conftest.er1
21560   ac_status=$?
21561   grep -v '^ *+' conftest.er1 >conftest.err
21562   rm -f conftest.er1
21563   cat conftest.err >&5
21564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21565   (exit $ac_status); } && {
21566          test -z "$ac_c_werror_flag" ||
21567          test ! -s conftest.err
21568        } && test -s conftest.$ac_objext; then
21569   ac_hi=$ac_mid
21570 else
21571   echo "$as_me: failed program was:" >&5
21572 sed 's/^/| /' conftest.$ac_ext >&5
21573
21574         ac_lo=`expr '(' $ac_mid ')' + 1`
21575 fi
21576
21577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21578 done
21579 case $ac_lo in
21580 ?*) ac_cv_alignof_int=$ac_lo;;
21581 '') if test "$ac_cv_type_int" = yes; then
21582      { { echo "$as_me:$LINENO: error: cannot compute alignment of int
21583 See \`config.log' for more details." >&5
21584 echo "$as_me: error: cannot compute alignment of int
21585 See \`config.log' for more details." >&2;}
21586    { (exit 77); exit 77; }; }
21587    else
21588      ac_cv_alignof_int=0
21589    fi ;;
21590 esac
21591 else
21592   cat >conftest.$ac_ext <<_ACEOF
21593 /* confdefs.h.  */
21594 _ACEOF
21595 cat confdefs.h >>conftest.$ac_ext
21596 cat >>conftest.$ac_ext <<_ACEOF
21597 /* end confdefs.h.  */
21598 $ac_includes_default
21599 #ifndef offsetof
21600 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21601 #endif
21602 typedef struct { char x; int y; } ac__type_alignof_;
21603 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
21604 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
21605 #include <stdio.h>
21606 #include <stdlib.h>
21607 int
21608 main ()
21609 {
21610
21611   FILE *f = fopen ("conftest.val", "w");
21612   if (! f)
21613     return 1;
21614   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
21615     {
21616       long int i = longval ();
21617       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21618         return 1;
21619       fprintf (f, "%ld\n", i);
21620     }
21621   else
21622     {
21623       unsigned long int i = ulongval ();
21624       if (i != ((long int) offsetof (ac__type_alignof_, y)))
21625         return 1;
21626       fprintf (f, "%lu\n", i);
21627     }
21628   return ferror (f) || fclose (f) != 0;
21629
21630   ;
21631   return 0;
21632 }
21633 _ACEOF
21634 rm -f conftest$ac_exeext
21635 if { (ac_try="$ac_link"
21636 case "(($ac_try" in
21637   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21638   *) ac_try_echo=$ac_try;;
21639 esac
21640 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21641   (eval "$ac_link") 2>&5
21642   ac_status=$?
21643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21644   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21645   { (case "(($ac_try" in
21646   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21647   *) ac_try_echo=$ac_try;;
21648 esac
21649 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21650   (eval "$ac_try") 2>&5
21651   ac_status=$?
21652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21653   (exit $ac_status); }; }; then
21654   ac_cv_alignof_int=`cat conftest.val`
21655 else
21656   echo "$as_me: program exited with status $ac_status" >&5
21657 echo "$as_me: failed program was:" >&5
21658 sed 's/^/| /' conftest.$ac_ext >&5
21659
21660 ( exit $ac_status )
21661 if test "$ac_cv_type_int" = yes; then
21662      { { echo "$as_me:$LINENO: error: cannot compute alignment of int
21663 See \`config.log' for more details." >&5
21664 echo "$as_me: error: cannot compute alignment of int
21665 See \`config.log' for more details." >&2;}
21666    { (exit 77); exit 77; }; }
21667    else
21668      ac_cv_alignof_int=0
21669    fi
21670 fi
21671 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21672 fi
21673 rm -f conftest.val
21674 fi
21675 { echo "$as_me:$LINENO: result: $ac_cv_alignof_int" >&5
21676 echo "${ECHO_T}$ac_cv_alignof_int" >&6; }
21677
21678
21679
21680 cat >>confdefs.h <<_ACEOF
21681 #define ALIGNOF_INT $ac_cv_alignof_int
21682 _ACEOF
21683
21684
21685 { echo "$as_me:$LINENO: checking for long" >&5
21686 echo $ECHO_N "checking for long... $ECHO_C" >&6; }
21687 if test "${ac_cv_type_long+set}" = set; then
21688   echo $ECHO_N "(cached) $ECHO_C" >&6
21689 else
21690   cat >conftest.$ac_ext <<_ACEOF
21691 /* confdefs.h.  */
21692 _ACEOF
21693 cat confdefs.h >>conftest.$ac_ext
21694 cat >>conftest.$ac_ext <<_ACEOF
21695 /* end confdefs.h.  */
21696 $ac_includes_default
21697 typedef long ac__type_new_;
21698 int
21699 main ()
21700 {
21701 if ((ac__type_new_ *) 0)
21702   return 0;
21703 if (sizeof (ac__type_new_))
21704   return 0;
21705   ;
21706   return 0;
21707 }
21708 _ACEOF
21709 rm -f conftest.$ac_objext
21710 if { (ac_try="$ac_compile"
21711 case "(($ac_try" in
21712   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21713   *) ac_try_echo=$ac_try;;
21714 esac
21715 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21716   (eval "$ac_compile") 2>conftest.er1
21717   ac_status=$?
21718   grep -v '^ *+' conftest.er1 >conftest.err
21719   rm -f conftest.er1
21720   cat conftest.err >&5
21721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21722   (exit $ac_status); } && {
21723          test -z "$ac_c_werror_flag" ||
21724          test ! -s conftest.err
21725        } && test -s conftest.$ac_objext; then
21726   ac_cv_type_long=yes
21727 else
21728   echo "$as_me: failed program was:" >&5
21729 sed 's/^/| /' conftest.$ac_ext >&5
21730
21731         ac_cv_type_long=no
21732 fi
21733
21734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21735 fi
21736 { echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
21737 echo "${ECHO_T}$ac_cv_type_long" >&6; }
21738
21739 # The cast to long int works around a bug in the HP C Compiler,
21740 # see AC_CHECK_SIZEOF for more information.
21741 { echo "$as_me:$LINENO: checking alignment of long" >&5
21742 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6; }
21743 if test "${ac_cv_alignof_long+set}" = set; then
21744   echo $ECHO_N "(cached) $ECHO_C" >&6
21745 else
21746   if test "$cross_compiling" = yes; then
21747   # Depending upon the size, compute the lo and hi bounds.
21748 cat >conftest.$ac_ext <<_ACEOF
21749 /* confdefs.h.  */
21750 _ACEOF
21751 cat confdefs.h >>conftest.$ac_ext
21752 cat >>conftest.$ac_ext <<_ACEOF
21753 /* end confdefs.h.  */
21754 $ac_includes_default
21755 #ifndef offsetof
21756 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21757 #endif
21758 typedef struct { char x; long y; } ac__type_alignof_;
21759 int
21760 main ()
21761 {
21762 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
21763 test_array [0] = 0
21764
21765   ;
21766   return 0;
21767 }
21768 _ACEOF
21769 rm -f conftest.$ac_objext
21770 if { (ac_try="$ac_compile"
21771 case "(($ac_try" in
21772   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21773   *) ac_try_echo=$ac_try;;
21774 esac
21775 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21776   (eval "$ac_compile") 2>conftest.er1
21777   ac_status=$?
21778   grep -v '^ *+' conftest.er1 >conftest.err
21779   rm -f conftest.er1
21780   cat conftest.err >&5
21781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21782   (exit $ac_status); } && {
21783          test -z "$ac_c_werror_flag" ||
21784          test ! -s conftest.err
21785        } && test -s conftest.$ac_objext; then
21786   ac_lo=0 ac_mid=0
21787   while :; do
21788     cat >conftest.$ac_ext <<_ACEOF
21789 /* confdefs.h.  */
21790 _ACEOF
21791 cat confdefs.h >>conftest.$ac_ext
21792 cat >>conftest.$ac_ext <<_ACEOF
21793 /* end confdefs.h.  */
21794 $ac_includes_default
21795 #ifndef offsetof
21796 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21797 #endif
21798 typedef struct { char x; long y; } ac__type_alignof_;
21799 int
21800 main ()
21801 {
21802 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21803 test_array [0] = 0
21804
21805   ;
21806   return 0;
21807 }
21808 _ACEOF
21809 rm -f conftest.$ac_objext
21810 if { (ac_try="$ac_compile"
21811 case "(($ac_try" in
21812   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21813   *) ac_try_echo=$ac_try;;
21814 esac
21815 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21816   (eval "$ac_compile") 2>conftest.er1
21817   ac_status=$?
21818   grep -v '^ *+' conftest.er1 >conftest.err
21819   rm -f conftest.er1
21820   cat conftest.err >&5
21821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21822   (exit $ac_status); } && {
21823          test -z "$ac_c_werror_flag" ||
21824          test ! -s conftest.err
21825        } && test -s conftest.$ac_objext; then
21826   ac_hi=$ac_mid; break
21827 else
21828   echo "$as_me: failed program was:" >&5
21829 sed 's/^/| /' conftest.$ac_ext >&5
21830
21831         ac_lo=`expr $ac_mid + 1`
21832                         if test $ac_lo -le $ac_mid; then
21833                           ac_lo= ac_hi=
21834                           break
21835                         fi
21836                         ac_mid=`expr 2 '*' $ac_mid + 1`
21837 fi
21838
21839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21840   done
21841 else
21842   echo "$as_me: failed program was:" >&5
21843 sed 's/^/| /' conftest.$ac_ext >&5
21844
21845         cat >conftest.$ac_ext <<_ACEOF
21846 /* confdefs.h.  */
21847 _ACEOF
21848 cat confdefs.h >>conftest.$ac_ext
21849 cat >>conftest.$ac_ext <<_ACEOF
21850 /* end confdefs.h.  */
21851 $ac_includes_default
21852 #ifndef offsetof
21853 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21854 #endif
21855 typedef struct { char x; long y; } ac__type_alignof_;
21856 int
21857 main ()
21858 {
21859 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
21860 test_array [0] = 0
21861
21862   ;
21863   return 0;
21864 }
21865 _ACEOF
21866 rm -f conftest.$ac_objext
21867 if { (ac_try="$ac_compile"
21868 case "(($ac_try" in
21869   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21870   *) ac_try_echo=$ac_try;;
21871 esac
21872 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21873   (eval "$ac_compile") 2>conftest.er1
21874   ac_status=$?
21875   grep -v '^ *+' conftest.er1 >conftest.err
21876   rm -f conftest.er1
21877   cat conftest.err >&5
21878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21879   (exit $ac_status); } && {
21880          test -z "$ac_c_werror_flag" ||
21881          test ! -s conftest.err
21882        } && test -s conftest.$ac_objext; then
21883   ac_hi=-1 ac_mid=-1
21884   while :; do
21885     cat >conftest.$ac_ext <<_ACEOF
21886 /* confdefs.h.  */
21887 _ACEOF
21888 cat confdefs.h >>conftest.$ac_ext
21889 cat >>conftest.$ac_ext <<_ACEOF
21890 /* end confdefs.h.  */
21891 $ac_includes_default
21892 #ifndef offsetof
21893 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21894 #endif
21895 typedef struct { char x; long y; } ac__type_alignof_;
21896 int
21897 main ()
21898 {
21899 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
21900 test_array [0] = 0
21901
21902   ;
21903   return 0;
21904 }
21905 _ACEOF
21906 rm -f conftest.$ac_objext
21907 if { (ac_try="$ac_compile"
21908 case "(($ac_try" in
21909   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21910   *) ac_try_echo=$ac_try;;
21911 esac
21912 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21913   (eval "$ac_compile") 2>conftest.er1
21914   ac_status=$?
21915   grep -v '^ *+' conftest.er1 >conftest.err
21916   rm -f conftest.er1
21917   cat conftest.err >&5
21918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21919   (exit $ac_status); } && {
21920          test -z "$ac_c_werror_flag" ||
21921          test ! -s conftest.err
21922        } && test -s conftest.$ac_objext; then
21923   ac_lo=$ac_mid; break
21924 else
21925   echo "$as_me: failed program was:" >&5
21926 sed 's/^/| /' conftest.$ac_ext >&5
21927
21928         ac_hi=`expr '(' $ac_mid ')' - 1`
21929                         if test $ac_mid -le $ac_hi; then
21930                           ac_lo= ac_hi=
21931                           break
21932                         fi
21933                         ac_mid=`expr 2 '*' $ac_mid`
21934 fi
21935
21936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21937   done
21938 else
21939   echo "$as_me: failed program was:" >&5
21940 sed 's/^/| /' conftest.$ac_ext >&5
21941
21942         ac_lo= ac_hi=
21943 fi
21944
21945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21946 fi
21947
21948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21949 # Binary search between lo and hi bounds.
21950 while test "x$ac_lo" != "x$ac_hi"; do
21951   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21952   cat >conftest.$ac_ext <<_ACEOF
21953 /* confdefs.h.  */
21954 _ACEOF
21955 cat confdefs.h >>conftest.$ac_ext
21956 cat >>conftest.$ac_ext <<_ACEOF
21957 /* end confdefs.h.  */
21958 $ac_includes_default
21959 #ifndef offsetof
21960 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
21961 #endif
21962 typedef struct { char x; long y; } ac__type_alignof_;
21963 int
21964 main ()
21965 {
21966 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
21967 test_array [0] = 0
21968
21969   ;
21970   return 0;
21971 }
21972 _ACEOF
21973 rm -f conftest.$ac_objext
21974 if { (ac_try="$ac_compile"
21975 case "(($ac_try" in
21976   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21977   *) ac_try_echo=$ac_try;;
21978 esac
21979 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21980   (eval "$ac_compile") 2>conftest.er1
21981   ac_status=$?
21982   grep -v '^ *+' conftest.er1 >conftest.err
21983   rm -f conftest.er1
21984   cat conftest.err >&5
21985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21986   (exit $ac_status); } && {
21987          test -z "$ac_c_werror_flag" ||
21988          test ! -s conftest.err
21989        } && test -s conftest.$ac_objext; then
21990   ac_hi=$ac_mid
21991 else
21992   echo "$as_me: failed program was:" >&5
21993 sed 's/^/| /' conftest.$ac_ext >&5
21994
21995         ac_lo=`expr '(' $ac_mid ')' + 1`
21996 fi
21997
21998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21999 done
22000 case $ac_lo in
22001 ?*) ac_cv_alignof_long=$ac_lo;;
22002 '') if test "$ac_cv_type_long" = yes; then
22003      { { echo "$as_me:$LINENO: error: cannot compute alignment of long
22004 See \`config.log' for more details." >&5
22005 echo "$as_me: error: cannot compute alignment of long
22006 See \`config.log' for more details." >&2;}
22007    { (exit 77); exit 77; }; }
22008    else
22009      ac_cv_alignof_long=0
22010    fi ;;
22011 esac
22012 else
22013   cat >conftest.$ac_ext <<_ACEOF
22014 /* confdefs.h.  */
22015 _ACEOF
22016 cat confdefs.h >>conftest.$ac_ext
22017 cat >>conftest.$ac_ext <<_ACEOF
22018 /* end confdefs.h.  */
22019 $ac_includes_default
22020 #ifndef offsetof
22021 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22022 #endif
22023 typedef struct { char x; long y; } ac__type_alignof_;
22024 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
22025 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
22026 #include <stdio.h>
22027 #include <stdlib.h>
22028 int
22029 main ()
22030 {
22031
22032   FILE *f = fopen ("conftest.val", "w");
22033   if (! f)
22034     return 1;
22035   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
22036     {
22037       long int i = longval ();
22038       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22039         return 1;
22040       fprintf (f, "%ld\n", i);
22041     }
22042   else
22043     {
22044       unsigned long int i = ulongval ();
22045       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22046         return 1;
22047       fprintf (f, "%lu\n", i);
22048     }
22049   return ferror (f) || fclose (f) != 0;
22050
22051   ;
22052   return 0;
22053 }
22054 _ACEOF
22055 rm -f conftest$ac_exeext
22056 if { (ac_try="$ac_link"
22057 case "(($ac_try" in
22058   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22059   *) ac_try_echo=$ac_try;;
22060 esac
22061 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22062   (eval "$ac_link") 2>&5
22063   ac_status=$?
22064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22065   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22066   { (case "(($ac_try" in
22067   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22068   *) ac_try_echo=$ac_try;;
22069 esac
22070 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22071   (eval "$ac_try") 2>&5
22072   ac_status=$?
22073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22074   (exit $ac_status); }; }; then
22075   ac_cv_alignof_long=`cat conftest.val`
22076 else
22077   echo "$as_me: program exited with status $ac_status" >&5
22078 echo "$as_me: failed program was:" >&5
22079 sed 's/^/| /' conftest.$ac_ext >&5
22080
22081 ( exit $ac_status )
22082 if test "$ac_cv_type_long" = yes; then
22083      { { echo "$as_me:$LINENO: error: cannot compute alignment of long
22084 See \`config.log' for more details." >&5
22085 echo "$as_me: error: cannot compute alignment of long
22086 See \`config.log' for more details." >&2;}
22087    { (exit 77); exit 77; }; }
22088    else
22089      ac_cv_alignof_long=0
22090    fi
22091 fi
22092 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22093 fi
22094 rm -f conftest.val
22095 fi
22096 { echo "$as_me:$LINENO: result: $ac_cv_alignof_long" >&5
22097 echo "${ECHO_T}$ac_cv_alignof_long" >&6; }
22098
22099
22100
22101 cat >>confdefs.h <<_ACEOF
22102 #define ALIGNOF_LONG $ac_cv_alignof_long
22103 _ACEOF
22104
22105
22106 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
22107   { echo "$as_me:$LINENO: checking for long long int" >&5
22108 echo $ECHO_N "checking for long long int... $ECHO_C" >&6; }
22109 if test "${ac_cv_type_long_long_int+set}" = set; then
22110   echo $ECHO_N "(cached) $ECHO_C" >&6
22111 else
22112   cat >conftest.$ac_ext <<_ACEOF
22113 /* confdefs.h.  */
22114 _ACEOF
22115 cat confdefs.h >>conftest.$ac_ext
22116 cat >>conftest.$ac_ext <<_ACEOF
22117 /* end confdefs.h.  */
22118 $ac_includes_default
22119 typedef long long int ac__type_new_;
22120 int
22121 main ()
22122 {
22123 if ((ac__type_new_ *) 0)
22124   return 0;
22125 if (sizeof (ac__type_new_))
22126   return 0;
22127   ;
22128   return 0;
22129 }
22130 _ACEOF
22131 rm -f conftest.$ac_objext
22132 if { (ac_try="$ac_compile"
22133 case "(($ac_try" in
22134   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22135   *) ac_try_echo=$ac_try;;
22136 esac
22137 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22138   (eval "$ac_compile") 2>conftest.er1
22139   ac_status=$?
22140   grep -v '^ *+' conftest.er1 >conftest.err
22141   rm -f conftest.er1
22142   cat conftest.err >&5
22143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22144   (exit $ac_status); } && {
22145          test -z "$ac_c_werror_flag" ||
22146          test ! -s conftest.err
22147        } && test -s conftest.$ac_objext; then
22148   ac_cv_type_long_long_int=yes
22149 else
22150   echo "$as_me: failed program was:" >&5
22151 sed 's/^/| /' conftest.$ac_ext >&5
22152
22153         ac_cv_type_long_long_int=no
22154 fi
22155
22156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22157 fi
22158 { echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
22159 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; }
22160
22161 # The cast to long int works around a bug in the HP C Compiler,
22162 # see AC_CHECK_SIZEOF for more information.
22163 { echo "$as_me:$LINENO: checking alignment of long long int" >&5
22164 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6; }
22165 if test "${ac_cv_alignof_long_long_int+set}" = set; then
22166   echo $ECHO_N "(cached) $ECHO_C" >&6
22167 else
22168   if test "$cross_compiling" = yes; then
22169   # Depending upon the size, compute the lo and hi bounds.
22170 cat >conftest.$ac_ext <<_ACEOF
22171 /* confdefs.h.  */
22172 _ACEOF
22173 cat confdefs.h >>conftest.$ac_ext
22174 cat >>conftest.$ac_ext <<_ACEOF
22175 /* end confdefs.h.  */
22176 $ac_includes_default
22177 #ifndef offsetof
22178 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22179 #endif
22180 typedef struct { char x; long long int y; } ac__type_alignof_;
22181 int
22182 main ()
22183 {
22184 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
22185 test_array [0] = 0
22186
22187   ;
22188   return 0;
22189 }
22190 _ACEOF
22191 rm -f conftest.$ac_objext
22192 if { (ac_try="$ac_compile"
22193 case "(($ac_try" in
22194   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22195   *) ac_try_echo=$ac_try;;
22196 esac
22197 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22198   (eval "$ac_compile") 2>conftest.er1
22199   ac_status=$?
22200   grep -v '^ *+' conftest.er1 >conftest.err
22201   rm -f conftest.er1
22202   cat conftest.err >&5
22203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22204   (exit $ac_status); } && {
22205          test -z "$ac_c_werror_flag" ||
22206          test ! -s conftest.err
22207        } && test -s conftest.$ac_objext; then
22208   ac_lo=0 ac_mid=0
22209   while :; do
22210     cat >conftest.$ac_ext <<_ACEOF
22211 /* confdefs.h.  */
22212 _ACEOF
22213 cat confdefs.h >>conftest.$ac_ext
22214 cat >>conftest.$ac_ext <<_ACEOF
22215 /* end confdefs.h.  */
22216 $ac_includes_default
22217 #ifndef offsetof
22218 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22219 #endif
22220 typedef struct { char x; long long int y; } ac__type_alignof_;
22221 int
22222 main ()
22223 {
22224 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22225 test_array [0] = 0
22226
22227   ;
22228   return 0;
22229 }
22230 _ACEOF
22231 rm -f conftest.$ac_objext
22232 if { (ac_try="$ac_compile"
22233 case "(($ac_try" in
22234   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22235   *) ac_try_echo=$ac_try;;
22236 esac
22237 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22238   (eval "$ac_compile") 2>conftest.er1
22239   ac_status=$?
22240   grep -v '^ *+' conftest.er1 >conftest.err
22241   rm -f conftest.er1
22242   cat conftest.err >&5
22243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22244   (exit $ac_status); } && {
22245          test -z "$ac_c_werror_flag" ||
22246          test ! -s conftest.err
22247        } && test -s conftest.$ac_objext; then
22248   ac_hi=$ac_mid; break
22249 else
22250   echo "$as_me: failed program was:" >&5
22251 sed 's/^/| /' conftest.$ac_ext >&5
22252
22253         ac_lo=`expr $ac_mid + 1`
22254                         if test $ac_lo -le $ac_mid; then
22255                           ac_lo= ac_hi=
22256                           break
22257                         fi
22258                         ac_mid=`expr 2 '*' $ac_mid + 1`
22259 fi
22260
22261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22262   done
22263 else
22264   echo "$as_me: failed program was:" >&5
22265 sed 's/^/| /' conftest.$ac_ext >&5
22266
22267         cat >conftest.$ac_ext <<_ACEOF
22268 /* confdefs.h.  */
22269 _ACEOF
22270 cat confdefs.h >>conftest.$ac_ext
22271 cat >>conftest.$ac_ext <<_ACEOF
22272 /* end confdefs.h.  */
22273 $ac_includes_default
22274 #ifndef offsetof
22275 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22276 #endif
22277 typedef struct { char x; long long int y; } ac__type_alignof_;
22278 int
22279 main ()
22280 {
22281 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
22282 test_array [0] = 0
22283
22284   ;
22285   return 0;
22286 }
22287 _ACEOF
22288 rm -f conftest.$ac_objext
22289 if { (ac_try="$ac_compile"
22290 case "(($ac_try" in
22291   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22292   *) ac_try_echo=$ac_try;;
22293 esac
22294 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22295   (eval "$ac_compile") 2>conftest.er1
22296   ac_status=$?
22297   grep -v '^ *+' conftest.er1 >conftest.err
22298   rm -f conftest.er1
22299   cat conftest.err >&5
22300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22301   (exit $ac_status); } && {
22302          test -z "$ac_c_werror_flag" ||
22303          test ! -s conftest.err
22304        } && test -s conftest.$ac_objext; then
22305   ac_hi=-1 ac_mid=-1
22306   while :; do
22307     cat >conftest.$ac_ext <<_ACEOF
22308 /* confdefs.h.  */
22309 _ACEOF
22310 cat confdefs.h >>conftest.$ac_ext
22311 cat >>conftest.$ac_ext <<_ACEOF
22312 /* end confdefs.h.  */
22313 $ac_includes_default
22314 #ifndef offsetof
22315 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22316 #endif
22317 typedef struct { char x; long long int y; } ac__type_alignof_;
22318 int
22319 main ()
22320 {
22321 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
22322 test_array [0] = 0
22323
22324   ;
22325   return 0;
22326 }
22327 _ACEOF
22328 rm -f conftest.$ac_objext
22329 if { (ac_try="$ac_compile"
22330 case "(($ac_try" in
22331   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22332   *) ac_try_echo=$ac_try;;
22333 esac
22334 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22335   (eval "$ac_compile") 2>conftest.er1
22336   ac_status=$?
22337   grep -v '^ *+' conftest.er1 >conftest.err
22338   rm -f conftest.er1
22339   cat conftest.err >&5
22340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22341   (exit $ac_status); } && {
22342          test -z "$ac_c_werror_flag" ||
22343          test ! -s conftest.err
22344        } && test -s conftest.$ac_objext; then
22345   ac_lo=$ac_mid; break
22346 else
22347   echo "$as_me: failed program was:" >&5
22348 sed 's/^/| /' conftest.$ac_ext >&5
22349
22350         ac_hi=`expr '(' $ac_mid ')' - 1`
22351                         if test $ac_mid -le $ac_hi; then
22352                           ac_lo= ac_hi=
22353                           break
22354                         fi
22355                         ac_mid=`expr 2 '*' $ac_mid`
22356 fi
22357
22358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22359   done
22360 else
22361   echo "$as_me: failed program was:" >&5
22362 sed 's/^/| /' conftest.$ac_ext >&5
22363
22364         ac_lo= ac_hi=
22365 fi
22366
22367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22368 fi
22369
22370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22371 # Binary search between lo and hi bounds.
22372 while test "x$ac_lo" != "x$ac_hi"; do
22373   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22374   cat >conftest.$ac_ext <<_ACEOF
22375 /* confdefs.h.  */
22376 _ACEOF
22377 cat confdefs.h >>conftest.$ac_ext
22378 cat >>conftest.$ac_ext <<_ACEOF
22379 /* end confdefs.h.  */
22380 $ac_includes_default
22381 #ifndef offsetof
22382 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22383 #endif
22384 typedef struct { char x; long long int y; } ac__type_alignof_;
22385 int
22386 main ()
22387 {
22388 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22389 test_array [0] = 0
22390
22391   ;
22392   return 0;
22393 }
22394 _ACEOF
22395 rm -f conftest.$ac_objext
22396 if { (ac_try="$ac_compile"
22397 case "(($ac_try" in
22398   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22399   *) ac_try_echo=$ac_try;;
22400 esac
22401 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22402   (eval "$ac_compile") 2>conftest.er1
22403   ac_status=$?
22404   grep -v '^ *+' conftest.er1 >conftest.err
22405   rm -f conftest.er1
22406   cat conftest.err >&5
22407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22408   (exit $ac_status); } && {
22409          test -z "$ac_c_werror_flag" ||
22410          test ! -s conftest.err
22411        } && test -s conftest.$ac_objext; then
22412   ac_hi=$ac_mid
22413 else
22414   echo "$as_me: failed program was:" >&5
22415 sed 's/^/| /' conftest.$ac_ext >&5
22416
22417         ac_lo=`expr '(' $ac_mid ')' + 1`
22418 fi
22419
22420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22421 done
22422 case $ac_lo in
22423 ?*) ac_cv_alignof_long_long_int=$ac_lo;;
22424 '') if test "$ac_cv_type_long_long_int" = yes; then
22425      { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int
22426 See \`config.log' for more details." >&5
22427 echo "$as_me: error: cannot compute alignment of long long int
22428 See \`config.log' for more details." >&2;}
22429    { (exit 77); exit 77; }; }
22430    else
22431      ac_cv_alignof_long_long_int=0
22432    fi ;;
22433 esac
22434 else
22435   cat >conftest.$ac_ext <<_ACEOF
22436 /* confdefs.h.  */
22437 _ACEOF
22438 cat confdefs.h >>conftest.$ac_ext
22439 cat >>conftest.$ac_ext <<_ACEOF
22440 /* end confdefs.h.  */
22441 $ac_includes_default
22442 #ifndef offsetof
22443 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22444 #endif
22445 typedef struct { char x; long long int y; } ac__type_alignof_;
22446 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
22447 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
22448 #include <stdio.h>
22449 #include <stdlib.h>
22450 int
22451 main ()
22452 {
22453
22454   FILE *f = fopen ("conftest.val", "w");
22455   if (! f)
22456     return 1;
22457   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
22458     {
22459       long int i = longval ();
22460       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22461         return 1;
22462       fprintf (f, "%ld\n", i);
22463     }
22464   else
22465     {
22466       unsigned long int i = ulongval ();
22467       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22468         return 1;
22469       fprintf (f, "%lu\n", i);
22470     }
22471   return ferror (f) || fclose (f) != 0;
22472
22473   ;
22474   return 0;
22475 }
22476 _ACEOF
22477 rm -f conftest$ac_exeext
22478 if { (ac_try="$ac_link"
22479 case "(($ac_try" in
22480   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22481   *) ac_try_echo=$ac_try;;
22482 esac
22483 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22484   (eval "$ac_link") 2>&5
22485   ac_status=$?
22486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22487   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22488   { (case "(($ac_try" in
22489   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22490   *) ac_try_echo=$ac_try;;
22491 esac
22492 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22493   (eval "$ac_try") 2>&5
22494   ac_status=$?
22495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22496   (exit $ac_status); }; }; then
22497   ac_cv_alignof_long_long_int=`cat conftest.val`
22498 else
22499   echo "$as_me: program exited with status $ac_status" >&5
22500 echo "$as_me: failed program was:" >&5
22501 sed 's/^/| /' conftest.$ac_ext >&5
22502
22503 ( exit $ac_status )
22504 if test "$ac_cv_type_long_long_int" = yes; then
22505      { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int
22506 See \`config.log' for more details." >&5
22507 echo "$as_me: error: cannot compute alignment of long long int
22508 See \`config.log' for more details." >&2;}
22509    { (exit 77); exit 77; }; }
22510    else
22511      ac_cv_alignof_long_long_int=0
22512    fi
22513 fi
22514 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22515 fi
22516 rm -f conftest.val
22517 fi
22518 { echo "$as_me:$LINENO: result: $ac_cv_alignof_long_long_int" >&5
22519 echo "${ECHO_T}$ac_cv_alignof_long_long_int" >&6; }
22520
22521
22522
22523 cat >>confdefs.h <<_ACEOF
22524 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
22525 _ACEOF
22526
22527
22528 fi
22529 { echo "$as_me:$LINENO: checking for double" >&5
22530 echo $ECHO_N "checking for double... $ECHO_C" >&6; }
22531 if test "${ac_cv_type_double+set}" = set; then
22532   echo $ECHO_N "(cached) $ECHO_C" >&6
22533 else
22534   cat >conftest.$ac_ext <<_ACEOF
22535 /* confdefs.h.  */
22536 _ACEOF
22537 cat confdefs.h >>conftest.$ac_ext
22538 cat >>conftest.$ac_ext <<_ACEOF
22539 /* end confdefs.h.  */
22540 $ac_includes_default
22541 typedef double ac__type_new_;
22542 int
22543 main ()
22544 {
22545 if ((ac__type_new_ *) 0)
22546   return 0;
22547 if (sizeof (ac__type_new_))
22548   return 0;
22549   ;
22550   return 0;
22551 }
22552 _ACEOF
22553 rm -f conftest.$ac_objext
22554 if { (ac_try="$ac_compile"
22555 case "(($ac_try" in
22556   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22557   *) ac_try_echo=$ac_try;;
22558 esac
22559 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22560   (eval "$ac_compile") 2>conftest.er1
22561   ac_status=$?
22562   grep -v '^ *+' conftest.er1 >conftest.err
22563   rm -f conftest.er1
22564   cat conftest.err >&5
22565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22566   (exit $ac_status); } && {
22567          test -z "$ac_c_werror_flag" ||
22568          test ! -s conftest.err
22569        } && test -s conftest.$ac_objext; then
22570   ac_cv_type_double=yes
22571 else
22572   echo "$as_me: failed program was:" >&5
22573 sed 's/^/| /' conftest.$ac_ext >&5
22574
22575         ac_cv_type_double=no
22576 fi
22577
22578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22579 fi
22580 { echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
22581 echo "${ECHO_T}$ac_cv_type_double" >&6; }
22582
22583 # The cast to long int works around a bug in the HP C Compiler,
22584 # see AC_CHECK_SIZEOF for more information.
22585 { echo "$as_me:$LINENO: checking alignment of double" >&5
22586 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6; }
22587 if test "${ac_cv_alignof_double+set}" = set; then
22588   echo $ECHO_N "(cached) $ECHO_C" >&6
22589 else
22590   if test "$cross_compiling" = yes; then
22591   # Depending upon the size, compute the lo and hi bounds.
22592 cat >conftest.$ac_ext <<_ACEOF
22593 /* confdefs.h.  */
22594 _ACEOF
22595 cat confdefs.h >>conftest.$ac_ext
22596 cat >>conftest.$ac_ext <<_ACEOF
22597 /* end confdefs.h.  */
22598 $ac_includes_default
22599 #ifndef offsetof
22600 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22601 #endif
22602 typedef struct { char x; double y; } ac__type_alignof_;
22603 int
22604 main ()
22605 {
22606 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
22607 test_array [0] = 0
22608
22609   ;
22610   return 0;
22611 }
22612 _ACEOF
22613 rm -f conftest.$ac_objext
22614 if { (ac_try="$ac_compile"
22615 case "(($ac_try" in
22616   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22617   *) ac_try_echo=$ac_try;;
22618 esac
22619 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22620   (eval "$ac_compile") 2>conftest.er1
22621   ac_status=$?
22622   grep -v '^ *+' conftest.er1 >conftest.err
22623   rm -f conftest.er1
22624   cat conftest.err >&5
22625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22626   (exit $ac_status); } && {
22627          test -z "$ac_c_werror_flag" ||
22628          test ! -s conftest.err
22629        } && test -s conftest.$ac_objext; then
22630   ac_lo=0 ac_mid=0
22631   while :; do
22632     cat >conftest.$ac_ext <<_ACEOF
22633 /* confdefs.h.  */
22634 _ACEOF
22635 cat confdefs.h >>conftest.$ac_ext
22636 cat >>conftest.$ac_ext <<_ACEOF
22637 /* end confdefs.h.  */
22638 $ac_includes_default
22639 #ifndef offsetof
22640 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22641 #endif
22642 typedef struct { char x; double y; } ac__type_alignof_;
22643 int
22644 main ()
22645 {
22646 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22647 test_array [0] = 0
22648
22649   ;
22650   return 0;
22651 }
22652 _ACEOF
22653 rm -f conftest.$ac_objext
22654 if { (ac_try="$ac_compile"
22655 case "(($ac_try" in
22656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22657   *) ac_try_echo=$ac_try;;
22658 esac
22659 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22660   (eval "$ac_compile") 2>conftest.er1
22661   ac_status=$?
22662   grep -v '^ *+' conftest.er1 >conftest.err
22663   rm -f conftest.er1
22664   cat conftest.err >&5
22665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22666   (exit $ac_status); } && {
22667          test -z "$ac_c_werror_flag" ||
22668          test ! -s conftest.err
22669        } && test -s conftest.$ac_objext; then
22670   ac_hi=$ac_mid; break
22671 else
22672   echo "$as_me: failed program was:" >&5
22673 sed 's/^/| /' conftest.$ac_ext >&5
22674
22675         ac_lo=`expr $ac_mid + 1`
22676                         if test $ac_lo -le $ac_mid; then
22677                           ac_lo= ac_hi=
22678                           break
22679                         fi
22680                         ac_mid=`expr 2 '*' $ac_mid + 1`
22681 fi
22682
22683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22684   done
22685 else
22686   echo "$as_me: failed program was:" >&5
22687 sed 's/^/| /' conftest.$ac_ext >&5
22688
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 $ac_includes_default
22696 #ifndef offsetof
22697 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22698 #endif
22699 typedef struct { char x; double y; } ac__type_alignof_;
22700 int
22701 main ()
22702 {
22703 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
22704 test_array [0] = 0
22705
22706   ;
22707   return 0;
22708 }
22709 _ACEOF
22710 rm -f conftest.$ac_objext
22711 if { (ac_try="$ac_compile"
22712 case "(($ac_try" in
22713   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22714   *) ac_try_echo=$ac_try;;
22715 esac
22716 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22717   (eval "$ac_compile") 2>conftest.er1
22718   ac_status=$?
22719   grep -v '^ *+' conftest.er1 >conftest.err
22720   rm -f conftest.er1
22721   cat conftest.err >&5
22722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22723   (exit $ac_status); } && {
22724          test -z "$ac_c_werror_flag" ||
22725          test ! -s conftest.err
22726        } && test -s conftest.$ac_objext; then
22727   ac_hi=-1 ac_mid=-1
22728   while :; do
22729     cat >conftest.$ac_ext <<_ACEOF
22730 /* confdefs.h.  */
22731 _ACEOF
22732 cat confdefs.h >>conftest.$ac_ext
22733 cat >>conftest.$ac_ext <<_ACEOF
22734 /* end confdefs.h.  */
22735 $ac_includes_default
22736 #ifndef offsetof
22737 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22738 #endif
22739 typedef struct { char x; double y; } ac__type_alignof_;
22740 int
22741 main ()
22742 {
22743 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
22744 test_array [0] = 0
22745
22746   ;
22747   return 0;
22748 }
22749 _ACEOF
22750 rm -f conftest.$ac_objext
22751 if { (ac_try="$ac_compile"
22752 case "(($ac_try" in
22753   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22754   *) ac_try_echo=$ac_try;;
22755 esac
22756 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22757   (eval "$ac_compile") 2>conftest.er1
22758   ac_status=$?
22759   grep -v '^ *+' conftest.er1 >conftest.err
22760   rm -f conftest.er1
22761   cat conftest.err >&5
22762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22763   (exit $ac_status); } && {
22764          test -z "$ac_c_werror_flag" ||
22765          test ! -s conftest.err
22766        } && test -s conftest.$ac_objext; then
22767   ac_lo=$ac_mid; break
22768 else
22769   echo "$as_me: failed program was:" >&5
22770 sed 's/^/| /' conftest.$ac_ext >&5
22771
22772         ac_hi=`expr '(' $ac_mid ')' - 1`
22773                         if test $ac_mid -le $ac_hi; then
22774                           ac_lo= ac_hi=
22775                           break
22776                         fi
22777                         ac_mid=`expr 2 '*' $ac_mid`
22778 fi
22779
22780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22781   done
22782 else
22783   echo "$as_me: failed program was:" >&5
22784 sed 's/^/| /' conftest.$ac_ext >&5
22785
22786         ac_lo= ac_hi=
22787 fi
22788
22789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22790 fi
22791
22792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22793 # Binary search between lo and hi bounds.
22794 while test "x$ac_lo" != "x$ac_hi"; do
22795   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22796   cat >conftest.$ac_ext <<_ACEOF
22797 /* confdefs.h.  */
22798 _ACEOF
22799 cat confdefs.h >>conftest.$ac_ext
22800 cat >>conftest.$ac_ext <<_ACEOF
22801 /* end confdefs.h.  */
22802 $ac_includes_default
22803 #ifndef offsetof
22804 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22805 #endif
22806 typedef struct { char x; double y; } ac__type_alignof_;
22807 int
22808 main ()
22809 {
22810 static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
22811 test_array [0] = 0
22812
22813   ;
22814   return 0;
22815 }
22816 _ACEOF
22817 rm -f conftest.$ac_objext
22818 if { (ac_try="$ac_compile"
22819 case "(($ac_try" in
22820   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22821   *) ac_try_echo=$ac_try;;
22822 esac
22823 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22824   (eval "$ac_compile") 2>conftest.er1
22825   ac_status=$?
22826   grep -v '^ *+' conftest.er1 >conftest.err
22827   rm -f conftest.er1
22828   cat conftest.err >&5
22829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22830   (exit $ac_status); } && {
22831          test -z "$ac_c_werror_flag" ||
22832          test ! -s conftest.err
22833        } && test -s conftest.$ac_objext; then
22834   ac_hi=$ac_mid
22835 else
22836   echo "$as_me: failed program was:" >&5
22837 sed 's/^/| /' conftest.$ac_ext >&5
22838
22839         ac_lo=`expr '(' $ac_mid ')' + 1`
22840 fi
22841
22842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22843 done
22844 case $ac_lo in
22845 ?*) ac_cv_alignof_double=$ac_lo;;
22846 '') if test "$ac_cv_type_double" = yes; then
22847      { { echo "$as_me:$LINENO: error: cannot compute alignment of double
22848 See \`config.log' for more details." >&5
22849 echo "$as_me: error: cannot compute alignment of double
22850 See \`config.log' for more details." >&2;}
22851    { (exit 77); exit 77; }; }
22852    else
22853      ac_cv_alignof_double=0
22854    fi ;;
22855 esac
22856 else
22857   cat >conftest.$ac_ext <<_ACEOF
22858 /* confdefs.h.  */
22859 _ACEOF
22860 cat confdefs.h >>conftest.$ac_ext
22861 cat >>conftest.$ac_ext <<_ACEOF
22862 /* end confdefs.h.  */
22863 $ac_includes_default
22864 #ifndef offsetof
22865 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
22866 #endif
22867 typedef struct { char x; double y; } ac__type_alignof_;
22868 static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
22869 static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
22870 #include <stdio.h>
22871 #include <stdlib.h>
22872 int
22873 main ()
22874 {
22875
22876   FILE *f = fopen ("conftest.val", "w");
22877   if (! f)
22878     return 1;
22879   if (((long int) offsetof (ac__type_alignof_, y)) < 0)
22880     {
22881       long int i = longval ();
22882       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22883         return 1;
22884       fprintf (f, "%ld\n", i);
22885     }
22886   else
22887     {
22888       unsigned long int i = ulongval ();
22889       if (i != ((long int) offsetof (ac__type_alignof_, y)))
22890         return 1;
22891       fprintf (f, "%lu\n", i);
22892     }
22893   return ferror (f) || fclose (f) != 0;
22894
22895   ;
22896   return 0;
22897 }
22898 _ACEOF
22899 rm -f conftest$ac_exeext
22900 if { (ac_try="$ac_link"
22901 case "(($ac_try" in
22902   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22903   *) ac_try_echo=$ac_try;;
22904 esac
22905 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22906   (eval "$ac_link") 2>&5
22907   ac_status=$?
22908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22909   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22910   { (case "(($ac_try" in
22911   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22912   *) ac_try_echo=$ac_try;;
22913 esac
22914 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22915   (eval "$ac_try") 2>&5
22916   ac_status=$?
22917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22918   (exit $ac_status); }; }; then
22919   ac_cv_alignof_double=`cat conftest.val`
22920 else
22921   echo "$as_me: program exited with status $ac_status" >&5
22922 echo "$as_me: failed program was:" >&5
22923 sed 's/^/| /' conftest.$ac_ext >&5
22924
22925 ( exit $ac_status )
22926 if test "$ac_cv_type_double" = yes; then
22927      { { echo "$as_me:$LINENO: error: cannot compute alignment of double
22928 See \`config.log' for more details." >&5
22929 echo "$as_me: error: cannot compute alignment of double
22930 See \`config.log' for more details." >&2;}
22931    { (exit 77); exit 77; }; }
22932    else
22933      ac_cv_alignof_double=0
22934    fi
22935 fi
22936 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22937 fi
22938 rm -f conftest.val
22939 fi
22940 { echo "$as_me:$LINENO: result: $ac_cv_alignof_double" >&5
22941 echo "${ECHO_T}$ac_cv_alignof_double" >&6; }
22942
22943
22944
22945 cat >>confdefs.h <<_ACEOF
22946 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
22947 _ACEOF
22948
22949
22950
22951 # Compute maximum alignment of any basic type.
22952 # We assume long's alignment is at least as strong as char, short, or int;
22953 # but we must check long long (if it exists) and double.
22954
22955 MAX_ALIGNOF=$ac_cv_alignof_long
22956 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
22957   MAX_ALIGNOF=$ac_cv_alignof_double
22958 fi
22959 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
22960   MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
22961 fi
22962
22963 cat >>confdefs.h <<_ACEOF
22964 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
22965 _ACEOF
22966
22967
22968
22969 # Some platforms predefine the types int8, int16, etc.  Only check
22970 # a (hopefully) representative subset.
22971 { echo "$as_me:$LINENO: checking for int8" >&5
22972 echo $ECHO_N "checking for int8... $ECHO_C" >&6; }
22973 if test "${ac_cv_type_int8+set}" = set; then
22974   echo $ECHO_N "(cached) $ECHO_C" >&6
22975 else
22976   cat >conftest.$ac_ext <<_ACEOF
22977 /* confdefs.h.  */
22978 _ACEOF
22979 cat confdefs.h >>conftest.$ac_ext
22980 cat >>conftest.$ac_ext <<_ACEOF
22981 /* end confdefs.h.  */
22982 #include <stdio.h>
22983 #ifdef HAVE_SUPPORTDEFS_H
22984 #include <SupportDefs.h>
22985 #endif
22986
22987 typedef int8 ac__type_new_;
22988 int
22989 main ()
22990 {
22991 if ((ac__type_new_ *) 0)
22992   return 0;
22993 if (sizeof (ac__type_new_))
22994   return 0;
22995   ;
22996   return 0;
22997 }
22998 _ACEOF
22999 rm -f conftest.$ac_objext
23000 if { (ac_try="$ac_compile"
23001 case "(($ac_try" in
23002   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23003   *) ac_try_echo=$ac_try;;
23004 esac
23005 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23006   (eval "$ac_compile") 2>conftest.er1
23007   ac_status=$?
23008   grep -v '^ *+' conftest.er1 >conftest.err
23009   rm -f conftest.er1
23010   cat conftest.err >&5
23011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23012   (exit $ac_status); } && {
23013          test -z "$ac_c_werror_flag" ||
23014          test ! -s conftest.err
23015        } && test -s conftest.$ac_objext; then
23016   ac_cv_type_int8=yes
23017 else
23018   echo "$as_me: failed program was:" >&5
23019 sed 's/^/| /' conftest.$ac_ext >&5
23020
23021         ac_cv_type_int8=no
23022 fi
23023
23024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23025 fi
23026 { echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
23027 echo "${ECHO_T}$ac_cv_type_int8" >&6; }
23028 if test $ac_cv_type_int8 = yes; then
23029
23030 cat >>confdefs.h <<_ACEOF
23031 #define HAVE_INT8 1
23032 _ACEOF
23033
23034
23035 fi
23036 { echo "$as_me:$LINENO: checking for uint8" >&5
23037 echo $ECHO_N "checking for uint8... $ECHO_C" >&6; }
23038 if test "${ac_cv_type_uint8+set}" = set; then
23039   echo $ECHO_N "(cached) $ECHO_C" >&6
23040 else
23041   cat >conftest.$ac_ext <<_ACEOF
23042 /* confdefs.h.  */
23043 _ACEOF
23044 cat confdefs.h >>conftest.$ac_ext
23045 cat >>conftest.$ac_ext <<_ACEOF
23046 /* end confdefs.h.  */
23047 #include <stdio.h>
23048 #ifdef HAVE_SUPPORTDEFS_H
23049 #include <SupportDefs.h>
23050 #endif
23051
23052 typedef uint8 ac__type_new_;
23053 int
23054 main ()
23055 {
23056 if ((ac__type_new_ *) 0)
23057   return 0;
23058 if (sizeof (ac__type_new_))
23059   return 0;
23060   ;
23061   return 0;
23062 }
23063 _ACEOF
23064 rm -f conftest.$ac_objext
23065 if { (ac_try="$ac_compile"
23066 case "(($ac_try" in
23067   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23068   *) ac_try_echo=$ac_try;;
23069 esac
23070 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23071   (eval "$ac_compile") 2>conftest.er1
23072   ac_status=$?
23073   grep -v '^ *+' conftest.er1 >conftest.err
23074   rm -f conftest.er1
23075   cat conftest.err >&5
23076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23077   (exit $ac_status); } && {
23078          test -z "$ac_c_werror_flag" ||
23079          test ! -s conftest.err
23080        } && test -s conftest.$ac_objext; then
23081   ac_cv_type_uint8=yes
23082 else
23083   echo "$as_me: failed program was:" >&5
23084 sed 's/^/| /' conftest.$ac_ext >&5
23085
23086         ac_cv_type_uint8=no
23087 fi
23088
23089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23090 fi
23091 { echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
23092 echo "${ECHO_T}$ac_cv_type_uint8" >&6; }
23093 if test $ac_cv_type_uint8 = yes; then
23094
23095 cat >>confdefs.h <<_ACEOF
23096 #define HAVE_UINT8 1
23097 _ACEOF
23098
23099
23100 fi
23101 { echo "$as_me:$LINENO: checking for int64" >&5
23102 echo $ECHO_N "checking for int64... $ECHO_C" >&6; }
23103 if test "${ac_cv_type_int64+set}" = set; then
23104   echo $ECHO_N "(cached) $ECHO_C" >&6
23105 else
23106   cat >conftest.$ac_ext <<_ACEOF
23107 /* confdefs.h.  */
23108 _ACEOF
23109 cat confdefs.h >>conftest.$ac_ext
23110 cat >>conftest.$ac_ext <<_ACEOF
23111 /* end confdefs.h.  */
23112 #include <stdio.h>
23113 #ifdef HAVE_SUPPORTDEFS_H
23114 #include <SupportDefs.h>
23115 #endif
23116
23117 typedef int64 ac__type_new_;
23118 int
23119 main ()
23120 {
23121 if ((ac__type_new_ *) 0)
23122   return 0;
23123 if (sizeof (ac__type_new_))
23124   return 0;
23125   ;
23126   return 0;
23127 }
23128 _ACEOF
23129 rm -f conftest.$ac_objext
23130 if { (ac_try="$ac_compile"
23131 case "(($ac_try" in
23132   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23133   *) ac_try_echo=$ac_try;;
23134 esac
23135 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23136   (eval "$ac_compile") 2>conftest.er1
23137   ac_status=$?
23138   grep -v '^ *+' conftest.er1 >conftest.err
23139   rm -f conftest.er1
23140   cat conftest.err >&5
23141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23142   (exit $ac_status); } && {
23143          test -z "$ac_c_werror_flag" ||
23144          test ! -s conftest.err
23145        } && test -s conftest.$ac_objext; then
23146   ac_cv_type_int64=yes
23147 else
23148   echo "$as_me: failed program was:" >&5
23149 sed 's/^/| /' conftest.$ac_ext >&5
23150
23151         ac_cv_type_int64=no
23152 fi
23153
23154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23155 fi
23156 { echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
23157 echo "${ECHO_T}$ac_cv_type_int64" >&6; }
23158 if test $ac_cv_type_int64 = yes; then
23159
23160 cat >>confdefs.h <<_ACEOF
23161 #define HAVE_INT64 1
23162 _ACEOF
23163
23164
23165 fi
23166 { echo "$as_me:$LINENO: checking for uint64" >&5
23167 echo $ECHO_N "checking for uint64... $ECHO_C" >&6; }
23168 if test "${ac_cv_type_uint64+set}" = set; then
23169   echo $ECHO_N "(cached) $ECHO_C" >&6
23170 else
23171   cat >conftest.$ac_ext <<_ACEOF
23172 /* confdefs.h.  */
23173 _ACEOF
23174 cat confdefs.h >>conftest.$ac_ext
23175 cat >>conftest.$ac_ext <<_ACEOF
23176 /* end confdefs.h.  */
23177 #include <stdio.h>
23178 #ifdef HAVE_SUPPORTDEFS_H
23179 #include <SupportDefs.h>
23180 #endif
23181
23182 typedef uint64 ac__type_new_;
23183 int
23184 main ()
23185 {
23186 if ((ac__type_new_ *) 0)
23187   return 0;
23188 if (sizeof (ac__type_new_))
23189   return 0;
23190   ;
23191   return 0;
23192 }
23193 _ACEOF
23194 rm -f conftest.$ac_objext
23195 if { (ac_try="$ac_compile"
23196 case "(($ac_try" in
23197   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23198   *) ac_try_echo=$ac_try;;
23199 esac
23200 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23201   (eval "$ac_compile") 2>conftest.er1
23202   ac_status=$?
23203   grep -v '^ *+' conftest.er1 >conftest.err
23204   rm -f conftest.er1
23205   cat conftest.err >&5
23206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23207   (exit $ac_status); } && {
23208          test -z "$ac_c_werror_flag" ||
23209          test ! -s conftest.err
23210        } && test -s conftest.$ac_objext; then
23211   ac_cv_type_uint64=yes
23212 else
23213   echo "$as_me: failed program was:" >&5
23214 sed 's/^/| /' conftest.$ac_ext >&5
23215
23216         ac_cv_type_uint64=no
23217 fi
23218
23219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23220 fi
23221 { echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
23222 echo "${ECHO_T}$ac_cv_type_uint64" >&6; }
23223 if test $ac_cv_type_uint64 = yes; then
23224
23225 cat >>confdefs.h <<_ACEOF
23226 #define HAVE_UINT64 1
23227 _ACEOF
23228
23229
23230 fi
23231
23232
23233 # We also check for sig_atomic_t, which *should* be defined per ANSI
23234 # C, but is missing on some old platforms.
23235 { echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
23236 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; }
23237 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
23238   echo $ECHO_N "(cached) $ECHO_C" >&6
23239 else
23240   cat >conftest.$ac_ext <<_ACEOF
23241 /* confdefs.h.  */
23242 _ACEOF
23243 cat confdefs.h >>conftest.$ac_ext
23244 cat >>conftest.$ac_ext <<_ACEOF
23245 /* end confdefs.h.  */
23246 #include <signal.h>
23247
23248 typedef sig_atomic_t ac__type_new_;
23249 int
23250 main ()
23251 {
23252 if ((ac__type_new_ *) 0)
23253   return 0;
23254 if (sizeof (ac__type_new_))
23255   return 0;
23256   ;
23257   return 0;
23258 }
23259 _ACEOF
23260 rm -f conftest.$ac_objext
23261 if { (ac_try="$ac_compile"
23262 case "(($ac_try" in
23263   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23264   *) ac_try_echo=$ac_try;;
23265 esac
23266 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23267   (eval "$ac_compile") 2>conftest.er1
23268   ac_status=$?
23269   grep -v '^ *+' conftest.er1 >conftest.err
23270   rm -f conftest.er1
23271   cat conftest.err >&5
23272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23273   (exit $ac_status); } && {
23274          test -z "$ac_c_werror_flag" ||
23275          test ! -s conftest.err
23276        } && test -s conftest.$ac_objext; then
23277   ac_cv_type_sig_atomic_t=yes
23278 else
23279   echo "$as_me: failed program was:" >&5
23280 sed 's/^/| /' conftest.$ac_ext >&5
23281
23282         ac_cv_type_sig_atomic_t=no
23283 fi
23284
23285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23286 fi
23287 { echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
23288 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; }
23289 if test $ac_cv_type_sig_atomic_t = yes; then
23290
23291 cat >>confdefs.h <<_ACEOF
23292 #define HAVE_SIG_ATOMIC_T 1
23293 _ACEOF
23294
23295
23296 fi
23297
23298
23299
23300 # If the user did not disable integer datetimes, check that
23301 # there is a working 64-bit integral type to use.
23302 if test x"$USE_INTEGER_DATETIMES" = x"yes" &&
23303    test x"$HAVE_LONG_INT_64" = x"no" &&
23304    test x"$HAVE_LONG_LONG_INT_64" = x"no" &&
23305    test x"$HAVE_INT64" = x"no" ; then
23306   { { echo "$as_me:$LINENO: error:
23307 Integer-based datetime support requires a 64-bit integer type,
23308 but no such type could be found. The --disable-integer-datetimes
23309 configure option can be used to disable integer-based storage
23310 of datetime values." >&5
23311 echo "$as_me: error:
23312 Integer-based datetime support requires a 64-bit integer type,
23313 but no such type could be found. The --disable-integer-datetimes
23314 configure option can be used to disable integer-based storage
23315 of datetime values." >&2;}
23316    { (exit 1); exit 1; }; }
23317 fi
23318
23319
23320 if test "$PORTNAME" != "win32"
23321 then
23322 { echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
23323 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6; }
23324 if test "${pgac_cv_func_posix_signals+set}" = set; then
23325   echo $ECHO_N "(cached) $ECHO_C" >&6
23326 else
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 <signal.h>
23334
23335 int
23336 main ()
23337 {
23338 struct sigaction act, oact;
23339 sigemptyset(&act.sa_mask);
23340 act.sa_flags = SA_RESTART;
23341 sigaction(0, &act, &oact);
23342   ;
23343   return 0;
23344 }
23345 _ACEOF
23346 rm -f conftest.$ac_objext conftest$ac_exeext
23347 if { (ac_try="$ac_link"
23348 case "(($ac_try" in
23349   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23350   *) ac_try_echo=$ac_try;;
23351 esac
23352 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23353   (eval "$ac_link") 2>conftest.er1
23354   ac_status=$?
23355   grep -v '^ *+' conftest.er1 >conftest.err
23356   rm -f conftest.er1
23357   cat conftest.err >&5
23358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23359   (exit $ac_status); } && {
23360          test -z "$ac_c_werror_flag" ||
23361          test ! -s conftest.err
23362        } && test -s conftest$ac_exeext &&
23363        $as_test_x conftest$ac_exeext; then
23364   pgac_cv_func_posix_signals=yes
23365 else
23366   echo "$as_me: failed program was:" >&5
23367 sed 's/^/| /' conftest.$ac_ext >&5
23368
23369         pgac_cv_func_posix_signals=no
23370 fi
23371
23372 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23373       conftest$ac_exeext conftest.$ac_ext
23374 fi
23375 { echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
23376 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6; }
23377 if test x"$pgac_cv_func_posix_signals" = xyes ; then
23378
23379 cat >>confdefs.h <<\_ACEOF
23380 #define HAVE_POSIX_SIGNALS
23381 _ACEOF
23382
23383 fi
23384 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
23385
23386 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
23387   { { echo "$as_me:$LINENO: error:
23388 Thread-safety requires POSIX signals, which are not supported by this
23389 operating system." >&5
23390 echo "$as_me: error:
23391 Thread-safety requires POSIX signals, which are not supported by this
23392 operating system." >&2;}
23393    { (exit 1); exit 1; }; }
23394 fi
23395 fi
23396
23397 if test $ac_cv_func_fseeko = yes; then
23398 # Check whether --enable-largefile was given.
23399 if test "${enable_largefile+set}" = set; then
23400   enableval=$enable_largefile;
23401 fi
23402
23403 if test "$enable_largefile" != no; then
23404
23405   { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
23406 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
23407 if test "${ac_cv_sys_largefile_CC+set}" = set; then
23408   echo $ECHO_N "(cached) $ECHO_C" >&6
23409 else
23410   ac_cv_sys_largefile_CC=no
23411      if test "$GCC" != yes; then
23412        ac_save_CC=$CC
23413        while :; do
23414          # IRIX 6.2 and later do not support large files by default,
23415          # so use the C compiler's -n32 option if that helps.
23416          cat >conftest.$ac_ext <<_ACEOF
23417 /* confdefs.h.  */
23418 _ACEOF
23419 cat confdefs.h >>conftest.$ac_ext
23420 cat >>conftest.$ac_ext <<_ACEOF
23421 /* end confdefs.h.  */
23422 #include <sys/types.h>
23423  /* Check that off_t can represent 2**63 - 1 correctly.
23424     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23425     since some C++ compilers masquerading as C compilers
23426     incorrectly reject 9223372036854775807.  */
23427 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23428   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23429                        && LARGE_OFF_T % 2147483647 == 1)
23430                       ? 1 : -1];
23431 int
23432 main ()
23433 {
23434
23435   ;
23436   return 0;
23437 }
23438 _ACEOF
23439          rm -f conftest.$ac_objext
23440 if { (ac_try="$ac_compile"
23441 case "(($ac_try" in
23442   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23443   *) ac_try_echo=$ac_try;;
23444 esac
23445 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23446   (eval "$ac_compile") 2>conftest.er1
23447   ac_status=$?
23448   grep -v '^ *+' conftest.er1 >conftest.err
23449   rm -f conftest.er1
23450   cat conftest.err >&5
23451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23452   (exit $ac_status); } && {
23453          test -z "$ac_c_werror_flag" ||
23454          test ! -s conftest.err
23455        } && test -s conftest.$ac_objext; then
23456   break
23457 else
23458   echo "$as_me: failed program was:" >&5
23459 sed 's/^/| /' conftest.$ac_ext >&5
23460
23461
23462 fi
23463
23464 rm -f core conftest.err conftest.$ac_objext
23465          CC="$CC -n32"
23466          rm -f conftest.$ac_objext
23467 if { (ac_try="$ac_compile"
23468 case "(($ac_try" in
23469   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23470   *) ac_try_echo=$ac_try;;
23471 esac
23472 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23473   (eval "$ac_compile") 2>conftest.er1
23474   ac_status=$?
23475   grep -v '^ *+' conftest.er1 >conftest.err
23476   rm -f conftest.er1
23477   cat conftest.err >&5
23478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23479   (exit $ac_status); } && {
23480          test -z "$ac_c_werror_flag" ||
23481          test ! -s conftest.err
23482        } && test -s conftest.$ac_objext; then
23483   ac_cv_sys_largefile_CC=' -n32'; break
23484 else
23485   echo "$as_me: failed program was:" >&5
23486 sed 's/^/| /' conftest.$ac_ext >&5
23487
23488
23489 fi
23490
23491 rm -f core conftest.err conftest.$ac_objext
23492          break
23493        done
23494        CC=$ac_save_CC
23495        rm -f conftest.$ac_ext
23496     fi
23497 fi
23498 { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
23499 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
23500   if test "$ac_cv_sys_largefile_CC" != no; then
23501     CC=$CC$ac_cv_sys_largefile_CC
23502   fi
23503
23504   { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
23505 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
23506 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
23507   echo $ECHO_N "(cached) $ECHO_C" >&6
23508 else
23509   while :; do
23510   cat >conftest.$ac_ext <<_ACEOF
23511 /* confdefs.h.  */
23512 _ACEOF
23513 cat confdefs.h >>conftest.$ac_ext
23514 cat >>conftest.$ac_ext <<_ACEOF
23515 /* end confdefs.h.  */
23516 #include <sys/types.h>
23517  /* Check that off_t can represent 2**63 - 1 correctly.
23518     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23519     since some C++ compilers masquerading as C compilers
23520     incorrectly reject 9223372036854775807.  */
23521 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23522   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23523                        && LARGE_OFF_T % 2147483647 == 1)
23524                       ? 1 : -1];
23525 int
23526 main ()
23527 {
23528
23529   ;
23530   return 0;
23531 }
23532 _ACEOF
23533 rm -f conftest.$ac_objext
23534 if { (ac_try="$ac_compile"
23535 case "(($ac_try" in
23536   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23537   *) ac_try_echo=$ac_try;;
23538 esac
23539 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23540   (eval "$ac_compile") 2>conftest.er1
23541   ac_status=$?
23542   grep -v '^ *+' conftest.er1 >conftest.err
23543   rm -f conftest.er1
23544   cat conftest.err >&5
23545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23546   (exit $ac_status); } && {
23547          test -z "$ac_c_werror_flag" ||
23548          test ! -s conftest.err
23549        } && test -s conftest.$ac_objext; then
23550   ac_cv_sys_file_offset_bits=no; break
23551 else
23552   echo "$as_me: failed program was:" >&5
23553 sed 's/^/| /' conftest.$ac_ext >&5
23554
23555
23556 fi
23557
23558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23559   cat >conftest.$ac_ext <<_ACEOF
23560 /* confdefs.h.  */
23561 _ACEOF
23562 cat confdefs.h >>conftest.$ac_ext
23563 cat >>conftest.$ac_ext <<_ACEOF
23564 /* end confdefs.h.  */
23565 #define _FILE_OFFSET_BITS 64
23566 #include <sys/types.h>
23567  /* Check that off_t can represent 2**63 - 1 correctly.
23568     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23569     since some C++ compilers masquerading as C compilers
23570     incorrectly reject 9223372036854775807.  */
23571 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23572   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23573                        && LARGE_OFF_T % 2147483647 == 1)
23574                       ? 1 : -1];
23575 int
23576 main ()
23577 {
23578
23579   ;
23580   return 0;
23581 }
23582 _ACEOF
23583 rm -f conftest.$ac_objext
23584 if { (ac_try="$ac_compile"
23585 case "(($ac_try" in
23586   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23587   *) ac_try_echo=$ac_try;;
23588 esac
23589 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23590   (eval "$ac_compile") 2>conftest.er1
23591   ac_status=$?
23592   grep -v '^ *+' conftest.er1 >conftest.err
23593   rm -f conftest.er1
23594   cat conftest.err >&5
23595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23596   (exit $ac_status); } && {
23597          test -z "$ac_c_werror_flag" ||
23598          test ! -s conftest.err
23599        } && test -s conftest.$ac_objext; then
23600   ac_cv_sys_file_offset_bits=64; break
23601 else
23602   echo "$as_me: failed program was:" >&5
23603 sed 's/^/| /' conftest.$ac_ext >&5
23604
23605
23606 fi
23607
23608 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23609   ac_cv_sys_file_offset_bits=unknown
23610   break
23611 done
23612 fi
23613 { echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
23614 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
23615 case $ac_cv_sys_file_offset_bits in #(
23616   no | unknown) ;;
23617   *)
23618 cat >>confdefs.h <<_ACEOF
23619 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
23620 _ACEOF
23621 ;;
23622 esac
23623 rm -f conftest*
23624   if test $ac_cv_sys_file_offset_bits = unknown; then
23625     { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
23626 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
23627 if test "${ac_cv_sys_large_files+set}" = set; then
23628   echo $ECHO_N "(cached) $ECHO_C" >&6
23629 else
23630   while :; do
23631   cat >conftest.$ac_ext <<_ACEOF
23632 /* confdefs.h.  */
23633 _ACEOF
23634 cat confdefs.h >>conftest.$ac_ext
23635 cat >>conftest.$ac_ext <<_ACEOF
23636 /* end confdefs.h.  */
23637 #include <sys/types.h>
23638  /* Check that off_t can represent 2**63 - 1 correctly.
23639     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23640     since some C++ compilers masquerading as C compilers
23641     incorrectly reject 9223372036854775807.  */
23642 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23643   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23644                        && LARGE_OFF_T % 2147483647 == 1)
23645                       ? 1 : -1];
23646 int
23647 main ()
23648 {
23649
23650   ;
23651   return 0;
23652 }
23653 _ACEOF
23654 rm -f conftest.$ac_objext
23655 if { (ac_try="$ac_compile"
23656 case "(($ac_try" in
23657   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23658   *) ac_try_echo=$ac_try;;
23659 esac
23660 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23661   (eval "$ac_compile") 2>conftest.er1
23662   ac_status=$?
23663   grep -v '^ *+' conftest.er1 >conftest.err
23664   rm -f conftest.er1
23665   cat conftest.err >&5
23666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23667   (exit $ac_status); } && {
23668          test -z "$ac_c_werror_flag" ||
23669          test ! -s conftest.err
23670        } && test -s conftest.$ac_objext; then
23671   ac_cv_sys_large_files=no; break
23672 else
23673   echo "$as_me: failed program was:" >&5
23674 sed 's/^/| /' conftest.$ac_ext >&5
23675
23676
23677 fi
23678
23679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23680   cat >conftest.$ac_ext <<_ACEOF
23681 /* confdefs.h.  */
23682 _ACEOF
23683 cat confdefs.h >>conftest.$ac_ext
23684 cat >>conftest.$ac_ext <<_ACEOF
23685 /* end confdefs.h.  */
23686 #define _LARGE_FILES 1
23687 #include <sys/types.h>
23688  /* Check that off_t can represent 2**63 - 1 correctly.
23689     We can't simply define LARGE_OFF_T to be 9223372036854775807,
23690     since some C++ compilers masquerading as C compilers
23691     incorrectly reject 9223372036854775807.  */
23692 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
23693   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
23694                        && LARGE_OFF_T % 2147483647 == 1)
23695                       ? 1 : -1];
23696 int
23697 main ()
23698 {
23699
23700   ;
23701   return 0;
23702 }
23703 _ACEOF
23704 rm -f conftest.$ac_objext
23705 if { (ac_try="$ac_compile"
23706 case "(($ac_try" in
23707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23708   *) ac_try_echo=$ac_try;;
23709 esac
23710 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23711   (eval "$ac_compile") 2>conftest.er1
23712   ac_status=$?
23713   grep -v '^ *+' conftest.er1 >conftest.err
23714   rm -f conftest.er1
23715   cat conftest.err >&5
23716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23717   (exit $ac_status); } && {
23718          test -z "$ac_c_werror_flag" ||
23719          test ! -s conftest.err
23720        } && test -s conftest.$ac_objext; then
23721   ac_cv_sys_large_files=1; break
23722 else
23723   echo "$as_me: failed program was:" >&5
23724 sed 's/^/| /' conftest.$ac_ext >&5
23725
23726
23727 fi
23728
23729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23730   ac_cv_sys_large_files=unknown
23731   break
23732 done
23733 fi
23734 { echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
23735 echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
23736 case $ac_cv_sys_large_files in #(
23737   no | unknown) ;;
23738   *)
23739 cat >>confdefs.h <<_ACEOF
23740 #define _LARGE_FILES $ac_cv_sys_large_files
23741 _ACEOF
23742 ;;
23743 esac
23744 rm -f conftest*
23745   fi
23746 fi
23747
23748 fi
23749
23750 # Check for largefile support (must be after AC_SYS_LARGEFILE)
23751 { echo "$as_me:$LINENO: checking for off_t" >&5
23752 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
23753 if test "${ac_cv_type_off_t+set}" = set; then
23754   echo $ECHO_N "(cached) $ECHO_C" >&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 $ac_includes_default
23763 typedef off_t ac__type_new_;
23764 int
23765 main ()
23766 {
23767 if ((ac__type_new_ *) 0)
23768   return 0;
23769 if (sizeof (ac__type_new_))
23770   return 0;
23771   ;
23772   return 0;
23773 }
23774 _ACEOF
23775 rm -f conftest.$ac_objext
23776 if { (ac_try="$ac_compile"
23777 case "(($ac_try" in
23778   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23779   *) ac_try_echo=$ac_try;;
23780 esac
23781 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23782   (eval "$ac_compile") 2>conftest.er1
23783   ac_status=$?
23784   grep -v '^ *+' conftest.er1 >conftest.err
23785   rm -f conftest.er1
23786   cat conftest.err >&5
23787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23788   (exit $ac_status); } && {
23789          test -z "$ac_c_werror_flag" ||
23790          test ! -s conftest.err
23791        } && test -s conftest.$ac_objext; then
23792   ac_cv_type_off_t=yes
23793 else
23794   echo "$as_me: failed program was:" >&5
23795 sed 's/^/| /' conftest.$ac_ext >&5
23796
23797         ac_cv_type_off_t=no
23798 fi
23799
23800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23801 fi
23802 { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
23803 echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
23804
23805 # The cast to long int works around a bug in the HP C Compiler
23806 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23807 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23808 # This bug is HP SR number 8606223364.
23809 { echo "$as_me:$LINENO: checking size of off_t" >&5
23810 echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
23811 if test "${ac_cv_sizeof_off_t+set}" = set; then
23812   echo $ECHO_N "(cached) $ECHO_C" >&6
23813 else
23814   if test "$cross_compiling" = yes; then
23815   # Depending upon the size, compute the lo and hi bounds.
23816 cat >conftest.$ac_ext <<_ACEOF
23817 /* confdefs.h.  */
23818 _ACEOF
23819 cat confdefs.h >>conftest.$ac_ext
23820 cat >>conftest.$ac_ext <<_ACEOF
23821 /* end confdefs.h.  */
23822 $ac_includes_default
23823    typedef off_t ac__type_sizeof_;
23824 int
23825 main ()
23826 {
23827 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
23828 test_array [0] = 0
23829
23830   ;
23831   return 0;
23832 }
23833 _ACEOF
23834 rm -f conftest.$ac_objext
23835 if { (ac_try="$ac_compile"
23836 case "(($ac_try" in
23837   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23838   *) ac_try_echo=$ac_try;;
23839 esac
23840 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23841   (eval "$ac_compile") 2>conftest.er1
23842   ac_status=$?
23843   grep -v '^ *+' conftest.er1 >conftest.err
23844   rm -f conftest.er1
23845   cat conftest.err >&5
23846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23847   (exit $ac_status); } && {
23848          test -z "$ac_c_werror_flag" ||
23849          test ! -s conftest.err
23850        } && test -s conftest.$ac_objext; then
23851   ac_lo=0 ac_mid=0
23852   while :; do
23853     cat >conftest.$ac_ext <<_ACEOF
23854 /* confdefs.h.  */
23855 _ACEOF
23856 cat confdefs.h >>conftest.$ac_ext
23857 cat >>conftest.$ac_ext <<_ACEOF
23858 /* end confdefs.h.  */
23859 $ac_includes_default
23860    typedef off_t ac__type_sizeof_;
23861 int
23862 main ()
23863 {
23864 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
23865 test_array [0] = 0
23866
23867   ;
23868   return 0;
23869 }
23870 _ACEOF
23871 rm -f conftest.$ac_objext
23872 if { (ac_try="$ac_compile"
23873 case "(($ac_try" in
23874   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23875   *) ac_try_echo=$ac_try;;
23876 esac
23877 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23878   (eval "$ac_compile") 2>conftest.er1
23879   ac_status=$?
23880   grep -v '^ *+' conftest.er1 >conftest.err
23881   rm -f conftest.er1
23882   cat conftest.err >&5
23883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23884   (exit $ac_status); } && {
23885          test -z "$ac_c_werror_flag" ||
23886          test ! -s conftest.err
23887        } && test -s conftest.$ac_objext; then
23888   ac_hi=$ac_mid; break
23889 else
23890   echo "$as_me: failed program was:" >&5
23891 sed 's/^/| /' conftest.$ac_ext >&5
23892
23893         ac_lo=`expr $ac_mid + 1`
23894                         if test $ac_lo -le $ac_mid; then
23895                           ac_lo= ac_hi=
23896                           break
23897                         fi
23898                         ac_mid=`expr 2 '*' $ac_mid + 1`
23899 fi
23900
23901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23902   done
23903 else
23904   echo "$as_me: failed program was:" >&5
23905 sed 's/^/| /' conftest.$ac_ext >&5
23906
23907         cat >conftest.$ac_ext <<_ACEOF
23908 /* confdefs.h.  */
23909 _ACEOF
23910 cat confdefs.h >>conftest.$ac_ext
23911 cat >>conftest.$ac_ext <<_ACEOF
23912 /* end confdefs.h.  */
23913 $ac_includes_default
23914    typedef off_t ac__type_sizeof_;
23915 int
23916 main ()
23917 {
23918 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
23919 test_array [0] = 0
23920
23921   ;
23922   return 0;
23923 }
23924 _ACEOF
23925 rm -f conftest.$ac_objext
23926 if { (ac_try="$ac_compile"
23927 case "(($ac_try" in
23928   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23929   *) ac_try_echo=$ac_try;;
23930 esac
23931 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23932   (eval "$ac_compile") 2>conftest.er1
23933   ac_status=$?
23934   grep -v '^ *+' conftest.er1 >conftest.err
23935   rm -f conftest.er1
23936   cat conftest.err >&5
23937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23938   (exit $ac_status); } && {
23939          test -z "$ac_c_werror_flag" ||
23940          test ! -s conftest.err
23941        } && test -s conftest.$ac_objext; then
23942   ac_hi=-1 ac_mid=-1
23943   while :; do
23944     cat >conftest.$ac_ext <<_ACEOF
23945 /* confdefs.h.  */
23946 _ACEOF
23947 cat confdefs.h >>conftest.$ac_ext
23948 cat >>conftest.$ac_ext <<_ACEOF
23949 /* end confdefs.h.  */
23950 $ac_includes_default
23951    typedef off_t ac__type_sizeof_;
23952 int
23953 main ()
23954 {
23955 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
23956 test_array [0] = 0
23957
23958   ;
23959   return 0;
23960 }
23961 _ACEOF
23962 rm -f conftest.$ac_objext
23963 if { (ac_try="$ac_compile"
23964 case "(($ac_try" in
23965   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23966   *) ac_try_echo=$ac_try;;
23967 esac
23968 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23969   (eval "$ac_compile") 2>conftest.er1
23970   ac_status=$?
23971   grep -v '^ *+' conftest.er1 >conftest.err
23972   rm -f conftest.er1
23973   cat conftest.err >&5
23974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23975   (exit $ac_status); } && {
23976          test -z "$ac_c_werror_flag" ||
23977          test ! -s conftest.err
23978        } && test -s conftest.$ac_objext; then
23979   ac_lo=$ac_mid; break
23980 else
23981   echo "$as_me: failed program was:" >&5
23982 sed 's/^/| /' conftest.$ac_ext >&5
23983
23984         ac_hi=`expr '(' $ac_mid ')' - 1`
23985                         if test $ac_mid -le $ac_hi; then
23986                           ac_lo= ac_hi=
23987                           break
23988                         fi
23989                         ac_mid=`expr 2 '*' $ac_mid`
23990 fi
23991
23992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23993   done
23994 else
23995   echo "$as_me: failed program was:" >&5
23996 sed 's/^/| /' conftest.$ac_ext >&5
23997
23998         ac_lo= ac_hi=
23999 fi
24000
24001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24002 fi
24003
24004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24005 # Binary search between lo and hi bounds.
24006 while test "x$ac_lo" != "x$ac_hi"; do
24007   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24008   cat >conftest.$ac_ext <<_ACEOF
24009 /* confdefs.h.  */
24010 _ACEOF
24011 cat confdefs.h >>conftest.$ac_ext
24012 cat >>conftest.$ac_ext <<_ACEOF
24013 /* end confdefs.h.  */
24014 $ac_includes_default
24015    typedef off_t ac__type_sizeof_;
24016 int
24017 main ()
24018 {
24019 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
24020 test_array [0] = 0
24021
24022   ;
24023   return 0;
24024 }
24025 _ACEOF
24026 rm -f conftest.$ac_objext
24027 if { (ac_try="$ac_compile"
24028 case "(($ac_try" in
24029   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24030   *) ac_try_echo=$ac_try;;
24031 esac
24032 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24033   (eval "$ac_compile") 2>conftest.er1
24034   ac_status=$?
24035   grep -v '^ *+' conftest.er1 >conftest.err
24036   rm -f conftest.er1
24037   cat conftest.err >&5
24038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24039   (exit $ac_status); } && {
24040          test -z "$ac_c_werror_flag" ||
24041          test ! -s conftest.err
24042        } && test -s conftest.$ac_objext; then
24043   ac_hi=$ac_mid
24044 else
24045   echo "$as_me: failed program was:" >&5
24046 sed 's/^/| /' conftest.$ac_ext >&5
24047
24048         ac_lo=`expr '(' $ac_mid ')' + 1`
24049 fi
24050
24051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24052 done
24053 case $ac_lo in
24054 ?*) ac_cv_sizeof_off_t=$ac_lo;;
24055 '') if test "$ac_cv_type_off_t" = yes; then
24056      { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
24057 See \`config.log' for more details." >&5
24058 echo "$as_me: error: cannot compute sizeof (off_t)
24059 See \`config.log' for more details." >&2;}
24060    { (exit 77); exit 77; }; }
24061    else
24062      ac_cv_sizeof_off_t=0
24063    fi ;;
24064 esac
24065 else
24066   cat >conftest.$ac_ext <<_ACEOF
24067 /* confdefs.h.  */
24068 _ACEOF
24069 cat confdefs.h >>conftest.$ac_ext
24070 cat >>conftest.$ac_ext <<_ACEOF
24071 /* end confdefs.h.  */
24072 $ac_includes_default
24073    typedef off_t ac__type_sizeof_;
24074 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24075 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
24076 #include <stdio.h>
24077 #include <stdlib.h>
24078 int
24079 main ()
24080 {
24081
24082   FILE *f = fopen ("conftest.val", "w");
24083   if (! f)
24084     return 1;
24085   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
24086     {
24087       long int i = longval ();
24088       if (i != ((long int) (sizeof (ac__type_sizeof_))))
24089         return 1;
24090       fprintf (f, "%ld\n", i);
24091     }
24092   else
24093     {
24094       unsigned long int i = ulongval ();
24095       if (i != ((long int) (sizeof (ac__type_sizeof_))))
24096         return 1;
24097       fprintf (f, "%lu\n", i);
24098     }
24099   return ferror (f) || fclose (f) != 0;
24100
24101   ;
24102   return 0;
24103 }
24104 _ACEOF
24105 rm -f conftest$ac_exeext
24106 if { (ac_try="$ac_link"
24107 case "(($ac_try" in
24108   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24109   *) ac_try_echo=$ac_try;;
24110 esac
24111 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24112   (eval "$ac_link") 2>&5
24113   ac_status=$?
24114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24115   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24116   { (case "(($ac_try" in
24117   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24118   *) ac_try_echo=$ac_try;;
24119 esac
24120 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24121   (eval "$ac_try") 2>&5
24122   ac_status=$?
24123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24124   (exit $ac_status); }; }; then
24125   ac_cv_sizeof_off_t=`cat conftest.val`
24126 else
24127   echo "$as_me: program exited with status $ac_status" >&5
24128 echo "$as_me: failed program was:" >&5
24129 sed 's/^/| /' conftest.$ac_ext >&5
24130
24131 ( exit $ac_status )
24132 if test "$ac_cv_type_off_t" = yes; then
24133      { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
24134 See \`config.log' for more details." >&5
24135 echo "$as_me: error: cannot compute sizeof (off_t)
24136 See \`config.log' for more details." >&2;}
24137    { (exit 77); exit 77; }; }
24138    else
24139      ac_cv_sizeof_off_t=0
24140    fi
24141 fi
24142 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24143 fi
24144 rm -f conftest.val
24145 fi
24146 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
24147 echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
24148
24149
24150
24151 cat >>confdefs.h <<_ACEOF
24152 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
24153 _ACEOF
24154
24155
24156
24157 if test "$ac_cv_sizeof_off_t" -lt 8 -o "$enable_segmented_files" = "yes"; then
24158
24159 cat >>confdefs.h <<\_ACEOF
24160 #define USE_SEGMENTED_FILES 1
24161 _ACEOF
24162
24163 fi
24164
24165 # SunOS doesn't handle negative byte comparisons properly with +/- return
24166 { echo "$as_me:$LINENO: checking for working memcmp" >&5
24167 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; }
24168 if test "${ac_cv_func_memcmp_working+set}" = set; then
24169   echo $ECHO_N "(cached) $ECHO_C" >&6
24170 else
24171   if test "$cross_compiling" = yes; then
24172   ac_cv_func_memcmp_working=no
24173 else
24174   cat >conftest.$ac_ext <<_ACEOF
24175 /* confdefs.h.  */
24176 _ACEOF
24177 cat confdefs.h >>conftest.$ac_ext
24178 cat >>conftest.$ac_ext <<_ACEOF
24179 /* end confdefs.h.  */
24180 $ac_includes_default
24181 int
24182 main ()
24183 {
24184
24185   /* Some versions of memcmp are not 8-bit clean.  */
24186   char c0 = '\100', c1 = '\200', c2 = '\201';
24187   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
24188     return 1;
24189
24190   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
24191      or more and with at least one buffer not starting on a 4-byte boundary.
24192      William Lewis provided this test program.   */
24193   {
24194     char foo[21];
24195     char bar[21];
24196     int i;
24197     for (i = 0; i < 4; i++)
24198       {
24199         char *a = foo + i;
24200         char *b = bar + i;
24201         strcpy (a, "--------01111111");
24202         strcpy (b, "--------10000000");
24203         if (memcmp (a, b, 16) >= 0)
24204           return 1;
24205       }
24206     return 0;
24207   }
24208
24209   ;
24210   return 0;
24211 }
24212 _ACEOF
24213 rm -f conftest$ac_exeext
24214 if { (ac_try="$ac_link"
24215 case "(($ac_try" in
24216   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24217   *) ac_try_echo=$ac_try;;
24218 esac
24219 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24220   (eval "$ac_link") 2>&5
24221   ac_status=$?
24222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24223   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24224   { (case "(($ac_try" in
24225   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24226   *) ac_try_echo=$ac_try;;
24227 esac
24228 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24229   (eval "$ac_try") 2>&5
24230   ac_status=$?
24231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24232   (exit $ac_status); }; }; then
24233   ac_cv_func_memcmp_working=yes
24234 else
24235   echo "$as_me: program exited with status $ac_status" >&5
24236 echo "$as_me: failed program was:" >&5
24237 sed 's/^/| /' conftest.$ac_ext >&5
24238
24239 ( exit $ac_status )
24240 ac_cv_func_memcmp_working=no
24241 fi
24242 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24243 fi
24244
24245
24246 fi
24247 { echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
24248 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; }
24249 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
24250   *" memcmp.$ac_objext "* ) ;;
24251   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
24252  ;;
24253 esac
24254
24255
24256
24257
24258 # Select semaphore implementation type.
24259 if test "$PORTNAME" != "win32"; then
24260   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
24261
24262 cat >>confdefs.h <<\_ACEOF
24263 #define USE_NAMED_POSIX_SEMAPHORES 1
24264 _ACEOF
24265
24266     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
24267   else
24268     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
24269
24270 cat >>confdefs.h <<\_ACEOF
24271 #define USE_UNNAMED_POSIX_SEMAPHORES 1
24272 _ACEOF
24273
24274       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
24275     else
24276
24277 cat >>confdefs.h <<\_ACEOF
24278 #define USE_SYSV_SEMAPHORES 1
24279 _ACEOF
24280
24281       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
24282     fi
24283   fi
24284 else
24285
24286 cat >>confdefs.h <<\_ACEOF
24287 #define USE_WIN32_SEMAPHORES 1
24288 _ACEOF
24289
24290   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
24291 fi
24292
24293
24294 # Select shared-memory implementation type.
24295 if test "$PORTNAME" != "win32"; then
24296
24297 cat >>confdefs.h <<\_ACEOF
24298 #define USE_SYSV_SHARED_MEMORY 1
24299 _ACEOF
24300
24301   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
24302 else
24303
24304 cat >>confdefs.h <<\_ACEOF
24305 #define USE_WIN32_SHARED_MEMORY 1
24306 _ACEOF
24307
24308   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
24309 fi
24310
24311 # If not set in template file, set bytes to use libc memset()
24312 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
24313   MEMSET_LOOP_LIMIT=1024
24314 fi
24315
24316 cat >>confdefs.h <<_ACEOF
24317 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
24318 _ACEOF
24319
24320
24321
24322 if test "$enable_nls" = yes ; then
24323
24324   { echo "$as_me:$LINENO: checking for library containing gettext" >&5
24325 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6; }
24326 if test "${ac_cv_search_gettext+set}" = set; then
24327   echo $ECHO_N "(cached) $ECHO_C" >&6
24328 else
24329   ac_func_search_save_LIBS=$LIBS
24330 cat >conftest.$ac_ext <<_ACEOF
24331 /* confdefs.h.  */
24332 _ACEOF
24333 cat confdefs.h >>conftest.$ac_ext
24334 cat >>conftest.$ac_ext <<_ACEOF
24335 /* end confdefs.h.  */
24336
24337 /* Override any GCC internal prototype to avoid an error.
24338    Use char because int might match the return type of a GCC
24339    builtin and then its argument prototype would still apply.  */
24340 #ifdef __cplusplus
24341 extern "C"
24342 #endif
24343 char gettext ();
24344 int
24345 main ()
24346 {
24347 return gettext ();
24348   ;
24349   return 0;
24350 }
24351 _ACEOF
24352 for ac_lib in '' intl; do
24353   if test -z "$ac_lib"; then
24354     ac_res="none required"
24355   else
24356     ac_res=-l$ac_lib
24357     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24358   fi
24359   rm -f conftest.$ac_objext conftest$ac_exeext
24360 if { (ac_try="$ac_link"
24361 case "(($ac_try" in
24362   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24363   *) ac_try_echo=$ac_try;;
24364 esac
24365 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24366   (eval "$ac_link") 2>conftest.er1
24367   ac_status=$?
24368   grep -v '^ *+' conftest.er1 >conftest.err
24369   rm -f conftest.er1
24370   cat conftest.err >&5
24371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24372   (exit $ac_status); } && {
24373          test -z "$ac_c_werror_flag" ||
24374          test ! -s conftest.err
24375        } && test -s conftest$ac_exeext &&
24376        $as_test_x conftest$ac_exeext; then
24377   ac_cv_search_gettext=$ac_res
24378 else
24379   echo "$as_me: failed program was:" >&5
24380 sed 's/^/| /' conftest.$ac_ext >&5
24381
24382
24383 fi
24384
24385 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24386       conftest$ac_exeext
24387   if test "${ac_cv_search_gettext+set}" = set; then
24388   break
24389 fi
24390 done
24391 if test "${ac_cv_search_gettext+set}" = set; then
24392   :
24393 else
24394   ac_cv_search_gettext=no
24395 fi
24396 rm conftest.$ac_ext
24397 LIBS=$ac_func_search_save_LIBS
24398 fi
24399 { echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
24400 echo "${ECHO_T}$ac_cv_search_gettext" >&6; }
24401 ac_res=$ac_cv_search_gettext
24402 if test "$ac_res" != no; then
24403   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24404
24405 else
24406   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
24407 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
24408    { (exit 1); exit 1; }; }
24409 fi
24410
24411   if test "${ac_cv_header_libintl_h+set}" = set; then
24412   { echo "$as_me:$LINENO: checking for libintl.h" >&5
24413 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
24414 if test "${ac_cv_header_libintl_h+set}" = set; then
24415   echo $ECHO_N "(cached) $ECHO_C" >&6
24416 fi
24417 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
24418 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
24419 else
24420   # Is the header compilable?
24421 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
24422 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
24423 cat >conftest.$ac_ext <<_ACEOF
24424 /* confdefs.h.  */
24425 _ACEOF
24426 cat confdefs.h >>conftest.$ac_ext
24427 cat >>conftest.$ac_ext <<_ACEOF
24428 /* end confdefs.h.  */
24429 $ac_includes_default
24430 #include <libintl.h>
24431 _ACEOF
24432 rm -f conftest.$ac_objext
24433 if { (ac_try="$ac_compile"
24434 case "(($ac_try" in
24435   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24436   *) ac_try_echo=$ac_try;;
24437 esac
24438 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24439   (eval "$ac_compile") 2>conftest.er1
24440   ac_status=$?
24441   grep -v '^ *+' conftest.er1 >conftest.err
24442   rm -f conftest.er1
24443   cat conftest.err >&5
24444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24445   (exit $ac_status); } && {
24446          test -z "$ac_c_werror_flag" ||
24447          test ! -s conftest.err
24448        } && test -s conftest.$ac_objext; then
24449   ac_header_compiler=yes
24450 else
24451   echo "$as_me: failed program was:" >&5
24452 sed 's/^/| /' conftest.$ac_ext >&5
24453
24454         ac_header_compiler=no
24455 fi
24456
24457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24458 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24459 echo "${ECHO_T}$ac_header_compiler" >&6; }
24460
24461 # Is the header present?
24462 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
24463 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
24464 cat >conftest.$ac_ext <<_ACEOF
24465 /* confdefs.h.  */
24466 _ACEOF
24467 cat confdefs.h >>conftest.$ac_ext
24468 cat >>conftest.$ac_ext <<_ACEOF
24469 /* end confdefs.h.  */
24470 #include <libintl.h>
24471 _ACEOF
24472 if { (ac_try="$ac_cpp conftest.$ac_ext"
24473 case "(($ac_try" in
24474   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24475   *) ac_try_echo=$ac_try;;
24476 esac
24477 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24478   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
24479   ac_status=$?
24480   grep -v '^ *+' conftest.er1 >conftest.err
24481   rm -f conftest.er1
24482   cat conftest.err >&5
24483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24484   (exit $ac_status); } >/dev/null && {
24485          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24486          test ! -s conftest.err
24487        }; then
24488   ac_header_preproc=yes
24489 else
24490   echo "$as_me: failed program was:" >&5
24491 sed 's/^/| /' conftest.$ac_ext >&5
24492
24493   ac_header_preproc=no
24494 fi
24495
24496 rm -f conftest.err conftest.$ac_ext
24497 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24498 echo "${ECHO_T}$ac_header_preproc" >&6; }
24499
24500 # So?  What about this header?
24501 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24502   yes:no: )
24503     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
24504 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24505     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
24506 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
24507     ac_header_preproc=yes
24508     ;;
24509   no:yes:* )
24510     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
24511 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
24512     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
24513 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
24514     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
24515 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
24516     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
24517 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
24518     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
24519 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
24520     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
24521 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
24522     ( cat <<\_ASBOX
24523 ## ---------------------------------------- ##
24524 ## Report this to pgsql-bugs@postgresql.org ##
24525 ## ---------------------------------------- ##
24526 _ASBOX
24527      ) | sed "s/^/$as_me: WARNING:     /" >&2
24528     ;;
24529 esac
24530 { echo "$as_me:$LINENO: checking for libintl.h" >&5
24531 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
24532 if test "${ac_cv_header_libintl_h+set}" = set; then
24533   echo $ECHO_N "(cached) $ECHO_C" >&6
24534 else
24535   ac_cv_header_libintl_h=$ac_header_preproc
24536 fi
24537 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
24538 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
24539
24540 fi
24541 if test $ac_cv_header_libintl_h = yes; then
24542   :
24543 else
24544   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
24545 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
24546    { (exit 1); exit 1; }; }
24547 fi
24548
24549
24550   for ac_prog in msgfmt
24551 do
24552   # Extract the first word of "$ac_prog", so it can be a program name with args.
24553 set dummy $ac_prog; ac_word=$2
24554 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24555 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24556 if test "${ac_cv_prog_MSGFMT+set}" = set; then
24557   echo $ECHO_N "(cached) $ECHO_C" >&6
24558 else
24559   if test -n "$MSGFMT"; then
24560   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
24561 else
24562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24563 for as_dir in $PATH
24564 do
24565   IFS=$as_save_IFS
24566   test -z "$as_dir" && as_dir=.
24567   for ac_exec_ext in '' $ac_executable_extensions; do
24568   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24569     ac_cv_prog_MSGFMT="$ac_prog"
24570     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24571     break 2
24572   fi
24573 done
24574 done
24575 IFS=$as_save_IFS
24576
24577 fi
24578 fi
24579 MSGFMT=$ac_cv_prog_MSGFMT
24580 if test -n "$MSGFMT"; then
24581   { echo "$as_me:$LINENO: result: $MSGFMT" >&5
24582 echo "${ECHO_T}$MSGFMT" >&6; }
24583 else
24584   { echo "$as_me:$LINENO: result: no" >&5
24585 echo "${ECHO_T}no" >&6; }
24586 fi
24587
24588
24589   test -n "$MSGFMT" && break
24590 done
24591
24592   if test -z "$MSGFMT"; then
24593     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
24594 echo "$as_me: error: msgfmt is required for NLS" >&2;}
24595    { (exit 1); exit 1; }; }
24596   fi
24597   for ac_prog in msgmerge
24598 do
24599   # Extract the first word of "$ac_prog", so it can be a program name with args.
24600 set dummy $ac_prog; ac_word=$2
24601 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24603 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
24604   echo $ECHO_N "(cached) $ECHO_C" >&6
24605 else
24606   if test -n "$MSGMERGE"; then
24607   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
24608 else
24609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24610 for as_dir in $PATH
24611 do
24612   IFS=$as_save_IFS
24613   test -z "$as_dir" && as_dir=.
24614   for ac_exec_ext in '' $ac_executable_extensions; do
24615   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24616     ac_cv_prog_MSGMERGE="$ac_prog"
24617     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24618     break 2
24619   fi
24620 done
24621 done
24622 IFS=$as_save_IFS
24623
24624 fi
24625 fi
24626 MSGMERGE=$ac_cv_prog_MSGMERGE
24627 if test -n "$MSGMERGE"; then
24628   { echo "$as_me:$LINENO: result: $MSGMERGE" >&5
24629 echo "${ECHO_T}$MSGMERGE" >&6; }
24630 else
24631   { echo "$as_me:$LINENO: result: no" >&5
24632 echo "${ECHO_T}no" >&6; }
24633 fi
24634
24635
24636   test -n "$MSGMERGE" && break
24637 done
24638
24639   for ac_prog in xgettext
24640 do
24641   # Extract the first word of "$ac_prog", so it can be a program name with args.
24642 set dummy $ac_prog; ac_word=$2
24643 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24645 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
24646   echo $ECHO_N "(cached) $ECHO_C" >&6
24647 else
24648   if test -n "$XGETTEXT"; then
24649   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
24650 else
24651 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24652 for as_dir in $PATH
24653 do
24654   IFS=$as_save_IFS
24655   test -z "$as_dir" && as_dir=.
24656   for ac_exec_ext in '' $ac_executable_extensions; do
24657   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24658     ac_cv_prog_XGETTEXT="$ac_prog"
24659     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24660     break 2
24661   fi
24662 done
24663 done
24664 IFS=$as_save_IFS
24665
24666 fi
24667 fi
24668 XGETTEXT=$ac_cv_prog_XGETTEXT
24669 if test -n "$XGETTEXT"; then
24670   { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
24671 echo "${ECHO_T}$XGETTEXT" >&6; }
24672 else
24673   { echo "$as_me:$LINENO: result: no" >&5
24674 echo "${ECHO_T}no" >&6; }
24675 fi
24676
24677
24678   test -n "$XGETTEXT" && break
24679 done
24680
24681
24682 fi
24683
24684 # Check for Tcl configuration script tclConfig.sh
24685 if test "$with_tcl" = yes; then
24686     for ac_prog in tclsh tcl
24687 do
24688   # Extract the first word of "$ac_prog", so it can be a program name with args.
24689 set dummy $ac_prog; ac_word=$2
24690 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24691 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24692 if test "${ac_cv_path_TCLSH+set}" = set; then
24693   echo $ECHO_N "(cached) $ECHO_C" >&6
24694 else
24695   case $TCLSH in
24696   [\\/]* | ?:[\\/]*)
24697   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
24698   ;;
24699   *)
24700   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24701 for as_dir in $PATH
24702 do
24703   IFS=$as_save_IFS
24704   test -z "$as_dir" && as_dir=.
24705   for ac_exec_ext in '' $ac_executable_extensions; do
24706   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24707     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
24708     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24709     break 2
24710   fi
24711 done
24712 done
24713 IFS=$as_save_IFS
24714
24715   ;;
24716 esac
24717 fi
24718 TCLSH=$ac_cv_path_TCLSH
24719 if test -n "$TCLSH"; then
24720   { echo "$as_me:$LINENO: result: $TCLSH" >&5
24721 echo "${ECHO_T}$TCLSH" >&6; }
24722 else
24723   { echo "$as_me:$LINENO: result: no" >&5
24724 echo "${ECHO_T}no" >&6; }
24725 fi
24726
24727
24728   test -n "$TCLSH" && break
24729 done
24730
24731 { echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
24732 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6; }
24733 # Let user override test
24734 if test -z "$TCL_CONFIG_SH"; then
24735     pgac_test_dirs="$with_tclconfig"
24736
24737     set X $pgac_test_dirs; shift
24738     if test $# -eq 0; then
24739         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
24740 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
24741    { (exit 1); exit 1; }; }
24742         set X `echo 'puts $auto_path' | $TCLSH`; shift
24743     fi
24744
24745     for pgac_dir do
24746         if test -r "$pgac_dir/tclConfig.sh"; then
24747             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
24748             break
24749         fi
24750     done
24751 fi
24752
24753 if test -z "$TCL_CONFIG_SH"; then
24754     { echo "$as_me:$LINENO: result: no" >&5
24755 echo "${ECHO_T}no" >&6; }
24756     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
24757 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
24758    { (exit 1); exit 1; }; }
24759 else
24760     { echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
24761 echo "${ECHO_T}$TCL_CONFIG_SH" >&6; }
24762 fi
24763
24764
24765
24766     . "$TCL_CONFIG_SH"
24767 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
24768 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
24769 eval TCL_LIBS=\"$TCL_LIBS\"
24770 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
24771 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
24772
24773         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
24774     ac_save_CPPFLAGS=$CPPFLAGS
24775     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
24776     if test "${ac_cv_header_tcl_h+set}" = set; then
24777   { echo "$as_me:$LINENO: checking for tcl.h" >&5
24778 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6; }
24779 if test "${ac_cv_header_tcl_h+set}" = set; then
24780   echo $ECHO_N "(cached) $ECHO_C" >&6
24781 fi
24782 { echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
24783 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6; }
24784 else
24785   # Is the header compilable?
24786 { echo "$as_me:$LINENO: checking tcl.h usability" >&5
24787 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6; }
24788 cat >conftest.$ac_ext <<_ACEOF
24789 /* confdefs.h.  */
24790 _ACEOF
24791 cat confdefs.h >>conftest.$ac_ext
24792 cat >>conftest.$ac_ext <<_ACEOF
24793 /* end confdefs.h.  */
24794 $ac_includes_default
24795 #include <tcl.h>
24796 _ACEOF
24797 rm -f conftest.$ac_objext
24798 if { (ac_try="$ac_compile"
24799 case "(($ac_try" in
24800   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24801   *) ac_try_echo=$ac_try;;
24802 esac
24803 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24804   (eval "$ac_compile") 2>conftest.er1
24805   ac_status=$?
24806   grep -v '^ *+' conftest.er1 >conftest.err
24807   rm -f conftest.er1
24808   cat conftest.err >&5
24809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24810   (exit $ac_status); } && {
24811          test -z "$ac_c_werror_flag" ||
24812          test ! -s conftest.err
24813        } && test -s conftest.$ac_objext; then
24814   ac_header_compiler=yes
24815 else
24816   echo "$as_me: failed program was:" >&5
24817 sed 's/^/| /' conftest.$ac_ext >&5
24818
24819         ac_header_compiler=no
24820 fi
24821
24822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24823 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24824 echo "${ECHO_T}$ac_header_compiler" >&6; }
24825
24826 # Is the header present?
24827 { echo "$as_me:$LINENO: checking tcl.h presence" >&5
24828 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6; }
24829 cat >conftest.$ac_ext <<_ACEOF
24830 /* confdefs.h.  */
24831 _ACEOF
24832 cat confdefs.h >>conftest.$ac_ext
24833 cat >>conftest.$ac_ext <<_ACEOF
24834 /* end confdefs.h.  */
24835 #include <tcl.h>
24836 _ACEOF
24837 if { (ac_try="$ac_cpp conftest.$ac_ext"
24838 case "(($ac_try" in
24839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24840   *) ac_try_echo=$ac_try;;
24841 esac
24842 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24843   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
24844   ac_status=$?
24845   grep -v '^ *+' conftest.er1 >conftest.err
24846   rm -f conftest.er1
24847   cat conftest.err >&5
24848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24849   (exit $ac_status); } >/dev/null && {
24850          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24851          test ! -s conftest.err
24852        }; then
24853   ac_header_preproc=yes
24854 else
24855   echo "$as_me: failed program was:" >&5
24856 sed 's/^/| /' conftest.$ac_ext >&5
24857
24858   ac_header_preproc=no
24859 fi
24860
24861 rm -f conftest.err conftest.$ac_ext
24862 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24863 echo "${ECHO_T}$ac_header_preproc" >&6; }
24864
24865 # So?  What about this header?
24866 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24867   yes:no: )
24868     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
24869 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24870     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
24871 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
24872     ac_header_preproc=yes
24873     ;;
24874   no:yes:* )
24875     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
24876 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
24877     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
24878 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
24879     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
24880 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
24881     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
24882 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
24883     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
24884 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
24885     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
24886 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
24887     ( cat <<\_ASBOX
24888 ## ---------------------------------------- ##
24889 ## Report this to pgsql-bugs@postgresql.org ##
24890 ## ---------------------------------------- ##
24891 _ASBOX
24892      ) | sed "s/^/$as_me: WARNING:     /" >&2
24893     ;;
24894 esac
24895 { echo "$as_me:$LINENO: checking for tcl.h" >&5
24896 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6; }
24897 if test "${ac_cv_header_tcl_h+set}" = set; then
24898   echo $ECHO_N "(cached) $ECHO_C" >&6
24899 else
24900   ac_cv_header_tcl_h=$ac_header_preproc
24901 fi
24902 { echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
24903 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6; }
24904
24905 fi
24906 if test $ac_cv_header_tcl_h = yes; then
24907   :
24908 else
24909   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
24910 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
24911    { (exit 1); exit 1; }; }
24912 fi
24913
24914
24915     CPPFLAGS=$ac_save_CPPFLAGS
24916 fi
24917
24918 #
24919 # Check for DocBook and tools
24920 #
24921 for ac_prog in onsgmls nsgmls
24922 do
24923   # Extract the first word of "$ac_prog", so it can be a program name with args.
24924 set dummy $ac_prog; ac_word=$2
24925 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24926 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24927 if test "${ac_cv_prog_NSGMLS+set}" = set; then
24928   echo $ECHO_N "(cached) $ECHO_C" >&6
24929 else
24930   if test -n "$NSGMLS"; then
24931   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
24932 else
24933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24934 for as_dir in $PATH
24935 do
24936   IFS=$as_save_IFS
24937   test -z "$as_dir" && as_dir=.
24938   for ac_exec_ext in '' $ac_executable_extensions; do
24939   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24940     ac_cv_prog_NSGMLS="$ac_prog"
24941     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24942     break 2
24943   fi
24944 done
24945 done
24946 IFS=$as_save_IFS
24947
24948 fi
24949 fi
24950 NSGMLS=$ac_cv_prog_NSGMLS
24951 if test -n "$NSGMLS"; then
24952   { echo "$as_me:$LINENO: result: $NSGMLS" >&5
24953 echo "${ECHO_T}$NSGMLS" >&6; }
24954 else
24955   { echo "$as_me:$LINENO: result: no" >&5
24956 echo "${ECHO_T}no" >&6; }
24957 fi
24958
24959
24960   test -n "$NSGMLS" && break
24961 done
24962
24963 for ac_prog in openjade jade
24964 do
24965   # Extract the first word of "$ac_prog", so it can be a program name with args.
24966 set dummy $ac_prog; ac_word=$2
24967 { echo "$as_me:$LINENO: checking for $ac_word" >&5
24968 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
24969 if test "${ac_cv_prog_JADE+set}" = set; then
24970   echo $ECHO_N "(cached) $ECHO_C" >&6
24971 else
24972   if test -n "$JADE"; then
24973   ac_cv_prog_JADE="$JADE" # Let the user override the test.
24974 else
24975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24976 for as_dir in $PATH
24977 do
24978   IFS=$as_save_IFS
24979   test -z "$as_dir" && as_dir=.
24980   for ac_exec_ext in '' $ac_executable_extensions; do
24981   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24982     ac_cv_prog_JADE="$ac_prog"
24983     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
24984     break 2
24985   fi
24986 done
24987 done
24988 IFS=$as_save_IFS
24989
24990 fi
24991 fi
24992 JADE=$ac_cv_prog_JADE
24993 if test -n "$JADE"; then
24994   { echo "$as_me:$LINENO: result: $JADE" >&5
24995 echo "${ECHO_T}$JADE" >&6; }
24996 else
24997   { echo "$as_me:$LINENO: result: no" >&5
24998 echo "${ECHO_T}no" >&6; }
24999 fi
25000
25001
25002   test -n "$JADE" && break
25003 done
25004
25005
25006 { echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
25007 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6; }
25008 if test "${pgac_cv_check_docbook+set}" = set; then
25009   echo $ECHO_N "(cached) $ECHO_C" >&6
25010 else
25011   cat >conftest.sgml <<EOF
25012 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
25013 <book>
25014  <title>test</title>
25015  <chapter>
25016   <title>random</title>
25017    <sect1>
25018     <title>testsect</title>
25019     <para>text</para>
25020   </sect1>
25021  </chapter>
25022 </book>
25023 EOF
25024
25025 pgac_cv_check_docbook=no
25026
25027 if test -n "$NSGMLS"; then
25028   $NSGMLS -s conftest.sgml 1>&5 2>&1
25029   if test $? -eq 0; then
25030     pgac_cv_check_docbook=yes
25031   fi
25032 fi
25033 rm -f conftest.sgml
25034 fi
25035 { echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
25036 echo "${ECHO_T}$pgac_cv_check_docbook" >&6; }
25037
25038 have_docbook=$pgac_cv_check_docbook
25039
25040
25041 { echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
25042 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6; }
25043 if test "${pgac_cv_path_stylesheets+set}" = set; then
25044   echo $ECHO_N "(cached) $ECHO_C" >&6
25045 else
25046   if test -n "$DOCBOOKSTYLE"; then
25047   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
25048 else
25049   for pgac_prefix in /usr /usr/local /opt; do
25050     for pgac_infix in share lib; do
25051       for pgac_postfix in \
25052         sgml/stylesheets/nwalsh-modular \
25053         sgml/stylesheets/docbook \
25054         sgml/stylesheets/dsssl/docbook \
25055         sgml/docbook-dsssl \
25056         sgml/docbook/dsssl/modular \
25057         sgml/docbook/stylesheet/dsssl/modular \
25058         sgml/docbook/dsssl-stylesheets
25059       do
25060         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
25061         if test -r "$pgac_candidate/html/docbook.dsl" \
25062            && test -r "$pgac_candidate/print/docbook.dsl"
25063         then
25064           pgac_cv_path_stylesheets=$pgac_candidate
25065           break 3
25066         fi
25067       done
25068     done
25069   done
25070 fi
25071 fi
25072
25073 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
25074
25075 if test -n "$DOCBOOKSTYLE"; then
25076   { echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
25077 echo "${ECHO_T}$DOCBOOKSTYLE" >&6; }
25078 else
25079   { echo "$as_me:$LINENO: result: no" >&5
25080 echo "${ECHO_T}no" >&6; }
25081 fi
25082 if test -n "$DOCBOOKSTYLE"; then
25083   for ac_prog in collateindex.pl
25084 do
25085   # Extract the first word of "$ac_prog", so it can be a program name with args.
25086 set dummy $ac_prog; ac_word=$2
25087 { echo "$as_me:$LINENO: checking for $ac_word" >&5
25088 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
25089 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
25090   echo $ECHO_N "(cached) $ECHO_C" >&6
25091 else
25092   case $COLLATEINDEX in
25093   [\\/]* | ?:[\\/]*)
25094   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
25095   ;;
25096   *)
25097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25098 for as_dir in $DOCBOOKSTYLE/bin $PATH
25099 do
25100   IFS=$as_save_IFS
25101   test -z "$as_dir" && as_dir=.
25102   for ac_exec_ext in '' $ac_executable_extensions; do
25103   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25104     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
25105     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25106     break 2
25107   fi
25108 done
25109 done
25110 IFS=$as_save_IFS
25111
25112   ;;
25113 esac
25114 fi
25115 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
25116 if test -n "$COLLATEINDEX"; then
25117   { echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
25118 echo "${ECHO_T}$COLLATEINDEX" >&6; }
25119 else
25120   { echo "$as_me:$LINENO: result: no" >&5
25121 echo "${ECHO_T}no" >&6; }
25122 fi
25123
25124
25125   test -n "$COLLATEINDEX" && break
25126 done
25127
25128 else
25129   for ac_prog in collateindex.pl
25130 do
25131   # Extract the first word of "$ac_prog", so it can be a program name with args.
25132 set dummy $ac_prog; ac_word=$2
25133 { echo "$as_me:$LINENO: checking for $ac_word" >&5
25134 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
25135 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
25136   echo $ECHO_N "(cached) $ECHO_C" >&6
25137 else
25138   case $COLLATEINDEX in
25139   [\\/]* | ?:[\\/]*)
25140   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
25141   ;;
25142   *)
25143   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25144 for as_dir in $PATH
25145 do
25146   IFS=$as_save_IFS
25147   test -z "$as_dir" && as_dir=.
25148   for ac_exec_ext in '' $ac_executable_extensions; do
25149   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25150     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
25151     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25152     break 2
25153   fi
25154 done
25155 done
25156 IFS=$as_save_IFS
25157
25158   ;;
25159 esac
25160 fi
25161 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
25162 if test -n "$COLLATEINDEX"; then
25163   { echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
25164 echo "${ECHO_T}$COLLATEINDEX" >&6; }
25165 else
25166   { echo "$as_me:$LINENO: result: no" >&5
25167 echo "${ECHO_T}no" >&6; }
25168 fi
25169
25170
25171   test -n "$COLLATEINDEX" && break
25172 done
25173
25174 fi
25175 for ac_prog in sgmlspl
25176 do
25177   # Extract the first word of "$ac_prog", so it can be a program name with args.
25178 set dummy $ac_prog; ac_word=$2
25179 { echo "$as_me:$LINENO: checking for $ac_word" >&5
25180 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
25181 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
25182   echo $ECHO_N "(cached) $ECHO_C" >&6
25183 else
25184   if test -n "$SGMLSPL"; then
25185   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
25186 else
25187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25188 for as_dir in $PATH
25189 do
25190   IFS=$as_save_IFS
25191   test -z "$as_dir" && as_dir=.
25192   for ac_exec_ext in '' $ac_executable_extensions; do
25193   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25194     ac_cv_prog_SGMLSPL="$ac_prog"
25195     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
25196     break 2
25197   fi
25198 done
25199 done
25200 IFS=$as_save_IFS
25201
25202 fi
25203 fi
25204 SGMLSPL=$ac_cv_prog_SGMLSPL
25205 if test -n "$SGMLSPL"; then
25206   { echo "$as_me:$LINENO: result: $SGMLSPL" >&5
25207 echo "${ECHO_T}$SGMLSPL" >&6; }
25208 else
25209   { echo "$as_me:$LINENO: result: no" >&5
25210 echo "${ECHO_T}no" >&6; }
25211 fi
25212
25213
25214   test -n "$SGMLSPL" && break
25215 done
25216
25217
25218 # Thread testing
25219
25220 # We have to run the thread test near the end so we have all our symbols
25221 # defined.  Cross compiling throws a warning.
25222 #
25223 if test "$enable_thread_safety_force" = yes; then
25224 if test "$PORTNAME" != "win32"
25225 then
25226   { echo "$as_me:$LINENO: WARNING:
25227 *** Skipping thread test program.  --enable-thread-safety-force was used.
25228 *** Run the program in src/test/thread on the your machine and add proper
25229 *** locking function calls to your applications to guarantee thread safety.
25230 " >&5
25231 echo "$as_me: WARNING:
25232 *** Skipping thread test program.  --enable-thread-safety-force was used.
25233 *** Run the program in src/test/thread on the your machine and add proper
25234 *** locking function calls to your applications to guarantee thread safety.
25235 " >&2;}
25236 else
25237 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
25238 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
25239 fi
25240 elif test "$enable_thread_safety" = yes; then
25241 if test "$PORTNAME" != "win32"
25242 then
25243 { echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
25244 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6; }
25245
25246 _CFLAGS="$CFLAGS"
25247 _LIBS="$LIBS"
25248 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
25249 LIBS="$LIBS $PTHREAD_LIBS"
25250 if test "$cross_compiling" = yes; then
25251   { echo "$as_me:$LINENO: result: maybe" >&5
25252 echo "${ECHO_T}maybe" >&6; }
25253   { echo "$as_me:$LINENO: WARNING:
25254 *** Skipping thread test program because of cross-compile build.
25255 *** Run the program in src/test/thread on the target machine.
25256 " >&5
25257 echo "$as_me: WARNING:
25258 *** Skipping thread test program because of cross-compile build.
25259 *** Run the program in src/test/thread on the target machine.
25260 " >&2;}
25261 else
25262   cat >conftest.$ac_ext <<_ACEOF
25263 /* confdefs.h.  */
25264 _ACEOF
25265 cat confdefs.h >>conftest.$ac_ext
25266 cat >>conftest.$ac_ext <<_ACEOF
25267 /* end confdefs.h.  */
25268 #include "$srcdir/src/test/thread/thread_test.c"
25269 _ACEOF
25270 rm -f conftest$ac_exeext
25271 if { (ac_try="$ac_link"
25272 case "(($ac_try" in
25273   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25274   *) ac_try_echo=$ac_try;;
25275 esac
25276 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25277   (eval "$ac_link") 2>&5
25278   ac_status=$?
25279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25280   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25281   { (case "(($ac_try" in
25282   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25283   *) ac_try_echo=$ac_try;;
25284 esac
25285 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25286   (eval "$ac_try") 2>&5
25287   ac_status=$?
25288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25289   (exit $ac_status); }; }; then
25290   { echo "$as_me:$LINENO: result: yes" >&5
25291 echo "${ECHO_T}yes" >&6; }
25292 else
25293   echo "$as_me: program exited with status $ac_status" >&5
25294 echo "$as_me: failed program was:" >&5
25295 sed 's/^/| /' conftest.$ac_ext >&5
25296
25297 ( exit $ac_status )
25298 { echo "$as_me:$LINENO: result: no" >&5
25299 echo "${ECHO_T}no" >&6; }
25300   { { echo "$as_me:$LINENO: error: thread test program failed
25301 This platform is not thread-safe.  Check the file 'config.log'for the
25302 exact reason.
25303
25304 You can use the configure option --enable-thread-safety-force to force
25305 threads to be enabled.  But you must then run the program in
25306 src/test/thread and add locking function calls to your applications to
25307 guarantee thread safety." >&5
25308 echo "$as_me: error: thread test program failed
25309 This platform is not thread-safe.  Check the file 'config.log'for the
25310 exact reason.
25311
25312 You can use the configure option --enable-thread-safety-force to force
25313 threads to be enabled.  But you must then run the program in
25314 src/test/thread and add locking function calls to your applications to
25315 guarantee thread safety." >&2;}
25316    { (exit 1); exit 1; }; }
25317 fi
25318 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25319 fi
25320
25321
25322 CFLAGS="$_CFLAGS"
25323 LIBS="$_LIBS"
25324 else
25325 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
25326 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
25327 fi
25328 fi
25329
25330 # prepare build tree if outside source tree
25331 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
25332 # Note 2: /bin/pwd might be better than shell's built-in at getting
25333 #         a symlink-free name.
25334 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
25335   vpath_build=no
25336 else
25337   vpath_build=yes
25338   if test "$no_create" != yes; then
25339     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
25340     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
25341     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
25342       || { { echo "$as_me:$LINENO: error: failed" >&5
25343 echo "$as_me: error: failed" >&2;}
25344    { (exit 1); exit 1; }; }
25345     { echo "$as_me:$LINENO: result: done" >&5
25346 echo "${ECHO_T}done" >&6; }
25347   fi
25348 fi
25349
25350
25351
25352 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
25353
25354
25355 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/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}"
25356
25357
25358 if test "$PORTNAME" = "win32"; then
25359 ac_config_commands="$ac_config_commands check_win32_symlinks"
25360
25361 fi
25362
25363 ac_config_headers="$ac_config_headers src/include/pg_config.h"
25364
25365
25366 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
25367
25368
25369 cat >confcache <<\_ACEOF
25370 # This file is a shell script that caches the results of configure
25371 # tests run on this system so they can be shared between configure
25372 # scripts and configure runs, see configure's option --config-cache.
25373 # It is not useful on other systems.  If it contains results you don't
25374 # want to keep, you may remove or edit it.
25375 #
25376 # config.status only pays attention to the cache file if you give it
25377 # the --recheck option to rerun configure.
25378 #
25379 # `ac_cv_env_foo' variables (set or unset) will be overridden when
25380 # loading this file, other *unset* `ac_cv_foo' will be assigned the
25381 # following values.
25382
25383 _ACEOF
25384
25385 # The following way of writing the cache mishandles newlines in values,
25386 # but we know of no workaround that is simple, portable, and efficient.
25387 # So, we kill variables containing newlines.
25388 # Ultrix sh set writes to stderr and can't be redirected directly,
25389 # and sets the high bit in the cache file unless we assign to the vars.
25390 (
25391   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25392     eval ac_val=\$$ac_var
25393     case $ac_val in #(
25394     *${as_nl}*)
25395       case $ac_var in #(
25396       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25397 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
25398       esac
25399       case $ac_var in #(
25400       _ | IFS | as_nl) ;; #(
25401       *) $as_unset $ac_var ;;
25402       esac ;;
25403     esac
25404   done
25405
25406   (set) 2>&1 |
25407     case $as_nl`(ac_space=' '; set) 2>&1` in #(
25408     *${as_nl}ac_space=\ *)
25409       # `set' does not quote correctly, so add quotes (double-quote
25410       # substitution turns \\\\ into \\, and sed turns \\ into \).
25411       sed -n \
25412         "s/'/'\\\\''/g;
25413           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
25414       ;; #(
25415     *)
25416       # `set' quotes correctly as required by POSIX, so do not add quotes.
25417       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
25418       ;;
25419     esac |
25420     sort
25421 ) |
25422   sed '
25423      /^ac_cv_env_/b end
25424      t clear
25425      :clear
25426      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25427      t end
25428      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25429      :end' >>confcache
25430 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25431   if test -w "$cache_file"; then
25432     test "x$cache_file" != "x/dev/null" &&
25433       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25434 echo "$as_me: updating cache $cache_file" >&6;}
25435     cat confcache >$cache_file
25436   else
25437     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25438 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
25439   fi
25440 fi
25441 rm -f confcache
25442
25443 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25444 # Let make expand exec_prefix.
25445 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25446
25447 DEFS=-DHAVE_CONFIG_H
25448
25449 ac_libobjs=
25450 ac_ltlibobjs=
25451 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25452   # 1. Remove the extension, and $U if already installed.
25453   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25454   ac_i=`echo "$ac_i" | sed "$ac_script"`
25455   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
25456   #    will be set to the directory where LIBOBJS objects are built.
25457   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25458   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
25459 done
25460 LIBOBJS=$ac_libobjs
25461
25462 LTLIBOBJS=$ac_ltlibobjs
25463
25464
25465
25466 : ${CONFIG_STATUS=./config.status}
25467 ac_clean_files_save=$ac_clean_files
25468 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25469 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25470 echo "$as_me: creating $CONFIG_STATUS" >&6;}
25471 cat >$CONFIG_STATUS <<_ACEOF
25472 #! $SHELL
25473 # Generated by $as_me.
25474 # Run this file to recreate the current configuration.
25475 # Compiler output produced by configure, useful for debugging
25476 # configure, is in config.log if it exists.
25477
25478 debug=false
25479 ac_cs_recheck=false
25480 ac_cs_silent=false
25481 SHELL=\${CONFIG_SHELL-$SHELL}
25482 _ACEOF
25483
25484 cat >>$CONFIG_STATUS <<\_ACEOF
25485 ## --------------------- ##
25486 ## M4sh Initialization.  ##
25487 ## --------------------- ##
25488
25489 # Be more Bourne compatible
25490 DUALCASE=1; export DUALCASE # for MKS sh
25491 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25492   emulate sh
25493   NULLCMD=:
25494   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
25495   # is contrary to our usage.  Disable this feature.
25496   alias -g '${1+"$@"}'='"$@"'
25497   setopt NO_GLOB_SUBST
25498 else
25499   case `(set -o) 2>/dev/null` in
25500   *posix*) set -o posix ;;
25501 esac
25502
25503 fi
25504
25505
25506
25507
25508 # PATH needs CR
25509 # Avoid depending upon Character Ranges.
25510 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25511 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25512 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25513 as_cr_digits='0123456789'
25514 as_cr_alnum=$as_cr_Letters$as_cr_digits
25515
25516 # The user is always right.
25517 if test "${PATH_SEPARATOR+set}" != set; then
25518   echo "#! /bin/sh" >conf$$.sh
25519   echo  "exit 0"   >>conf$$.sh
25520   chmod +x conf$$.sh
25521   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
25522     PATH_SEPARATOR=';'
25523   else
25524     PATH_SEPARATOR=:
25525   fi
25526   rm -f conf$$.sh
25527 fi
25528
25529 # Support unset when possible.
25530 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25531   as_unset=unset
25532 else
25533   as_unset=false
25534 fi
25535
25536
25537 # IFS
25538 # We need space, tab and new line, in precisely that order.  Quoting is
25539 # there to prevent editors from complaining about space-tab.
25540 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
25541 # splitting by setting IFS to empty value.)
25542 as_nl='
25543 '
25544 IFS=" ""        $as_nl"
25545
25546 # Find who we are.  Look in the path if we contain no directory separator.
25547 case $0 in
25548   *[\\/]* ) as_myself=$0 ;;
25549   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25550 for as_dir in $PATH
25551 do
25552   IFS=$as_save_IFS
25553   test -z "$as_dir" && as_dir=.
25554   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25555 done
25556 IFS=$as_save_IFS
25557
25558      ;;
25559 esac
25560 # We did not find ourselves, most probably we were run as `sh COMMAND'
25561 # in which case we are not to be found in the path.
25562 if test "x$as_myself" = x; then
25563   as_myself=$0
25564 fi
25565 if test ! -f "$as_myself"; then
25566   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25567   { (exit 1); exit 1; }
25568 fi
25569
25570 # Work around bugs in pre-3.0 UWIN ksh.
25571 for as_var in ENV MAIL MAILPATH
25572 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25573 done
25574 PS1='$ '
25575 PS2='> '
25576 PS4='+ '
25577
25578 # NLS nuisances.
25579 for as_var in \
25580   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25581   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25582   LC_TELEPHONE LC_TIME
25583 do
25584   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25585     eval $as_var=C; export $as_var
25586   else
25587     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25588   fi
25589 done
25590
25591 # Required to use basename.
25592 if expr a : '\(a\)' >/dev/null 2>&1 &&
25593    test "X`expr 00001 : '.*\(...\)'`" = X001; then
25594   as_expr=expr
25595 else
25596   as_expr=false
25597 fi
25598
25599 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25600   as_basename=basename
25601 else
25602   as_basename=false
25603 fi
25604
25605
25606 # Name of the executable.
25607 as_me=`$as_basename -- "$0" ||
25608 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25609          X"$0" : 'X\(//\)$' \| \
25610          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25611 echo X/"$0" |
25612     sed '/^.*\/\([^/][^/]*\)\/*$/{
25613             s//\1/
25614             q
25615           }
25616           /^X\/\(\/\/\)$/{
25617             s//\1/
25618             q
25619           }
25620           /^X\/\(\/\).*/{
25621             s//\1/
25622             q
25623           }
25624           s/.*/./; q'`
25625
25626 # CDPATH.
25627 $as_unset CDPATH
25628
25629
25630
25631   as_lineno_1=$LINENO
25632   as_lineno_2=$LINENO
25633   test "x$as_lineno_1" != "x$as_lineno_2" &&
25634   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
25635
25636   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25637   # uniformly replaced by the line number.  The first 'sed' inserts a
25638   # line-number line after each line using $LINENO; the second 'sed'
25639   # does the real work.  The second script uses 'N' to pair each
25640   # line-number line with the line containing $LINENO, and appends
25641   # trailing '-' during substitution so that $LINENO is not a special
25642   # case at line end.
25643   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
25644   # scripts with optimization help from Paolo Bonzini.  Blame Lee
25645   # E. McMahon (1931-1989) for sed's syntax.  :-)
25646   sed -n '
25647     p
25648     /[$]LINENO/=
25649   ' <$as_myself |
25650     sed '
25651       s/[$]LINENO.*/&-/
25652       t lineno
25653       b
25654       :lineno
25655       N
25656       :loop
25657       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
25658       t loop
25659       s/-\n.*//
25660     ' >$as_me.lineno &&
25661   chmod +x "$as_me.lineno" ||
25662     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
25663    { (exit 1); exit 1; }; }
25664
25665   # Don't try to exec as it changes $[0], causing all sort of problems
25666   # (the dirname of $[0] is not the place where we might find the
25667   # original and so on.  Autoconf is especially sensitive to this).
25668   . "./$as_me.lineno"
25669   # Exit status is that of the last command.
25670   exit
25671 }
25672
25673
25674 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25675   as_dirname=dirname
25676 else
25677   as_dirname=false
25678 fi
25679
25680 ECHO_C= ECHO_N= ECHO_T=
25681 case `echo -n x` in
25682 -n*)
25683   case `echo 'x\c'` in
25684   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
25685   *)   ECHO_C='\c';;
25686   esac;;
25687 *)
25688   ECHO_N='-n';;
25689 esac
25690
25691 if expr a : '\(a\)' >/dev/null 2>&1 &&
25692    test "X`expr 00001 : '.*\(...\)'`" = X001; then
25693   as_expr=expr
25694 else
25695   as_expr=false
25696 fi
25697
25698 rm -f conf$$ conf$$.exe conf$$.file
25699 if test -d conf$$.dir; then
25700   rm -f conf$$.dir/conf$$.file
25701 else
25702   rm -f conf$$.dir
25703   mkdir conf$$.dir
25704 fi
25705 echo >conf$$.file
25706 if ln -s conf$$.file conf$$ 2>/dev/null; then
25707   as_ln_s='ln -s'
25708   # ... but there are two gotchas:
25709   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25710   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25711   # In both cases, we have to default to `cp -p'.
25712   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25713     as_ln_s='cp -p'
25714 elif ln conf$$.file conf$$ 2>/dev/null; then
25715   as_ln_s=ln
25716 else
25717   as_ln_s='cp -p'
25718 fi
25719 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25720 rmdir conf$$.dir 2>/dev/null
25721
25722 if mkdir -p . 2>/dev/null; then
25723   as_mkdir_p=:
25724 else
25725   test -d ./-p && rmdir ./-p
25726   as_mkdir_p=false
25727 fi
25728
25729 if test -x / >/dev/null 2>&1; then
25730   as_test_x='test -x'
25731 else
25732   if ls -dL / >/dev/null 2>&1; then
25733     as_ls_L_option=L
25734   else
25735     as_ls_L_option=
25736   fi
25737   as_test_x='
25738     eval sh -c '\''
25739       if test -d "$1"; then
25740         test -d "$1/.";
25741       else
25742         case $1 in
25743         -*)set "./$1";;
25744         esac;
25745         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25746         ???[sx]*):;;*)false;;esac;fi
25747     '\'' sh
25748   '
25749 fi
25750 as_executable_p=$as_test_x
25751
25752 # Sed expression to map a string onto a valid CPP name.
25753 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25754
25755 # Sed expression to map a string onto a valid variable name.
25756 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25757
25758
25759 exec 6>&1
25760
25761 # Save the log message, to keep $[0] and so on meaningful, and to
25762 # report actual input values of CONFIG_FILES etc. instead of their
25763 # values after options handling.
25764 ac_log="
25765 This file was extended by PostgreSQL $as_me 8.4devel, which was
25766 generated by GNU Autoconf 2.61.  Invocation command line was
25767
25768   CONFIG_FILES    = $CONFIG_FILES
25769   CONFIG_HEADERS  = $CONFIG_HEADERS
25770   CONFIG_LINKS    = $CONFIG_LINKS
25771   CONFIG_COMMANDS = $CONFIG_COMMANDS
25772   $ $0 $@
25773
25774 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25775 "
25776
25777 _ACEOF
25778
25779 cat >>$CONFIG_STATUS <<_ACEOF
25780 # Files that config.status was made for.
25781 config_files="$ac_config_files"
25782 config_headers="$ac_config_headers"
25783 config_links="$ac_config_links"
25784 config_commands="$ac_config_commands"
25785
25786 _ACEOF
25787
25788 cat >>$CONFIG_STATUS <<\_ACEOF
25789 ac_cs_usage="\
25790 \`$as_me' instantiates files from templates according to the
25791 current configuration.
25792
25793 Usage: $0 [OPTIONS] [FILE]...
25794
25795   -h, --help       print this help, then exit
25796   -V, --version    print version number and configuration settings, then exit
25797   -q, --quiet      do not print progress messages
25798   -d, --debug      don't remove temporary files
25799       --recheck    update $as_me by reconfiguring in the same conditions
25800   --file=FILE[:TEMPLATE]
25801                    instantiate the configuration file FILE
25802   --header=FILE[:TEMPLATE]
25803                    instantiate the configuration header FILE
25804
25805 Configuration files:
25806 $config_files
25807
25808 Configuration headers:
25809 $config_headers
25810
25811 Configuration links:
25812 $config_links
25813
25814 Configuration commands:
25815 $config_commands
25816
25817 Report bugs to <bug-autoconf@gnu.org>."
25818
25819 _ACEOF
25820 cat >>$CONFIG_STATUS <<_ACEOF
25821 ac_cs_version="\\
25822 PostgreSQL config.status 8.4devel
25823 configured by $0, generated by GNU Autoconf 2.61,
25824   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
25825
25826 Copyright (C) 2006 Free Software Foundation, Inc.
25827 This config.status script is free software; the Free Software Foundation
25828 gives unlimited permission to copy, distribute and modify it."
25829
25830 ac_pwd='$ac_pwd'
25831 srcdir='$srcdir'
25832 _ACEOF
25833
25834 cat >>$CONFIG_STATUS <<\_ACEOF
25835 # If no file are specified by the user, then we need to provide default
25836 # value.  By we need to know if files were specified by the user.
25837 ac_need_defaults=:
25838 while test $# != 0
25839 do
25840   case $1 in
25841   --*=*)
25842     ac_option=`expr "X$1" : 'X\([^=]*\)='`
25843     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25844     ac_shift=:
25845     ;;
25846   *)
25847     ac_option=$1
25848     ac_optarg=$2
25849     ac_shift=shift
25850     ;;
25851   esac
25852
25853   case $ac_option in
25854   # Handling of the options.
25855   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25856     ac_cs_recheck=: ;;
25857   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25858     echo "$ac_cs_version"; exit ;;
25859   --debug | --debu | --deb | --de | --d | -d )
25860     debug=: ;;
25861   --file | --fil | --fi | --f )
25862     $ac_shift
25863     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
25864     ac_need_defaults=false;;
25865   --header | --heade | --head | --hea )
25866     $ac_shift
25867     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
25868     ac_need_defaults=false;;
25869   --he | --h)
25870     # Conflict between --help and --header
25871     { echo "$as_me: error: ambiguous option: $1
25872 Try \`$0 --help' for more information." >&2
25873    { (exit 1); exit 1; }; };;
25874   --help | --hel | -h )
25875     echo "$ac_cs_usage"; exit ;;
25876   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25877   | -silent | --silent | --silen | --sile | --sil | --si | --s)
25878     ac_cs_silent=: ;;
25879
25880   # This is an error.
25881   -*) { echo "$as_me: error: unrecognized option: $1
25882 Try \`$0 --help' for more information." >&2
25883    { (exit 1); exit 1; }; } ;;
25884
25885   *) ac_config_targets="$ac_config_targets $1"
25886      ac_need_defaults=false ;;
25887
25888   esac
25889   shift
25890 done
25891
25892 ac_configure_extra_args=
25893
25894 if $ac_cs_silent; then
25895   exec 6>/dev/null
25896   ac_configure_extra_args="$ac_configure_extra_args --silent"
25897 fi
25898
25899 _ACEOF
25900 cat >>$CONFIG_STATUS <<_ACEOF
25901 if \$ac_cs_recheck; then
25902   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25903   CONFIG_SHELL=$SHELL
25904   export CONFIG_SHELL
25905   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25906 fi
25907
25908 _ACEOF
25909 cat >>$CONFIG_STATUS <<\_ACEOF
25910 exec 5>>config.log
25911 {
25912   echo
25913   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25914 ## Running $as_me. ##
25915 _ASBOX
25916   echo "$ac_log"
25917 } >&5
25918
25919 _ACEOF
25920 cat >>$CONFIG_STATUS <<_ACEOF
25921 _ACEOF
25922
25923 cat >>$CONFIG_STATUS <<\_ACEOF
25924
25925 # Handling of arguments.
25926 for ac_config_target in $ac_config_targets
25927 do
25928   case $ac_config_target in
25929     "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
25930     "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
25931     "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
25932     "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
25933     "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
25934     "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
25935     "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
25936     "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
25937     "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
25938     "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
25939     "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
25940     "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
25941
25942   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25943 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25944    { (exit 1); exit 1; }; };;
25945   esac
25946 done
25947
25948
25949 # If the user did not use the arguments to specify the items to instantiate,
25950 # then the envvar interface is used.  Set only those that are not.
25951 # We use the long form for the default assignment because of an extremely
25952 # bizarre bug on SunOS 4.1.3.
25953 if $ac_need_defaults; then
25954   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25955   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25956   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
25957   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25958 fi
25959
25960 # Have a temporary directory for convenience.  Make it in the build tree
25961 # simply because there is no reason against having it here, and in addition,
25962 # creating and moving files from /tmp can sometimes cause problems.
25963 # Hook for its removal unless debugging.
25964 # Note that there is a small window in which the directory will not be cleaned:
25965 # after its creation but before its name has been assigned to `$tmp'.
25966 $debug ||
25967 {
25968   tmp=
25969   trap 'exit_status=$?
25970   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25971 ' 0
25972   trap '{ (exit 1); exit 1; }' 1 2 13 15
25973 }
25974 # Create a (secure) tmp directory for tmp files.
25975
25976 {
25977   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25978   test -n "$tmp" && test -d "$tmp"
25979 }  ||
25980 {
25981   tmp=./conf$$-$RANDOM
25982   (umask 077 && mkdir "$tmp")
25983 } ||
25984 {
25985    echo "$me: cannot create a temporary directory in ." >&2
25986    { (exit 1); exit 1; }
25987 }
25988
25989 #
25990 # Set up the sed scripts for CONFIG_FILES section.
25991 #
25992
25993 # No need to generate the scripts if there are no CONFIG_FILES.
25994 # This happens for instance when ./config.status config.h
25995 if test -n "$CONFIG_FILES"; then
25996
25997 _ACEOF
25998
25999
26000
26001 ac_delim='%!_!# '
26002 for ac_last_try in false false false false false :; do
26003   cat >conf$$subs.sed <<_ACEOF
26004 SHELL!$SHELL$ac_delim
26005 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26006 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26007 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26008 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26009 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26010 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26011 exec_prefix!$exec_prefix$ac_delim
26012 prefix!$prefix$ac_delim
26013 program_transform_name!$program_transform_name$ac_delim
26014 bindir!$bindir$ac_delim
26015 sbindir!$sbindir$ac_delim
26016 libexecdir!$libexecdir$ac_delim
26017 datarootdir!$datarootdir$ac_delim
26018 datadir!$datadir$ac_delim
26019 sysconfdir!$sysconfdir$ac_delim
26020 sharedstatedir!$sharedstatedir$ac_delim
26021 localstatedir!$localstatedir$ac_delim
26022 includedir!$includedir$ac_delim
26023 oldincludedir!$oldincludedir$ac_delim
26024 docdir!$docdir$ac_delim
26025 infodir!$infodir$ac_delim
26026 htmldir!$htmldir$ac_delim
26027 dvidir!$dvidir$ac_delim
26028 pdfdir!$pdfdir$ac_delim
26029 psdir!$psdir$ac_delim
26030 libdir!$libdir$ac_delim
26031 localedir!$localedir$ac_delim
26032 mandir!$mandir$ac_delim
26033 DEFS!$DEFS$ac_delim
26034 ECHO_C!$ECHO_C$ac_delim
26035 ECHO_N!$ECHO_N$ac_delim
26036 ECHO_T!$ECHO_T$ac_delim
26037 LIBS!$LIBS$ac_delim
26038 build_alias!$build_alias$ac_delim
26039 host_alias!$host_alias$ac_delim
26040 target_alias!$target_alias$ac_delim
26041 configure_args!$configure_args$ac_delim
26042 build!$build$ac_delim
26043 build_cpu!$build_cpu$ac_delim
26044 build_vendor!$build_vendor$ac_delim
26045 build_os!$build_os$ac_delim
26046 host!$host$ac_delim
26047 host_cpu!$host_cpu$ac_delim
26048 host_vendor!$host_vendor$ac_delim
26049 host_os!$host_os$ac_delim
26050 PORTNAME!$PORTNAME$ac_delim
26051 enable_nls!$enable_nls$ac_delim
26052 WANTED_LANGUAGES!$WANTED_LANGUAGES$ac_delim
26053 default_port!$default_port$ac_delim
26054 enable_shared!$enable_shared$ac_delim
26055 enable_rpath!$enable_rpath$ac_delim
26056 enable_debug!$enable_debug$ac_delim
26057 enable_profiling!$enable_profiling$ac_delim
26058 DTRACE!$DTRACE$ac_delim
26059 DTRACEFLAGS!$DTRACEFLAGS$ac_delim
26060 enable_dtrace!$enable_dtrace$ac_delim
26061 CC!$CC$ac_delim
26062 CFLAGS!$CFLAGS$ac_delim
26063 LDFLAGS!$LDFLAGS$ac_delim
26064 CPPFLAGS!$CPPFLAGS$ac_delim
26065 ac_ct_CC!$ac_ct_CC$ac_delim
26066 EXEEXT!$EXEEXT$ac_delim
26067 OBJEXT!$OBJEXT$ac_delim
26068 CPP!$CPP$ac_delim
26069 GCC!$GCC$ac_delim
26070 TAS!$TAS$ac_delim
26071 autodepend!$autodepend$ac_delim
26072 INCLUDES!$INCLUDES$ac_delim
26073 enable_thread_safety!$enable_thread_safety$ac_delim
26074 with_tcl!$with_tcl$ac_delim
26075 with_perl!$with_perl$ac_delim
26076 with_python!$with_python$ac_delim
26077 with_gssapi!$with_gssapi$ac_delim
26078 with_krb5!$with_krb5$ac_delim
26079 krb_srvtab!$krb_srvtab$ac_delim
26080 with_pam!$with_pam$ac_delim
26081 with_ldap!$with_ldap$ac_delim
26082 with_bonjour!$with_bonjour$ac_delim
26083 with_openssl!$with_openssl$ac_delim
26084 with_ossp_uuid!$with_ossp_uuid$ac_delim
26085 XML2_CONFIG!$XML2_CONFIG$ac_delim
26086 with_libxml!$with_libxml$ac_delim
26087 with_libxslt!$with_libxslt$ac_delim
26088 with_system_tzdata!$with_system_tzdata$ac_delim
26089 with_zlib!$with_zlib$ac_delim
26090 GREP!$GREP$ac_delim
26091 EGREP!$EGREP$ac_delim
26092 ELF_SYS!$ELF_SYS$ac_delim
26093 LDFLAGS_SL!$LDFLAGS_SL$ac_delim
26094 LD!$LD$ac_delim
26095 with_gnu_ld!$with_gnu_ld$ac_delim
26096 ld_R_works!$ld_R_works$ac_delim
26097 RANLIB!$RANLIB$ac_delim
26098 STRIP!$STRIP$ac_delim
26099 STRIP_STATIC_LIB!$STRIP_STATIC_LIB$ac_delim
26100 STRIP_SHARED_LIB!$STRIP_SHARED_LIB$ac_delim
26101 _ACEOF
26102
26103   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
26104     break
26105   elif $ac_last_try; then
26106     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26107 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26108    { (exit 1); exit 1; }; }
26109   else
26110     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26111   fi
26112 done
26113
26114 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26115 if test -n "$ac_eof"; then
26116   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26117   ac_eof=`expr $ac_eof + 1`
26118 fi
26119
26120 cat >>$CONFIG_STATUS <<_ACEOF
26121 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26122 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26123 _ACEOF
26124 sed '
26125 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26126 s/^/s,@/; s/!/@,|#_!!_#|/
26127 :n
26128 t n
26129 s/'"$ac_delim"'$/,g/; t
26130 s/$/\\/; p
26131 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26132 ' >>$CONFIG_STATUS <conf$$subs.sed
26133 rm -f conf$$subs.sed
26134 cat >>$CONFIG_STATUS <<_ACEOF
26135 CEOF$ac_eof
26136 _ACEOF
26137
26138
26139 ac_delim='%!_!# '
26140 for ac_last_try in false false false false false :; do
26141   cat >conf$$subs.sed <<_ACEOF
26142 TAR!$TAR$ac_delim
26143 LN_S!$LN_S$ac_delim
26144 AWK!$AWK$ac_delim
26145 YACC!$YACC$ac_delim
26146 YFLAGS!$YFLAGS$ac_delim
26147 FLEX!$FLEX$ac_delim
26148 FLEXFLAGS!$FLEXFLAGS$ac_delim
26149 PERL!$PERL$ac_delim
26150 perl_archlibexp!$perl_archlibexp$ac_delim
26151 perl_privlibexp!$perl_privlibexp$ac_delim
26152 perl_useshrplib!$perl_useshrplib$ac_delim
26153 perl_embed_ldflags!$perl_embed_ldflags$ac_delim
26154 PYTHON!$PYTHON$ac_delim
26155 python_version!$python_version$ac_delim
26156 python_configdir!$python_configdir$ac_delim
26157 python_includespec!$python_includespec$ac_delim
26158 python_libdir!$python_libdir$ac_delim
26159 python_libspec!$python_libspec$ac_delim
26160 python_additional_libs!$python_additional_libs$ac_delim
26161 OSSP_UUID_LIBS!$OSSP_UUID_LIBS$ac_delim
26162 HAVE_IPV6!$HAVE_IPV6$ac_delim
26163 LIBOBJS!$LIBOBJS$ac_delim
26164 acx_pthread_config!$acx_pthread_config$ac_delim
26165 PTHREAD_CC!$PTHREAD_CC$ac_delim
26166 PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim
26167 PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim
26168 LDAP_LIBS_FE!$LDAP_LIBS_FE$ac_delim
26169 LDAP_LIBS_BE!$LDAP_LIBS_BE$ac_delim
26170 HAVE_POSIX_SIGNALS!$HAVE_POSIX_SIGNALS$ac_delim
26171 MSGFMT!$MSGFMT$ac_delim
26172 MSGMERGE!$MSGMERGE$ac_delim
26173 XGETTEXT!$XGETTEXT$ac_delim
26174 TCLSH!$TCLSH$ac_delim
26175 TCL_CONFIG_SH!$TCL_CONFIG_SH$ac_delim
26176 TCL_INCLUDE_SPEC!$TCL_INCLUDE_SPEC$ac_delim
26177 TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
26178 TCL_LIBS!$TCL_LIBS$ac_delim
26179 TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
26180 TCL_SHARED_BUILD!$TCL_SHARED_BUILD$ac_delim
26181 TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
26182 NSGMLS!$NSGMLS$ac_delim
26183 JADE!$JADE$ac_delim
26184 have_docbook!$have_docbook$ac_delim
26185 DOCBOOKSTYLE!$DOCBOOKSTYLE$ac_delim
26186 COLLATEINDEX!$COLLATEINDEX$ac_delim
26187 SGMLSPL!$SGMLSPL$ac_delim
26188 vpath_build!$vpath_build$ac_delim
26189 LTLIBOBJS!$LTLIBOBJS$ac_delim
26190 _ACEOF
26191
26192   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 48; then
26193     break
26194   elif $ac_last_try; then
26195     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26196 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26197    { (exit 1); exit 1; }; }
26198   else
26199     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26200   fi
26201 done
26202
26203 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26204 if test -n "$ac_eof"; then
26205   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26206   ac_eof=`expr $ac_eof + 1`
26207 fi
26208
26209 cat >>$CONFIG_STATUS <<_ACEOF
26210 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26211 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
26212 _ACEOF
26213 sed '
26214 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26215 s/^/s,@/; s/!/@,|#_!!_#|/
26216 :n
26217 t n
26218 s/'"$ac_delim"'$/,g/; t
26219 s/$/\\/; p
26220 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26221 ' >>$CONFIG_STATUS <conf$$subs.sed
26222 rm -f conf$$subs.sed
26223 cat >>$CONFIG_STATUS <<_ACEOF
26224 :end
26225 s/|#_!!_#|//g
26226 CEOF$ac_eof
26227 _ACEOF
26228
26229
26230 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26231 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26232 # trailing colons and then remove the whole line if VPATH becomes empty
26233 # (actually we leave an empty line to preserve line numbers).
26234 if test "x$srcdir" = x.; then
26235   ac_vpsub='/^[  ]*VPATH[        ]*=/{
26236 s/:*\$(srcdir):*/:/
26237 s/:*\${srcdir}:*/:/
26238 s/:*@srcdir@:*/:/
26239 s/^\([^=]*=[     ]*\):*/\1/
26240 s/:*$//
26241 s/^[^=]*=[       ]*$//
26242 }'
26243 fi
26244
26245 cat >>$CONFIG_STATUS <<\_ACEOF
26246 fi # test -n "$CONFIG_FILES"
26247
26248
26249 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS
26250 do
26251   case $ac_tag in
26252   :[FHLC]) ac_mode=$ac_tag; continue;;
26253   esac
26254   case $ac_mode$ac_tag in
26255   :[FHL]*:*);;
26256   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26257 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
26258    { (exit 1); exit 1; }; };;
26259   :[FH]-) ac_tag=-:-;;
26260   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26261   esac
26262   ac_save_IFS=$IFS
26263   IFS=:
26264   set x $ac_tag
26265   IFS=$ac_save_IFS
26266   shift
26267   ac_file=$1
26268   shift
26269
26270   case $ac_mode in
26271   :L) ac_source=$1;;
26272   :[FH])
26273     ac_file_inputs=
26274     for ac_f
26275     do
26276       case $ac_f in
26277       -) ac_f="$tmp/stdin";;
26278       *) # Look for the file first in the build tree, then in the source tree
26279          # (if the path is not absolute).  The absolute path cannot be DOS-style,
26280          # because $ac_f cannot contain `:'.
26281          test -f "$ac_f" ||
26282            case $ac_f in
26283            [\\/$]*) false;;
26284            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26285            esac ||
26286            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26287 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
26288    { (exit 1); exit 1; }; };;
26289       esac
26290       ac_file_inputs="$ac_file_inputs $ac_f"
26291     done
26292
26293     # Let's still pretend it is `configure' which instantiates (i.e., don't
26294     # use $as_me), people would be surprised to read:
26295     #    /* config.h.  Generated by config.status.  */
26296     configure_input="Generated from "`IFS=:
26297           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
26298     if test x"$ac_file" != x-; then
26299       configure_input="$ac_file.  $configure_input"
26300       { echo "$as_me:$LINENO: creating $ac_file" >&5
26301 echo "$as_me: creating $ac_file" >&6;}
26302     fi
26303
26304     case $ac_tag in
26305     *:-:* | *:-) cat >"$tmp/stdin";;
26306     esac
26307     ;;
26308   esac
26309
26310   ac_dir=`$as_dirname -- "$ac_file" ||
26311 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26312          X"$ac_file" : 'X\(//\)[^/]' \| \
26313          X"$ac_file" : 'X\(//\)$' \| \
26314          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26315 echo X"$ac_file" |
26316     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26317             s//\1/
26318             q
26319           }
26320           /^X\(\/\/\)[^/].*/{
26321             s//\1/
26322             q
26323           }
26324           /^X\(\/\/\)$/{
26325             s//\1/
26326             q
26327           }
26328           /^X\(\/\).*/{
26329             s//\1/
26330             q
26331           }
26332           s/.*/./; q'`
26333   { as_dir="$ac_dir"
26334   case $as_dir in #(
26335   -*) as_dir=./$as_dir;;
26336   esac
26337   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
26338     as_dirs=
26339     while :; do
26340       case $as_dir in #(
26341       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
26342       *) as_qdir=$as_dir;;
26343       esac
26344       as_dirs="'$as_qdir' $as_dirs"
26345       as_dir=`$as_dirname -- "$as_dir" ||
26346 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26347          X"$as_dir" : 'X\(//\)[^/]' \| \
26348          X"$as_dir" : 'X\(//\)$' \| \
26349          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
26350 echo X"$as_dir" |
26351     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26352             s//\1/
26353             q
26354           }
26355           /^X\(\/\/\)[^/].*/{
26356             s//\1/
26357             q
26358           }
26359           /^X\(\/\/\)$/{
26360             s//\1/
26361             q
26362           }
26363           /^X\(\/\).*/{
26364             s//\1/
26365             q
26366           }
26367           s/.*/./; q'`
26368       test -d "$as_dir" && break
26369     done
26370     test -z "$as_dirs" || eval "mkdir $as_dirs"
26371   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26372 echo "$as_me: error: cannot create directory $as_dir" >&2;}
26373    { (exit 1); exit 1; }; }; }
26374   ac_builddir=.
26375
26376 case "$ac_dir" in
26377 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26378 *)
26379   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
26380   # A ".." for each directory in $ac_dir_suffix.
26381   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
26382   case $ac_top_builddir_sub in
26383   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26384   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26385   esac ;;
26386 esac
26387 ac_abs_top_builddir=$ac_pwd
26388 ac_abs_builddir=$ac_pwd$ac_dir_suffix
26389 # for backward compatibility:
26390 ac_top_builddir=$ac_top_build_prefix
26391
26392 case $srcdir in
26393   .)  # We are building in place.
26394     ac_srcdir=.
26395     ac_top_srcdir=$ac_top_builddir_sub
26396     ac_abs_top_srcdir=$ac_pwd ;;
26397   [\\/]* | ?:[\\/]* )  # Absolute name.
26398     ac_srcdir=$srcdir$ac_dir_suffix;
26399     ac_top_srcdir=$srcdir
26400     ac_abs_top_srcdir=$srcdir ;;
26401   *) # Relative name.
26402     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26403     ac_top_srcdir=$ac_top_build_prefix$srcdir
26404     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
26405 esac
26406 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
26407
26408
26409   case $ac_mode in
26410   :F)
26411   #
26412   # CONFIG_FILE
26413   #
26414
26415 _ACEOF
26416
26417 cat >>$CONFIG_STATUS <<\_ACEOF
26418 # If the template does not know about datarootdir, expand it.
26419 # FIXME: This hack should be removed a few years after 2.60.
26420 ac_datarootdir_hack=; ac_datarootdir_seen=
26421
26422 case `sed -n '/datarootdir/ {
26423   p
26424   q
26425 }
26426 /@datadir@/p
26427 /@docdir@/p
26428 /@infodir@/p
26429 /@localedir@/p
26430 /@mandir@/p
26431 ' $ac_file_inputs` in
26432 *datarootdir*) ac_datarootdir_seen=yes;;
26433 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26434   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26435 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26436 _ACEOF
26437 cat >>$CONFIG_STATUS <<_ACEOF
26438   ac_datarootdir_hack='
26439   s&@datadir@&$datadir&g
26440   s&@docdir@&$docdir&g
26441   s&@infodir@&$infodir&g
26442   s&@localedir@&$localedir&g
26443   s&@mandir@&$mandir&g
26444     s&\\\${datarootdir}&$datarootdir&g' ;;
26445 esac
26446 _ACEOF
26447
26448 # Neutralize VPATH when `$srcdir' = `.'.
26449 # Shell code in configure.ac might set extrasub.
26450 # FIXME: do we really want to maintain this feature?
26451 cat >>$CONFIG_STATUS <<_ACEOF
26452   sed "$ac_vpsub
26453 $extrasub
26454 _ACEOF
26455 cat >>$CONFIG_STATUS <<\_ACEOF
26456 :t
26457 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26458 s&@configure_input@&$configure_input&;t t
26459 s&@top_builddir@&$ac_top_builddir_sub&;t t
26460 s&@srcdir@&$ac_srcdir&;t t
26461 s&@abs_srcdir@&$ac_abs_srcdir&;t t
26462 s&@top_srcdir@&$ac_top_srcdir&;t t
26463 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26464 s&@builddir@&$ac_builddir&;t t
26465 s&@abs_builddir@&$ac_abs_builddir&;t t
26466 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26467 $ac_datarootdir_hack
26468 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
26469
26470 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26471   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26472   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26473   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26474 which seems to be undefined.  Please make sure it is defined." >&5
26475 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26476 which seems to be undefined.  Please make sure it is defined." >&2;}
26477
26478   rm -f "$tmp/stdin"
26479   case $ac_file in
26480   -) cat "$tmp/out"; rm -f "$tmp/out";;
26481   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
26482   esac
26483  ;;
26484   :H)
26485   #
26486   # CONFIG_HEADER
26487   #
26488 _ACEOF
26489
26490 # Transform confdefs.h into a sed script `conftest.defines', that
26491 # substitutes the proper values into config.h.in to produce config.h.
26492 rm -f conftest.defines conftest.tail
26493 # First, append a space to every undef/define line, to ease matching.
26494 echo 's/$/ /' >conftest.defines
26495 # Then, protect against being on the right side of a sed subst, or in
26496 # an unquoted here document, in config.status.  If some macros were
26497 # called several times there might be several #defines for the same
26498 # symbol, which is useless.  But do not sort them, since the last
26499 # AC_DEFINE must be honored.
26500 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26501 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26502 # NAME is the cpp macro being defined, VALUE is the value it is being given.
26503 # PARAMS is the parameter list in the macro definition--in most cases, it's
26504 # just an empty string.
26505 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
26506 ac_dB='\\)[      (].*,\\1define\\2'
26507 ac_dC=' '
26508 ac_dD=' ,'
26509
26510 uniq confdefs.h |
26511   sed -n '
26512         t rset
26513         :rset
26514         s/^[     ]*#[    ]*define[       ][      ]*//
26515         t ok
26516         d
26517         :ok
26518         s/[\\&,]/\\&/g
26519         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26520         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26521   ' >>conftest.defines
26522
26523 # Remove the space that was appended to ease matching.
26524 # Then replace #undef with comments.  This is necessary, for
26525 # example, in the case of _POSIX_SOURCE, which is predefined and required
26526 # on some systems where configure will not decide to define it.
26527 # (The regexp can be short, since the line contains either #define or #undef.)
26528 echo 's/ $//
26529 s,^[     #]*u.*,/* & */,' >>conftest.defines
26530
26531 # Break up conftest.defines:
26532 ac_max_sed_lines=50
26533
26534 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26535 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26536 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26537 # et cetera.
26538 ac_in='$ac_file_inputs'
26539 ac_out='"$tmp/out1"'
26540 ac_nxt='"$tmp/out2"'
26541
26542 while :
26543 do
26544   # Write a here document:
26545     cat >>$CONFIG_STATUS <<_ACEOF
26546     # First, check the format of the line:
26547     cat >"\$tmp/defines.sed" <<\\CEOF
26548 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
26549 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
26550 b
26551 :def
26552 _ACEOF
26553   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
26554   echo 'CEOF
26555     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26556   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26557   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26558   grep . conftest.tail >/dev/null || break
26559   rm -f conftest.defines
26560   mv conftest.tail conftest.defines
26561 done
26562 rm -f conftest.defines conftest.tail
26563
26564 echo "ac_result=$ac_in" >>$CONFIG_STATUS
26565 cat >>$CONFIG_STATUS <<\_ACEOF
26566   if test x"$ac_file" != x-; then
26567     echo "/* $configure_input  */" >"$tmp/config.h"
26568     cat "$ac_result" >>"$tmp/config.h"
26569     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
26570       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26571 echo "$as_me: $ac_file is unchanged" >&6;}
26572     else
26573       rm -f $ac_file
26574       mv "$tmp/config.h" $ac_file
26575     fi
26576   else
26577     echo "/* $configure_input  */"
26578     cat "$ac_result"
26579   fi
26580   rm -f "$tmp/out12"
26581  ;;
26582   :L)
26583   #
26584   # CONFIG_LINK
26585   #
26586
26587   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_file" >&5
26588 echo "$as_me: linking $srcdir/$ac_source to $ac_file" >&6;}
26589
26590   if test ! -r "$srcdir/$ac_source"; then
26591     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
26592 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
26593    { (exit 1); exit 1; }; }
26594   fi
26595   rm -f "$ac_file"
26596
26597   # Try a relative symlink, then a hard link, then a copy.
26598   case $srcdir in
26599   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
26600       *) ac_rel_source=$ac_top_build_prefix$srcdir/$ac_source ;;
26601   esac
26602   ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
26603     ln "$srcdir/$ac_source" "$ac_file" 2>/dev/null ||
26604     cp -p "$srcdir/$ac_source" "$ac_file" ||
26605     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_file" >&5
26606 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_file" >&2;}
26607    { (exit 1); exit 1; }; }
26608  ;;
26609   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
26610 echo "$as_me: executing $ac_file commands" >&6;}
26611  ;;
26612   esac
26613
26614
26615   case $ac_file$ac_mode in
26616     "check_win32_symlinks":C)
26617 # Links sometimes fail undetected on Mingw -
26618 # so here we detect it and warn the user
26619 for FILE in $CONFIG_LINKS
26620  do
26621         # test -e works for symlinks in the MinGW console
26622         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
26623 echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
26624  done
26625  ;;
26626     "src/include/pg_config.h":H)
26627 # Update timestamp for pg_config.h (see Makefile.global)
26628 echo >src/include/stamp-h
26629  ;;
26630
26631   esac
26632 done # for ac_tag
26633
26634
26635 { (exit 0); exit 0; }
26636 _ACEOF
26637 chmod +x $CONFIG_STATUS
26638 ac_clean_files=$ac_clean_files_save
26639
26640
26641 # configure is writing to config.log, and then calls config.status.
26642 # config.status does its own redirection, appending to config.log.
26643 # Unfortunately, on DOS this fails, as config.log is still kept open
26644 # by configure, so config.status won't be able to write to it; its
26645 # output is simply discarded.  So we exec the FD to /dev/null,
26646 # effectively closing config.log, so it can be properly (re)opened and
26647 # appended to by config.status.  When coming back to configure, we
26648 # need to make the FD available again.
26649 if test "$no_create" != yes; then
26650   ac_cs_success=:
26651   ac_config_status_args=
26652   test "$silent" = yes &&
26653     ac_config_status_args="$ac_config_status_args --quiet"
26654   exec 5>/dev/null
26655   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26656   exec 5>>config.log
26657   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26658   # would make configure fail if this is the last instruction.
26659   $ac_cs_success || { (exit 1); exit 1; }
26660 fi
26661
26662
26663 # Warn about unknown options
26664 for pgac_var in `set | sed 's/=.*//' | $EGREP 'with_|enable_'`; do
26665   for pgac_arg in $pgac_args with_gnu_ld; do
26666     if test "$pgac_var" = "$pgac_arg"; then
26667       continue 2
26668     fi
26669   done
26670   pgac_txt=`echo $pgac_var | sed 's/_/-/g'`
26671   { echo "$as_me:$LINENO: WARNING: option ignored: --$pgac_txt" >&5
26672 echo "$as_me: WARNING: option ignored: --$pgac_txt" >&2;}
26673 done