]> granicus.if.org Git - postgresql/blob - configure
2b9f6690454dff8b9fb6f02dd4b1545fa91d4966
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59 for PostgreSQL 8.2devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 # Copyright (C) 2003 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 #
11 # Copyright (c) 1996-2005, PostgreSQL Global Development Group
12 ## --------------------- ##
13 ## M4sh Initialization.  ##
14 ## --------------------- ##
15
16 # Be Bourne compatible
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18   emulate sh
19   NULLCMD=:
20   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24   set -o posix
25 fi
26 DUALCASE=1; export DUALCASE # for MKS sh
27
28 # Support unset when possible.
29 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30   as_unset=unset
31 else
32   as_unset=false
33 fi
34
35
36 # Work around bugs in pre-3.0 UWIN ksh.
37 $as_unset ENV MAIL MAILPATH
38 PS1='$ '
39 PS2='> '
40 PS4='+ '
41
42 # NLS nuisances.
43 for as_var in \
44   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
46   LC_TELEPHONE LC_TIME
47 do
48   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
49     eval $as_var=C; export $as_var
50   else
51     $as_unset $as_var
52   fi
53 done
54
55 # Required to use basename.
56 if expr a : '\(a\)' >/dev/null 2>&1; then
57   as_expr=expr
58 else
59   as_expr=false
60 fi
61
62 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
63   as_basename=basename
64 else
65   as_basename=false
66 fi
67
68
69 # Name of the executable.
70 as_me=`$as_basename "$0" ||
71 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
72          X"$0" : 'X\(//\)$' \| \
73          X"$0" : 'X\(/\)$' \| \
74          .     : '\(.\)' 2>/dev/null ||
75 echo X/"$0" |
76     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
77           /^X\/\(\/\/\)$/{ s//\1/; q; }
78           /^X\/\(\/\).*/{ s//\1/; q; }
79           s/.*/./; q'`
80
81
82 # PATH needs CR, and LINENO needs CR and PATH.
83 # Avoid depending upon Character Ranges.
84 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
85 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
86 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
87 as_cr_digits='0123456789'
88 as_cr_alnum=$as_cr_Letters$as_cr_digits
89
90 # The user is always right.
91 if test "${PATH_SEPARATOR+set}" != set; then
92   echo "#! /bin/sh" >conf$$.sh
93   echo  "exit 0"   >>conf$$.sh
94   chmod +x conf$$.sh
95   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
96     PATH_SEPARATOR=';'
97   else
98     PATH_SEPARATOR=:
99   fi
100   rm -f conf$$.sh
101 fi
102
103
104   as_lineno_1=$LINENO
105   as_lineno_2=$LINENO
106   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
107   test "x$as_lineno_1" != "x$as_lineno_2" &&
108   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
109   # Find who we are.  Look in the path if we contain no path at all
110   # relative or not.
111   case $0 in
112     *[\\/]* ) as_myself=$0 ;;
113     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
114 for as_dir in $PATH
115 do
116   IFS=$as_save_IFS
117   test -z "$as_dir" && as_dir=.
118   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
119 done
120
121        ;;
122   esac
123   # We did not find ourselves, most probably we were run as `sh COMMAND'
124   # in which case we are not to be found in the path.
125   if test "x$as_myself" = x; then
126     as_myself=$0
127   fi
128   if test ! -f "$as_myself"; then
129     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
130    { (exit 1); exit 1; }; }
131   fi
132   case $CONFIG_SHELL in
133   '')
134     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
135 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
136 do
137   IFS=$as_save_IFS
138   test -z "$as_dir" && as_dir=.
139   for as_base in sh bash ksh sh5; do
140          case $as_dir in
141          /*)
142            if ("$as_dir/$as_base" -c '
143   as_lineno_1=$LINENO
144   as_lineno_2=$LINENO
145   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
146   test "x$as_lineno_1" != "x$as_lineno_2" &&
147   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
148              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
149              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
150              CONFIG_SHELL=$as_dir/$as_base
151              export CONFIG_SHELL
152              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
153            fi;;
154          esac
155        done
156 done
157 ;;
158   esac
159
160   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
161   # uniformly replaced by the line number.  The first 'sed' inserts a
162   # line-number line before each line; the second 'sed' does the real
163   # work.  The second script uses 'N' to pair each line-number line
164   # with the numbered line, and appends trailing '-' during
165   # substitution so that $LINENO is not a special case at line end.
166   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
167   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
168   sed '=' <$as_myself |
169     sed '
170       N
171       s,$,-,
172       : loop
173       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
174       t loop
175       s,-$,,
176       s,^['$as_cr_digits']*\n,,
177     ' >$as_me.lineno &&
178   chmod +x $as_me.lineno ||
179     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
180    { (exit 1); exit 1; }; }
181
182   # Don't try to exec as it changes $[0], causing all sort of problems
183   # (the dirname of $[0] is not the place where we might find the
184   # original and so on.  Autoconf is especially sensible to this).
185   . ./$as_me.lineno
186   # Exit status is that of the last command.
187   exit
188 }
189
190
191 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
192   *c*,-n*) ECHO_N= ECHO_C='
193 ' ECHO_T='      ' ;;
194   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
195   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
196 esac
197
198 if expr a : '\(a\)' >/dev/null 2>&1; then
199   as_expr=expr
200 else
201   as_expr=false
202 fi
203
204 rm -f conf$$ conf$$.exe conf$$.file
205 echo >conf$$.file
206 if ln -s conf$$.file conf$$ 2>/dev/null; then
207   # We could just check for DJGPP; but this test a) works b) is more generic
208   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
209   if test -f conf$$.exe; then
210     # Don't use ln at all; we don't have any links
211     as_ln_s='cp -p'
212   else
213     as_ln_s='ln -s'
214   fi
215 elif ln conf$$.file conf$$ 2>/dev/null; then
216   as_ln_s=ln
217 else
218   as_ln_s='cp -p'
219 fi
220 rm -f conf$$ conf$$.exe conf$$.file
221
222 if mkdir -p . 2>/dev/null; then
223   as_mkdir_p=:
224 else
225   test -d ./-p && rmdir ./-p
226   as_mkdir_p=false
227 fi
228
229 as_executable_p="test -f"
230
231 # Sed expression to map a string onto a valid CPP name.
232 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
233
234 # Sed expression to map a string onto a valid variable name.
235 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
236
237
238 # IFS
239 # We need space, tab and new line, in precisely that order.
240 as_nl='
241 '
242 IFS="   $as_nl"
243
244 # CDPATH.
245 $as_unset CDPATH
246
247
248 # Name of the host.
249 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
250 # so uname gets run too.
251 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
252
253 exec 6>&1
254
255 #
256 # Initializations.
257 #
258 ac_default_prefix=/usr/local
259 ac_config_libobj_dir=.
260 cross_compiling=no
261 subdirs=
262 MFLAGS=
263 MAKEFLAGS=
264 SHELL=${CONFIG_SHELL-/bin/sh}
265
266 # Maximum number of lines to put in a shell here document.
267 # This variable seems obsolete.  It should probably be removed, and
268 # only ac_max_sed_lines should be used.
269 : ${ac_max_here_lines=38}
270
271 # Identity of this package.
272 PACKAGE_NAME='PostgreSQL'
273 PACKAGE_TARNAME='postgresql'
274 PACKAGE_VERSION='8.2devel'
275 PACKAGE_STRING='PostgreSQL 8.2devel'
276 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
277
278 ac_unique_file="src/backend/access/common/heaptuple.c"
279 ac_default_prefix=/usr/local/pgsql
280 # Factoring default headers for most tests.
281 ac_includes_default="\
282 #include <stdio.h>
283 #if HAVE_SYS_TYPES_H
284 # include <sys/types.h>
285 #endif
286 #if HAVE_SYS_STAT_H
287 # include <sys/stat.h>
288 #endif
289 #if STDC_HEADERS
290 # include <stdlib.h>
291 # include <stddef.h>
292 #else
293 # if HAVE_STDLIB_H
294 #  include <stdlib.h>
295 # endif
296 #endif
297 #if HAVE_STRING_H
298 # if !STDC_HEADERS && HAVE_MEMORY_H
299 #  include <memory.h>
300 # endif
301 # include <string.h>
302 #endif
303 #if HAVE_STRINGS_H
304 # include <strings.h>
305 #endif
306 #if HAVE_INTTYPES_H
307 # include <inttypes.h>
308 #else
309 # if HAVE_STDINT_H
310 #  include <stdint.h>
311 # endif
312 #endif
313 #if HAVE_UNISTD_H
314 # include <unistd.h>
315 #endif"
316
317 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_bonjour with_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB LORDER TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
318 ac_subst_files=''
319
320 # Initialize some variables set by options.
321 ac_init_help=
322 ac_init_version=false
323 # The variables have the same names as the options, with
324 # dashes changed to underlines.
325 cache_file=/dev/null
326 exec_prefix=NONE
327 no_create=
328 no_recursion=
329 prefix=NONE
330 program_prefix=NONE
331 program_suffix=NONE
332 program_transform_name=s,x,x,
333 silent=
334 site=
335 srcdir=
336 verbose=
337 x_includes=NONE
338 x_libraries=NONE
339
340 # Installation directory options.
341 # These are left unexpanded so users can "make install exec_prefix=/foo"
342 # and all the variables that are supposed to be based on exec_prefix
343 # by default will actually change.
344 # Use braces instead of parens because sh, perl, etc. also accept them.
345 bindir='${exec_prefix}/bin'
346 sbindir='${exec_prefix}/sbin'
347 libexecdir='${exec_prefix}/libexec'
348 datadir='${prefix}/share'
349 sysconfdir='${prefix}/etc'
350 sharedstatedir='${prefix}/com'
351 localstatedir='${prefix}/var'
352 libdir='${exec_prefix}/lib'
353 includedir='${prefix}/include'
354 oldincludedir='/usr/include'
355 infodir='${prefix}/info'
356 mandir='${prefix}/man'
357
358 ac_prev=
359 for ac_option
360 do
361   # If the previous option needs an argument, assign it.
362   if test -n "$ac_prev"; then
363     eval "$ac_prev=\$ac_option"
364     ac_prev=
365     continue
366   fi
367
368   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
369
370   # Accept the important Cygnus configure options, so we can diagnose typos.
371
372   case $ac_option in
373
374   -bindir | --bindir | --bindi | --bind | --bin | --bi)
375     ac_prev=bindir ;;
376   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
377     bindir=$ac_optarg ;;
378
379   -build | --build | --buil | --bui | --bu)
380     ac_prev=build_alias ;;
381   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
382     build_alias=$ac_optarg ;;
383
384   -cache-file | --cache-file | --cache-fil | --cache-fi \
385   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
386     ac_prev=cache_file ;;
387   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
388   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
389     cache_file=$ac_optarg ;;
390
391   --config-cache | -C)
392     cache_file=config.cache ;;
393
394   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
395     ac_prev=datadir ;;
396   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
397   | --da=*)
398     datadir=$ac_optarg ;;
399
400   -disable-* | --disable-*)
401     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
402     # Reject names that are not valid shell variable names.
403     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
405    { (exit 1); exit 1; }; }
406     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
407     eval "enable_$ac_feature=no" ;;
408
409   -enable-* | --enable-*)
410     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
411     # Reject names that are not valid shell variable names.
412     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
413       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
414    { (exit 1); exit 1; }; }
415     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
416     case $ac_option in
417       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
418       *) ac_optarg=yes ;;
419     esac
420     eval "enable_$ac_feature='$ac_optarg'" ;;
421
422   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
423   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
424   | --exec | --exe | --ex)
425     ac_prev=exec_prefix ;;
426   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
427   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
428   | --exec=* | --exe=* | --ex=*)
429     exec_prefix=$ac_optarg ;;
430
431   -gas | --gas | --ga | --g)
432     # Obsolete; use --with-gas.
433     with_gas=yes ;;
434
435   -help | --help | --hel | --he | -h)
436     ac_init_help=long ;;
437   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
438     ac_init_help=recursive ;;
439   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
440     ac_init_help=short ;;
441
442   -host | --host | --hos | --ho)
443     ac_prev=host_alias ;;
444   -host=* | --host=* | --hos=* | --ho=*)
445     host_alias=$ac_optarg ;;
446
447   -includedir | --includedir | --includedi | --included | --include \
448   | --includ | --inclu | --incl | --inc)
449     ac_prev=includedir ;;
450   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
451   | --includ=* | --inclu=* | --incl=* | --inc=*)
452     includedir=$ac_optarg ;;
453
454   -infodir | --infodir | --infodi | --infod | --info | --inf)
455     ac_prev=infodir ;;
456   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
457     infodir=$ac_optarg ;;
458
459   -libdir | --libdir | --libdi | --libd)
460     ac_prev=libdir ;;
461   -libdir=* | --libdir=* | --libdi=* | --libd=*)
462     libdir=$ac_optarg ;;
463
464   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
465   | --libexe | --libex | --libe)
466     ac_prev=libexecdir ;;
467   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
468   | --libexe=* | --libex=* | --libe=*)
469     libexecdir=$ac_optarg ;;
470
471   -localstatedir | --localstatedir | --localstatedi | --localstated \
472   | --localstate | --localstat | --localsta | --localst \
473   | --locals | --local | --loca | --loc | --lo)
474     ac_prev=localstatedir ;;
475   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
476   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
477   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
478     localstatedir=$ac_optarg ;;
479
480   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
481     ac_prev=mandir ;;
482   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
483     mandir=$ac_optarg ;;
484
485   -nfp | --nfp | --nf)
486     # Obsolete; use --without-fp.
487     with_fp=no ;;
488
489   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
490   | --no-cr | --no-c | -n)
491     no_create=yes ;;
492
493   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
494   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
495     no_recursion=yes ;;
496
497   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
498   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
499   | --oldin | --oldi | --old | --ol | --o)
500     ac_prev=oldincludedir ;;
501   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
502   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
503   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
504     oldincludedir=$ac_optarg ;;
505
506   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
507     ac_prev=prefix ;;
508   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
509     prefix=$ac_optarg ;;
510
511   -program-prefix | --program-prefix | --program-prefi | --program-pref \
512   | --program-pre | --program-pr | --program-p)
513     ac_prev=program_prefix ;;
514   -program-prefix=* | --program-prefix=* | --program-prefi=* \
515   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
516     program_prefix=$ac_optarg ;;
517
518   -program-suffix | --program-suffix | --program-suffi | --program-suff \
519   | --program-suf | --program-su | --program-s)
520     ac_prev=program_suffix ;;
521   -program-suffix=* | --program-suffix=* | --program-suffi=* \
522   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
523     program_suffix=$ac_optarg ;;
524
525   -program-transform-name | --program-transform-name \
526   | --program-transform-nam | --program-transform-na \
527   | --program-transform-n | --program-transform- \
528   | --program-transform | --program-transfor \
529   | --program-transfo | --program-transf \
530   | --program-trans | --program-tran \
531   | --progr-tra | --program-tr | --program-t)
532     ac_prev=program_transform_name ;;
533   -program-transform-name=* | --program-transform-name=* \
534   | --program-transform-nam=* | --program-transform-na=* \
535   | --program-transform-n=* | --program-transform-=* \
536   | --program-transform=* | --program-transfor=* \
537   | --program-transfo=* | --program-transf=* \
538   | --program-trans=* | --program-tran=* \
539   | --progr-tra=* | --program-tr=* | --program-t=*)
540     program_transform_name=$ac_optarg ;;
541
542   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
543   | -silent | --silent | --silen | --sile | --sil)
544     silent=yes ;;
545
546   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
547     ac_prev=sbindir ;;
548   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
549   | --sbi=* | --sb=*)
550     sbindir=$ac_optarg ;;
551
552   -sharedstatedir | --sharedstatedir | --sharedstatedi \
553   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
554   | --sharedst | --shareds | --shared | --share | --shar \
555   | --sha | --sh)
556     ac_prev=sharedstatedir ;;
557   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
558   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
559   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
560   | --sha=* | --sh=*)
561     sharedstatedir=$ac_optarg ;;
562
563   -site | --site | --sit)
564     ac_prev=site ;;
565   -site=* | --site=* | --sit=*)
566     site=$ac_optarg ;;
567
568   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
569     ac_prev=srcdir ;;
570   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
571     srcdir=$ac_optarg ;;
572
573   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
574   | --syscon | --sysco | --sysc | --sys | --sy)
575     ac_prev=sysconfdir ;;
576   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
577   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
578     sysconfdir=$ac_optarg ;;
579
580   -target | --target | --targe | --targ | --tar | --ta | --t)
581     ac_prev=target_alias ;;
582   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
583     target_alias=$ac_optarg ;;
584
585   -v | -verbose | --verbose | --verbos | --verbo | --verb)
586     verbose=yes ;;
587
588   -version | --version | --versio | --versi | --vers | -V)
589     ac_init_version=: ;;
590
591   -with-* | --with-*)
592     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
593     # Reject names that are not valid shell variable names.
594     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
595       { echo "$as_me: error: invalid package name: $ac_package" >&2
596    { (exit 1); exit 1; }; }
597     ac_package=`echo $ac_package| sed 's/-/_/g'`
598     case $ac_option in
599       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
600       *) ac_optarg=yes ;;
601     esac
602     eval "with_$ac_package='$ac_optarg'" ;;
603
604   -without-* | --without-*)
605     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
606     # Reject names that are not valid shell variable names.
607     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
608       { echo "$as_me: error: invalid package name: $ac_package" >&2
609    { (exit 1); exit 1; }; }
610     ac_package=`echo $ac_package | sed 's/-/_/g'`
611     eval "with_$ac_package=no" ;;
612
613   --x)
614     # Obsolete; use --with-x.
615     with_x=yes ;;
616
617   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
618   | --x-incl | --x-inc | --x-in | --x-i)
619     ac_prev=x_includes ;;
620   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
621   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
622     x_includes=$ac_optarg ;;
623
624   -x-libraries | --x-libraries | --x-librarie | --x-librari \
625   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
626     ac_prev=x_libraries ;;
627   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
628   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
629     x_libraries=$ac_optarg ;;
630
631   -*) { echo "$as_me: error: unrecognized option: $ac_option
632 Try \`$0 --help' for more information." >&2
633    { (exit 1); exit 1; }; }
634     ;;
635
636   *=*)
637     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
638     # Reject names that are not valid shell variable names.
639     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
640       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
641    { (exit 1); exit 1; }; }
642     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
643     eval "$ac_envvar='$ac_optarg'"
644     export $ac_envvar ;;
645
646   *)
647     # FIXME: should be removed in autoconf 3.0.
648     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
649     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
650       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
651     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
652     ;;
653
654   esac
655 done
656
657 if test -n "$ac_prev"; then
658   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
659   { echo "$as_me: error: missing argument to $ac_option" >&2
660    { (exit 1); exit 1; }; }
661 fi
662
663 # Be sure to have absolute paths.
664 for ac_var in exec_prefix prefix
665 do
666   eval ac_val=$`echo $ac_var`
667   case $ac_val in
668     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
669     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
670    { (exit 1); exit 1; }; };;
671   esac
672 done
673
674 # Be sure to have absolute paths.
675 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
676               localstatedir libdir includedir oldincludedir infodir mandir
677 do
678   eval ac_val=$`echo $ac_var`
679   case $ac_val in
680     [\\/$]* | ?:[\\/]* ) ;;
681     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
682    { (exit 1); exit 1; }; };;
683   esac
684 done
685
686 # There might be people who depend on the old broken behavior: `$host'
687 # used to hold the argument of --host etc.
688 # FIXME: To remove some day.
689 build=$build_alias
690 host=$host_alias
691 target=$target_alias
692
693 # FIXME: To remove some day.
694 if test "x$host_alias" != x; then
695   if test "x$build_alias" = x; then
696     cross_compiling=maybe
697     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
698     If a cross compiler is detected then cross compile mode will be used." >&2
699   elif test "x$build_alias" != "x$host_alias"; then
700     cross_compiling=yes
701   fi
702 fi
703
704 ac_tool_prefix=
705 test -n "$host_alias" && ac_tool_prefix=$host_alias-
706
707 test "$silent" = yes && exec 6>/dev/null
708
709
710 # Find the source files, if location was not specified.
711 if test -z "$srcdir"; then
712   ac_srcdir_defaulted=yes
713   # Try the directory containing this script, then its parent.
714   ac_confdir=`(dirname "$0") 2>/dev/null ||
715 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
716          X"$0" : 'X\(//\)[^/]' \| \
717          X"$0" : 'X\(//\)$' \| \
718          X"$0" : 'X\(/\)' \| \
719          .     : '\(.\)' 2>/dev/null ||
720 echo X"$0" |
721     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
722           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
723           /^X\(\/\/\)$/{ s//\1/; q; }
724           /^X\(\/\).*/{ s//\1/; q; }
725           s/.*/./; q'`
726   srcdir=$ac_confdir
727   if test ! -r $srcdir/$ac_unique_file; then
728     srcdir=..
729   fi
730 else
731   ac_srcdir_defaulted=no
732 fi
733 if test ! -r $srcdir/$ac_unique_file; then
734   if test "$ac_srcdir_defaulted" = yes; then
735     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
736    { (exit 1); exit 1; }; }
737   else
738     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
739    { (exit 1); exit 1; }; }
740   fi
741 fi
742 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
743   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
744    { (exit 1); exit 1; }; }
745 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
746 ac_env_build_alias_set=${build_alias+set}
747 ac_env_build_alias_value=$build_alias
748 ac_cv_env_build_alias_set=${build_alias+set}
749 ac_cv_env_build_alias_value=$build_alias
750 ac_env_host_alias_set=${host_alias+set}
751 ac_env_host_alias_value=$host_alias
752 ac_cv_env_host_alias_set=${host_alias+set}
753 ac_cv_env_host_alias_value=$host_alias
754 ac_env_target_alias_set=${target_alias+set}
755 ac_env_target_alias_value=$target_alias
756 ac_cv_env_target_alias_set=${target_alias+set}
757 ac_cv_env_target_alias_value=$target_alias
758 ac_env_CC_set=${CC+set}
759 ac_env_CC_value=$CC
760 ac_cv_env_CC_set=${CC+set}
761 ac_cv_env_CC_value=$CC
762 ac_env_CFLAGS_set=${CFLAGS+set}
763 ac_env_CFLAGS_value=$CFLAGS
764 ac_cv_env_CFLAGS_set=${CFLAGS+set}
765 ac_cv_env_CFLAGS_value=$CFLAGS
766 ac_env_LDFLAGS_set=${LDFLAGS+set}
767 ac_env_LDFLAGS_value=$LDFLAGS
768 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
769 ac_cv_env_LDFLAGS_value=$LDFLAGS
770 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
771 ac_env_CPPFLAGS_value=$CPPFLAGS
772 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
773 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
774 ac_env_CPP_set=${CPP+set}
775 ac_env_CPP_value=$CPP
776 ac_cv_env_CPP_set=${CPP+set}
777 ac_cv_env_CPP_value=$CPP
778 ac_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
779 ac_env_LDFLAGS_SL_value=$LDFLAGS_SL
780 ac_cv_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
781 ac_cv_env_LDFLAGS_SL_value=$LDFLAGS_SL
782 ac_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
783 ac_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
784 ac_cv_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
785 ac_cv_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
786
787 #
788 # Report the --help message.
789 #
790 if test "$ac_init_help" = "long"; then
791   # Omit some internal or obsolete options to make the list less imposing.
792   # This message is too long to be a string in the A/UX 3.1 sh.
793   cat <<_ACEOF
794 \`configure' configures PostgreSQL 8.2devel to adapt to many kinds of systems.
795
796 Usage: $0 [OPTION]... [VAR=VALUE]...
797
798 To assign environment variables (e.g., CC, CFLAGS...), specify them as
799 VAR=VALUE.  See below for descriptions of some of the useful variables.
800
801 Defaults for the options are specified in brackets.
802
803 Configuration:
804   -h, --help              display this help and exit
805       --help=short        display options specific to this package
806       --help=recursive    display the short help of all the included packages
807   -V, --version           display version information and exit
808   -q, --quiet, --silent   do not print \`checking...' messages
809       --cache-file=FILE   cache test results in FILE [disabled]
810   -C, --config-cache      alias for \`--cache-file=config.cache'
811   -n, --no-create         do not create output files
812       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
813
814 _ACEOF
815
816   cat <<_ACEOF
817 Installation directories:
818   --prefix=PREFIX         install architecture-independent files in PREFIX
819                           [$ac_default_prefix]
820   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
821                           [PREFIX]
822
823 By default, \`make install' will install all the files in
824 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
825 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
826 for instance \`--prefix=\$HOME'.
827
828 For better control, use the options below.
829
830 Fine tuning of the installation directories:
831   --bindir=DIR           user executables [EPREFIX/bin]
832   --sbindir=DIR          system admin executables [EPREFIX/sbin]
833   --libexecdir=DIR       program executables [EPREFIX/libexec]
834   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
835   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
836   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
837   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
838   --libdir=DIR           object code libraries [EPREFIX/lib]
839   --includedir=DIR       C header files [PREFIX/include]
840   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
841   --infodir=DIR          info documentation [PREFIX/info]
842   --mandir=DIR           man documentation [PREFIX/man]
843 _ACEOF
844
845   cat <<\_ACEOF
846
847 System types:
848   --build=BUILD     configure for building on BUILD [guessed]
849   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
850 _ACEOF
851 fi
852
853 if test -n "$ac_init_help"; then
854   case $ac_init_help in
855      short | recursive ) echo "Configuration of PostgreSQL 8.2devel:";;
856    esac
857   cat <<\_ACEOF
858
859 Optional Features:
860   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
861   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
862   --enable-integer-datetimes  enable 64-bit integer date/time support
863   --enable-nls[=LANGUAGES]  enable Native Language Support
864   --disable-shared        do not build shared libraries
865   --disable-rpath         do not embed shared library search path in executables
866   --disable-spinlocks     do not use spinlocks
867   --enable-debug          build with debugging symbols (-g)
868   --enable-depend         turn on automatic dependency tracking
869   --enable-cassert        enable assertion checks (for debugging)
870   --enable-thread-safety  make client libraries thread-safe
871   --enable-thread-safety-force  force thread-safety in spite of thread test failure
872   --disable-largefile     omit support for large files
873
874 Optional Packages:
875   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
876   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
877
878   --with-docdir=DIR       install the documentation in DIR [PREFIX/doc]
879   --without-docdir        do not install the documentation
880   --with-includes=DIRS    look for additional header files in DIRS
881   --with-libraries=DIRS   look for additional libraries in DIRS
882   --with-libs=DIRS        alternative spelling of --with-libraries
883   --with-pgport=PORTNUM   change default port number [5432]
884   --with-tcl              build Tcl modules (PL/Tcl)
885   --with-tclconfig=DIR    tclConfig.sh is in DIR
886   --with-perl             build Perl modules (PL/Perl)
887   --with-python           build Python modules (PL/Python)
888   --with-krb5             build with Kerberos 5 support
889   --with-krb-srvnam=NAME  name of the default service principal in Kerberos [postgres]
890   --with-pam              build with PAM support
891   --with-bonjour          build with Bonjour support
892   --with-openssl          build with OpenSSL support
893   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
894   --without-readline      do not use GNU Readline / BSD Libedit line editing
895   --without-zlib          do not use Zlib
896   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
897
898 Some influential environment variables:
899   CC          C compiler command
900   CFLAGS      C compiler flags
901   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
902               nonstandard directory <lib dir>
903   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
904               headers in a nonstandard directory <include dir>
905   CPP         C preprocessor
906   LDFLAGS_SL
907   DOCBOOKSTYLE
908               location of DocBook stylesheets
909
910 Use these variables to override the choices made by `configure' or to help
911 it to find libraries and programs with nonstandard names/locations.
912
913 Report bugs to <pgsql-bugs@postgresql.org>.
914 _ACEOF
915 fi
916
917 if test "$ac_init_help" = "recursive"; then
918   # If there are subdirs, report their specific --help.
919   ac_popdir=`pwd`
920   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
921     test -d $ac_dir || continue
922     ac_builddir=.
923
924 if test "$ac_dir" != .; then
925   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
926   # A "../" for each directory in $ac_dir_suffix.
927   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
928 else
929   ac_dir_suffix= ac_top_builddir=
930 fi
931
932 case $srcdir in
933   .)  # No --srcdir option.  We are building in place.
934     ac_srcdir=.
935     if test -z "$ac_top_builddir"; then
936        ac_top_srcdir=.
937     else
938        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
939     fi ;;
940   [\\/]* | ?:[\\/]* )  # Absolute path.
941     ac_srcdir=$srcdir$ac_dir_suffix;
942     ac_top_srcdir=$srcdir ;;
943   *) # Relative path.
944     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
945     ac_top_srcdir=$ac_top_builddir$srcdir ;;
946 esac
947
948 # Do not use `cd foo && pwd` to compute absolute paths, because
949 # the directories may not exist.
950 case `pwd` in
951 .) ac_abs_builddir="$ac_dir";;
952 *)
953   case "$ac_dir" in
954   .) ac_abs_builddir=`pwd`;;
955   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
956   *) ac_abs_builddir=`pwd`/"$ac_dir";;
957   esac;;
958 esac
959 case $ac_abs_builddir in
960 .) ac_abs_top_builddir=${ac_top_builddir}.;;
961 *)
962   case ${ac_top_builddir}. in
963   .) ac_abs_top_builddir=$ac_abs_builddir;;
964   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
965   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
966   esac;;
967 esac
968 case $ac_abs_builddir in
969 .) ac_abs_srcdir=$ac_srcdir;;
970 *)
971   case $ac_srcdir in
972   .) ac_abs_srcdir=$ac_abs_builddir;;
973   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
974   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
975   esac;;
976 esac
977 case $ac_abs_builddir in
978 .) ac_abs_top_srcdir=$ac_top_srcdir;;
979 *)
980   case $ac_top_srcdir in
981   .) ac_abs_top_srcdir=$ac_abs_builddir;;
982   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
983   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
984   esac;;
985 esac
986
987     cd $ac_dir
988     # Check for guested configure; otherwise get Cygnus style configure.
989     if test -f $ac_srcdir/configure.gnu; then
990       echo
991       $SHELL $ac_srcdir/configure.gnu  --help=recursive
992     elif test -f $ac_srcdir/configure; then
993       echo
994       $SHELL $ac_srcdir/configure  --help=recursive
995     elif test -f $ac_srcdir/configure.ac ||
996            test -f $ac_srcdir/configure.in; then
997       echo
998       $ac_configure --help
999     else
1000       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1001     fi
1002     cd $ac_popdir
1003   done
1004 fi
1005
1006 test -n "$ac_init_help" && exit 0
1007 if $ac_init_version; then
1008   cat <<\_ACEOF
1009 PostgreSQL configure 8.2devel
1010 generated by GNU Autoconf 2.59
1011
1012 Copyright (C) 2003 Free Software Foundation, Inc.
1013 This configure script is free software; the Free Software Foundation
1014 gives unlimited permission to copy, distribute and modify it.
1015
1016 Copyright (c) 1996-2005, PostgreSQL Global Development Group
1017 _ACEOF
1018   exit 0
1019 fi
1020 exec 5>config.log
1021 cat >&5 <<_ACEOF
1022 This file contains any messages produced by compilers while
1023 running configure, to aid debugging if configure makes a mistake.
1024
1025 It was created by PostgreSQL $as_me 8.2devel, which was
1026 generated by GNU Autoconf 2.59.  Invocation command line was
1027
1028   $ $0 $@
1029
1030 _ACEOF
1031 {
1032 cat <<_ASUNAME
1033 ## --------- ##
1034 ## Platform. ##
1035 ## --------- ##
1036
1037 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1038 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1039 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1040 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1041 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1042
1043 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1044 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1045
1046 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1047 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1048 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1049 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1050 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1051 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1052 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1053
1054 _ASUNAME
1055
1056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1057 for as_dir in $PATH
1058 do
1059   IFS=$as_save_IFS
1060   test -z "$as_dir" && as_dir=.
1061   echo "PATH: $as_dir"
1062 done
1063
1064 } >&5
1065
1066 cat >&5 <<_ACEOF
1067
1068
1069 ## ----------- ##
1070 ## Core tests. ##
1071 ## ----------- ##
1072
1073 _ACEOF
1074
1075
1076 # Keep a trace of the command line.
1077 # Strip out --no-create and --no-recursion so they do not pile up.
1078 # Strip out --silent because we don't want to record it for future runs.
1079 # Also quote any args containing shell meta-characters.
1080 # Make two passes to allow for proper duplicate-argument suppression.
1081 ac_configure_args=
1082 ac_configure_args0=
1083 ac_configure_args1=
1084 ac_sep=
1085 ac_must_keep_next=false
1086 for ac_pass in 1 2
1087 do
1088   for ac_arg
1089   do
1090     case $ac_arg in
1091     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1092     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1093     | -silent | --silent | --silen | --sile | --sil)
1094       continue ;;
1095     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1096       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1097     esac
1098     case $ac_pass in
1099     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1100     2)
1101       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1102       if test $ac_must_keep_next = true; then
1103         ac_must_keep_next=false # Got value, back to normal.
1104       else
1105         case $ac_arg in
1106           *=* | --config-cache | -C | -disable-* | --disable-* \
1107           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1108           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1109           | -with-* | --with-* | -without-* | --without-* | --x)
1110             case "$ac_configure_args0 " in
1111               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1112             esac
1113             ;;
1114           -* ) ac_must_keep_next=true ;;
1115         esac
1116       fi
1117       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1118       # Get rid of the leading space.
1119       ac_sep=" "
1120       ;;
1121     esac
1122   done
1123 done
1124 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1125 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1126
1127 # When interrupted or exit'd, cleanup temporary files, and complete
1128 # config.log.  We remove comments because anyway the quotes in there
1129 # would cause problems or look ugly.
1130 # WARNING: Be sure not to use single quotes in there, as some shells,
1131 # such as our DU 5.0 friend, will then `close' the trap.
1132 trap 'exit_status=$?
1133   # Save into config.log some information that might help in debugging.
1134   {
1135     echo
1136
1137     cat <<\_ASBOX
1138 ## ---------------- ##
1139 ## Cache variables. ##
1140 ## ---------------- ##
1141 _ASBOX
1142     echo
1143     # The following way of writing the cache mishandles newlines in values,
1144 {
1145   (set) 2>&1 |
1146     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1147     *ac_space=\ *)
1148       sed -n \
1149         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1150           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1151       ;;
1152     *)
1153       sed -n \
1154         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1155       ;;
1156     esac;
1157 }
1158     echo
1159
1160     cat <<\_ASBOX
1161 ## ----------------- ##
1162 ## Output variables. ##
1163 ## ----------------- ##
1164 _ASBOX
1165     echo
1166     for ac_var in $ac_subst_vars
1167     do
1168       eval ac_val=$`echo $ac_var`
1169       echo "$ac_var='"'"'$ac_val'"'"'"
1170     done | sort
1171     echo
1172
1173     if test -n "$ac_subst_files"; then
1174       cat <<\_ASBOX
1175 ## ------------- ##
1176 ## Output files. ##
1177 ## ------------- ##
1178 _ASBOX
1179       echo
1180       for ac_var in $ac_subst_files
1181       do
1182         eval ac_val=$`echo $ac_var`
1183         echo "$ac_var='"'"'$ac_val'"'"'"
1184       done | sort
1185       echo
1186     fi
1187
1188     if test -s confdefs.h; then
1189       cat <<\_ASBOX
1190 ## ----------- ##
1191 ## confdefs.h. ##
1192 ## ----------- ##
1193 _ASBOX
1194       echo
1195       sed "/^$/d" confdefs.h | sort
1196       echo
1197     fi
1198     test "$ac_signal" != 0 &&
1199       echo "$as_me: caught signal $ac_signal"
1200     echo "$as_me: exit $exit_status"
1201   } >&5
1202   rm -f core *.core &&
1203   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1204     exit $exit_status
1205      ' 0
1206 for ac_signal in 1 2 13 15; do
1207   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1208 done
1209 ac_signal=0
1210
1211 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1212 rm -rf conftest* confdefs.h
1213 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1214 echo >confdefs.h
1215
1216 # Predefined preprocessor variables.
1217
1218 cat >>confdefs.h <<_ACEOF
1219 #define PACKAGE_NAME "$PACKAGE_NAME"
1220 _ACEOF
1221
1222
1223 cat >>confdefs.h <<_ACEOF
1224 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1225 _ACEOF
1226
1227
1228 cat >>confdefs.h <<_ACEOF
1229 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1230 _ACEOF
1231
1232
1233 cat >>confdefs.h <<_ACEOF
1234 #define PACKAGE_STRING "$PACKAGE_STRING"
1235 _ACEOF
1236
1237
1238 cat >>confdefs.h <<_ACEOF
1239 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1240 _ACEOF
1241
1242
1243 # Let the site file select an alternate cache file if it wants to.
1244 # Prefer explicitly selected file to automatically selected ones.
1245 if test -z "$CONFIG_SITE"; then
1246   if test "x$prefix" != xNONE; then
1247     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1248   else
1249     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1250   fi
1251 fi
1252 for ac_site_file in $CONFIG_SITE; do
1253   if test -r "$ac_site_file"; then
1254     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1255 echo "$as_me: loading site script $ac_site_file" >&6;}
1256     sed 's/^/| /' "$ac_site_file" >&5
1257     . "$ac_site_file"
1258   fi
1259 done
1260
1261 if test -r "$cache_file"; then
1262   # Some versions of bash will fail to source /dev/null (special
1263   # files actually), so we avoid doing that.
1264   if test -f "$cache_file"; then
1265     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1266 echo "$as_me: loading cache $cache_file" >&6;}
1267     case $cache_file in
1268       [\\/]* | ?:[\\/]* ) . $cache_file;;
1269       *)                      . ./$cache_file;;
1270     esac
1271   fi
1272 else
1273   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1274 echo "$as_me: creating cache $cache_file" >&6;}
1275   >$cache_file
1276 fi
1277
1278 # Check that the precious variables saved in the cache have kept the same
1279 # value.
1280 ac_cache_corrupted=false
1281 for ac_var in `(set) 2>&1 |
1282                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1283   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1284   eval ac_new_set=\$ac_env_${ac_var}_set
1285   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1286   eval ac_new_val="\$ac_env_${ac_var}_value"
1287   case $ac_old_set,$ac_new_set in
1288     set,)
1289       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1290 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1291       ac_cache_corrupted=: ;;
1292     ,set)
1293       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1294 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1295       ac_cache_corrupted=: ;;
1296     ,);;
1297     *)
1298       if test "x$ac_old_val" != "x$ac_new_val"; then
1299         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1300 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1301         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1302 echo "$as_me:   former value:  $ac_old_val" >&2;}
1303         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1304 echo "$as_me:   current value: $ac_new_val" >&2;}
1305         ac_cache_corrupted=:
1306       fi;;
1307   esac
1308   # Pass precious variables to config.status.
1309   if test "$ac_new_set" = set; then
1310     case $ac_new_val in
1311     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1312       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1313     *) ac_arg=$ac_var=$ac_new_val ;;
1314     esac
1315     case " $ac_configure_args " in
1316       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1317       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1318     esac
1319   fi
1320 done
1321 if $ac_cache_corrupted; then
1322   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1323 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1324   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1325 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1326    { (exit 1); exit 1; }; }
1327 fi
1328
1329 ac_ext=c
1330 ac_cpp='$CPP $CPPFLAGS'
1331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365 ac_aux_dir=
1366 for ac_dir in config $srcdir/config; do
1367   if test -f $ac_dir/install-sh; then
1368     ac_aux_dir=$ac_dir
1369     ac_install_sh="$ac_aux_dir/install-sh -c"
1370     break
1371   elif test -f $ac_dir/install.sh; then
1372     ac_aux_dir=$ac_dir
1373     ac_install_sh="$ac_aux_dir/install.sh -c"
1374     break
1375   elif test -f $ac_dir/shtool; then
1376     ac_aux_dir=$ac_dir
1377     ac_install_sh="$ac_aux_dir/shtool install -c"
1378     break
1379   fi
1380 done
1381 if test -z "$ac_aux_dir"; then
1382   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1383 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1384    { (exit 1); exit 1; }; }
1385 fi
1386 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1387 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1388 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1389
1390
1391 configure_args=$ac_configure_args
1392
1393
1394
1395 cat >>confdefs.h <<_ACEOF
1396 #define PG_VERSION "$PACKAGE_VERSION"
1397 _ACEOF
1398
1399
1400 # Make sure we can run config.sub.
1401 $ac_config_sub sun4 >/dev/null 2>&1 ||
1402   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1403 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1404    { (exit 1); exit 1; }; }
1405
1406 echo "$as_me:$LINENO: checking build system type" >&5
1407 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1408 if test "${ac_cv_build+set}" = set; then
1409   echo $ECHO_N "(cached) $ECHO_C" >&6
1410 else
1411   ac_cv_build_alias=$build_alias
1412 test -z "$ac_cv_build_alias" &&
1413   ac_cv_build_alias=`$ac_config_guess`
1414 test -z "$ac_cv_build_alias" &&
1415   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1416 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1417    { (exit 1); exit 1; }; }
1418 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1419   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1420 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1421    { (exit 1); exit 1; }; }
1422
1423 fi
1424 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1425 echo "${ECHO_T}$ac_cv_build" >&6
1426 build=$ac_cv_build
1427 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1428 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1429 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1430
1431
1432 echo "$as_me:$LINENO: checking host system type" >&5
1433 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1434 if test "${ac_cv_host+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   ac_cv_host_alias=$host_alias
1438 test -z "$ac_cv_host_alias" &&
1439   ac_cv_host_alias=$ac_cv_build_alias
1440 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1441   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1442 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1443    { (exit 1); exit 1; }; }
1444
1445 fi
1446 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1447 echo "${ECHO_T}$ac_cv_host" >&6
1448 host=$ac_cv_host
1449 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1450 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1451 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1452
1453
1454
1455 template=
1456 echo "$as_me:$LINENO: checking which template to use" >&5
1457 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1458
1459
1460
1461
1462 # Check whether --with-template or --without-template was given.
1463 if test "${with_template+set}" = set; then
1464   withval="$with_template"
1465
1466   case $withval in
1467     yes)
1468       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1469 echo "$as_me: error: argument required for --with-template option" >&2;}
1470    { (exit 1); exit 1; }; }
1471       ;;
1472     no)
1473       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1474 echo "$as_me: error: argument required for --with-template option" >&2;}
1475    { (exit 1); exit 1; }; }
1476       ;;
1477     *)
1478
1479   case $withval in
1480     list)   echo; ls "$srcdir/src/template"; exit;;
1481     *)      if test -f "$srcdir/src/template/$with_template" ; then
1482               template=$withval
1483             else
1484               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1485 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1486    { (exit 1); exit 1; }; }
1487             fi;;
1488   esac
1489
1490       ;;
1491   esac
1492
1493 else
1494
1495 # --with-template not given
1496
1497 case $host_os in
1498      aix*) template=aix ;;
1499     bsdi*) template=bsdi ;;
1500   cygwin*) template=cygwin ;;
1501   darwin*) template=darwin ;;
1502     dgux*) template=dgux ;;
1503  freebsd*) template=freebsd ;;
1504     hpux*) template=hpux ;;
1505     irix*) template=irix ;;
1506  linux*|gnu*|k*bsd*-gnu)
1507            template=linux ;;
1508    mingw*) template=win32 ;;
1509   netbsd*) template=netbsd ;;
1510 nextstep*) template=nextstep ;;
1511  openbsd*) template=openbsd ;;
1512      osf*) template=osf ;;
1513      sco*) template=sco ;;
1514  solaris*) template=solaris ;;
1515    sunos*) template=sunos4 ;;
1516  sysv4.2*)
1517         case $host_vendor in
1518           univel) template=univel ;;
1519         esac ;;
1520    sysv4*) template=svr4 ;;
1521    sysv5*) template=unixware ;;
1522   ultrix*) template=ultrix4 ;;
1523 esac
1524
1525   if test x"$template" = x"" ; then
1526     { { echo "$as_me:$LINENO: error:
1527 *******************************************************************
1528 PostgreSQL has apparently not been ported to your platform yet.
1529 To try a manual configuration, look into the src/template directory
1530 for a similar platform and use the '--with-template=' option.
1531
1532 Please also contact <pgsql-ports@postgresql.org> to see about
1533 rectifying this.  Include the above 'checking host system type...'
1534 line.
1535 *******************************************************************
1536 " >&5
1537 echo "$as_me: error:
1538 *******************************************************************
1539 PostgreSQL has apparently not been ported to your platform yet.
1540 To try a manual configuration, look into the src/template directory
1541 for a similar platform and use the '--with-template=' option.
1542
1543 Please also contact <pgsql-ports@postgresql.org> to see about
1544 rectifying this.  Include the above 'checking host system type...'
1545 line.
1546 *******************************************************************
1547 " >&2;}
1548    { (exit 1); exit 1; }; }
1549   fi
1550
1551
1552 fi;
1553
1554
1555 echo "$as_me:$LINENO: result: $template" >&5
1556 echo "${ECHO_T}$template" >&6
1557
1558 PORTNAME=$template
1559
1560
1561 # Initialize default assumption that we do not need separate assembly code
1562 # for TAS (test-and-set).  This can be overridden by the template file
1563 # when it's executed.
1564 need_tas=no
1565 tas_file=dummy.s
1566
1567
1568
1569 ##
1570 ## Command line options
1571 ##
1572
1573 #
1574 # Installation directory for documentation
1575 #
1576
1577
1578
1579 # Check whether --with-docdir or --without-docdir was given.
1580 if test "${with_docdir+set}" = set; then
1581   withval="$with_docdir"
1582
1583   case $withval in
1584     yes)
1585       { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1586 echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1587    { (exit 1); exit 1; }; }
1588       ;;
1589     no)
1590       docdir=
1591       ;;
1592     *)
1593       docdir=$withval
1594       ;;
1595   esac
1596
1597 else
1598   docdir='${prefix}/doc'
1599 fi;
1600
1601
1602
1603
1604 #
1605 # Add non-standard directories to the include path
1606 #
1607
1608
1609
1610 # Check whether --with-includes or --without-includes was given.
1611 if test "${with_includes+set}" = set; then
1612   withval="$with_includes"
1613
1614   case $withval in
1615     yes)
1616       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1617 echo "$as_me: error: argument required for --with-includes option" >&2;}
1618    { (exit 1); exit 1; }; }
1619       ;;
1620     no)
1621       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1622 echo "$as_me: error: argument required for --with-includes option" >&2;}
1623    { (exit 1); exit 1; }; }
1624       ;;
1625     *)
1626
1627       ;;
1628   esac
1629
1630 fi;
1631
1632
1633
1634 #
1635 # Add non-standard directories to the library search path
1636 #
1637
1638
1639
1640 # Check whether --with-libraries or --without-libraries was given.
1641 if test "${with_libraries+set}" = set; then
1642   withval="$with_libraries"
1643
1644   case $withval in
1645     yes)
1646       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1647 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1648    { (exit 1); exit 1; }; }
1649       ;;
1650     no)
1651       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1652 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1653    { (exit 1); exit 1; }; }
1654       ;;
1655     *)
1656       LIBRARY_DIRS=$withval
1657       ;;
1658   esac
1659
1660 fi;
1661
1662
1663
1664
1665
1666 # Check whether --with-libs or --without-libs was given.
1667 if test "${with_libs+set}" = set; then
1668   withval="$with_libs"
1669
1670   case $withval in
1671     yes)
1672       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1673 echo "$as_me: error: argument required for --with-libs option" >&2;}
1674    { (exit 1); exit 1; }; }
1675       ;;
1676     no)
1677       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1678 echo "$as_me: error: argument required for --with-libs option" >&2;}
1679    { (exit 1); exit 1; }; }
1680       ;;
1681     *)
1682       LIBRARY_DIRS=$withval
1683       ;;
1684   esac
1685
1686 fi;
1687
1688
1689
1690 #
1691 # 64-bit integer date/time storage (--enable-integer-datetimes)
1692 #
1693 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1694 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1695
1696
1697 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1698 if test "${enable_integer_datetimes+set}" = set; then
1699   enableval="$enable_integer_datetimes"
1700
1701   case $enableval in
1702     yes)
1703
1704 cat >>confdefs.h <<\_ACEOF
1705 #define USE_INTEGER_DATETIMES 1
1706 _ACEOF
1707
1708       ;;
1709     no)
1710       :
1711       ;;
1712     *)
1713       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1714 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1715    { (exit 1); exit 1; }; }
1716       ;;
1717   esac
1718
1719 else
1720   enable_integer_datetimes=no
1721
1722 fi;
1723
1724 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1725 echo "${ECHO_T}$enable_integer_datetimes" >&6
1726
1727
1728 #
1729 # NLS
1730 #
1731 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1732 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1733
1734
1735 # Check whether --enable-nls or --disable-nls was given.
1736 if test "${enable_nls+set}" = set; then
1737   enableval="$enable_nls"
1738
1739   case $enableval in
1740     yes)
1741       :
1742       ;;
1743     no)
1744       :
1745       ;;
1746     *)
1747       enable_nls=yes
1748 WANTED_LANGUAGES=$enableval
1749       ;;
1750   esac
1751
1752 else
1753   enable_nls=no
1754 fi;
1755
1756
1757 if test "$enable_nls" = yes; then
1758
1759 cat >>confdefs.h <<\_ACEOF
1760 #define ENABLE_NLS 1
1761 _ACEOF
1762
1763 fi
1764
1765 echo "$as_me:$LINENO: result: $enable_nls" >&5
1766 echo "${ECHO_T}$enable_nls" >&6
1767
1768
1769
1770 #
1771 # Default port number (--with-pgport), default 5432
1772 #
1773 echo "$as_me:$LINENO: checking for default port number" >&5
1774 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1775
1776
1777
1778 # Check whether --with-pgport or --without-pgport was given.
1779 if test "${with_pgport+set}" = set; then
1780   withval="$with_pgport"
1781
1782   case $withval in
1783     yes)
1784       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1785 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1786    { (exit 1); exit 1; }; }
1787       ;;
1788     no)
1789       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1790 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1791    { (exit 1); exit 1; }; }
1792       ;;
1793     *)
1794       default_port=$withval
1795       ;;
1796   esac
1797
1798 else
1799   default_port=5432
1800 fi;
1801
1802 echo "$as_me:$LINENO: result: $default_port" >&5
1803 echo "${ECHO_T}$default_port" >&6
1804 # Need both of these because some places want an integer and some a string
1805
1806 cat >>confdefs.h <<_ACEOF
1807 #define DEF_PGPORT ${default_port}
1808 _ACEOF
1809
1810
1811 cat >>confdefs.h <<_ACEOF
1812 #define DEF_PGPORT_STR "${default_port}"
1813 _ACEOF
1814
1815
1816
1817 #
1818 # Option to disable shared libraries
1819 #
1820
1821
1822 # Check whether --enable-shared or --disable-shared was given.
1823 if test "${enable_shared+set}" = set; then
1824   enableval="$enable_shared"
1825
1826   case $enableval in
1827     yes)
1828       :
1829       ;;
1830     no)
1831       :
1832       ;;
1833     *)
1834       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1835 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1836    { (exit 1); exit 1; }; }
1837       ;;
1838   esac
1839
1840 else
1841   enable_shared=yes
1842
1843 fi;
1844
1845
1846
1847 #
1848 # '-rpath'-like feature can be disabled
1849 #
1850
1851
1852 # Check whether --enable-rpath or --disable-rpath was given.
1853 if test "${enable_rpath+set}" = set; then
1854   enableval="$enable_rpath"
1855
1856   case $enableval in
1857     yes)
1858       :
1859       ;;
1860     no)
1861       :
1862       ;;
1863     *)
1864       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1865 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1866    { (exit 1); exit 1; }; }
1867       ;;
1868   esac
1869
1870 else
1871   enable_rpath=yes
1872
1873 fi;
1874
1875
1876
1877 #
1878 # Spinlocks
1879 #
1880
1881
1882 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1883 if test "${enable_spinlocks+set}" = set; then
1884   enableval="$enable_spinlocks"
1885
1886   case $enableval in
1887     yes)
1888       :
1889       ;;
1890     no)
1891       :
1892       ;;
1893     *)
1894       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1895 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1896    { (exit 1); exit 1; }; }
1897       ;;
1898   esac
1899
1900 else
1901   enable_spinlocks=yes
1902
1903 fi;
1904
1905
1906 #
1907 # --enable-debug adds -g to compiler flags
1908 #
1909
1910
1911 # Check whether --enable-debug or --disable-debug was given.
1912 if test "${enable_debug+set}" = set; then
1913   enableval="$enable_debug"
1914
1915   case $enableval in
1916     yes)
1917       :
1918       ;;
1919     no)
1920       :
1921       ;;
1922     *)
1923       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1924 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1925    { (exit 1); exit 1; }; }
1926       ;;
1927   esac
1928
1929 else
1930   enable_debug=no
1931
1932 fi;
1933
1934
1935
1936 #
1937 # C compiler
1938 #
1939
1940 # For historical reasons you can also use --with-CC to specify the C compiler
1941 # to use, although the standard way to do this is to set the CC environment
1942 # variable.
1943
1944
1945
1946 # Check whether --with-CC or --without-CC was given.
1947 if test "${with_CC+set}" = set; then
1948   withval="$with_CC"
1949
1950   case $withval in
1951     yes)
1952       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1953 echo "$as_me: error: argument required for --with-CC option" >&2;}
1954    { (exit 1); exit 1; }; }
1955       ;;
1956     no)
1957       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1958 echo "$as_me: error: argument required for --with-CC option" >&2;}
1959    { (exit 1); exit 1; }; }
1960       ;;
1961     *)
1962       CC=$with_CC
1963       ;;
1964   esac
1965
1966 fi;
1967
1968
1969 case $template in
1970   aix) pgac_cc_list="gcc xlc";;
1971  irix) pgac_cc_list="cc";; # no gcc
1972     *) pgac_cc_list="gcc cc";;
1973 esac
1974
1975 ac_ext=c
1976 ac_cpp='$CPP $CPPFLAGS'
1977 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1978 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1979 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1980 if test -n "$ac_tool_prefix"; then
1981   for ac_prog in $pgac_cc_list
1982   do
1983     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1984 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1985 echo "$as_me:$LINENO: checking for $ac_word" >&5
1986 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1987 if test "${ac_cv_prog_CC+set}" = set; then
1988   echo $ECHO_N "(cached) $ECHO_C" >&6
1989 else
1990   if test -n "$CC"; then
1991   ac_cv_prog_CC="$CC" # Let the user override the test.
1992 else
1993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1994 for as_dir in $PATH
1995 do
1996   IFS=$as_save_IFS
1997   test -z "$as_dir" && as_dir=.
1998   for ac_exec_ext in '' $ac_executable_extensions; do
1999   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2000     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2001     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2002     break 2
2003   fi
2004 done
2005 done
2006
2007 fi
2008 fi
2009 CC=$ac_cv_prog_CC
2010 if test -n "$CC"; then
2011   echo "$as_me:$LINENO: result: $CC" >&5
2012 echo "${ECHO_T}$CC" >&6
2013 else
2014   echo "$as_me:$LINENO: result: no" >&5
2015 echo "${ECHO_T}no" >&6
2016 fi
2017
2018     test -n "$CC" && break
2019   done
2020 fi
2021 if test -z "$CC"; then
2022   ac_ct_CC=$CC
2023   for ac_prog in $pgac_cc_list
2024 do
2025   # Extract the first word of "$ac_prog", so it can be a program name with args.
2026 set dummy $ac_prog; ac_word=$2
2027 echo "$as_me:$LINENO: checking for $ac_word" >&5
2028 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2029 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2030   echo $ECHO_N "(cached) $ECHO_C" >&6
2031 else
2032   if test -n "$ac_ct_CC"; then
2033   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2034 else
2035 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2036 for as_dir in $PATH
2037 do
2038   IFS=$as_save_IFS
2039   test -z "$as_dir" && as_dir=.
2040   for ac_exec_ext in '' $ac_executable_extensions; do
2041   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2042     ac_cv_prog_ac_ct_CC="$ac_prog"
2043     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2044     break 2
2045   fi
2046 done
2047 done
2048
2049 fi
2050 fi
2051 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2052 if test -n "$ac_ct_CC"; then
2053   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2054 echo "${ECHO_T}$ac_ct_CC" >&6
2055 else
2056   echo "$as_me:$LINENO: result: no" >&5
2057 echo "${ECHO_T}no" >&6
2058 fi
2059
2060   test -n "$ac_ct_CC" && break
2061 done
2062
2063   CC=$ac_ct_CC
2064 fi
2065
2066
2067 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2068 See \`config.log' for more details." >&5
2069 echo "$as_me: error: no acceptable C compiler found in \$PATH
2070 See \`config.log' for more details." >&2;}
2071    { (exit 1); exit 1; }; }
2072
2073 # Provide some information about the compiler.
2074 echo "$as_me:$LINENO:" \
2075      "checking for C compiler version" >&5
2076 ac_compiler=`set X $ac_compile; echo $2`
2077 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2078   (eval $ac_compiler --version </dev/null >&5) 2>&5
2079   ac_status=$?
2080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2081   (exit $ac_status); }
2082 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2083   (eval $ac_compiler -v </dev/null >&5) 2>&5
2084   ac_status=$?
2085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2086   (exit $ac_status); }
2087 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2088   (eval $ac_compiler -V </dev/null >&5) 2>&5
2089   ac_status=$?
2090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2091   (exit $ac_status); }
2092
2093 cat >conftest.$ac_ext <<_ACEOF
2094 /* confdefs.h.  */
2095 _ACEOF
2096 cat confdefs.h >>conftest.$ac_ext
2097 cat >>conftest.$ac_ext <<_ACEOF
2098 /* end confdefs.h.  */
2099
2100 int
2101 main ()
2102 {
2103
2104   ;
2105   return 0;
2106 }
2107 _ACEOF
2108 ac_clean_files_save=$ac_clean_files
2109 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2110 # Try to create an executable without -o first, disregard a.out.
2111 # It will help us diagnose broken compilers, and finding out an intuition
2112 # of exeext.
2113 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2114 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2115 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2116 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2117   (eval $ac_link_default) 2>&5
2118   ac_status=$?
2119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2120   (exit $ac_status); }; then
2121   # Find the output, starting from the most likely.  This scheme is
2122 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2123 # resort.
2124
2125 # Be careful to initialize this variable, since it used to be cached.
2126 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2127 ac_cv_exeext=
2128 # b.out is created by i960 compilers.
2129 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2130 do
2131   test -f "$ac_file" || continue
2132   case $ac_file in
2133     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2134         ;;
2135     conftest.$ac_ext )
2136         # This is the source file.
2137         ;;
2138     [ab].out )
2139         # We found the default executable, but exeext='' is most
2140         # certainly right.
2141         break;;
2142     *.* )
2143         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2144         # FIXME: I believe we export ac_cv_exeext for Libtool,
2145         # but it would be cool to find out if it's true.  Does anybody
2146         # maintain Libtool? --akim.
2147         export ac_cv_exeext
2148         break;;
2149     * )
2150         break;;
2151   esac
2152 done
2153 else
2154   echo "$as_me: failed program was:" >&5
2155 sed 's/^/| /' conftest.$ac_ext >&5
2156
2157 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2158 See \`config.log' for more details." >&5
2159 echo "$as_me: error: C compiler cannot create executables
2160 See \`config.log' for more details." >&2;}
2161    { (exit 77); exit 77; }; }
2162 fi
2163
2164 ac_exeext=$ac_cv_exeext
2165 echo "$as_me:$LINENO: result: $ac_file" >&5
2166 echo "${ECHO_T}$ac_file" >&6
2167
2168 # Check the compiler produces executables we can run.  If not, either
2169 # the compiler is broken, or we cross compile.
2170 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2171 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2172 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2173 # If not cross compiling, check that we can run a simple program.
2174 if test "$cross_compiling" != yes; then
2175   if { ac_try='./$ac_file'
2176   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2177   (eval $ac_try) 2>&5
2178   ac_status=$?
2179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2180   (exit $ac_status); }; }; then
2181     cross_compiling=no
2182   else
2183     if test "$cross_compiling" = maybe; then
2184         cross_compiling=yes
2185     else
2186         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2187 If you meant to cross compile, use \`--host'.
2188 See \`config.log' for more details." >&5
2189 echo "$as_me: error: cannot run C compiled programs.
2190 If you meant to cross compile, use \`--host'.
2191 See \`config.log' for more details." >&2;}
2192    { (exit 1); exit 1; }; }
2193     fi
2194   fi
2195 fi
2196 echo "$as_me:$LINENO: result: yes" >&5
2197 echo "${ECHO_T}yes" >&6
2198
2199 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2200 ac_clean_files=$ac_clean_files_save
2201 # Check the compiler produces executables we can run.  If not, either
2202 # the compiler is broken, or we cross compile.
2203 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2204 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2205 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2206 echo "${ECHO_T}$cross_compiling" >&6
2207
2208 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2209 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2210 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2211   (eval $ac_link) 2>&5
2212   ac_status=$?
2213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2214   (exit $ac_status); }; then
2215   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2216 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2217 # work properly (i.e., refer to `conftest.exe'), while it won't with
2218 # `rm'.
2219 for ac_file in conftest.exe conftest conftest.*; do
2220   test -f "$ac_file" || continue
2221   case $ac_file in
2222     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2223     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2224           export ac_cv_exeext
2225           break;;
2226     * ) break;;
2227   esac
2228 done
2229 else
2230   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2231 See \`config.log' for more details." >&5
2232 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2233 See \`config.log' for more details." >&2;}
2234    { (exit 1); exit 1; }; }
2235 fi
2236
2237 rm -f conftest$ac_cv_exeext
2238 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2239 echo "${ECHO_T}$ac_cv_exeext" >&6
2240
2241 rm -f conftest.$ac_ext
2242 EXEEXT=$ac_cv_exeext
2243 ac_exeext=$EXEEXT
2244 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2245 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2246 if test "${ac_cv_objext+set}" = set; then
2247   echo $ECHO_N "(cached) $ECHO_C" >&6
2248 else
2249   cat >conftest.$ac_ext <<_ACEOF
2250 /* confdefs.h.  */
2251 _ACEOF
2252 cat confdefs.h >>conftest.$ac_ext
2253 cat >>conftest.$ac_ext <<_ACEOF
2254 /* end confdefs.h.  */
2255
2256 int
2257 main ()
2258 {
2259
2260   ;
2261   return 0;
2262 }
2263 _ACEOF
2264 rm -f conftest.o conftest.obj
2265 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2266   (eval $ac_compile) 2>&5
2267   ac_status=$?
2268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2269   (exit $ac_status); }; then
2270   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2271   case $ac_file in
2272     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2273     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2274        break;;
2275   esac
2276 done
2277 else
2278   echo "$as_me: failed program was:" >&5
2279 sed 's/^/| /' conftest.$ac_ext >&5
2280
2281 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2282 See \`config.log' for more details." >&5
2283 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2284 See \`config.log' for more details." >&2;}
2285    { (exit 1); exit 1; }; }
2286 fi
2287
2288 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2289 fi
2290 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2291 echo "${ECHO_T}$ac_cv_objext" >&6
2292 OBJEXT=$ac_cv_objext
2293 ac_objext=$OBJEXT
2294 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2295 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2296 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2297   echo $ECHO_N "(cached) $ECHO_C" >&6
2298 else
2299   cat >conftest.$ac_ext <<_ACEOF
2300 /* confdefs.h.  */
2301 _ACEOF
2302 cat confdefs.h >>conftest.$ac_ext
2303 cat >>conftest.$ac_ext <<_ACEOF
2304 /* end confdefs.h.  */
2305
2306 int
2307 main ()
2308 {
2309 #ifndef __GNUC__
2310        choke me
2311 #endif
2312
2313   ;
2314   return 0;
2315 }
2316 _ACEOF
2317 rm -f conftest.$ac_objext
2318 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2319   (eval $ac_compile) 2>conftest.er1
2320   ac_status=$?
2321   grep -v '^ *+' conftest.er1 >conftest.err
2322   rm -f conftest.er1
2323   cat conftest.err >&5
2324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2325   (exit $ac_status); } &&
2326          { ac_try='test -z "$ac_c_werror_flag"
2327                          || test ! -s conftest.err'
2328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2329   (eval $ac_try) 2>&5
2330   ac_status=$?
2331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2332   (exit $ac_status); }; } &&
2333          { ac_try='test -s conftest.$ac_objext'
2334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2335   (eval $ac_try) 2>&5
2336   ac_status=$?
2337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2338   (exit $ac_status); }; }; then
2339   ac_compiler_gnu=yes
2340 else
2341   echo "$as_me: failed program was:" >&5
2342 sed 's/^/| /' conftest.$ac_ext >&5
2343
2344 ac_compiler_gnu=no
2345 fi
2346 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2347 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2348
2349 fi
2350 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2351 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2352 GCC=`test $ac_compiler_gnu = yes && echo yes`
2353 ac_test_CFLAGS=${CFLAGS+set}
2354 ac_save_CFLAGS=$CFLAGS
2355 CFLAGS="-g"
2356 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2357 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2358 if test "${ac_cv_prog_cc_g+set}" = set; then
2359   echo $ECHO_N "(cached) $ECHO_C" >&6
2360 else
2361   cat >conftest.$ac_ext <<_ACEOF
2362 /* confdefs.h.  */
2363 _ACEOF
2364 cat confdefs.h >>conftest.$ac_ext
2365 cat >>conftest.$ac_ext <<_ACEOF
2366 /* end confdefs.h.  */
2367
2368 int
2369 main ()
2370 {
2371
2372   ;
2373   return 0;
2374 }
2375 _ACEOF
2376 rm -f conftest.$ac_objext
2377 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2378   (eval $ac_compile) 2>conftest.er1
2379   ac_status=$?
2380   grep -v '^ *+' conftest.er1 >conftest.err
2381   rm -f conftest.er1
2382   cat conftest.err >&5
2383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2384   (exit $ac_status); } &&
2385          { ac_try='test -z "$ac_c_werror_flag"
2386                          || test ! -s conftest.err'
2387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2388   (eval $ac_try) 2>&5
2389   ac_status=$?
2390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2391   (exit $ac_status); }; } &&
2392          { ac_try='test -s conftest.$ac_objext'
2393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2394   (eval $ac_try) 2>&5
2395   ac_status=$?
2396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397   (exit $ac_status); }; }; then
2398   ac_cv_prog_cc_g=yes
2399 else
2400   echo "$as_me: failed program was:" >&5
2401 sed 's/^/| /' conftest.$ac_ext >&5
2402
2403 ac_cv_prog_cc_g=no
2404 fi
2405 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2406 fi
2407 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2408 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2409 if test "$ac_test_CFLAGS" = set; then
2410   CFLAGS=$ac_save_CFLAGS
2411 elif test $ac_cv_prog_cc_g = yes; then
2412   if test "$GCC" = yes; then
2413     CFLAGS="-g -O2"
2414   else
2415     CFLAGS="-g"
2416   fi
2417 else
2418   if test "$GCC" = yes; then
2419     CFLAGS="-O2"
2420   else
2421     CFLAGS=
2422   fi
2423 fi
2424 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2425 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2426 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2427   echo $ECHO_N "(cached) $ECHO_C" >&6
2428 else
2429   ac_cv_prog_cc_stdc=no
2430 ac_save_CC=$CC
2431 cat >conftest.$ac_ext <<_ACEOF
2432 /* confdefs.h.  */
2433 _ACEOF
2434 cat confdefs.h >>conftest.$ac_ext
2435 cat >>conftest.$ac_ext <<_ACEOF
2436 /* end confdefs.h.  */
2437 #include <stdarg.h>
2438 #include <stdio.h>
2439 #include <sys/types.h>
2440 #include <sys/stat.h>
2441 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2442 struct buf { int x; };
2443 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2444 static char *e (p, i)
2445      char **p;
2446      int i;
2447 {
2448   return p[i];
2449 }
2450 static char *f (char * (*g) (char **, int), char **p, ...)
2451 {
2452   char *s;
2453   va_list v;
2454   va_start (v,p);
2455   s = g (p, va_arg (v,int));
2456   va_end (v);
2457   return s;
2458 }
2459
2460 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2461    function prototypes and stuff, but not '\xHH' hex character constants.
2462    These don't provoke an error unfortunately, instead are silently treated
2463    as 'x'.  The following induces an error, until -std1 is added to get
2464    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2465    array size at least.  It's necessary to write '\x00'==0 to get something
2466    that's true only with -std1.  */
2467 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2468
2469 int test (int i, double x);
2470 struct s1 {int (*f) (int a);};
2471 struct s2 {int (*f) (double a);};
2472 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2473 int argc;
2474 char **argv;
2475 int
2476 main ()
2477 {
2478 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2479   ;
2480   return 0;
2481 }
2482 _ACEOF
2483 # Don't try gcc -ansi; that turns off useful extensions and
2484 # breaks some systems' header files.
2485 # AIX                   -qlanglvl=ansi
2486 # Ultrix and OSF/1      -std1
2487 # HP-UX 10.20 and later -Ae
2488 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2489 # SVR4                  -Xc -D__EXTENSIONS__
2490 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2491 do
2492   CC="$ac_save_CC $ac_arg"
2493   rm -f conftest.$ac_objext
2494 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2495   (eval $ac_compile) 2>conftest.er1
2496   ac_status=$?
2497   grep -v '^ *+' conftest.er1 >conftest.err
2498   rm -f conftest.er1
2499   cat conftest.err >&5
2500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2501   (exit $ac_status); } &&
2502          { ac_try='test -z "$ac_c_werror_flag"
2503                          || test ! -s conftest.err'
2504   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2505   (eval $ac_try) 2>&5
2506   ac_status=$?
2507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2508   (exit $ac_status); }; } &&
2509          { ac_try='test -s conftest.$ac_objext'
2510   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2511   (eval $ac_try) 2>&5
2512   ac_status=$?
2513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2514   (exit $ac_status); }; }; then
2515   ac_cv_prog_cc_stdc=$ac_arg
2516 break
2517 else
2518   echo "$as_me: failed program was:" >&5
2519 sed 's/^/| /' conftest.$ac_ext >&5
2520
2521 fi
2522 rm -f conftest.err conftest.$ac_objext
2523 done
2524 rm -f conftest.$ac_ext conftest.$ac_objext
2525 CC=$ac_save_CC
2526
2527 fi
2528
2529 case "x$ac_cv_prog_cc_stdc" in
2530   x|xno)
2531     echo "$as_me:$LINENO: result: none needed" >&5
2532 echo "${ECHO_T}none needed" >&6 ;;
2533   *)
2534     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2535 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2536     CC="$CC $ac_cv_prog_cc_stdc" ;;
2537 esac
2538
2539 # Some people use a C++ compiler to compile C.  Since we use `exit',
2540 # in C++ we need to declare it.  In case someone uses the same compiler
2541 # for both compiling C and C++ we need to have the C++ compiler decide
2542 # the declaration of exit, since it's the most demanding environment.
2543 cat >conftest.$ac_ext <<_ACEOF
2544 #ifndef __cplusplus
2545   choke me
2546 #endif
2547 _ACEOF
2548 rm -f conftest.$ac_objext
2549 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2550   (eval $ac_compile) 2>conftest.er1
2551   ac_status=$?
2552   grep -v '^ *+' conftest.er1 >conftest.err
2553   rm -f conftest.er1
2554   cat conftest.err >&5
2555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2556   (exit $ac_status); } &&
2557          { ac_try='test -z "$ac_c_werror_flag"
2558                          || test ! -s conftest.err'
2559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2560   (eval $ac_try) 2>&5
2561   ac_status=$?
2562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2563   (exit $ac_status); }; } &&
2564          { ac_try='test -s conftest.$ac_objext'
2565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2566   (eval $ac_try) 2>&5
2567   ac_status=$?
2568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2569   (exit $ac_status); }; }; then
2570   for ac_declaration in \
2571    '' \
2572    'extern "C" void std::exit (int) throw (); using std::exit;' \
2573    'extern "C" void std::exit (int); using std::exit;' \
2574    'extern "C" void exit (int) throw ();' \
2575    'extern "C" void exit (int);' \
2576    'void exit (int);'
2577 do
2578   cat >conftest.$ac_ext <<_ACEOF
2579 /* confdefs.h.  */
2580 _ACEOF
2581 cat confdefs.h >>conftest.$ac_ext
2582 cat >>conftest.$ac_ext <<_ACEOF
2583 /* end confdefs.h.  */
2584 $ac_declaration
2585 #include <stdlib.h>
2586 int
2587 main ()
2588 {
2589 exit (42);
2590   ;
2591   return 0;
2592 }
2593 _ACEOF
2594 rm -f conftest.$ac_objext
2595 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2596   (eval $ac_compile) 2>conftest.er1
2597   ac_status=$?
2598   grep -v '^ *+' conftest.er1 >conftest.err
2599   rm -f conftest.er1
2600   cat conftest.err >&5
2601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2602   (exit $ac_status); } &&
2603          { ac_try='test -z "$ac_c_werror_flag"
2604                          || test ! -s conftest.err'
2605   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2606   (eval $ac_try) 2>&5
2607   ac_status=$?
2608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2609   (exit $ac_status); }; } &&
2610          { ac_try='test -s conftest.$ac_objext'
2611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2612   (eval $ac_try) 2>&5
2613   ac_status=$?
2614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2615   (exit $ac_status); }; }; then
2616   :
2617 else
2618   echo "$as_me: failed program was:" >&5
2619 sed 's/^/| /' conftest.$ac_ext >&5
2620
2621 continue
2622 fi
2623 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2624   cat >conftest.$ac_ext <<_ACEOF
2625 /* confdefs.h.  */
2626 _ACEOF
2627 cat confdefs.h >>conftest.$ac_ext
2628 cat >>conftest.$ac_ext <<_ACEOF
2629 /* end confdefs.h.  */
2630 $ac_declaration
2631 int
2632 main ()
2633 {
2634 exit (42);
2635   ;
2636   return 0;
2637 }
2638 _ACEOF
2639 rm -f conftest.$ac_objext
2640 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2641   (eval $ac_compile) 2>conftest.er1
2642   ac_status=$?
2643   grep -v '^ *+' conftest.er1 >conftest.err
2644   rm -f conftest.er1
2645   cat conftest.err >&5
2646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2647   (exit $ac_status); } &&
2648          { ac_try='test -z "$ac_c_werror_flag"
2649                          || test ! -s conftest.err'
2650   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2651   (eval $ac_try) 2>&5
2652   ac_status=$?
2653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2654   (exit $ac_status); }; } &&
2655          { ac_try='test -s conftest.$ac_objext'
2656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2657   (eval $ac_try) 2>&5
2658   ac_status=$?
2659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2660   (exit $ac_status); }; }; then
2661   break
2662 else
2663   echo "$as_me: failed program was:" >&5
2664 sed 's/^/| /' conftest.$ac_ext >&5
2665
2666 fi
2667 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2668 done
2669 rm -f conftest*
2670 if test -n "$ac_declaration"; then
2671   echo '#ifdef __cplusplus' >>confdefs.h
2672   echo $ac_declaration      >>confdefs.h
2673   echo '#endif'             >>confdefs.h
2674 fi
2675
2676 else
2677   echo "$as_me: failed program was:" >&5
2678 sed 's/^/| /' conftest.$ac_ext >&5
2679
2680 fi
2681 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2682 ac_ext=c
2683 ac_cpp='$CPP $CPPFLAGS'
2684 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2685 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2686 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2687
2688
2689 unset CFLAGS
2690
2691 #
2692 # Read the template
2693 #
2694 . "$srcdir/src/template/$template" || exit
2695
2696 # CFLAGS are selected so:
2697 # If the user specifies something in the environment, that is used.
2698 # else:  If the template file set something, that is used.
2699 # else:  If the compiler is GCC, then we use -O2.
2700 # else:  If the compiler is something else, then we use -0.
2701
2702 if test "$ac_env_CFLAGS_set" = set; then
2703   CFLAGS=$ac_env_CFLAGS_value
2704 elif test "${CFLAGS+set}" = set; then
2705   : # (keep what template set)
2706 elif test "$GCC" = yes; then
2707   CFLAGS="-O2"
2708 else
2709   # if the user selected debug mode, don't use -O
2710   if test "$enable_debug" != yes; then
2711     CFLAGS="-O"
2712   fi
2713 fi
2714
2715 if test "$GCC" = yes; then
2716   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
2717
2718   # Some versions of GCC support some additional useful warning flags.
2719   # Check whether they are supported, and add them to CFLAGS if so.
2720   echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2721 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2722 pgac_save_CFLAGS=$CFLAGS
2723 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2724 cat >conftest.$ac_ext <<_ACEOF
2725 /* confdefs.h.  */
2726 _ACEOF
2727 cat confdefs.h >>conftest.$ac_ext
2728 cat >>conftest.$ac_ext <<_ACEOF
2729 /* end confdefs.h.  */
2730
2731 int
2732 main ()
2733 {
2734
2735   ;
2736   return 0;
2737 }
2738 _ACEOF
2739 rm -f conftest.$ac_objext
2740 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2741   (eval $ac_compile) 2>conftest.er1
2742   ac_status=$?
2743   grep -v '^ *+' conftest.er1 >conftest.err
2744   rm -f conftest.er1
2745   cat conftest.err >&5
2746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2747   (exit $ac_status); } &&
2748          { ac_try='test -z "$ac_c_werror_flag"
2749                          || test ! -s conftest.err'
2750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2751   (eval $ac_try) 2>&5
2752   ac_status=$?
2753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2754   (exit $ac_status); }; } &&
2755          { ac_try='test -s conftest.$ac_objext'
2756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2757   (eval $ac_try) 2>&5
2758   ac_status=$?
2759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2760   (exit $ac_status); }; }; then
2761   echo "$as_me:$LINENO: result: yes" >&5
2762 echo "${ECHO_T}yes" >&6
2763 else
2764   echo "$as_me: failed program was:" >&5
2765 sed 's/^/| /' conftest.$ac_ext >&5
2766
2767 CFLAGS="$pgac_save_CFLAGS"
2768                     echo "$as_me:$LINENO: result: no" >&5
2769 echo "${ECHO_T}no" >&6
2770 fi
2771 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2772
2773   echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2774 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2775 pgac_save_CFLAGS=$CFLAGS
2776 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2777 cat >conftest.$ac_ext <<_ACEOF
2778 /* confdefs.h.  */
2779 _ACEOF
2780 cat confdefs.h >>conftest.$ac_ext
2781 cat >>conftest.$ac_ext <<_ACEOF
2782 /* end confdefs.h.  */
2783
2784 int
2785 main ()
2786 {
2787
2788   ;
2789   return 0;
2790 }
2791 _ACEOF
2792 rm -f conftest.$ac_objext
2793 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2794   (eval $ac_compile) 2>conftest.er1
2795   ac_status=$?
2796   grep -v '^ *+' conftest.er1 >conftest.err
2797   rm -f conftest.er1
2798   cat conftest.err >&5
2799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2800   (exit $ac_status); } &&
2801          { ac_try='test -z "$ac_c_werror_flag"
2802                          || test ! -s conftest.err'
2803   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2804   (eval $ac_try) 2>&5
2805   ac_status=$?
2806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2807   (exit $ac_status); }; } &&
2808          { ac_try='test -s conftest.$ac_objext'
2809   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2810   (eval $ac_try) 2>&5
2811   ac_status=$?
2812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2813   (exit $ac_status); }; }; then
2814   echo "$as_me:$LINENO: result: yes" >&5
2815 echo "${ECHO_T}yes" >&6
2816 else
2817   echo "$as_me: failed program was:" >&5
2818 sed 's/^/| /' conftest.$ac_ext >&5
2819
2820 CFLAGS="$pgac_save_CFLAGS"
2821                     echo "$as_me:$LINENO: result: no" >&5
2822 echo "${ECHO_T}no" >&6
2823 fi
2824 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2825
2826
2827   # Disable strict-aliasing rules; needed for gcc 3.3+
2828   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
2829 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
2830 pgac_save_CFLAGS=$CFLAGS
2831 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
2832 cat >conftest.$ac_ext <<_ACEOF
2833 /* confdefs.h.  */
2834 _ACEOF
2835 cat confdefs.h >>conftest.$ac_ext
2836 cat >>conftest.$ac_ext <<_ACEOF
2837 /* end confdefs.h.  */
2838
2839 int
2840 main ()
2841 {
2842
2843   ;
2844   return 0;
2845 }
2846 _ACEOF
2847 rm -f conftest.$ac_objext
2848 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2849   (eval $ac_compile) 2>conftest.er1
2850   ac_status=$?
2851   grep -v '^ *+' conftest.er1 >conftest.err
2852   rm -f conftest.er1
2853   cat conftest.err >&5
2854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2855   (exit $ac_status); } &&
2856          { ac_try='test -z "$ac_c_werror_flag"
2857                          || test ! -s conftest.err'
2858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2859   (eval $ac_try) 2>&5
2860   ac_status=$?
2861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2862   (exit $ac_status); }; } &&
2863          { ac_try='test -s conftest.$ac_objext'
2864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2865   (eval $ac_try) 2>&5
2866   ac_status=$?
2867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2868   (exit $ac_status); }; }; then
2869   echo "$as_me:$LINENO: result: yes" >&5
2870 echo "${ECHO_T}yes" >&6
2871 else
2872   echo "$as_me: failed program was:" >&5
2873 sed 's/^/| /' conftest.$ac_ext >&5
2874
2875 CFLAGS="$pgac_save_CFLAGS"
2876                     echo "$as_me:$LINENO: result: no" >&5
2877 echo "${ECHO_T}no" >&6
2878 fi
2879 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2880
2881 fi
2882
2883 # supply -g if --enable-debug
2884 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
2885   CFLAGS="$CFLAGS -g"
2886 fi
2887
2888 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
2889 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
2890
2891 # We already have this in Makefile.win32, but configure needs it too
2892 if test "$PORTNAME" = "win32"; then
2893   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
2894 fi
2895
2896 # Check if the compiler still works with the template settings
2897 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
2898 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
2899
2900 cat >conftest.$ac_ext <<_ACEOF
2901 /* confdefs.h.  */
2902 _ACEOF
2903 cat confdefs.h >>conftest.$ac_ext
2904 cat >>conftest.$ac_ext <<_ACEOF
2905 /* end confdefs.h.  */
2906
2907 int
2908 main ()
2909 {
2910 return 0;
2911   ;
2912   return 0;
2913 }
2914 _ACEOF
2915 rm -f conftest.$ac_objext conftest$ac_exeext
2916 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2917   (eval $ac_link) 2>conftest.er1
2918   ac_status=$?
2919   grep -v '^ *+' conftest.er1 >conftest.err
2920   rm -f conftest.er1
2921   cat conftest.err >&5
2922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2923   (exit $ac_status); } &&
2924          { ac_try='test -z "$ac_c_werror_flag"
2925                          || test ! -s conftest.err'
2926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2927   (eval $ac_try) 2>&5
2928   ac_status=$?
2929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2930   (exit $ac_status); }; } &&
2931          { ac_try='test -s conftest$ac_exeext'
2932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2933   (eval $ac_try) 2>&5
2934   ac_status=$?
2935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2936   (exit $ac_status); }; }; then
2937   echo "$as_me:$LINENO: result: yes" >&5
2938 echo "${ECHO_T}yes" >&6
2939 else
2940   echo "$as_me: failed program was:" >&5
2941 sed 's/^/| /' conftest.$ac_ext >&5
2942
2943 echo "$as_me:$LINENO: result: no" >&5
2944 echo "${ECHO_T}no" >&6
2945    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
2946 echo "$as_me: error: cannot proceed" >&2;}
2947    { (exit 1); exit 1; }; }
2948 fi
2949 rm -f conftest.err conftest.$ac_objext \
2950       conftest$ac_exeext conftest.$ac_ext
2951
2952 # Defend against gcc -ffast-math
2953 if test "$GCC" = yes; then
2954 cat >conftest.$ac_ext <<_ACEOF
2955 /* confdefs.h.  */
2956 _ACEOF
2957 cat confdefs.h >>conftest.$ac_ext
2958 cat >>conftest.$ac_ext <<_ACEOF
2959 /* end confdefs.h.  */
2960
2961 int
2962 main ()
2963 {
2964 #ifdef __FAST_MATH__
2965 choke me
2966 #endif
2967   ;
2968   return 0;
2969 }
2970 _ACEOF
2971 rm -f conftest.$ac_objext
2972 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2973   (eval $ac_compile) 2>conftest.er1
2974   ac_status=$?
2975   grep -v '^ *+' conftest.er1 >conftest.err
2976   rm -f conftest.er1
2977   cat conftest.err >&5
2978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2979   (exit $ac_status); } &&
2980          { ac_try='test -z "$ac_c_werror_flag"
2981                          || test ! -s conftest.err'
2982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2983   (eval $ac_try) 2>&5
2984   ac_status=$?
2985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2986   (exit $ac_status); }; } &&
2987          { ac_try='test -s conftest.$ac_objext'
2988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2989   (eval $ac_try) 2>&5
2990   ac_status=$?
2991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2992   (exit $ac_status); }; }; then
2993   :
2994 else
2995   echo "$as_me: failed program was:" >&5
2996 sed 's/^/| /' conftest.$ac_ext >&5
2997
2998 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
2999 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3000    { (exit 1); exit 1; }; }
3001 fi
3002 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3003 fi
3004
3005 ac_ext=c
3006 ac_cpp='$CPP $CPPFLAGS'
3007 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3008 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3009 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3010 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3011 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3012 # On Suns, sometimes $CPP names a directory.
3013 if test -n "$CPP" && test -d "$CPP"; then
3014   CPP=
3015 fi
3016 if test -z "$CPP"; then
3017   if test "${ac_cv_prog_CPP+set}" = set; then
3018   echo $ECHO_N "(cached) $ECHO_C" >&6
3019 else
3020       # Double quotes because CPP needs to be expanded
3021     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3022     do
3023       ac_preproc_ok=false
3024 for ac_c_preproc_warn_flag in '' yes
3025 do
3026   # Use a header file that comes with gcc, so configuring glibc
3027   # with a fresh cross-compiler works.
3028   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3029   # <limits.h> exists even on freestanding compilers.
3030   # On the NeXT, cc -E runs the code through the compiler's parser,
3031   # not just through cpp. "Syntax error" is here to catch this case.
3032   cat >conftest.$ac_ext <<_ACEOF
3033 /* confdefs.h.  */
3034 _ACEOF
3035 cat confdefs.h >>conftest.$ac_ext
3036 cat >>conftest.$ac_ext <<_ACEOF
3037 /* end confdefs.h.  */
3038 #ifdef __STDC__
3039 # include <limits.h>
3040 #else
3041 # include <assert.h>
3042 #endif
3043                      Syntax error
3044 _ACEOF
3045 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3046   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3047   ac_status=$?
3048   grep -v '^ *+' conftest.er1 >conftest.err
3049   rm -f conftest.er1
3050   cat conftest.err >&5
3051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3052   (exit $ac_status); } >/dev/null; then
3053   if test -s conftest.err; then
3054     ac_cpp_err=$ac_c_preproc_warn_flag
3055     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3056   else
3057     ac_cpp_err=
3058   fi
3059 else
3060   ac_cpp_err=yes
3061 fi
3062 if test -z "$ac_cpp_err"; then
3063   :
3064 else
3065   echo "$as_me: failed program was:" >&5
3066 sed 's/^/| /' conftest.$ac_ext >&5
3067
3068   # Broken: fails on valid input.
3069 continue
3070 fi
3071 rm -f conftest.err conftest.$ac_ext
3072
3073   # OK, works on sane cases.  Now check whether non-existent headers
3074   # can be detected and how.
3075   cat >conftest.$ac_ext <<_ACEOF
3076 /* confdefs.h.  */
3077 _ACEOF
3078 cat confdefs.h >>conftest.$ac_ext
3079 cat >>conftest.$ac_ext <<_ACEOF
3080 /* end confdefs.h.  */
3081 #include <ac_nonexistent.h>
3082 _ACEOF
3083 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3084   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3085   ac_status=$?
3086   grep -v '^ *+' conftest.er1 >conftest.err
3087   rm -f conftest.er1
3088   cat conftest.err >&5
3089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3090   (exit $ac_status); } >/dev/null; then
3091   if test -s conftest.err; then
3092     ac_cpp_err=$ac_c_preproc_warn_flag
3093     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3094   else
3095     ac_cpp_err=
3096   fi
3097 else
3098   ac_cpp_err=yes
3099 fi
3100 if test -z "$ac_cpp_err"; then
3101   # Broken: success on invalid input.
3102 continue
3103 else
3104   echo "$as_me: failed program was:" >&5
3105 sed 's/^/| /' conftest.$ac_ext >&5
3106
3107   # Passes both tests.
3108 ac_preproc_ok=:
3109 break
3110 fi
3111 rm -f conftest.err conftest.$ac_ext
3112
3113 done
3114 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3115 rm -f conftest.err conftest.$ac_ext
3116 if $ac_preproc_ok; then
3117   break
3118 fi
3119
3120     done
3121     ac_cv_prog_CPP=$CPP
3122
3123 fi
3124   CPP=$ac_cv_prog_CPP
3125 else
3126   ac_cv_prog_CPP=$CPP
3127 fi
3128 echo "$as_me:$LINENO: result: $CPP" >&5
3129 echo "${ECHO_T}$CPP" >&6
3130 ac_preproc_ok=false
3131 for ac_c_preproc_warn_flag in '' yes
3132 do
3133   # Use a header file that comes with gcc, so configuring glibc
3134   # with a fresh cross-compiler works.
3135   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3136   # <limits.h> exists even on freestanding compilers.
3137   # On the NeXT, cc -E runs the code through the compiler's parser,
3138   # not just through cpp. "Syntax error" is here to catch this case.
3139   cat >conftest.$ac_ext <<_ACEOF
3140 /* confdefs.h.  */
3141 _ACEOF
3142 cat confdefs.h >>conftest.$ac_ext
3143 cat >>conftest.$ac_ext <<_ACEOF
3144 /* end confdefs.h.  */
3145 #ifdef __STDC__
3146 # include <limits.h>
3147 #else
3148 # include <assert.h>
3149 #endif
3150                      Syntax error
3151 _ACEOF
3152 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3153   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3154   ac_status=$?
3155   grep -v '^ *+' conftest.er1 >conftest.err
3156   rm -f conftest.er1
3157   cat conftest.err >&5
3158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3159   (exit $ac_status); } >/dev/null; then
3160   if test -s conftest.err; then
3161     ac_cpp_err=$ac_c_preproc_warn_flag
3162     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3163   else
3164     ac_cpp_err=
3165   fi
3166 else
3167   ac_cpp_err=yes
3168 fi
3169 if test -z "$ac_cpp_err"; then
3170   :
3171 else
3172   echo "$as_me: failed program was:" >&5
3173 sed 's/^/| /' conftest.$ac_ext >&5
3174
3175   # Broken: fails on valid input.
3176 continue
3177 fi
3178 rm -f conftest.err conftest.$ac_ext
3179
3180   # OK, works on sane cases.  Now check whether non-existent headers
3181   # can be detected and how.
3182   cat >conftest.$ac_ext <<_ACEOF
3183 /* confdefs.h.  */
3184 _ACEOF
3185 cat confdefs.h >>conftest.$ac_ext
3186 cat >>conftest.$ac_ext <<_ACEOF
3187 /* end confdefs.h.  */
3188 #include <ac_nonexistent.h>
3189 _ACEOF
3190 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3191   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3192   ac_status=$?
3193   grep -v '^ *+' conftest.er1 >conftest.err
3194   rm -f conftest.er1
3195   cat conftest.err >&5
3196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3197   (exit $ac_status); } >/dev/null; then
3198   if test -s conftest.err; then
3199     ac_cpp_err=$ac_c_preproc_warn_flag
3200     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3201   else
3202     ac_cpp_err=
3203   fi
3204 else
3205   ac_cpp_err=yes
3206 fi
3207 if test -z "$ac_cpp_err"; then
3208   # Broken: success on invalid input.
3209 continue
3210 else
3211   echo "$as_me: failed program was:" >&5
3212 sed 's/^/| /' conftest.$ac_ext >&5
3213
3214   # Passes both tests.
3215 ac_preproc_ok=:
3216 break
3217 fi
3218 rm -f conftest.err conftest.$ac_ext
3219
3220 done
3221 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3222 rm -f conftest.err conftest.$ac_ext
3223 if $ac_preproc_ok; then
3224   :
3225 else
3226   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3227 See \`config.log' for more details." >&5
3228 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3229 See \`config.log' for more details." >&2;}
3230    { (exit 1); exit 1; }; }
3231 fi
3232
3233 ac_ext=c
3234 ac_cpp='$CPP $CPPFLAGS'
3235 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3236 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3237 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3238
3239
3240
3241 # Create compiler version string
3242 if test x"$GCC" = x"yes" ; then
3243   cc_string="GCC `${CC} --version | sed q`"
3244 else
3245   cc_string=$CC
3246 fi
3247
3248 cat >>confdefs.h <<_ACEOF
3249 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3250 _ACEOF
3251
3252
3253
3254 #
3255 # Set up TAS assembly code if needed; the template file has now had its
3256 # chance to request this.
3257 #
3258           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3259
3260
3261 if test "$need_tas" = yes ; then
3262   TAS=tas.o
3263 else
3264   TAS=""
3265 fi
3266
3267
3268
3269 #
3270 # Automatic dependency tracking
3271 #
3272
3273
3274 # Check whether --enable-depend or --disable-depend was given.
3275 if test "${enable_depend+set}" = set; then
3276   enableval="$enable_depend"
3277
3278   case $enableval in
3279     yes)
3280       autodepend=yes
3281       ;;
3282     no)
3283       :
3284       ;;
3285     *)
3286       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3287 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3288    { (exit 1); exit 1; }; }
3289       ;;
3290   esac
3291
3292 else
3293   enable_depend=no
3294
3295 fi;
3296
3297
3298
3299
3300 #
3301 # Enable assert checks
3302 #
3303
3304
3305 # Check whether --enable-cassert or --disable-cassert was given.
3306 if test "${enable_cassert+set}" = set; then
3307   enableval="$enable_cassert"
3308
3309   case $enableval in
3310     yes)
3311
3312 cat >>confdefs.h <<\_ACEOF
3313 #define USE_ASSERT_CHECKING 1
3314 _ACEOF
3315
3316       ;;
3317     no)
3318       :
3319       ;;
3320     *)
3321       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3322 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3323    { (exit 1); exit 1; }; }
3324       ;;
3325   esac
3326
3327 else
3328   enable_cassert=no
3329
3330 fi;
3331
3332
3333
3334 #
3335 # Include directories
3336 #
3337 ac_save_IFS=$IFS
3338 IFS="${IFS}${PATH_SEPARATOR}"
3339 # SRCH_INC comes from the template file
3340 for dir in $with_includes $SRCH_INC; do
3341   if test -d "$dir"; then
3342     INCLUDES="$INCLUDES -I$dir"
3343   else
3344     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3345 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3346   fi
3347 done
3348 IFS=$ac_save_IFS
3349
3350
3351
3352 #
3353 # Library directories
3354 #
3355 ac_save_IFS=$IFS
3356 IFS="${IFS}${PATH_SEPARATOR}"
3357 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3358 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3359   if test -d "$dir"; then
3360     LIBDIRS="$LIBDIRS -L$dir"
3361   else
3362     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3363 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3364   fi
3365 done
3366 IFS=$ac_save_IFS
3367
3368 #
3369 # Enable thread-safe client libraries
3370 #
3371 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3372 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3373
3374
3375 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3376 if test "${enable_thread_safety+set}" = set; then
3377   enableval="$enable_thread_safety"
3378
3379   case $enableval in
3380     yes)
3381       :
3382       ;;
3383     no)
3384       :
3385       ;;
3386     *)
3387       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3388 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3389    { (exit 1); exit 1; }; }
3390       ;;
3391   esac
3392
3393 else
3394   enable_thread_safety=no
3395
3396 fi;
3397
3398
3399
3400 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3401 if test "${enable_thread_safety_force+set}" = set; then
3402   enableval="$enable_thread_safety_force"
3403
3404   case $enableval in
3405     yes)
3406       :
3407       ;;
3408     no)
3409       :
3410       ;;
3411     *)
3412       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3413 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3414    { (exit 1); exit 1; }; }
3415       ;;
3416   esac
3417
3418 else
3419   enable_thread_safety_force=no
3420
3421 fi;
3422
3423 if test "$enable_thread_safety" = yes -o \
3424         "$enable_thread_safety_force" = yes; then
3425   enable_thread_safety="yes"    # for 'force'
3426
3427 cat >>confdefs.h <<\_ACEOF
3428 #define ENABLE_THREAD_SAFETY 1
3429 _ACEOF
3430
3431 fi
3432 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3433 echo "${ECHO_T}$enable_thread_safety" >&6
3434
3435
3436 #
3437 # Optionally build Tcl modules (PL/Tcl)
3438 #
3439 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3440 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3441
3442
3443
3444 # Check whether --with-tcl or --without-tcl was given.
3445 if test "${with_tcl+set}" = set; then
3446   withval="$with_tcl"
3447
3448   case $withval in
3449     yes)
3450       :
3451       ;;
3452     no)
3453       :
3454       ;;
3455     *)
3456       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3457 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3458    { (exit 1); exit 1; }; }
3459       ;;
3460   esac
3461
3462 else
3463   with_tcl=no
3464
3465 fi;
3466
3467 echo "$as_me:$LINENO: result: $with_tcl" >&5
3468 echo "${ECHO_T}$with_tcl" >&6
3469
3470
3471 # We see if the path to the Tcl/Tk configuration scripts is specified.
3472 # This will override the use of tclsh to find the paths to search.
3473
3474
3475
3476
3477 # Check whether --with-tclconfig or --without-tclconfig was given.
3478 if test "${with_tclconfig+set}" = set; then
3479   withval="$with_tclconfig"
3480
3481   case $withval in
3482     yes)
3483       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3484 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3485    { (exit 1); exit 1; }; }
3486       ;;
3487     no)
3488       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3489 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3490    { (exit 1); exit 1; }; }
3491       ;;
3492     *)
3493
3494       ;;
3495   esac
3496
3497 fi;
3498
3499
3500 #
3501 # Optionally build Perl modules (PL/Perl)
3502 #
3503 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3504 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3505
3506
3507
3508 # Check whether --with-perl or --without-perl was given.
3509 if test "${with_perl+set}" = set; then
3510   withval="$with_perl"
3511
3512   case $withval in
3513     yes)
3514       :
3515       ;;
3516     no)
3517       :
3518       ;;
3519     *)
3520       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3521 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3522    { (exit 1); exit 1; }; }
3523       ;;
3524   esac
3525
3526 else
3527   with_perl=no
3528
3529 fi;
3530
3531 echo "$as_me:$LINENO: result: $with_perl" >&5
3532 echo "${ECHO_T}$with_perl" >&6
3533
3534
3535 #
3536 # Optionally build Python modules (PL/Python)
3537 #
3538 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3539 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3540
3541
3542
3543 # Check whether --with-python or --without-python was given.
3544 if test "${with_python+set}" = set; then
3545   withval="$with_python"
3546
3547   case $withval in
3548     yes)
3549       :
3550       ;;
3551     no)
3552       :
3553       ;;
3554     *)
3555       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3556 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3557    { (exit 1); exit 1; }; }
3558       ;;
3559   esac
3560
3561 else
3562   with_python=no
3563
3564 fi;
3565
3566 echo "$as_me:$LINENO: result: $with_python" >&5
3567 echo "${ECHO_T}$with_python" >&6
3568
3569
3570 #
3571 # Kerberos 5
3572 #
3573 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3574 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3575
3576
3577
3578 # Check whether --with-krb5 or --without-krb5 was given.
3579 if test "${with_krb5+set}" = set; then
3580   withval="$with_krb5"
3581
3582   case $withval in
3583     yes)
3584
3585
3586 cat >>confdefs.h <<\_ACEOF
3587 #define KRB5 1
3588 _ACEOF
3589
3590   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3591
3592       ;;
3593     no)
3594       :
3595       ;;
3596     *)
3597       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3598 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3599    { (exit 1); exit 1; }; }
3600       ;;
3601   esac
3602
3603 else
3604   with_krb5=no
3605
3606 fi;
3607
3608 echo "$as_me:$LINENO: result: $with_krb5" >&5
3609 echo "${ECHO_T}$with_krb5" >&6
3610
3611
3612
3613
3614
3615
3616 #
3617 # Kerberos configuration parameters
3618 #
3619
3620
3621
3622 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3623 if test "${with_krb_srvnam+set}" = set; then
3624   withval="$with_krb_srvnam"
3625
3626   case $withval in
3627     yes)
3628       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3629 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3630    { (exit 1); exit 1; }; }
3631       ;;
3632     no)
3633       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3634 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3635    { (exit 1); exit 1; }; }
3636       ;;
3637     *)
3638
3639       ;;
3640   esac
3641
3642 else
3643   with_krb_srvnam="postgres"
3644 fi;
3645
3646
3647 cat >>confdefs.h <<_ACEOF
3648 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3649 _ACEOF
3650
3651
3652
3653 #
3654 # PAM
3655 #
3656 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3657 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3658
3659
3660
3661 # Check whether --with-pam or --without-pam was given.
3662 if test "${with_pam+set}" = set; then
3663   withval="$with_pam"
3664
3665   case $withval in
3666     yes)
3667
3668 cat >>confdefs.h <<\_ACEOF
3669 #define USE_PAM 1
3670 _ACEOF
3671
3672       ;;
3673     no)
3674       :
3675       ;;
3676     *)
3677       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3678 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3679    { (exit 1); exit 1; }; }
3680       ;;
3681   esac
3682
3683 else
3684   with_pam=no
3685
3686 fi;
3687
3688 echo "$as_me:$LINENO: result: $with_pam" >&5
3689 echo "${ECHO_T}$with_pam" >&6
3690
3691
3692
3693 #
3694 # Bonjour
3695 #
3696 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
3697 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
3698
3699
3700
3701 # Check whether --with-bonjour or --without-bonjour was given.
3702 if test "${with_bonjour+set}" = set; then
3703   withval="$with_bonjour"
3704
3705   case $withval in
3706     yes)
3707
3708 cat >>confdefs.h <<\_ACEOF
3709 #define USE_BONJOUR 1
3710 _ACEOF
3711
3712       ;;
3713     no)
3714       :
3715       ;;
3716     *)
3717       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
3718 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
3719    { (exit 1); exit 1; }; }
3720       ;;
3721   esac
3722
3723 else
3724   with_bonjour=no
3725
3726 fi;
3727
3728 echo "$as_me:$LINENO: result: $with_bonjour" >&5
3729 echo "${ECHO_T}$with_bonjour" >&6
3730
3731
3732
3733 #
3734 # OpenSSL
3735 #
3736 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
3737 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
3738
3739
3740
3741 # Check whether --with-openssl or --without-openssl was given.
3742 if test "${with_openssl+set}" = set; then
3743   withval="$with_openssl"
3744
3745   case $withval in
3746     yes)
3747
3748 cat >>confdefs.h <<\_ACEOF
3749 #define USE_SSL 1
3750 _ACEOF
3751
3752       ;;
3753     no)
3754       :
3755       ;;
3756     *)
3757       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
3758 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
3759    { (exit 1); exit 1; }; }
3760       ;;
3761   esac
3762
3763 else
3764   with_openssl=no
3765
3766 fi;
3767
3768 echo "$as_me:$LINENO: result: $with_openssl" >&5
3769 echo "${ECHO_T}$with_openssl" >&6
3770
3771
3772
3773 #
3774 # Prefer libedit
3775 #
3776
3777
3778
3779 # Check whether --with-libedit-preferred or --without-libedit-preferred was given.
3780 if test "${with_libedit_preferred+set}" = set; then
3781   withval="$with_libedit_preferred"
3782
3783   case $withval in
3784     yes)
3785       :
3786       ;;
3787     no)
3788       :
3789       ;;
3790     *)
3791       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
3792 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
3793    { (exit 1); exit 1; }; }
3794       ;;
3795   esac
3796
3797 else
3798   with_libedit_preferred=no
3799
3800 fi;
3801
3802
3803
3804 #
3805 # Readline
3806 #
3807
3808
3809
3810 # Check whether --with-readline or --without-readline was given.
3811 if test "${with_readline+set}" = set; then
3812   withval="$with_readline"
3813
3814   case $withval in
3815     yes)
3816       :
3817       ;;
3818     no)
3819       :
3820       ;;
3821     *)
3822       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
3823 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
3824    { (exit 1); exit 1; }; }
3825       ;;
3826   esac
3827
3828 else
3829   with_readline=yes
3830
3831 fi;
3832
3833 # readline on MinGW has problems with backslashes in psql and other bugs.
3834 # This is particularly a problem with non-US code pages.
3835 # Therefore disable its use until we understand the cause. 2004-07-20
3836 if test "$PORTNAME" = "win32"; then
3837   if test "$with_readline" = yes; then
3838     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
3839 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
3840     with_readline=no
3841   fi
3842 fi
3843
3844
3845 #
3846 # Zlib
3847 #
3848
3849
3850
3851 # Check whether --with-zlib or --without-zlib was given.
3852 if test "${with_zlib+set}" = set; then
3853   withval="$with_zlib"
3854
3855   case $withval in
3856     yes)
3857       :
3858       ;;
3859     no)
3860       :
3861       ;;
3862     *)
3863       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
3864 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
3865    { (exit 1); exit 1; }; }
3866       ;;
3867   esac
3868
3869 else
3870   with_zlib=yes
3871
3872 fi;
3873
3874
3875
3876 #
3877 # Elf
3878 #
3879
3880 # Assume system is ELF if it predefines __ELF__ as 1,
3881 # otherwise believe host_os based default.
3882 case $host_os in
3883     freebsd1*|freebsd2*) elf=no;;
3884     freebsd3*|freebsd4*) elf=yes;;
3885 esac
3886
3887
3888 echo "$as_me:$LINENO: checking for egrep" >&5
3889 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3890 if test "${ac_cv_prog_egrep+set}" = set; then
3891   echo $ECHO_N "(cached) $ECHO_C" >&6
3892 else
3893   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3894     then ac_cv_prog_egrep='grep -E'
3895     else ac_cv_prog_egrep='egrep'
3896     fi
3897 fi
3898 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3899 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3900  EGREP=$ac_cv_prog_egrep
3901
3902
3903 cat >conftest.$ac_ext <<_ACEOF
3904 /* confdefs.h.  */
3905 _ACEOF
3906 cat confdefs.h >>conftest.$ac_ext
3907 cat >>conftest.$ac_ext <<_ACEOF
3908 /* end confdefs.h.  */
3909 #if __ELF__
3910   yes
3911 #endif
3912
3913 _ACEOF
3914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3915   $EGREP "yes" >/dev/null 2>&1; then
3916   ELF_SYS=true
3917 else
3918   if test "X$elf" = "Xyes" ; then
3919   ELF_SYS=true
3920 else
3921   ELF_SYS=
3922 fi
3923 fi
3924 rm -f conftest*
3925
3926
3927
3928 #
3929 # Assignments
3930 #
3931
3932 CPPFLAGS="$CPPFLAGS $INCLUDES"
3933 LDFLAGS="$LDFLAGS $LIBDIRS"
3934
3935 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
3936 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
3937 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
3938 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
3939
3940
3941
3942 for ac_prog in gawk mawk nawk awk
3943 do
3944   # Extract the first word of "$ac_prog", so it can be a program name with args.
3945 set dummy $ac_prog; ac_word=$2
3946 echo "$as_me:$LINENO: checking for $ac_word" >&5
3947 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3948 if test "${ac_cv_prog_AWK+set}" = set; then
3949   echo $ECHO_N "(cached) $ECHO_C" >&6
3950 else
3951   if test -n "$AWK"; then
3952   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3953 else
3954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3955 for as_dir in $PATH
3956 do
3957   IFS=$as_save_IFS
3958   test -z "$as_dir" && as_dir=.
3959   for ac_exec_ext in '' $ac_executable_extensions; do
3960   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3961     ac_cv_prog_AWK="$ac_prog"
3962     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3963     break 2
3964   fi
3965 done
3966 done
3967
3968 fi
3969 fi
3970 AWK=$ac_cv_prog_AWK
3971 if test -n "$AWK"; then
3972   echo "$as_me:$LINENO: result: $AWK" >&5
3973 echo "${ECHO_T}$AWK" >&6
3974 else
3975   echo "$as_me:$LINENO: result: no" >&5
3976 echo "${ECHO_T}no" >&6
3977 fi
3978
3979   test -n "$AWK" && break
3980 done
3981
3982 echo "$as_me:$LINENO: checking for flex" >&5
3983 echo $ECHO_N "checking for flex... $ECHO_C" >&6
3984 if test "${pgac_cv_path_flex+set}" = set; then
3985   echo $ECHO_N "(cached) $ECHO_C" >&6
3986 else
3987   # Let the user override the test
3988 if test -n "$FLEX"; then
3989   pgac_cv_path_flex=$FLEX
3990 else
3991   pgac_save_IFS=$IFS
3992   IFS=$PATH_SEPARATOR
3993   for pgac_dir in $PATH; do
3994     IFS=$pgac_save_IFS
3995     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
3996       pgac_dir=`pwd`
3997     fi
3998     for pgac_prog in flex lex; do
3999       pgac_candidate="$pgac_dir/$pgac_prog"
4000       if test -f "$pgac_candidate" \
4001         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4002       then
4003         echo '%%'  > conftest.l
4004         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4005           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4006             pgac_broken_flex=$pgac_candidate
4007             continue
4008           fi
4009
4010           pgac_cv_path_flex=$pgac_candidate
4011           break 2
4012         fi
4013       fi
4014     done
4015   done
4016   rm -f conftest.l lex.yy.c
4017   : ${pgac_cv_path_flex=no}
4018 fi
4019
4020 fi
4021 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4022 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4023 if test x"$pgac_cv_path_flex" = x"no"; then
4024   if test -n "$pgac_broken_flex"; then
4025     { echo "$as_me:$LINENO: WARNING:
4026 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4027 *** should get version 2.5.4 or later." >&5
4028 echo "$as_me: WARNING:
4029 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4030 *** should get version 2.5.4 or later." >&2;}
4031   fi
4032
4033   { echo "$as_me:$LINENO: WARNING:
4034 *** Without Flex you will not be able to build PostgreSQL from CVS or
4035 *** change any of the scanner definition files.  You can obtain Flex from
4036 *** a GNU mirror site.  (If you are using the official distribution of
4037 *** PostgreSQL then you do not need to worry about this because the Flex
4038 *** output is pre-generated.)" >&5
4039 echo "$as_me: WARNING:
4040 *** Without Flex you will not be able to build PostgreSQL from CVS or
4041 *** change any of the scanner definition files.  You can obtain Flex from
4042 *** a GNU mirror site.  (If you are using the official distribution of
4043 *** PostgreSQL then you do not need to worry about this because the Flex
4044 *** output is pre-generated.)" >&2;}
4045 fi
4046
4047 if test x"$pgac_cv_path_flex" = x"no"; then
4048   FLEX=
4049 else
4050   FLEX=$pgac_cv_path_flex
4051 fi
4052
4053
4054
4055
4056 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4057 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4058 LN_S=$as_ln_s
4059 if test "$LN_S" = "ln -s"; then
4060   echo "$as_me:$LINENO: result: yes" >&5
4061 echo "${ECHO_T}yes" >&6
4062 else
4063   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4064 echo "${ECHO_T}no, using $LN_S" >&6
4065 fi
4066
4067
4068 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4069 if test "${with_gnu_ld+set}" = set; then
4070   withval="$with_gnu_ld"
4071   test "$withval" = no || with_gnu_ld=yes
4072 else
4073   with_gnu_ld=no
4074 fi;
4075 ac_prog=ld
4076 if test "$GCC" = yes; then
4077   # Check if gcc -print-prog-name=ld gives a path.
4078   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4079 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4080   case $host in
4081   *-*-mingw*)
4082     # gcc leaves a trailing carriage return which upsets mingw
4083     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4084   *)
4085     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4086   esac
4087   case "$ac_prog" in
4088     # Accept absolute paths.
4089     [\\/]* | [A-Za-z]:[\\/]*)
4090       re_direlt='/[^/][^/]*/\.\./'
4091       # Canonicalize the path of ld
4092       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4093       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4094         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4095       done
4096       test -z "$LD" && LD="$ac_prog"
4097       ;;
4098   "")
4099     # If it fails, then pretend we aren't using GCC.
4100     ac_prog=ld
4101     ;;
4102   *)
4103     # If it is relative, then search for the first ld in PATH.
4104     with_gnu_ld=unknown
4105     ;;
4106   esac
4107 elif test "$with_gnu_ld" = yes; then
4108   echo "$as_me:$LINENO: checking for GNU ld" >&5
4109 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4110 else
4111   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4112 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4113 fi
4114 if test "${ac_cv_path_LD+set}" = set; then
4115   echo $ECHO_N "(cached) $ECHO_C" >&6
4116 else
4117   if test -z "$LD"; then
4118   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4119   for ac_dir in $PATH; do
4120     test -z "$ac_dir" && ac_dir=.
4121     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4122       ac_cv_path_LD="$ac_dir/$ac_prog"
4123       # Check to see if the program is GNU ld.  I'd rather use --version,
4124       # but apparently some GNU ld's only accept -v.
4125       # Break only if it was the GNU/non-GNU ld that we prefer.
4126       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4127         test "$with_gnu_ld" != no && break
4128       else
4129         test "$with_gnu_ld" != yes && break
4130       fi
4131     fi
4132   done
4133   IFS="$ac_save_ifs"
4134 else
4135   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4136 fi
4137 fi
4138
4139 LD="$ac_cv_path_LD"
4140 if test -n "$LD"; then
4141   echo "$as_me:$LINENO: result: $LD" >&5
4142 echo "${ECHO_T}$LD" >&6
4143 else
4144   echo "$as_me:$LINENO: result: no" >&5
4145 echo "${ECHO_T}no" >&6
4146 fi
4147 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4148 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4149    { (exit 1); exit 1; }; }
4150 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4151 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4152 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4153   echo $ECHO_N "(cached) $ECHO_C" >&6
4154 else
4155   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4156 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4157   ac_cv_prog_gnu_ld=yes
4158 else
4159   ac_cv_prog_gnu_ld=no
4160 fi
4161 fi
4162 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4163 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4164 with_gnu_ld=$ac_cv_prog_gnu_ld
4165
4166
4167
4168
4169 case $host_os in sysv5*)
4170   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4171 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4172 if test "${pgac_cv_prog_ld_R+set}" = set; then
4173   echo $ECHO_N "(cached) $ECHO_C" >&6
4174 else
4175
4176     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4177     cat >conftest.$ac_ext <<_ACEOF
4178 /* confdefs.h.  */
4179 _ACEOF
4180 cat confdefs.h >>conftest.$ac_ext
4181 cat >>conftest.$ac_ext <<_ACEOF
4182 /* end confdefs.h.  */
4183
4184 int
4185 main ()
4186 {
4187
4188   ;
4189   return 0;
4190 }
4191 _ACEOF
4192 rm -f conftest.$ac_objext conftest$ac_exeext
4193 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4194   (eval $ac_link) 2>conftest.er1
4195   ac_status=$?
4196   grep -v '^ *+' conftest.er1 >conftest.err
4197   rm -f conftest.er1
4198   cat conftest.err >&5
4199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4200   (exit $ac_status); } &&
4201          { ac_try='test -z "$ac_c_werror_flag"
4202                          || test ! -s conftest.err'
4203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4204   (eval $ac_try) 2>&5
4205   ac_status=$?
4206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4207   (exit $ac_status); }; } &&
4208          { ac_try='test -s conftest$ac_exeext'
4209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4210   (eval $ac_try) 2>&5
4211   ac_status=$?
4212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4213   (exit $ac_status); }; }; then
4214   pgac_cv_prog_ld_R=yes
4215 else
4216   echo "$as_me: failed program was:" >&5
4217 sed 's/^/| /' conftest.$ac_ext >&5
4218
4219 pgac_cv_prog_ld_R=no
4220 fi
4221 rm -f conftest.err conftest.$ac_objext \
4222       conftest$ac_exeext conftest.$ac_ext
4223     LDFLAGS=$pgac_save_LDFLAGS
4224
4225 fi
4226 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4227 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4228   ld_R_works=$pgac_cv_prog_ld_R
4229
4230 esac
4231 if test -n "$ac_tool_prefix"; then
4232   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4233 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4234 echo "$as_me:$LINENO: checking for $ac_word" >&5
4235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4236 if test "${ac_cv_prog_RANLIB+set}" = set; then
4237   echo $ECHO_N "(cached) $ECHO_C" >&6
4238 else
4239   if test -n "$RANLIB"; then
4240   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4241 else
4242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4243 for as_dir in $PATH
4244 do
4245   IFS=$as_save_IFS
4246   test -z "$as_dir" && as_dir=.
4247   for ac_exec_ext in '' $ac_executable_extensions; do
4248   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4249     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4250     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4251     break 2
4252   fi
4253 done
4254 done
4255
4256 fi
4257 fi
4258 RANLIB=$ac_cv_prog_RANLIB
4259 if test -n "$RANLIB"; then
4260   echo "$as_me:$LINENO: result: $RANLIB" >&5
4261 echo "${ECHO_T}$RANLIB" >&6
4262 else
4263   echo "$as_me:$LINENO: result: no" >&5
4264 echo "${ECHO_T}no" >&6
4265 fi
4266
4267 fi
4268 if test -z "$ac_cv_prog_RANLIB"; then
4269   ac_ct_RANLIB=$RANLIB
4270   # Extract the first word of "ranlib", so it can be a program name with args.
4271 set dummy ranlib; ac_word=$2
4272 echo "$as_me:$LINENO: checking for $ac_word" >&5
4273 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4274 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4275   echo $ECHO_N "(cached) $ECHO_C" >&6
4276 else
4277   if test -n "$ac_ct_RANLIB"; then
4278   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4279 else
4280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4281 for as_dir in $PATH
4282 do
4283   IFS=$as_save_IFS
4284   test -z "$as_dir" && as_dir=.
4285   for ac_exec_ext in '' $ac_executable_extensions; do
4286   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4287     ac_cv_prog_ac_ct_RANLIB="ranlib"
4288     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4289     break 2
4290   fi
4291 done
4292 done
4293
4294   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4295 fi
4296 fi
4297 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4298 if test -n "$ac_ct_RANLIB"; then
4299   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4300 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4301 else
4302   echo "$as_me:$LINENO: result: no" >&5
4303 echo "${ECHO_T}no" >&6
4304 fi
4305
4306   RANLIB=$ac_ct_RANLIB
4307 else
4308   RANLIB="$ac_cv_prog_RANLIB"
4309 fi
4310
4311 for ac_prog in lorder
4312 do
4313   # Extract the first word of "$ac_prog", so it can be a program name with args.
4314 set dummy $ac_prog; ac_word=$2
4315 echo "$as_me:$LINENO: checking for $ac_word" >&5
4316 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4317 if test "${ac_cv_prog_LORDER+set}" = set; then
4318   echo $ECHO_N "(cached) $ECHO_C" >&6
4319 else
4320   if test -n "$LORDER"; then
4321   ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
4322 else
4323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4324 for as_dir in $PATH
4325 do
4326   IFS=$as_save_IFS
4327   test -z "$as_dir" && as_dir=.
4328   for ac_exec_ext in '' $ac_executable_extensions; do
4329   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4330     ac_cv_prog_LORDER="$ac_prog"
4331     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4332     break 2
4333   fi
4334 done
4335 done
4336
4337 fi
4338 fi
4339 LORDER=$ac_cv_prog_LORDER
4340 if test -n "$LORDER"; then
4341   echo "$as_me:$LINENO: result: $LORDER" >&5
4342 echo "${ECHO_T}$LORDER" >&6
4343 else
4344   echo "$as_me:$LINENO: result: no" >&5
4345 echo "${ECHO_T}no" >&6
4346 fi
4347
4348   test -n "$LORDER" && break
4349 done
4350
4351 # Extract the first word of "tar", so it can be a program name with args.
4352 set dummy tar; ac_word=$2
4353 echo "$as_me:$LINENO: checking for $ac_word" >&5
4354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4355 if test "${ac_cv_path_TAR+set}" = set; then
4356   echo $ECHO_N "(cached) $ECHO_C" >&6
4357 else
4358   case $TAR in
4359   [\\/]* | ?:[\\/]*)
4360   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4361   ;;
4362   *)
4363   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4364 for as_dir in $PATH
4365 do
4366   IFS=$as_save_IFS
4367   test -z "$as_dir" && as_dir=.
4368   for ac_exec_ext in '' $ac_executable_extensions; do
4369   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4370     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4371     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4372     break 2
4373   fi
4374 done
4375 done
4376
4377   ;;
4378 esac
4379 fi
4380 TAR=$ac_cv_path_TAR
4381
4382 if test -n "$TAR"; then
4383   echo "$as_me:$LINENO: result: $TAR" >&5
4384 echo "${ECHO_T}$TAR" >&6
4385 else
4386   echo "$as_me:$LINENO: result: no" >&5
4387 echo "${ECHO_T}no" >&6
4388 fi
4389
4390
4391   if test -n "$ac_tool_prefix"; then
4392   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4393 set dummy ${ac_tool_prefix}strip; ac_word=$2
4394 echo "$as_me:$LINENO: checking for $ac_word" >&5
4395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4396 if test "${ac_cv_prog_STRIP+set}" = set; then
4397   echo $ECHO_N "(cached) $ECHO_C" >&6
4398 else
4399   if test -n "$STRIP"; then
4400   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4401 else
4402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4403 for as_dir in $PATH
4404 do
4405   IFS=$as_save_IFS
4406   test -z "$as_dir" && as_dir=.
4407   for ac_exec_ext in '' $ac_executable_extensions; do
4408   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4409     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4410     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4411     break 2
4412   fi
4413 done
4414 done
4415
4416 fi
4417 fi
4418 STRIP=$ac_cv_prog_STRIP
4419 if test -n "$STRIP"; then
4420   echo "$as_me:$LINENO: result: $STRIP" >&5
4421 echo "${ECHO_T}$STRIP" >&6
4422 else
4423   echo "$as_me:$LINENO: result: no" >&5
4424 echo "${ECHO_T}no" >&6
4425 fi
4426
4427 fi
4428 if test -z "$ac_cv_prog_STRIP"; then
4429   ac_ct_STRIP=$STRIP
4430   # Extract the first word of "strip", so it can be a program name with args.
4431 set dummy strip; ac_word=$2
4432 echo "$as_me:$LINENO: checking for $ac_word" >&5
4433 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4434 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4435   echo $ECHO_N "(cached) $ECHO_C" >&6
4436 else
4437   if test -n "$ac_ct_STRIP"; then
4438   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4439 else
4440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4441 for as_dir in $PATH
4442 do
4443   IFS=$as_save_IFS
4444   test -z "$as_dir" && as_dir=.
4445   for ac_exec_ext in '' $ac_executable_extensions; do
4446   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4447     ac_cv_prog_ac_ct_STRIP="strip"
4448     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4449     break 2
4450   fi
4451 done
4452 done
4453
4454   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4455 fi
4456 fi
4457 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4458 if test -n "$ac_ct_STRIP"; then
4459   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4460 echo "${ECHO_T}$ac_ct_STRIP" >&6
4461 else
4462   echo "$as_me:$LINENO: result: no" >&5
4463 echo "${ECHO_T}no" >&6
4464 fi
4465
4466   STRIP=$ac_ct_STRIP
4467 else
4468   STRIP="$ac_cv_prog_STRIP"
4469 fi
4470
4471
4472   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4473 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4474   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4475     STRIP_STATIC_LIB="$STRIP -x"
4476     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4477     echo "$as_me:$LINENO: result: yes" >&5
4478 echo "${ECHO_T}yes" >&6
4479   else
4480     STRIP_STATIC_LIB=:
4481     STRIP_SHARED_LIB=:
4482     echo "$as_me:$LINENO: result: no" >&5
4483 echo "${ECHO_T}no" >&6
4484   fi
4485
4486
4487
4488
4489 for ac_prog in 'bison -y'
4490 do
4491   # Extract the first word of "$ac_prog", so it can be a program name with args.
4492 set dummy $ac_prog; ac_word=$2
4493 echo "$as_me:$LINENO: checking for $ac_word" >&5
4494 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4495 if test "${ac_cv_prog_YACC+set}" = set; then
4496   echo $ECHO_N "(cached) $ECHO_C" >&6
4497 else
4498   if test -n "$YACC"; then
4499   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4500 else
4501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4502 for as_dir in $PATH
4503 do
4504   IFS=$as_save_IFS
4505   test -z "$as_dir" && as_dir=.
4506   for ac_exec_ext in '' $ac_executable_extensions; do
4507   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4508     ac_cv_prog_YACC="$ac_prog"
4509     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4510     break 2
4511   fi
4512 done
4513 done
4514
4515 fi
4516 fi
4517 YACC=$ac_cv_prog_YACC
4518 if test -n "$YACC"; then
4519   echo "$as_me:$LINENO: result: $YACC" >&5
4520 echo "${ECHO_T}$YACC" >&6
4521 else
4522   echo "$as_me:$LINENO: result: no" >&5
4523 echo "${ECHO_T}no" >&6
4524 fi
4525
4526   test -n "$YACC" && break
4527 done
4528
4529
4530 if test "$YACC"; then
4531   if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4532     { echo "$as_me:$LINENO: WARNING:
4533 *** If you are going to modify the grammar files or build from CVS, the installed
4534 *** version of Bison is too old.  Bison version 1.875 or later is required." >&5
4535 echo "$as_me: WARNING:
4536 *** If you are going to modify the grammar files or build from CVS, the installed
4537 *** version of Bison is too old.  Bison version 1.875 or later is required." >&2;}
4538   fi
4539 fi
4540
4541 if test -z "$YACC"; then
4542   { echo "$as_me:$LINENO: WARNING:
4543 *** Without Bison you will not be able to build PostgreSQL from CVS or
4544 *** change any of the parser definition files.  You can obtain Bison from
4545 *** a GNU mirror site.  (If you are using the official distribution of
4546 *** PostgreSQL then you do not need to worry about this because the Bison
4547 *** output is pre-generated.)  To use a different yacc program (possible,
4548 *** but not recommended), set the environment variable YACC before running
4549 *** 'configure'." >&5
4550 echo "$as_me: WARNING:
4551 *** Without Bison you will not be able to build PostgreSQL from CVS or
4552 *** change any of the parser definition files.  You can obtain Bison from
4553 *** a GNU mirror site.  (If you are using the official distribution of
4554 *** PostgreSQL then you do not need to worry about this because the Bison
4555 *** output is pre-generated.)  To use a different yacc program (possible,
4556 *** but not recommended), set the environment variable YACC before running
4557 *** 'configure'." >&2;}
4558 fi
4559
4560
4561 # Extract the first word of "perl", so it can be a program name with args.
4562 set dummy perl; ac_word=$2
4563 echo "$as_me:$LINENO: checking for $ac_word" >&5
4564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4565 if test "${ac_cv_path_PERL+set}" = set; then
4566   echo $ECHO_N "(cached) $ECHO_C" >&6
4567 else
4568   case $PERL in
4569   [\\/]* | ?:[\\/]*)
4570   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4571   ;;
4572   *)
4573   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4574 for as_dir in $PATH
4575 do
4576   IFS=$as_save_IFS
4577   test -z "$as_dir" && as_dir=.
4578   for ac_exec_ext in '' $ac_executable_extensions; do
4579   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4580     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4581     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4582     break 2
4583   fi
4584 done
4585 done
4586
4587   ;;
4588 esac
4589 fi
4590 PERL=$ac_cv_path_PERL
4591
4592 if test -n "$PERL"; then
4593   echo "$as_me:$LINENO: result: $PERL" >&5
4594 echo "${ECHO_T}$PERL" >&6
4595 else
4596   echo "$as_me:$LINENO: result: no" >&5
4597 echo "${ECHO_T}no" >&6
4598 fi
4599
4600 if test "$with_perl" = yes; then
4601
4602 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4603 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4604 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4605 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4606 echo "${ECHO_T}$perl_archlibexp" >&6
4607 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4608 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4609 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4610 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4611 echo "${ECHO_T}$perl_privlibexp" >&6
4612 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4613 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4614 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4615 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4616 echo "${ECHO_T}$perl_useshrplib" >&6
4617
4618 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4619 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4620 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4621 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4622 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4623 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4624 echo "${ECHO_T}$perl_embed_ldflags" >&6
4625 fi
4626
4627 if test "$with_python" = yes; then
4628   # Extract the first word of "python", so it can be a program name with args.
4629 set dummy python; ac_word=$2
4630 echo "$as_me:$LINENO: checking for $ac_word" >&5
4631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4632 if test "${ac_cv_path_PYTHON+set}" = set; then
4633   echo $ECHO_N "(cached) $ECHO_C" >&6
4634 else
4635   case $PYTHON in
4636   [\\/]* | ?:[\\/]*)
4637   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4638   ;;
4639   *)
4640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4641 for as_dir in $PATH
4642 do
4643   IFS=$as_save_IFS
4644   test -z "$as_dir" && as_dir=.
4645   for ac_exec_ext in '' $ac_executable_extensions; do
4646   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4647     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4648     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4649     break 2
4650   fi
4651 done
4652 done
4653
4654   ;;
4655 esac
4656 fi
4657 PYTHON=$ac_cv_path_PYTHON
4658
4659 if test -n "$PYTHON"; then
4660   echo "$as_me:$LINENO: result: $PYTHON" >&5
4661 echo "${ECHO_T}$PYTHON" >&6
4662 else
4663   echo "$as_me:$LINENO: result: no" >&5
4664 echo "${ECHO_T}no" >&6
4665 fi
4666
4667 if test x"$PYTHON" = x""; then
4668   { { echo "$as_me:$LINENO: error: Python not found" >&5
4669 echo "$as_me: error: Python not found" >&2;}
4670    { (exit 1); exit 1; }; }
4671 fi
4672
4673
4674 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4675 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4676 if "${PYTHON}" 2>&- -c 'import distutils'
4677 then
4678     echo "$as_me:$LINENO: result: yes" >&5
4679 echo "${ECHO_T}yes" >&6
4680 else
4681     echo "$as_me:$LINENO: result: no" >&5
4682 echo "${ECHO_T}no" >&6
4683     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4684 echo "$as_me: error: distutils module not found" >&2;}
4685    { (exit 1); exit 1; }; }
4686 fi
4687 echo "$as_me:$LINENO: checking Python configuration directory" >&5
4688 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
4689 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4690 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')"`
4691 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
4692
4693 # This should be enough of a message.
4694 echo "$as_me:$LINENO: result: $python_configdir" >&5
4695 echo "${ECHO_T}$python_configdir" >&6
4696
4697
4698 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4699 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4700
4701 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
4702 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
4703 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
4704 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
4705
4706 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
4707 then
4708         # New way: use the official shared library
4709         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
4710         python_libspec="-L${python_libdir} -l${ldlibrary}"
4711 else
4712         # Old way: use libpython from python_configdir
4713         python_libdir="${python_configdir}"
4714         python_libspec="-L${python_libdir} -lpython${python_version}"
4715 fi
4716
4717 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
4718
4719 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
4720 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
4721
4722
4723 # threaded python is not supported on bsd's
4724 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
4725 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
4726 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
4727 if test "$pythreads" = "1"; then
4728   echo "$as_me:$LINENO: result: yes" >&5
4729 echo "${ECHO_T}yes" >&6
4730   case $host_os in
4731   openbsd*|freebsd4*)
4732     { { echo "$as_me:$LINENO: error: *** Threaded Python not supported on this platform ***" >&5
4733 echo "$as_me: error: *** Threaded Python not supported on this platform ***" >&2;}
4734    { (exit 1); exit 1; }; }
4735     ;;
4736   esac
4737 else
4738   echo "$as_me:$LINENO: result: no" >&5
4739 echo "${ECHO_T}no" >&6
4740 fi
4741
4742
4743 fi
4744
4745 # Supply a numeric version string for use by 3rd party add-ons
4746 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/A-Za-z.*$//' |
4747 $AWK -F'\.' '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
4748
4749 cat >>confdefs.h <<_ACEOF
4750 #define PG_VERSION_NUM $PG_VERSION_NUM
4751 _ACEOF
4752
4753
4754 ##
4755 ## Libraries
4756 ##
4757
4758 echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
4759 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6
4760 if test "${ac_cv_search_setproctitle+set}" = set; then
4761   echo $ECHO_N "(cached) $ECHO_C" >&6
4762 else
4763   ac_func_search_save_LIBS=$LIBS
4764 ac_cv_search_setproctitle=no
4765 cat >conftest.$ac_ext <<_ACEOF
4766 /* confdefs.h.  */
4767 _ACEOF
4768 cat confdefs.h >>conftest.$ac_ext
4769 cat >>conftest.$ac_ext <<_ACEOF
4770 /* end confdefs.h.  */
4771
4772 /* Override any gcc2 internal prototype to avoid an error.  */
4773 #ifdef __cplusplus
4774 extern "C"
4775 #endif
4776 /* We use char because int might match the return type of a gcc2
4777    builtin and then its argument prototype would still apply.  */
4778 char setproctitle ();
4779 int
4780 main ()
4781 {
4782 setproctitle ();
4783   ;
4784   return 0;
4785 }
4786 _ACEOF
4787 rm -f conftest.$ac_objext conftest$ac_exeext
4788 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4789   (eval $ac_link) 2>conftest.er1
4790   ac_status=$?
4791   grep -v '^ *+' conftest.er1 >conftest.err
4792   rm -f conftest.er1
4793   cat conftest.err >&5
4794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4795   (exit $ac_status); } &&
4796          { ac_try='test -z "$ac_c_werror_flag"
4797                          || test ! -s conftest.err'
4798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4799   (eval $ac_try) 2>&5
4800   ac_status=$?
4801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4802   (exit $ac_status); }; } &&
4803          { ac_try='test -s conftest$ac_exeext'
4804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4805   (eval $ac_try) 2>&5
4806   ac_status=$?
4807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4808   (exit $ac_status); }; }; then
4809   ac_cv_search_setproctitle="none required"
4810 else
4811   echo "$as_me: failed program was:" >&5
4812 sed 's/^/| /' conftest.$ac_ext >&5
4813
4814 fi
4815 rm -f conftest.err conftest.$ac_objext \
4816       conftest$ac_exeext conftest.$ac_ext
4817 if test "$ac_cv_search_setproctitle" = no; then
4818   for ac_lib in util; do
4819     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4820     cat >conftest.$ac_ext <<_ACEOF
4821 /* confdefs.h.  */
4822 _ACEOF
4823 cat confdefs.h >>conftest.$ac_ext
4824 cat >>conftest.$ac_ext <<_ACEOF
4825 /* end confdefs.h.  */
4826
4827 /* Override any gcc2 internal prototype to avoid an error.  */
4828 #ifdef __cplusplus
4829 extern "C"
4830 #endif
4831 /* We use char because int might match the return type of a gcc2
4832    builtin and then its argument prototype would still apply.  */
4833 char setproctitle ();
4834 int
4835 main ()
4836 {
4837 setproctitle ();
4838   ;
4839   return 0;
4840 }
4841 _ACEOF
4842 rm -f conftest.$ac_objext conftest$ac_exeext
4843 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4844   (eval $ac_link) 2>conftest.er1
4845   ac_status=$?
4846   grep -v '^ *+' conftest.er1 >conftest.err
4847   rm -f conftest.er1
4848   cat conftest.err >&5
4849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4850   (exit $ac_status); } &&
4851          { ac_try='test -z "$ac_c_werror_flag"
4852                          || test ! -s conftest.err'
4853   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4854   (eval $ac_try) 2>&5
4855   ac_status=$?
4856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4857   (exit $ac_status); }; } &&
4858          { ac_try='test -s conftest$ac_exeext'
4859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4860   (eval $ac_try) 2>&5
4861   ac_status=$?
4862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4863   (exit $ac_status); }; }; then
4864   ac_cv_search_setproctitle="-l$ac_lib"
4865 break
4866 else
4867   echo "$as_me: failed program was:" >&5
4868 sed 's/^/| /' conftest.$ac_ext >&5
4869
4870 fi
4871 rm -f conftest.err conftest.$ac_objext \
4872       conftest$ac_exeext conftest.$ac_ext
4873   done
4874 fi
4875 LIBS=$ac_func_search_save_LIBS
4876 fi
4877 echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
4878 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6
4879 if test "$ac_cv_search_setproctitle" != no; then
4880   test "$ac_cv_search_setproctitle" = "none required" || LIBS="$ac_cv_search_setproctitle $LIBS"
4881
4882 fi
4883
4884 echo "$as_me:$LINENO: checking for library containing pow" >&5
4885 echo $ECHO_N "checking for library containing pow... $ECHO_C" >&6
4886 if test "${ac_cv_search_pow+set}" = set; then
4887   echo $ECHO_N "(cached) $ECHO_C" >&6
4888 else
4889   ac_func_search_save_LIBS=$LIBS
4890 ac_cv_search_pow=no
4891 cat >conftest.$ac_ext <<_ACEOF
4892 /* confdefs.h.  */
4893 _ACEOF
4894 cat confdefs.h >>conftest.$ac_ext
4895 cat >>conftest.$ac_ext <<_ACEOF
4896 /* end confdefs.h.  */
4897
4898 /* Override any gcc2 internal prototype to avoid an error.  */
4899 #ifdef __cplusplus
4900 extern "C"
4901 #endif
4902 /* We use char because int might match the return type of a gcc2
4903    builtin and then its argument prototype would still apply.  */
4904 char pow ();
4905 int
4906 main ()
4907 {
4908 pow ();
4909   ;
4910   return 0;
4911 }
4912 _ACEOF
4913 rm -f conftest.$ac_objext conftest$ac_exeext
4914 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4915   (eval $ac_link) 2>conftest.er1
4916   ac_status=$?
4917   grep -v '^ *+' conftest.er1 >conftest.err
4918   rm -f conftest.er1
4919   cat conftest.err >&5
4920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4921   (exit $ac_status); } &&
4922          { ac_try='test -z "$ac_c_werror_flag"
4923                          || test ! -s conftest.err'
4924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4925   (eval $ac_try) 2>&5
4926   ac_status=$?
4927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4928   (exit $ac_status); }; } &&
4929          { ac_try='test -s conftest$ac_exeext'
4930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4931   (eval $ac_try) 2>&5
4932   ac_status=$?
4933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4934   (exit $ac_status); }; }; then
4935   ac_cv_search_pow="none required"
4936 else
4937   echo "$as_me: failed program was:" >&5
4938 sed 's/^/| /' conftest.$ac_ext >&5
4939
4940 fi
4941 rm -f conftest.err conftest.$ac_objext \
4942       conftest$ac_exeext conftest.$ac_ext
4943 if test "$ac_cv_search_pow" = no; then
4944   for ac_lib in m; do
4945     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4946     cat >conftest.$ac_ext <<_ACEOF
4947 /* confdefs.h.  */
4948 _ACEOF
4949 cat confdefs.h >>conftest.$ac_ext
4950 cat >>conftest.$ac_ext <<_ACEOF
4951 /* end confdefs.h.  */
4952
4953 /* Override any gcc2 internal prototype to avoid an error.  */
4954 #ifdef __cplusplus
4955 extern "C"
4956 #endif
4957 /* We use char because int might match the return type of a gcc2
4958    builtin and then its argument prototype would still apply.  */
4959 char pow ();
4960 int
4961 main ()
4962 {
4963 pow ();
4964   ;
4965   return 0;
4966 }
4967 _ACEOF
4968 rm -f conftest.$ac_objext conftest$ac_exeext
4969 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4970   (eval $ac_link) 2>conftest.er1
4971   ac_status=$?
4972   grep -v '^ *+' conftest.er1 >conftest.err
4973   rm -f conftest.er1
4974   cat conftest.err >&5
4975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4976   (exit $ac_status); } &&
4977          { ac_try='test -z "$ac_c_werror_flag"
4978                          || test ! -s conftest.err'
4979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4980   (eval $ac_try) 2>&5
4981   ac_status=$?
4982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4983   (exit $ac_status); }; } &&
4984          { ac_try='test -s conftest$ac_exeext'
4985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4986   (eval $ac_try) 2>&5
4987   ac_status=$?
4988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4989   (exit $ac_status); }; }; then
4990   ac_cv_search_pow="-l$ac_lib"
4991 break
4992 else
4993   echo "$as_me: failed program was:" >&5
4994 sed 's/^/| /' conftest.$ac_ext >&5
4995
4996 fi
4997 rm -f conftest.err conftest.$ac_objext \
4998       conftest$ac_exeext conftest.$ac_ext
4999   done
5000 fi
5001 LIBS=$ac_func_search_save_LIBS
5002 fi
5003 echo "$as_me:$LINENO: result: $ac_cv_search_pow" >&5
5004 echo "${ECHO_T}$ac_cv_search_pow" >&6
5005 if test "$ac_cv_search_pow" != no; then
5006   test "$ac_cv_search_pow" = "none required" || LIBS="$ac_cv_search_pow $LIBS"
5007
5008 fi
5009
5010 echo "$as_me:$LINENO: checking for library containing dlopen" >&5
5011 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6
5012 if test "${ac_cv_search_dlopen+set}" = set; then
5013   echo $ECHO_N "(cached) $ECHO_C" >&6
5014 else
5015   ac_func_search_save_LIBS=$LIBS
5016 ac_cv_search_dlopen=no
5017 cat >conftest.$ac_ext <<_ACEOF
5018 /* confdefs.h.  */
5019 _ACEOF
5020 cat confdefs.h >>conftest.$ac_ext
5021 cat >>conftest.$ac_ext <<_ACEOF
5022 /* end confdefs.h.  */
5023
5024 /* Override any gcc2 internal prototype to avoid an error.  */
5025 #ifdef __cplusplus
5026 extern "C"
5027 #endif
5028 /* We use char because int might match the return type of a gcc2
5029    builtin and then its argument prototype would still apply.  */
5030 char dlopen ();
5031 int
5032 main ()
5033 {
5034 dlopen ();
5035   ;
5036   return 0;
5037 }
5038 _ACEOF
5039 rm -f conftest.$ac_objext conftest$ac_exeext
5040 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5041   (eval $ac_link) 2>conftest.er1
5042   ac_status=$?
5043   grep -v '^ *+' conftest.er1 >conftest.err
5044   rm -f conftest.er1
5045   cat conftest.err >&5
5046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5047   (exit $ac_status); } &&
5048          { ac_try='test -z "$ac_c_werror_flag"
5049                          || test ! -s conftest.err'
5050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5051   (eval $ac_try) 2>&5
5052   ac_status=$?
5053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5054   (exit $ac_status); }; } &&
5055          { ac_try='test -s conftest$ac_exeext'
5056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5057   (eval $ac_try) 2>&5
5058   ac_status=$?
5059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5060   (exit $ac_status); }; }; then
5061   ac_cv_search_dlopen="none required"
5062 else
5063   echo "$as_me: failed program was:" >&5
5064 sed 's/^/| /' conftest.$ac_ext >&5
5065
5066 fi
5067 rm -f conftest.err conftest.$ac_objext \
5068       conftest$ac_exeext conftest.$ac_ext
5069 if test "$ac_cv_search_dlopen" = no; then
5070   for ac_lib in dl; do
5071     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5072     cat >conftest.$ac_ext <<_ACEOF
5073 /* confdefs.h.  */
5074 _ACEOF
5075 cat confdefs.h >>conftest.$ac_ext
5076 cat >>conftest.$ac_ext <<_ACEOF
5077 /* end confdefs.h.  */
5078
5079 /* Override any gcc2 internal prototype to avoid an error.  */
5080 #ifdef __cplusplus
5081 extern "C"
5082 #endif
5083 /* We use char because int might match the return type of a gcc2
5084    builtin and then its argument prototype would still apply.  */
5085 char dlopen ();
5086 int
5087 main ()
5088 {
5089 dlopen ();
5090   ;
5091   return 0;
5092 }
5093 _ACEOF
5094 rm -f conftest.$ac_objext conftest$ac_exeext
5095 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5096   (eval $ac_link) 2>conftest.er1
5097   ac_status=$?
5098   grep -v '^ *+' conftest.er1 >conftest.err
5099   rm -f conftest.er1
5100   cat conftest.err >&5
5101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5102   (exit $ac_status); } &&
5103          { ac_try='test -z "$ac_c_werror_flag"
5104                          || test ! -s conftest.err'
5105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5106   (eval $ac_try) 2>&5
5107   ac_status=$?
5108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5109   (exit $ac_status); }; } &&
5110          { ac_try='test -s conftest$ac_exeext'
5111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5112   (eval $ac_try) 2>&5
5113   ac_status=$?
5114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5115   (exit $ac_status); }; }; then
5116   ac_cv_search_dlopen="-l$ac_lib"
5117 break
5118 else
5119   echo "$as_me: failed program was:" >&5
5120 sed 's/^/| /' conftest.$ac_ext >&5
5121
5122 fi
5123 rm -f conftest.err conftest.$ac_objext \
5124       conftest$ac_exeext conftest.$ac_ext
5125   done
5126 fi
5127 LIBS=$ac_func_search_save_LIBS
5128 fi
5129 echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
5130 echo "${ECHO_T}$ac_cv_search_dlopen" >&6
5131 if test "$ac_cv_search_dlopen" != no; then
5132   test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
5133
5134 fi
5135
5136 echo "$as_me:$LINENO: checking for library containing socket" >&5
5137 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
5138 if test "${ac_cv_search_socket+set}" = set; then
5139   echo $ECHO_N "(cached) $ECHO_C" >&6
5140 else
5141   ac_func_search_save_LIBS=$LIBS
5142 ac_cv_search_socket=no
5143 cat >conftest.$ac_ext <<_ACEOF
5144 /* confdefs.h.  */
5145 _ACEOF
5146 cat confdefs.h >>conftest.$ac_ext
5147 cat >>conftest.$ac_ext <<_ACEOF
5148 /* end confdefs.h.  */
5149
5150 /* Override any gcc2 internal prototype to avoid an error.  */
5151 #ifdef __cplusplus
5152 extern "C"
5153 #endif
5154 /* We use char because int might match the return type of a gcc2
5155    builtin and then its argument prototype would still apply.  */
5156 char socket ();
5157 int
5158 main ()
5159 {
5160 socket ();
5161   ;
5162   return 0;
5163 }
5164 _ACEOF
5165 rm -f conftest.$ac_objext conftest$ac_exeext
5166 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5167   (eval $ac_link) 2>conftest.er1
5168   ac_status=$?
5169   grep -v '^ *+' conftest.er1 >conftest.err
5170   rm -f conftest.er1
5171   cat conftest.err >&5
5172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5173   (exit $ac_status); } &&
5174          { ac_try='test -z "$ac_c_werror_flag"
5175                          || test ! -s conftest.err'
5176   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5177   (eval $ac_try) 2>&5
5178   ac_status=$?
5179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5180   (exit $ac_status); }; } &&
5181          { ac_try='test -s conftest$ac_exeext'
5182   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5183   (eval $ac_try) 2>&5
5184   ac_status=$?
5185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5186   (exit $ac_status); }; }; then
5187   ac_cv_search_socket="none required"
5188 else
5189   echo "$as_me: failed program was:" >&5
5190 sed 's/^/| /' conftest.$ac_ext >&5
5191
5192 fi
5193 rm -f conftest.err conftest.$ac_objext \
5194       conftest$ac_exeext conftest.$ac_ext
5195 if test "$ac_cv_search_socket" = no; then
5196   for ac_lib in socket wsock32; do
5197     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5198     cat >conftest.$ac_ext <<_ACEOF
5199 /* confdefs.h.  */
5200 _ACEOF
5201 cat confdefs.h >>conftest.$ac_ext
5202 cat >>conftest.$ac_ext <<_ACEOF
5203 /* end confdefs.h.  */
5204
5205 /* Override any gcc2 internal prototype to avoid an error.  */
5206 #ifdef __cplusplus
5207 extern "C"
5208 #endif
5209 /* We use char because int might match the return type of a gcc2
5210    builtin and then its argument prototype would still apply.  */
5211 char socket ();
5212 int
5213 main ()
5214 {
5215 socket ();
5216   ;
5217   return 0;
5218 }
5219 _ACEOF
5220 rm -f conftest.$ac_objext conftest$ac_exeext
5221 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5222   (eval $ac_link) 2>conftest.er1
5223   ac_status=$?
5224   grep -v '^ *+' conftest.er1 >conftest.err
5225   rm -f conftest.er1
5226   cat conftest.err >&5
5227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5228   (exit $ac_status); } &&
5229          { ac_try='test -z "$ac_c_werror_flag"
5230                          || test ! -s conftest.err'
5231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5232   (eval $ac_try) 2>&5
5233   ac_status=$?
5234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5235   (exit $ac_status); }; } &&
5236          { ac_try='test -s conftest$ac_exeext'
5237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5238   (eval $ac_try) 2>&5
5239   ac_status=$?
5240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5241   (exit $ac_status); }; }; then
5242   ac_cv_search_socket="-l$ac_lib"
5243 break
5244 else
5245   echo "$as_me: failed program was:" >&5
5246 sed 's/^/| /' conftest.$ac_ext >&5
5247
5248 fi
5249 rm -f conftest.err conftest.$ac_objext \
5250       conftest$ac_exeext conftest.$ac_ext
5251   done
5252 fi
5253 LIBS=$ac_func_search_save_LIBS
5254 fi
5255 echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
5256 echo "${ECHO_T}$ac_cv_search_socket" >&6
5257 if test "$ac_cv_search_socket" != no; then
5258   test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
5259
5260 fi
5261
5262 echo "$as_me:$LINENO: checking for library containing shl_load" >&5
5263 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6
5264 if test "${ac_cv_search_shl_load+set}" = set; then
5265   echo $ECHO_N "(cached) $ECHO_C" >&6
5266 else
5267   ac_func_search_save_LIBS=$LIBS
5268 ac_cv_search_shl_load=no
5269 cat >conftest.$ac_ext <<_ACEOF
5270 /* confdefs.h.  */
5271 _ACEOF
5272 cat confdefs.h >>conftest.$ac_ext
5273 cat >>conftest.$ac_ext <<_ACEOF
5274 /* end confdefs.h.  */
5275
5276 /* Override any gcc2 internal prototype to avoid an error.  */
5277 #ifdef __cplusplus
5278 extern "C"
5279 #endif
5280 /* We use char because int might match the return type of a gcc2
5281    builtin and then its argument prototype would still apply.  */
5282 char shl_load ();
5283 int
5284 main ()
5285 {
5286 shl_load ();
5287   ;
5288   return 0;
5289 }
5290 _ACEOF
5291 rm -f conftest.$ac_objext conftest$ac_exeext
5292 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5293   (eval $ac_link) 2>conftest.er1
5294   ac_status=$?
5295   grep -v '^ *+' conftest.er1 >conftest.err
5296   rm -f conftest.er1
5297   cat conftest.err >&5
5298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5299   (exit $ac_status); } &&
5300          { ac_try='test -z "$ac_c_werror_flag"
5301                          || test ! -s conftest.err'
5302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5303   (eval $ac_try) 2>&5
5304   ac_status=$?
5305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5306   (exit $ac_status); }; } &&
5307          { ac_try='test -s conftest$ac_exeext'
5308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5309   (eval $ac_try) 2>&5
5310   ac_status=$?
5311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5312   (exit $ac_status); }; }; then
5313   ac_cv_search_shl_load="none required"
5314 else
5315   echo "$as_me: failed program was:" >&5
5316 sed 's/^/| /' conftest.$ac_ext >&5
5317
5318 fi
5319 rm -f conftest.err conftest.$ac_objext \
5320       conftest$ac_exeext conftest.$ac_ext
5321 if test "$ac_cv_search_shl_load" = no; then
5322   for ac_lib in dld; do
5323     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5324     cat >conftest.$ac_ext <<_ACEOF
5325 /* confdefs.h.  */
5326 _ACEOF
5327 cat confdefs.h >>conftest.$ac_ext
5328 cat >>conftest.$ac_ext <<_ACEOF
5329 /* end confdefs.h.  */
5330
5331 /* Override any gcc2 internal prototype to avoid an error.  */
5332 #ifdef __cplusplus
5333 extern "C"
5334 #endif
5335 /* We use char because int might match the return type of a gcc2
5336    builtin and then its argument prototype would still apply.  */
5337 char shl_load ();
5338 int
5339 main ()
5340 {
5341 shl_load ();
5342   ;
5343   return 0;
5344 }
5345 _ACEOF
5346 rm -f conftest.$ac_objext conftest$ac_exeext
5347 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5348   (eval $ac_link) 2>conftest.er1
5349   ac_status=$?
5350   grep -v '^ *+' conftest.er1 >conftest.err
5351   rm -f conftest.er1
5352   cat conftest.err >&5
5353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5354   (exit $ac_status); } &&
5355          { ac_try='test -z "$ac_c_werror_flag"
5356                          || test ! -s conftest.err'
5357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5358   (eval $ac_try) 2>&5
5359   ac_status=$?
5360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5361   (exit $ac_status); }; } &&
5362          { ac_try='test -s conftest$ac_exeext'
5363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5364   (eval $ac_try) 2>&5
5365   ac_status=$?
5366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5367   (exit $ac_status); }; }; then
5368   ac_cv_search_shl_load="-l$ac_lib"
5369 break
5370 else
5371   echo "$as_me: failed program was:" >&5
5372 sed 's/^/| /' conftest.$ac_ext >&5
5373
5374 fi
5375 rm -f conftest.err conftest.$ac_objext \
5376       conftest$ac_exeext conftest.$ac_ext
5377   done
5378 fi
5379 LIBS=$ac_func_search_save_LIBS
5380 fi
5381 echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
5382 echo "${ECHO_T}$ac_cv_search_shl_load" >&6
5383 if test "$ac_cv_search_shl_load" != no; then
5384   test "$ac_cv_search_shl_load" = "none required" || LIBS="$ac_cv_search_shl_load $LIBS"
5385
5386 fi
5387
5388 # We only use libld in port/dynloader/aix.c
5389 case $host_os in
5390      aix*)
5391         echo "$as_me:$LINENO: checking for library containing ldopen" >&5
5392 echo $ECHO_N "checking for library containing ldopen... $ECHO_C" >&6
5393 if test "${ac_cv_search_ldopen+set}" = set; then
5394   echo $ECHO_N "(cached) $ECHO_C" >&6
5395 else
5396   ac_func_search_save_LIBS=$LIBS
5397 ac_cv_search_ldopen=no
5398 cat >conftest.$ac_ext <<_ACEOF
5399 /* confdefs.h.  */
5400 _ACEOF
5401 cat confdefs.h >>conftest.$ac_ext
5402 cat >>conftest.$ac_ext <<_ACEOF
5403 /* end confdefs.h.  */
5404
5405 /* Override any gcc2 internal prototype to avoid an error.  */
5406 #ifdef __cplusplus
5407 extern "C"
5408 #endif
5409 /* We use char because int might match the return type of a gcc2
5410    builtin and then its argument prototype would still apply.  */
5411 char ldopen ();
5412 int
5413 main ()
5414 {
5415 ldopen ();
5416   ;
5417   return 0;
5418 }
5419 _ACEOF
5420 rm -f conftest.$ac_objext conftest$ac_exeext
5421 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5422   (eval $ac_link) 2>conftest.er1
5423   ac_status=$?
5424   grep -v '^ *+' conftest.er1 >conftest.err
5425   rm -f conftest.er1
5426   cat conftest.err >&5
5427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5428   (exit $ac_status); } &&
5429          { ac_try='test -z "$ac_c_werror_flag"
5430                          || test ! -s conftest.err'
5431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5432   (eval $ac_try) 2>&5
5433   ac_status=$?
5434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5435   (exit $ac_status); }; } &&
5436          { ac_try='test -s conftest$ac_exeext'
5437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5438   (eval $ac_try) 2>&5
5439   ac_status=$?
5440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5441   (exit $ac_status); }; }; then
5442   ac_cv_search_ldopen="none required"
5443 else
5444   echo "$as_me: failed program was:" >&5
5445 sed 's/^/| /' conftest.$ac_ext >&5
5446
5447 fi
5448 rm -f conftest.err conftest.$ac_objext \
5449       conftest$ac_exeext conftest.$ac_ext
5450 if test "$ac_cv_search_ldopen" = no; then
5451   for ac_lib in ld; do
5452     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5453     cat >conftest.$ac_ext <<_ACEOF
5454 /* confdefs.h.  */
5455 _ACEOF
5456 cat confdefs.h >>conftest.$ac_ext
5457 cat >>conftest.$ac_ext <<_ACEOF
5458 /* end confdefs.h.  */
5459
5460 /* Override any gcc2 internal prototype to avoid an error.  */
5461 #ifdef __cplusplus
5462 extern "C"
5463 #endif
5464 /* We use char because int might match the return type of a gcc2
5465    builtin and then its argument prototype would still apply.  */
5466 char ldopen ();
5467 int
5468 main ()
5469 {
5470 ldopen ();
5471   ;
5472   return 0;
5473 }
5474 _ACEOF
5475 rm -f conftest.$ac_objext conftest$ac_exeext
5476 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5477   (eval $ac_link) 2>conftest.er1
5478   ac_status=$?
5479   grep -v '^ *+' conftest.er1 >conftest.err
5480   rm -f conftest.er1
5481   cat conftest.err >&5
5482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5483   (exit $ac_status); } &&
5484          { ac_try='test -z "$ac_c_werror_flag"
5485                          || test ! -s conftest.err'
5486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5487   (eval $ac_try) 2>&5
5488   ac_status=$?
5489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5490   (exit $ac_status); }; } &&
5491          { ac_try='test -s conftest$ac_exeext'
5492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5493   (eval $ac_try) 2>&5
5494   ac_status=$?
5495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5496   (exit $ac_status); }; }; then
5497   ac_cv_search_ldopen="-l$ac_lib"
5498 break
5499 else
5500   echo "$as_me: failed program was:" >&5
5501 sed 's/^/| /' conftest.$ac_ext >&5
5502
5503 fi
5504 rm -f conftest.err conftest.$ac_objext \
5505       conftest$ac_exeext conftest.$ac_ext
5506   done
5507 fi
5508 LIBS=$ac_func_search_save_LIBS
5509 fi
5510 echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
5511 echo "${ECHO_T}$ac_cv_search_ldopen" >&6
5512 if test "$ac_cv_search_ldopen" != no; then
5513   test "$ac_cv_search_ldopen" = "none required" || LIBS="$ac_cv_search_ldopen $LIBS"
5514
5515 fi
5516
5517         ;;
5518 esac
5519 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5520 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5521 if test "${ac_cv_search_getopt_long+set}" = set; then
5522   echo $ECHO_N "(cached) $ECHO_C" >&6
5523 else
5524   ac_func_search_save_LIBS=$LIBS
5525 ac_cv_search_getopt_long=no
5526 cat >conftest.$ac_ext <<_ACEOF
5527 /* confdefs.h.  */
5528 _ACEOF
5529 cat confdefs.h >>conftest.$ac_ext
5530 cat >>conftest.$ac_ext <<_ACEOF
5531 /* end confdefs.h.  */
5532
5533 /* Override any gcc2 internal prototype to avoid an error.  */
5534 #ifdef __cplusplus
5535 extern "C"
5536 #endif
5537 /* We use char because int might match the return type of a gcc2
5538    builtin and then its argument prototype would still apply.  */
5539 char getopt_long ();
5540 int
5541 main ()
5542 {
5543 getopt_long ();
5544   ;
5545   return 0;
5546 }
5547 _ACEOF
5548 rm -f conftest.$ac_objext conftest$ac_exeext
5549 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5550   (eval $ac_link) 2>conftest.er1
5551   ac_status=$?
5552   grep -v '^ *+' conftest.er1 >conftest.err
5553   rm -f conftest.er1
5554   cat conftest.err >&5
5555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5556   (exit $ac_status); } &&
5557          { ac_try='test -z "$ac_c_werror_flag"
5558                          || test ! -s conftest.err'
5559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5560   (eval $ac_try) 2>&5
5561   ac_status=$?
5562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5563   (exit $ac_status); }; } &&
5564          { ac_try='test -s conftest$ac_exeext'
5565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5566   (eval $ac_try) 2>&5
5567   ac_status=$?
5568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5569   (exit $ac_status); }; }; then
5570   ac_cv_search_getopt_long="none required"
5571 else
5572   echo "$as_me: failed program was:" >&5
5573 sed 's/^/| /' conftest.$ac_ext >&5
5574
5575 fi
5576 rm -f conftest.err conftest.$ac_objext \
5577       conftest$ac_exeext conftest.$ac_ext
5578 if test "$ac_cv_search_getopt_long" = no; then
5579   for ac_lib in getopt gnugetopt; do
5580     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5581     cat >conftest.$ac_ext <<_ACEOF
5582 /* confdefs.h.  */
5583 _ACEOF
5584 cat confdefs.h >>conftest.$ac_ext
5585 cat >>conftest.$ac_ext <<_ACEOF
5586 /* end confdefs.h.  */
5587
5588 /* Override any gcc2 internal prototype to avoid an error.  */
5589 #ifdef __cplusplus
5590 extern "C"
5591 #endif
5592 /* We use char because int might match the return type of a gcc2
5593    builtin and then its argument prototype would still apply.  */
5594 char getopt_long ();
5595 int
5596 main ()
5597 {
5598 getopt_long ();
5599   ;
5600   return 0;
5601 }
5602 _ACEOF
5603 rm -f conftest.$ac_objext conftest$ac_exeext
5604 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5605   (eval $ac_link) 2>conftest.er1
5606   ac_status=$?
5607   grep -v '^ *+' conftest.er1 >conftest.err
5608   rm -f conftest.er1
5609   cat conftest.err >&5
5610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5611   (exit $ac_status); } &&
5612          { ac_try='test -z "$ac_c_werror_flag"
5613                          || test ! -s conftest.err'
5614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5615   (eval $ac_try) 2>&5
5616   ac_status=$?
5617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5618   (exit $ac_status); }; } &&
5619          { ac_try='test -s conftest$ac_exeext'
5620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5621   (eval $ac_try) 2>&5
5622   ac_status=$?
5623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5624   (exit $ac_status); }; }; then
5625   ac_cv_search_getopt_long="-l$ac_lib"
5626 break
5627 else
5628   echo "$as_me: failed program was:" >&5
5629 sed 's/^/| /' conftest.$ac_ext >&5
5630
5631 fi
5632 rm -f conftest.err conftest.$ac_objext \
5633       conftest$ac_exeext conftest.$ac_ext
5634   done
5635 fi
5636 LIBS=$ac_func_search_save_LIBS
5637 fi
5638 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5639 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5640 if test "$ac_cv_search_getopt_long" != no; then
5641   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5642
5643 fi
5644
5645 echo "$as_me:$LINENO: checking for library containing crypt" >&5
5646 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
5647 if test "${ac_cv_search_crypt+set}" = set; then
5648   echo $ECHO_N "(cached) $ECHO_C" >&6
5649 else
5650   ac_func_search_save_LIBS=$LIBS
5651 ac_cv_search_crypt=no
5652 cat >conftest.$ac_ext <<_ACEOF
5653 /* confdefs.h.  */
5654 _ACEOF
5655 cat confdefs.h >>conftest.$ac_ext
5656 cat >>conftest.$ac_ext <<_ACEOF
5657 /* end confdefs.h.  */
5658
5659 /* Override any gcc2 internal prototype to avoid an error.  */
5660 #ifdef __cplusplus
5661 extern "C"
5662 #endif
5663 /* We use char because int might match the return type of a gcc2
5664    builtin and then its argument prototype would still apply.  */
5665 char crypt ();
5666 int
5667 main ()
5668 {
5669 crypt ();
5670   ;
5671   return 0;
5672 }
5673 _ACEOF
5674 rm -f conftest.$ac_objext conftest$ac_exeext
5675 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5676   (eval $ac_link) 2>conftest.er1
5677   ac_status=$?
5678   grep -v '^ *+' conftest.er1 >conftest.err
5679   rm -f conftest.er1
5680   cat conftest.err >&5
5681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5682   (exit $ac_status); } &&
5683          { ac_try='test -z "$ac_c_werror_flag"
5684                          || test ! -s conftest.err'
5685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5686   (eval $ac_try) 2>&5
5687   ac_status=$?
5688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5689   (exit $ac_status); }; } &&
5690          { ac_try='test -s conftest$ac_exeext'
5691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5692   (eval $ac_try) 2>&5
5693   ac_status=$?
5694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5695   (exit $ac_status); }; }; then
5696   ac_cv_search_crypt="none required"
5697 else
5698   echo "$as_me: failed program was:" >&5
5699 sed 's/^/| /' conftest.$ac_ext >&5
5700
5701 fi
5702 rm -f conftest.err conftest.$ac_objext \
5703       conftest$ac_exeext conftest.$ac_ext
5704 if test "$ac_cv_search_crypt" = no; then
5705   for ac_lib in crypt; do
5706     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5707     cat >conftest.$ac_ext <<_ACEOF
5708 /* confdefs.h.  */
5709 _ACEOF
5710 cat confdefs.h >>conftest.$ac_ext
5711 cat >>conftest.$ac_ext <<_ACEOF
5712 /* end confdefs.h.  */
5713
5714 /* Override any gcc2 internal prototype to avoid an error.  */
5715 #ifdef __cplusplus
5716 extern "C"
5717 #endif
5718 /* We use char because int might match the return type of a gcc2
5719    builtin and then its argument prototype would still apply.  */
5720 char crypt ();
5721 int
5722 main ()
5723 {
5724 crypt ();
5725   ;
5726   return 0;
5727 }
5728 _ACEOF
5729 rm -f conftest.$ac_objext conftest$ac_exeext
5730 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5731   (eval $ac_link) 2>conftest.er1
5732   ac_status=$?
5733   grep -v '^ *+' conftest.er1 >conftest.err
5734   rm -f conftest.er1
5735   cat conftest.err >&5
5736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5737   (exit $ac_status); } &&
5738          { ac_try='test -z "$ac_c_werror_flag"
5739                          || test ! -s conftest.err'
5740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5741   (eval $ac_try) 2>&5
5742   ac_status=$?
5743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5744   (exit $ac_status); }; } &&
5745          { ac_try='test -s conftest$ac_exeext'
5746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5747   (eval $ac_try) 2>&5
5748   ac_status=$?
5749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5750   (exit $ac_status); }; }; then
5751   ac_cv_search_crypt="-l$ac_lib"
5752 break
5753 else
5754   echo "$as_me: failed program was:" >&5
5755 sed 's/^/| /' conftest.$ac_ext >&5
5756
5757 fi
5758 rm -f conftest.err conftest.$ac_objext \
5759       conftest$ac_exeext conftest.$ac_ext
5760   done
5761 fi
5762 LIBS=$ac_func_search_save_LIBS
5763 fi
5764 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
5765 echo "${ECHO_T}$ac_cv_search_crypt" >&6
5766 if test "$ac_cv_search_crypt" != no; then
5767   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
5768
5769 fi
5770
5771 # Solaris:
5772 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
5773 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
5774 if test "${ac_cv_search_fdatasync+set}" = set; then
5775   echo $ECHO_N "(cached) $ECHO_C" >&6
5776 else
5777   ac_func_search_save_LIBS=$LIBS
5778 ac_cv_search_fdatasync=no
5779 cat >conftest.$ac_ext <<_ACEOF
5780 /* confdefs.h.  */
5781 _ACEOF
5782 cat confdefs.h >>conftest.$ac_ext
5783 cat >>conftest.$ac_ext <<_ACEOF
5784 /* end confdefs.h.  */
5785
5786 /* Override any gcc2 internal prototype to avoid an error.  */
5787 #ifdef __cplusplus
5788 extern "C"
5789 #endif
5790 /* We use char because int might match the return type of a gcc2
5791    builtin and then its argument prototype would still apply.  */
5792 char fdatasync ();
5793 int
5794 main ()
5795 {
5796 fdatasync ();
5797   ;
5798   return 0;
5799 }
5800 _ACEOF
5801 rm -f conftest.$ac_objext conftest$ac_exeext
5802 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5803   (eval $ac_link) 2>conftest.er1
5804   ac_status=$?
5805   grep -v '^ *+' conftest.er1 >conftest.err
5806   rm -f conftest.er1
5807   cat conftest.err >&5
5808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5809   (exit $ac_status); } &&
5810          { ac_try='test -z "$ac_c_werror_flag"
5811                          || test ! -s conftest.err'
5812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5813   (eval $ac_try) 2>&5
5814   ac_status=$?
5815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5816   (exit $ac_status); }; } &&
5817          { ac_try='test -s conftest$ac_exeext'
5818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5819   (eval $ac_try) 2>&5
5820   ac_status=$?
5821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5822   (exit $ac_status); }; }; then
5823   ac_cv_search_fdatasync="none required"
5824 else
5825   echo "$as_me: failed program was:" >&5
5826 sed 's/^/| /' conftest.$ac_ext >&5
5827
5828 fi
5829 rm -f conftest.err conftest.$ac_objext \
5830       conftest$ac_exeext conftest.$ac_ext
5831 if test "$ac_cv_search_fdatasync" = no; then
5832   for ac_lib in rt posix4; do
5833     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5834     cat >conftest.$ac_ext <<_ACEOF
5835 /* confdefs.h.  */
5836 _ACEOF
5837 cat confdefs.h >>conftest.$ac_ext
5838 cat >>conftest.$ac_ext <<_ACEOF
5839 /* end confdefs.h.  */
5840
5841 /* Override any gcc2 internal prototype to avoid an error.  */
5842 #ifdef __cplusplus
5843 extern "C"
5844 #endif
5845 /* We use char because int might match the return type of a gcc2
5846    builtin and then its argument prototype would still apply.  */
5847 char fdatasync ();
5848 int
5849 main ()
5850 {
5851 fdatasync ();
5852   ;
5853   return 0;
5854 }
5855 _ACEOF
5856 rm -f conftest.$ac_objext conftest$ac_exeext
5857 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5858   (eval $ac_link) 2>conftest.er1
5859   ac_status=$?
5860   grep -v '^ *+' conftest.er1 >conftest.err
5861   rm -f conftest.er1
5862   cat conftest.err >&5
5863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5864   (exit $ac_status); } &&
5865          { ac_try='test -z "$ac_c_werror_flag"
5866                          || test ! -s conftest.err'
5867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5868   (eval $ac_try) 2>&5
5869   ac_status=$?
5870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5871   (exit $ac_status); }; } &&
5872          { ac_try='test -s conftest$ac_exeext'
5873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5874   (eval $ac_try) 2>&5
5875   ac_status=$?
5876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5877   (exit $ac_status); }; }; then
5878   ac_cv_search_fdatasync="-l$ac_lib"
5879 break
5880 else
5881   echo "$as_me: failed program was:" >&5
5882 sed 's/^/| /' conftest.$ac_ext >&5
5883
5884 fi
5885 rm -f conftest.err conftest.$ac_objext \
5886       conftest$ac_exeext conftest.$ac_ext
5887   done
5888 fi
5889 LIBS=$ac_func_search_save_LIBS
5890 fi
5891 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
5892 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
5893 if test "$ac_cv_search_fdatasync" != no; then
5894   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
5895
5896 fi
5897
5898 # Cygwin:
5899 echo "$as_me:$LINENO: checking for library containing shmget" >&5
5900 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6
5901 if test "${ac_cv_search_shmget+set}" = set; then
5902   echo $ECHO_N "(cached) $ECHO_C" >&6
5903 else
5904   ac_func_search_save_LIBS=$LIBS
5905 ac_cv_search_shmget=no
5906 cat >conftest.$ac_ext <<_ACEOF
5907 /* confdefs.h.  */
5908 _ACEOF
5909 cat confdefs.h >>conftest.$ac_ext
5910 cat >>conftest.$ac_ext <<_ACEOF
5911 /* end confdefs.h.  */
5912
5913 /* Override any gcc2 internal prototype to avoid an error.  */
5914 #ifdef __cplusplus
5915 extern "C"
5916 #endif
5917 /* We use char because int might match the return type of a gcc2
5918    builtin and then its argument prototype would still apply.  */
5919 char shmget ();
5920 int
5921 main ()
5922 {
5923 shmget ();
5924   ;
5925   return 0;
5926 }
5927 _ACEOF
5928 rm -f conftest.$ac_objext conftest$ac_exeext
5929 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5930   (eval $ac_link) 2>conftest.er1
5931   ac_status=$?
5932   grep -v '^ *+' conftest.er1 >conftest.err
5933   rm -f conftest.er1
5934   cat conftest.err >&5
5935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5936   (exit $ac_status); } &&
5937          { ac_try='test -z "$ac_c_werror_flag"
5938                          || test ! -s conftest.err'
5939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5940   (eval $ac_try) 2>&5
5941   ac_status=$?
5942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5943   (exit $ac_status); }; } &&
5944          { ac_try='test -s conftest$ac_exeext'
5945   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5946   (eval $ac_try) 2>&5
5947   ac_status=$?
5948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5949   (exit $ac_status); }; }; then
5950   ac_cv_search_shmget="none required"
5951 else
5952   echo "$as_me: failed program was:" >&5
5953 sed 's/^/| /' conftest.$ac_ext >&5
5954
5955 fi
5956 rm -f conftest.err conftest.$ac_objext \
5957       conftest$ac_exeext conftest.$ac_ext
5958 if test "$ac_cv_search_shmget" = no; then
5959   for ac_lib in cygipc; do
5960     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5961     cat >conftest.$ac_ext <<_ACEOF
5962 /* confdefs.h.  */
5963 _ACEOF
5964 cat confdefs.h >>conftest.$ac_ext
5965 cat >>conftest.$ac_ext <<_ACEOF
5966 /* end confdefs.h.  */
5967
5968 /* Override any gcc2 internal prototype to avoid an error.  */
5969 #ifdef __cplusplus
5970 extern "C"
5971 #endif
5972 /* We use char because int might match the return type of a gcc2
5973    builtin and then its argument prototype would still apply.  */
5974 char shmget ();
5975 int
5976 main ()
5977 {
5978 shmget ();
5979   ;
5980   return 0;
5981 }
5982 _ACEOF
5983 rm -f conftest.$ac_objext conftest$ac_exeext
5984 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5985   (eval $ac_link) 2>conftest.er1
5986   ac_status=$?
5987   grep -v '^ *+' conftest.er1 >conftest.err
5988   rm -f conftest.er1
5989   cat conftest.err >&5
5990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5991   (exit $ac_status); } &&
5992          { ac_try='test -z "$ac_c_werror_flag"
5993                          || test ! -s conftest.err'
5994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5995   (eval $ac_try) 2>&5
5996   ac_status=$?
5997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5998   (exit $ac_status); }; } &&
5999          { ac_try='test -s conftest$ac_exeext'
6000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6001   (eval $ac_try) 2>&5
6002   ac_status=$?
6003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6004   (exit $ac_status); }; }; then
6005   ac_cv_search_shmget="-l$ac_lib"
6006 break
6007 else
6008   echo "$as_me: failed program was:" >&5
6009 sed 's/^/| /' conftest.$ac_ext >&5
6010
6011 fi
6012 rm -f conftest.err conftest.$ac_objext \
6013       conftest$ac_exeext conftest.$ac_ext
6014   done
6015 fi
6016 LIBS=$ac_func_search_save_LIBS
6017 fi
6018 echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
6019 echo "${ECHO_T}$ac_cv_search_shmget" >&6
6020 if test "$ac_cv_search_shmget" != no; then
6021   test "$ac_cv_search_shmget" = "none required" || LIBS="$ac_cv_search_shmget $LIBS"
6022
6023 fi
6024
6025
6026 if test "$with_readline" = yes; then
6027
6028
6029 if test "${pgac_cv_check_readline+set}" = set; then
6030   echo $ECHO_N "(cached) $ECHO_C" >&6
6031 else
6032   pgac_cv_check_readline=no
6033 pgac_save_LIBS=$LIBS
6034 if test x"$with_libedit_preferred" != x"yes"
6035 then    READLINE_ORDER="-lreadline -ledit"
6036 else    READLINE_ORDER="-ledit -lreadline"
6037 fi
6038 for pgac_rllib in $READLINE_ORDER ; do
6039   echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6040 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6
6041   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6042     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6043     cat >conftest.$ac_ext <<_ACEOF
6044 /* confdefs.h.  */
6045 _ACEOF
6046 cat confdefs.h >>conftest.$ac_ext
6047 cat >>conftest.$ac_ext <<_ACEOF
6048 /* end confdefs.h.  */
6049
6050 /* Override any gcc2 internal prototype to avoid an error.  */
6051 #ifdef __cplusplus
6052 extern "C"
6053 #endif
6054 /* We use char because int might match the return type of a gcc2
6055    builtin and then its argument prototype would still apply.  */
6056 char readline ();
6057 int
6058 main ()
6059 {
6060 readline ();
6061   ;
6062   return 0;
6063 }
6064 _ACEOF
6065 rm -f conftest.$ac_objext conftest$ac_exeext
6066 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6067   (eval $ac_link) 2>conftest.er1
6068   ac_status=$?
6069   grep -v '^ *+' conftest.er1 >conftest.err
6070   rm -f conftest.er1
6071   cat conftest.err >&5
6072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6073   (exit $ac_status); } &&
6074          { ac_try='test -z "$ac_c_werror_flag"
6075                          || test ! -s conftest.err'
6076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6077   (eval $ac_try) 2>&5
6078   ac_status=$?
6079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6080   (exit $ac_status); }; } &&
6081          { ac_try='test -s conftest$ac_exeext'
6082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6083   (eval $ac_try) 2>&5
6084   ac_status=$?
6085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6086   (exit $ac_status); }; }; then
6087
6088       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6089       # recognize dependent libraries; assume curses is needed if we didn't
6090       # find any dependency.
6091       case $host_os in
6092         netbsd* | openbsd* | irix*)
6093           if test x"$pgac_lib" = x"" ; then
6094             pgac_lib=" -lcurses"
6095           fi ;;
6096       esac
6097
6098       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6099       break
6100
6101 else
6102   echo "$as_me: failed program was:" >&5
6103 sed 's/^/| /' conftest.$ac_ext >&5
6104
6105 fi
6106 rm -f conftest.err conftest.$ac_objext \
6107       conftest$ac_exeext conftest.$ac_ext
6108   done
6109   if test "$pgac_cv_check_readline" != no ; then
6110     echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6111 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6112     break
6113   else
6114     echo "$as_me:$LINENO: result: no" >&5
6115 echo "${ECHO_T}no" >&6
6116   fi
6117 done
6118 LIBS=$pgac_save_LIBS
6119
6120 fi
6121
6122 if test "$pgac_cv_check_readline" != no ; then
6123   LIBS="$pgac_cv_check_readline $LIBS"
6124
6125 cat >>confdefs.h <<\_ACEOF
6126 #define HAVE_LIBREADLINE 1
6127 _ACEOF
6128
6129 fi
6130
6131
6132   if test x"$pgac_cv_check_readline" = x"no"; then
6133     { { echo "$as_me:$LINENO: error: readline library not found
6134 If you have readline already installed, see config.log for details on the
6135 failure.  It is possible the compiler isn't looking in the proper directory.
6136 Use --without-readline to disable readline support." >&5
6137 echo "$as_me: error: readline library not found
6138 If you have readline already installed, see config.log for details on the
6139 failure.  It is possible the compiler isn't looking in the proper directory.
6140 Use --without-readline to disable readline support." >&2;}
6141    { (exit 1); exit 1; }; }
6142   fi
6143 fi
6144
6145 if test "$with_zlib" = yes; then
6146
6147 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6148 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6149 if test "${ac_cv_lib_z_inflate+set}" = set; then
6150   echo $ECHO_N "(cached) $ECHO_C" >&6
6151 else
6152   ac_check_lib_save_LIBS=$LIBS
6153 LIBS="-lz  $LIBS"
6154 cat >conftest.$ac_ext <<_ACEOF
6155 /* confdefs.h.  */
6156 _ACEOF
6157 cat confdefs.h >>conftest.$ac_ext
6158 cat >>conftest.$ac_ext <<_ACEOF
6159 /* end confdefs.h.  */
6160
6161 /* Override any gcc2 internal prototype to avoid an error.  */
6162 #ifdef __cplusplus
6163 extern "C"
6164 #endif
6165 /* We use char because int might match the return type of a gcc2
6166    builtin and then its argument prototype would still apply.  */
6167 char inflate ();
6168 int
6169 main ()
6170 {
6171 inflate ();
6172   ;
6173   return 0;
6174 }
6175 _ACEOF
6176 rm -f conftest.$ac_objext conftest$ac_exeext
6177 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6178   (eval $ac_link) 2>conftest.er1
6179   ac_status=$?
6180   grep -v '^ *+' conftest.er1 >conftest.err
6181   rm -f conftest.er1
6182   cat conftest.err >&5
6183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6184   (exit $ac_status); } &&
6185          { ac_try='test -z "$ac_c_werror_flag"
6186                          || test ! -s conftest.err'
6187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6188   (eval $ac_try) 2>&5
6189   ac_status=$?
6190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6191   (exit $ac_status); }; } &&
6192          { ac_try='test -s conftest$ac_exeext'
6193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6194   (eval $ac_try) 2>&5
6195   ac_status=$?
6196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6197   (exit $ac_status); }; }; then
6198   ac_cv_lib_z_inflate=yes
6199 else
6200   echo "$as_me: failed program was:" >&5
6201 sed 's/^/| /' conftest.$ac_ext >&5
6202
6203 ac_cv_lib_z_inflate=no
6204 fi
6205 rm -f conftest.err conftest.$ac_objext \
6206       conftest$ac_exeext conftest.$ac_ext
6207 LIBS=$ac_check_lib_save_LIBS
6208 fi
6209 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6210 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6211 if test $ac_cv_lib_z_inflate = yes; then
6212   cat >>confdefs.h <<_ACEOF
6213 #define HAVE_LIBZ 1
6214 _ACEOF
6215
6216   LIBS="-lz $LIBS"
6217
6218 else
6219   { { echo "$as_me:$LINENO: error: zlib library not found
6220 If you have zlib already installed, see config.log for details on the
6221 failure.  It is possible the compiler isn't looking in the proper directory.
6222 Use --without-zlib to disable zlib support." >&5
6223 echo "$as_me: error: zlib library not found
6224 If you have zlib already installed, see config.log for details on the
6225 failure.  It is possible the compiler isn't looking in the proper directory.
6226 Use --without-zlib to disable zlib support." >&2;}
6227    { (exit 1); exit 1; }; }
6228 fi
6229
6230 fi
6231
6232 if test "$enable_spinlocks" = yes; then
6233
6234 cat >>confdefs.h <<\_ACEOF
6235 #define HAVE_SPINLOCKS 1
6236 _ACEOF
6237
6238 else
6239   { echo "$as_me:$LINENO: WARNING:
6240 *** Not using spinlocks will cause poor performance." >&5
6241 echo "$as_me: WARNING:
6242 *** Not using spinlocks will cause poor performance." >&2;}
6243 fi
6244
6245 if test "$with_krb5" = yes ; then
6246   if test "$PORTNAME" != "win32"; then
6247      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6248 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6249 if test "${ac_cv_search_com_err+set}" = set; then
6250   echo $ECHO_N "(cached) $ECHO_C" >&6
6251 else
6252   ac_func_search_save_LIBS=$LIBS
6253 ac_cv_search_com_err=no
6254 cat >conftest.$ac_ext <<_ACEOF
6255 /* confdefs.h.  */
6256 _ACEOF
6257 cat confdefs.h >>conftest.$ac_ext
6258 cat >>conftest.$ac_ext <<_ACEOF
6259 /* end confdefs.h.  */
6260
6261 /* Override any gcc2 internal prototype to avoid an error.  */
6262 #ifdef __cplusplus
6263 extern "C"
6264 #endif
6265 /* We use char because int might match the return type of a gcc2
6266    builtin and then its argument prototype would still apply.  */
6267 char com_err ();
6268 int
6269 main ()
6270 {
6271 com_err ();
6272   ;
6273   return 0;
6274 }
6275 _ACEOF
6276 rm -f conftest.$ac_objext conftest$ac_exeext
6277 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6278   (eval $ac_link) 2>conftest.er1
6279   ac_status=$?
6280   grep -v '^ *+' conftest.er1 >conftest.err
6281   rm -f conftest.er1
6282   cat conftest.err >&5
6283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6284   (exit $ac_status); } &&
6285          { ac_try='test -z "$ac_c_werror_flag"
6286                          || test ! -s conftest.err'
6287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6288   (eval $ac_try) 2>&5
6289   ac_status=$?
6290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6291   (exit $ac_status); }; } &&
6292          { ac_try='test -s conftest$ac_exeext'
6293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6294   (eval $ac_try) 2>&5
6295   ac_status=$?
6296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6297   (exit $ac_status); }; }; then
6298   ac_cv_search_com_err="none required"
6299 else
6300   echo "$as_me: failed program was:" >&5
6301 sed 's/^/| /' conftest.$ac_ext >&5
6302
6303 fi
6304 rm -f conftest.err conftest.$ac_objext \
6305       conftest$ac_exeext conftest.$ac_ext
6306 if test "$ac_cv_search_com_err" = no; then
6307   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6308     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6309     cat >conftest.$ac_ext <<_ACEOF
6310 /* confdefs.h.  */
6311 _ACEOF
6312 cat confdefs.h >>conftest.$ac_ext
6313 cat >>conftest.$ac_ext <<_ACEOF
6314 /* end confdefs.h.  */
6315
6316 /* Override any gcc2 internal prototype to avoid an error.  */
6317 #ifdef __cplusplus
6318 extern "C"
6319 #endif
6320 /* We use char because int might match the return type of a gcc2
6321    builtin and then its argument prototype would still apply.  */
6322 char com_err ();
6323 int
6324 main ()
6325 {
6326 com_err ();
6327   ;
6328   return 0;
6329 }
6330 _ACEOF
6331 rm -f conftest.$ac_objext conftest$ac_exeext
6332 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6333   (eval $ac_link) 2>conftest.er1
6334   ac_status=$?
6335   grep -v '^ *+' conftest.er1 >conftest.err
6336   rm -f conftest.er1
6337   cat conftest.err >&5
6338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6339   (exit $ac_status); } &&
6340          { ac_try='test -z "$ac_c_werror_flag"
6341                          || test ! -s conftest.err'
6342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6343   (eval $ac_try) 2>&5
6344   ac_status=$?
6345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6346   (exit $ac_status); }; } &&
6347          { ac_try='test -s conftest$ac_exeext'
6348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6349   (eval $ac_try) 2>&5
6350   ac_status=$?
6351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6352   (exit $ac_status); }; }; then
6353   ac_cv_search_com_err="-l$ac_lib"
6354 break
6355 else
6356   echo "$as_me: failed program was:" >&5
6357 sed 's/^/| /' conftest.$ac_ext >&5
6358
6359 fi
6360 rm -f conftest.err conftest.$ac_objext \
6361       conftest$ac_exeext conftest.$ac_ext
6362   done
6363 fi
6364 LIBS=$ac_func_search_save_LIBS
6365 fi
6366 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6367 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6368 if test "$ac_cv_search_com_err" != no; then
6369   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6370
6371 else
6372   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6373 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6374    { (exit 1); exit 1; }; }
6375 fi
6376
6377      echo "$as_me:$LINENO: checking for library containing krb5_encrypt" >&5
6378 echo $ECHO_N "checking for library containing krb5_encrypt... $ECHO_C" >&6
6379 if test "${ac_cv_search_krb5_encrypt+set}" = set; then
6380   echo $ECHO_N "(cached) $ECHO_C" >&6
6381 else
6382   ac_func_search_save_LIBS=$LIBS
6383 ac_cv_search_krb5_encrypt=no
6384 cat >conftest.$ac_ext <<_ACEOF
6385 /* confdefs.h.  */
6386 _ACEOF
6387 cat confdefs.h >>conftest.$ac_ext
6388 cat >>conftest.$ac_ext <<_ACEOF
6389 /* end confdefs.h.  */
6390
6391 /* Override any gcc2 internal prototype to avoid an error.  */
6392 #ifdef __cplusplus
6393 extern "C"
6394 #endif
6395 /* We use char because int might match the return type of a gcc2
6396    builtin and then its argument prototype would still apply.  */
6397 char krb5_encrypt ();
6398 int
6399 main ()
6400 {
6401 krb5_encrypt ();
6402   ;
6403   return 0;
6404 }
6405 _ACEOF
6406 rm -f conftest.$ac_objext conftest$ac_exeext
6407 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6408   (eval $ac_link) 2>conftest.er1
6409   ac_status=$?
6410   grep -v '^ *+' conftest.er1 >conftest.err
6411   rm -f conftest.er1
6412   cat conftest.err >&5
6413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6414   (exit $ac_status); } &&
6415          { ac_try='test -z "$ac_c_werror_flag"
6416                          || test ! -s conftest.err'
6417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6418   (eval $ac_try) 2>&5
6419   ac_status=$?
6420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6421   (exit $ac_status); }; } &&
6422          { ac_try='test -s conftest$ac_exeext'
6423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6424   (eval $ac_try) 2>&5
6425   ac_status=$?
6426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6427   (exit $ac_status); }; }; then
6428   ac_cv_search_krb5_encrypt="none required"
6429 else
6430   echo "$as_me: failed program was:" >&5
6431 sed 's/^/| /' conftest.$ac_ext >&5
6432
6433 fi
6434 rm -f conftest.err conftest.$ac_objext \
6435       conftest$ac_exeext conftest.$ac_ext
6436 if test "$ac_cv_search_krb5_encrypt" = no; then
6437   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' crypto k5crypto; do
6438     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6439     cat >conftest.$ac_ext <<_ACEOF
6440 /* confdefs.h.  */
6441 _ACEOF
6442 cat confdefs.h >>conftest.$ac_ext
6443 cat >>conftest.$ac_ext <<_ACEOF
6444 /* end confdefs.h.  */
6445
6446 /* Override any gcc2 internal prototype to avoid an error.  */
6447 #ifdef __cplusplus
6448 extern "C"
6449 #endif
6450 /* We use char because int might match the return type of a gcc2
6451    builtin and then its argument prototype would still apply.  */
6452 char krb5_encrypt ();
6453 int
6454 main ()
6455 {
6456 krb5_encrypt ();
6457   ;
6458   return 0;
6459 }
6460 _ACEOF
6461 rm -f conftest.$ac_objext conftest$ac_exeext
6462 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6463   (eval $ac_link) 2>conftest.er1
6464   ac_status=$?
6465   grep -v '^ *+' conftest.er1 >conftest.err
6466   rm -f conftest.er1
6467   cat conftest.err >&5
6468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6469   (exit $ac_status); } &&
6470          { ac_try='test -z "$ac_c_werror_flag"
6471                          || test ! -s conftest.err'
6472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6473   (eval $ac_try) 2>&5
6474   ac_status=$?
6475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6476   (exit $ac_status); }; } &&
6477          { ac_try='test -s conftest$ac_exeext'
6478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6479   (eval $ac_try) 2>&5
6480   ac_status=$?
6481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6482   (exit $ac_status); }; }; then
6483   ac_cv_search_krb5_encrypt="-l$ac_lib"
6484 break
6485 else
6486   echo "$as_me: failed program was:" >&5
6487 sed 's/^/| /' conftest.$ac_ext >&5
6488
6489 fi
6490 rm -f conftest.err conftest.$ac_objext \
6491       conftest$ac_exeext conftest.$ac_ext
6492   done
6493 fi
6494 LIBS=$ac_func_search_save_LIBS
6495 fi
6496 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_encrypt" >&5
6497 echo "${ECHO_T}$ac_cv_search_krb5_encrypt" >&6
6498 if test "$ac_cv_search_krb5_encrypt" != no; then
6499   test "$ac_cv_search_krb5_encrypt" = "none required" || LIBS="$ac_cv_search_krb5_encrypt $LIBS"
6500
6501 else
6502   { { echo "$as_me:$LINENO: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&5
6503 echo "$as_me: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&2;}
6504    { (exit 1); exit 1; }; }
6505 fi
6506
6507      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6508 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6509 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6510   echo $ECHO_N "(cached) $ECHO_C" >&6
6511 else
6512   ac_func_search_save_LIBS=$LIBS
6513 ac_cv_search_krb5_sendauth=no
6514 cat >conftest.$ac_ext <<_ACEOF
6515 /* confdefs.h.  */
6516 _ACEOF
6517 cat confdefs.h >>conftest.$ac_ext
6518 cat >>conftest.$ac_ext <<_ACEOF
6519 /* end confdefs.h.  */
6520
6521 /* Override any gcc2 internal prototype to avoid an error.  */
6522 #ifdef __cplusplus
6523 extern "C"
6524 #endif
6525 /* We use char because int might match the return type of a gcc2
6526    builtin and then its argument prototype would still apply.  */
6527 char krb5_sendauth ();
6528 int
6529 main ()
6530 {
6531 krb5_sendauth ();
6532   ;
6533   return 0;
6534 }
6535 _ACEOF
6536 rm -f conftest.$ac_objext conftest$ac_exeext
6537 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6538   (eval $ac_link) 2>conftest.er1
6539   ac_status=$?
6540   grep -v '^ *+' conftest.er1 >conftest.err
6541   rm -f conftest.er1
6542   cat conftest.err >&5
6543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6544   (exit $ac_status); } &&
6545          { ac_try='test -z "$ac_c_werror_flag"
6546                          || test ! -s conftest.err'
6547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6548   (eval $ac_try) 2>&5
6549   ac_status=$?
6550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6551   (exit $ac_status); }; } &&
6552          { ac_try='test -s conftest$ac_exeext'
6553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6554   (eval $ac_try) 2>&5
6555   ac_status=$?
6556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6557   (exit $ac_status); }; }; then
6558   ac_cv_search_krb5_sendauth="none required"
6559 else
6560   echo "$as_me: failed program was:" >&5
6561 sed 's/^/| /' conftest.$ac_ext >&5
6562
6563 fi
6564 rm -f conftest.err conftest.$ac_objext \
6565       conftest$ac_exeext conftest.$ac_ext
6566 if test "$ac_cv_search_krb5_sendauth" = no; then
6567   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
6568     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6569     cat >conftest.$ac_ext <<_ACEOF
6570 /* confdefs.h.  */
6571 _ACEOF
6572 cat confdefs.h >>conftest.$ac_ext
6573 cat >>conftest.$ac_ext <<_ACEOF
6574 /* end confdefs.h.  */
6575
6576 /* Override any gcc2 internal prototype to avoid an error.  */
6577 #ifdef __cplusplus
6578 extern "C"
6579 #endif
6580 /* We use char because int might match the return type of a gcc2
6581    builtin and then its argument prototype would still apply.  */
6582 char krb5_sendauth ();
6583 int
6584 main ()
6585 {
6586 krb5_sendauth ();
6587   ;
6588   return 0;
6589 }
6590 _ACEOF
6591 rm -f conftest.$ac_objext conftest$ac_exeext
6592 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6593   (eval $ac_link) 2>conftest.er1
6594   ac_status=$?
6595   grep -v '^ *+' conftest.er1 >conftest.err
6596   rm -f conftest.er1
6597   cat conftest.err >&5
6598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6599   (exit $ac_status); } &&
6600          { ac_try='test -z "$ac_c_werror_flag"
6601                          || test ! -s conftest.err'
6602   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6603   (eval $ac_try) 2>&5
6604   ac_status=$?
6605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6606   (exit $ac_status); }; } &&
6607          { ac_try='test -s conftest$ac_exeext'
6608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6609   (eval $ac_try) 2>&5
6610   ac_status=$?
6611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6612   (exit $ac_status); }; }; then
6613   ac_cv_search_krb5_sendauth="-l$ac_lib"
6614 break
6615 else
6616   echo "$as_me: failed program was:" >&5
6617 sed 's/^/| /' conftest.$ac_ext >&5
6618
6619 fi
6620 rm -f conftest.err conftest.$ac_objext \
6621       conftest$ac_exeext conftest.$ac_ext
6622   done
6623 fi
6624 LIBS=$ac_func_search_save_LIBS
6625 fi
6626 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
6627 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
6628 if test "$ac_cv_search_krb5_sendauth" != no; then
6629   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
6630
6631 else
6632   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
6633 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
6634    { (exit 1); exit 1; }; }
6635 fi
6636
6637   else
6638      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6639 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6640 if test "${ac_cv_search_com_err+set}" = set; then
6641   echo $ECHO_N "(cached) $ECHO_C" >&6
6642 else
6643   ac_func_search_save_LIBS=$LIBS
6644 ac_cv_search_com_err=no
6645 cat >conftest.$ac_ext <<_ACEOF
6646 /* confdefs.h.  */
6647 _ACEOF
6648 cat confdefs.h >>conftest.$ac_ext
6649 cat >>conftest.$ac_ext <<_ACEOF
6650 /* end confdefs.h.  */
6651
6652 /* Override any gcc2 internal prototype to avoid an error.  */
6653 #ifdef __cplusplus
6654 extern "C"
6655 #endif
6656 /* We use char because int might match the return type of a gcc2
6657    builtin and then its argument prototype would still apply.  */
6658 char com_err ();
6659 int
6660 main ()
6661 {
6662 com_err ();
6663   ;
6664   return 0;
6665 }
6666 _ACEOF
6667 rm -f conftest.$ac_objext conftest$ac_exeext
6668 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6669   (eval $ac_link) 2>conftest.er1
6670   ac_status=$?
6671   grep -v '^ *+' conftest.er1 >conftest.err
6672   rm -f conftest.er1
6673   cat conftest.err >&5
6674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6675   (exit $ac_status); } &&
6676          { ac_try='test -z "$ac_c_werror_flag"
6677                          || test ! -s conftest.err'
6678   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6679   (eval $ac_try) 2>&5
6680   ac_status=$?
6681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6682   (exit $ac_status); }; } &&
6683          { ac_try='test -s conftest$ac_exeext'
6684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6685   (eval $ac_try) 2>&5
6686   ac_status=$?
6687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6688   (exit $ac_status); }; }; then
6689   ac_cv_search_com_err="none required"
6690 else
6691   echo "$as_me: failed program was:" >&5
6692 sed 's/^/| /' conftest.$ac_ext >&5
6693
6694 fi
6695 rm -f conftest.err conftest.$ac_objext \
6696       conftest$ac_exeext conftest.$ac_ext
6697 if test "$ac_cv_search_com_err" = no; then
6698   for ac_lib in 'comerr32 -lkrb5_32'; do
6699     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6700     cat >conftest.$ac_ext <<_ACEOF
6701 /* confdefs.h.  */
6702 _ACEOF
6703 cat confdefs.h >>conftest.$ac_ext
6704 cat >>conftest.$ac_ext <<_ACEOF
6705 /* end confdefs.h.  */
6706
6707 /* Override any gcc2 internal prototype to avoid an error.  */
6708 #ifdef __cplusplus
6709 extern "C"
6710 #endif
6711 /* We use char because int might match the return type of a gcc2
6712    builtin and then its argument prototype would still apply.  */
6713 char com_err ();
6714 int
6715 main ()
6716 {
6717 com_err ();
6718   ;
6719   return 0;
6720 }
6721 _ACEOF
6722 rm -f conftest.$ac_objext conftest$ac_exeext
6723 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6724   (eval $ac_link) 2>conftest.er1
6725   ac_status=$?
6726   grep -v '^ *+' conftest.er1 >conftest.err
6727   rm -f conftest.er1
6728   cat conftest.err >&5
6729   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6730   (exit $ac_status); } &&
6731          { ac_try='test -z "$ac_c_werror_flag"
6732                          || test ! -s conftest.err'
6733   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6734   (eval $ac_try) 2>&5
6735   ac_status=$?
6736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6737   (exit $ac_status); }; } &&
6738          { ac_try='test -s conftest$ac_exeext'
6739   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6740   (eval $ac_try) 2>&5
6741   ac_status=$?
6742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6743   (exit $ac_status); }; }; then
6744   ac_cv_search_com_err="-l$ac_lib"
6745 break
6746 else
6747   echo "$as_me: failed program was:" >&5
6748 sed 's/^/| /' conftest.$ac_ext >&5
6749
6750 fi
6751 rm -f conftest.err conftest.$ac_objext \
6752       conftest$ac_exeext conftest.$ac_ext
6753   done
6754 fi
6755 LIBS=$ac_func_search_save_LIBS
6756 fi
6757 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6758 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6759 if test "$ac_cv_search_com_err" != no; then
6760   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6761
6762 else
6763   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6764 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6765    { (exit 1); exit 1; }; }
6766 fi
6767
6768   fi
6769 fi
6770
6771 if test "$with_openssl" = yes ; then
6772     if test "$PORTNAME" != "win32"; then
6773
6774 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
6775 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
6776 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
6777   echo $ECHO_N "(cached) $ECHO_C" >&6
6778 else
6779   ac_check_lib_save_LIBS=$LIBS
6780 LIBS="-lcrypto  $LIBS"
6781 cat >conftest.$ac_ext <<_ACEOF
6782 /* confdefs.h.  */
6783 _ACEOF
6784 cat confdefs.h >>conftest.$ac_ext
6785 cat >>conftest.$ac_ext <<_ACEOF
6786 /* end confdefs.h.  */
6787
6788 /* Override any gcc2 internal prototype to avoid an error.  */
6789 #ifdef __cplusplus
6790 extern "C"
6791 #endif
6792 /* We use char because int might match the return type of a gcc2
6793    builtin and then its argument prototype would still apply.  */
6794 char CRYPTO_new_ex_data ();
6795 int
6796 main ()
6797 {
6798 CRYPTO_new_ex_data ();
6799   ;
6800   return 0;
6801 }
6802 _ACEOF
6803 rm -f conftest.$ac_objext conftest$ac_exeext
6804 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6805   (eval $ac_link) 2>conftest.er1
6806   ac_status=$?
6807   grep -v '^ *+' conftest.er1 >conftest.err
6808   rm -f conftest.er1
6809   cat conftest.err >&5
6810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6811   (exit $ac_status); } &&
6812          { ac_try='test -z "$ac_c_werror_flag"
6813                          || test ! -s conftest.err'
6814   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6815   (eval $ac_try) 2>&5
6816   ac_status=$?
6817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6818   (exit $ac_status); }; } &&
6819          { ac_try='test -s conftest$ac_exeext'
6820   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6821   (eval $ac_try) 2>&5
6822   ac_status=$?
6823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6824   (exit $ac_status); }; }; then
6825   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
6826 else
6827   echo "$as_me: failed program was:" >&5
6828 sed 's/^/| /' conftest.$ac_ext >&5
6829
6830 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
6831 fi
6832 rm -f conftest.err conftest.$ac_objext \
6833       conftest$ac_exeext conftest.$ac_ext
6834 LIBS=$ac_check_lib_save_LIBS
6835 fi
6836 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
6837 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
6838 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
6839   cat >>confdefs.h <<_ACEOF
6840 #define HAVE_LIBCRYPTO 1
6841 _ACEOF
6842
6843   LIBS="-lcrypto $LIBS"
6844
6845 else
6846   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
6847 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
6848    { (exit 1); exit 1; }; }
6849 fi
6850
6851
6852 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
6853 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
6854 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
6855   echo $ECHO_N "(cached) $ECHO_C" >&6
6856 else
6857   ac_check_lib_save_LIBS=$LIBS
6858 LIBS="-lssl  $LIBS"
6859 cat >conftest.$ac_ext <<_ACEOF
6860 /* confdefs.h.  */
6861 _ACEOF
6862 cat confdefs.h >>conftest.$ac_ext
6863 cat >>conftest.$ac_ext <<_ACEOF
6864 /* end confdefs.h.  */
6865
6866 /* Override any gcc2 internal prototype to avoid an error.  */
6867 #ifdef __cplusplus
6868 extern "C"
6869 #endif
6870 /* We use char because int might match the return type of a gcc2
6871    builtin and then its argument prototype would still apply.  */
6872 char SSL_library_init ();
6873 int
6874 main ()
6875 {
6876 SSL_library_init ();
6877   ;
6878   return 0;
6879 }
6880 _ACEOF
6881 rm -f conftest.$ac_objext conftest$ac_exeext
6882 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6883   (eval $ac_link) 2>conftest.er1
6884   ac_status=$?
6885   grep -v '^ *+' conftest.er1 >conftest.err
6886   rm -f conftest.er1
6887   cat conftest.err >&5
6888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6889   (exit $ac_status); } &&
6890          { ac_try='test -z "$ac_c_werror_flag"
6891                          || test ! -s conftest.err'
6892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6893   (eval $ac_try) 2>&5
6894   ac_status=$?
6895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6896   (exit $ac_status); }; } &&
6897          { ac_try='test -s conftest$ac_exeext'
6898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6899   (eval $ac_try) 2>&5
6900   ac_status=$?
6901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6902   (exit $ac_status); }; }; then
6903   ac_cv_lib_ssl_SSL_library_init=yes
6904 else
6905   echo "$as_me: failed program was:" >&5
6906 sed 's/^/| /' conftest.$ac_ext >&5
6907
6908 ac_cv_lib_ssl_SSL_library_init=no
6909 fi
6910 rm -f conftest.err conftest.$ac_objext \
6911       conftest$ac_exeext conftest.$ac_ext
6912 LIBS=$ac_check_lib_save_LIBS
6913 fi
6914 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
6915 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
6916 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
6917   cat >>confdefs.h <<_ACEOF
6918 #define HAVE_LIBSSL 1
6919 _ACEOF
6920
6921   LIBS="-lssl $LIBS"
6922
6923 else
6924   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
6925 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
6926    { (exit 1); exit 1; }; }
6927 fi
6928
6929   else
6930
6931 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
6932 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
6933 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
6934   echo $ECHO_N "(cached) $ECHO_C" >&6
6935 else
6936   ac_check_lib_save_LIBS=$LIBS
6937 LIBS="-leay32  $LIBS"
6938 cat >conftest.$ac_ext <<_ACEOF
6939 /* confdefs.h.  */
6940 _ACEOF
6941 cat confdefs.h >>conftest.$ac_ext
6942 cat >>conftest.$ac_ext <<_ACEOF
6943 /* end confdefs.h.  */
6944
6945 /* Override any gcc2 internal prototype to avoid an error.  */
6946 #ifdef __cplusplus
6947 extern "C"
6948 #endif
6949 /* We use char because int might match the return type of a gcc2
6950    builtin and then its argument prototype would still apply.  */
6951 char CRYPTO_new_ex_data ();
6952 int
6953 main ()
6954 {
6955 CRYPTO_new_ex_data ();
6956   ;
6957   return 0;
6958 }
6959 _ACEOF
6960 rm -f conftest.$ac_objext conftest$ac_exeext
6961 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6962   (eval $ac_link) 2>conftest.er1
6963   ac_status=$?
6964   grep -v '^ *+' conftest.er1 >conftest.err
6965   rm -f conftest.er1
6966   cat conftest.err >&5
6967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6968   (exit $ac_status); } &&
6969          { ac_try='test -z "$ac_c_werror_flag"
6970                          || test ! -s conftest.err'
6971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6972   (eval $ac_try) 2>&5
6973   ac_status=$?
6974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6975   (exit $ac_status); }; } &&
6976          { ac_try='test -s conftest$ac_exeext'
6977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6978   (eval $ac_try) 2>&5
6979   ac_status=$?
6980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6981   (exit $ac_status); }; }; then
6982   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
6983 else
6984   echo "$as_me: failed program was:" >&5
6985 sed 's/^/| /' conftest.$ac_ext >&5
6986
6987 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
6988 fi
6989 rm -f conftest.err conftest.$ac_objext \
6990       conftest$ac_exeext conftest.$ac_ext
6991 LIBS=$ac_check_lib_save_LIBS
6992 fi
6993 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
6994 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
6995 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
6996   cat >>confdefs.h <<_ACEOF
6997 #define HAVE_LIBEAY32 1
6998 _ACEOF
6999
7000   LIBS="-leay32 $LIBS"
7001
7002 else
7003   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7004 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7005    { (exit 1); exit 1; }; }
7006 fi
7007
7008
7009 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7010 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7011 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7012   echo $ECHO_N "(cached) $ECHO_C" >&6
7013 else
7014   ac_check_lib_save_LIBS=$LIBS
7015 LIBS="-lssleay32  $LIBS"
7016 cat >conftest.$ac_ext <<_ACEOF
7017 /* confdefs.h.  */
7018 _ACEOF
7019 cat confdefs.h >>conftest.$ac_ext
7020 cat >>conftest.$ac_ext <<_ACEOF
7021 /* end confdefs.h.  */
7022
7023 /* Override any gcc2 internal prototype to avoid an error.  */
7024 #ifdef __cplusplus
7025 extern "C"
7026 #endif
7027 /* We use char because int might match the return type of a gcc2
7028    builtin and then its argument prototype would still apply.  */
7029 char SSL_library_init ();
7030 int
7031 main ()
7032 {
7033 SSL_library_init ();
7034   ;
7035   return 0;
7036 }
7037 _ACEOF
7038 rm -f conftest.$ac_objext conftest$ac_exeext
7039 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7040   (eval $ac_link) 2>conftest.er1
7041   ac_status=$?
7042   grep -v '^ *+' conftest.er1 >conftest.err
7043   rm -f conftest.er1
7044   cat conftest.err >&5
7045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7046   (exit $ac_status); } &&
7047          { ac_try='test -z "$ac_c_werror_flag"
7048                          || test ! -s conftest.err'
7049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7050   (eval $ac_try) 2>&5
7051   ac_status=$?
7052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7053   (exit $ac_status); }; } &&
7054          { ac_try='test -s conftest$ac_exeext'
7055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7056   (eval $ac_try) 2>&5
7057   ac_status=$?
7058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7059   (exit $ac_status); }; }; then
7060   ac_cv_lib_ssleay32_SSL_library_init=yes
7061 else
7062   echo "$as_me: failed program was:" >&5
7063 sed 's/^/| /' conftest.$ac_ext >&5
7064
7065 ac_cv_lib_ssleay32_SSL_library_init=no
7066 fi
7067 rm -f conftest.err conftest.$ac_objext \
7068       conftest$ac_exeext conftest.$ac_ext
7069 LIBS=$ac_check_lib_save_LIBS
7070 fi
7071 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7072 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7073 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7074   cat >>confdefs.h <<_ACEOF
7075 #define HAVE_LIBSSLEAY32 1
7076 _ACEOF
7077
7078   LIBS="-lssleay32 $LIBS"
7079
7080 else
7081   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7082 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7083    { (exit 1); exit 1; }; }
7084 fi
7085
7086   fi
7087 fi
7088
7089 if test "$with_pam" = yes ; then
7090
7091 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7092 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7093 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7094   echo $ECHO_N "(cached) $ECHO_C" >&6
7095 else
7096   ac_check_lib_save_LIBS=$LIBS
7097 LIBS="-lpam  $LIBS"
7098 cat >conftest.$ac_ext <<_ACEOF
7099 /* confdefs.h.  */
7100 _ACEOF
7101 cat confdefs.h >>conftest.$ac_ext
7102 cat >>conftest.$ac_ext <<_ACEOF
7103 /* end confdefs.h.  */
7104
7105 /* Override any gcc2 internal prototype to avoid an error.  */
7106 #ifdef __cplusplus
7107 extern "C"
7108 #endif
7109 /* We use char because int might match the return type of a gcc2
7110    builtin and then its argument prototype would still apply.  */
7111 char pam_start ();
7112 int
7113 main ()
7114 {
7115 pam_start ();
7116   ;
7117   return 0;
7118 }
7119 _ACEOF
7120 rm -f conftest.$ac_objext conftest$ac_exeext
7121 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7122   (eval $ac_link) 2>conftest.er1
7123   ac_status=$?
7124   grep -v '^ *+' conftest.er1 >conftest.err
7125   rm -f conftest.er1
7126   cat conftest.err >&5
7127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7128   (exit $ac_status); } &&
7129          { ac_try='test -z "$ac_c_werror_flag"
7130                          || test ! -s conftest.err'
7131   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7132   (eval $ac_try) 2>&5
7133   ac_status=$?
7134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7135   (exit $ac_status); }; } &&
7136          { ac_try='test -s conftest$ac_exeext'
7137   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7138   (eval $ac_try) 2>&5
7139   ac_status=$?
7140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7141   (exit $ac_status); }; }; then
7142   ac_cv_lib_pam_pam_start=yes
7143 else
7144   echo "$as_me: failed program was:" >&5
7145 sed 's/^/| /' conftest.$ac_ext >&5
7146
7147 ac_cv_lib_pam_pam_start=no
7148 fi
7149 rm -f conftest.err conftest.$ac_objext \
7150       conftest$ac_exeext conftest.$ac_ext
7151 LIBS=$ac_check_lib_save_LIBS
7152 fi
7153 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7154 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7155 if test $ac_cv_lib_pam_pam_start = yes; then
7156   cat >>confdefs.h <<_ACEOF
7157 #define HAVE_LIBPAM 1
7158 _ACEOF
7159
7160   LIBS="-lpam $LIBS"
7161
7162 else
7163   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7164 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7165    { (exit 1); exit 1; }; }
7166 fi
7167
7168 fi
7169
7170
7171 ##
7172 ## Header files
7173 ##
7174
7175 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7176 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7177 if test "${ac_cv_header_stdc+set}" = set; then
7178   echo $ECHO_N "(cached) $ECHO_C" >&6
7179 else
7180   cat >conftest.$ac_ext <<_ACEOF
7181 /* confdefs.h.  */
7182 _ACEOF
7183 cat confdefs.h >>conftest.$ac_ext
7184 cat >>conftest.$ac_ext <<_ACEOF
7185 /* end confdefs.h.  */
7186 #include <stdlib.h>
7187 #include <stdarg.h>
7188 #include <string.h>
7189 #include <float.h>
7190
7191 int
7192 main ()
7193 {
7194
7195   ;
7196   return 0;
7197 }
7198 _ACEOF
7199 rm -f conftest.$ac_objext
7200 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7201   (eval $ac_compile) 2>conftest.er1
7202   ac_status=$?
7203   grep -v '^ *+' conftest.er1 >conftest.err
7204   rm -f conftest.er1
7205   cat conftest.err >&5
7206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7207   (exit $ac_status); } &&
7208          { ac_try='test -z "$ac_c_werror_flag"
7209                          || test ! -s conftest.err'
7210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7211   (eval $ac_try) 2>&5
7212   ac_status=$?
7213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7214   (exit $ac_status); }; } &&
7215          { ac_try='test -s conftest.$ac_objext'
7216   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7217   (eval $ac_try) 2>&5
7218   ac_status=$?
7219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7220   (exit $ac_status); }; }; then
7221   ac_cv_header_stdc=yes
7222 else
7223   echo "$as_me: failed program was:" >&5
7224 sed 's/^/| /' conftest.$ac_ext >&5
7225
7226 ac_cv_header_stdc=no
7227 fi
7228 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7229
7230 if test $ac_cv_header_stdc = yes; then
7231   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7232   cat >conftest.$ac_ext <<_ACEOF
7233 /* confdefs.h.  */
7234 _ACEOF
7235 cat confdefs.h >>conftest.$ac_ext
7236 cat >>conftest.$ac_ext <<_ACEOF
7237 /* end confdefs.h.  */
7238 #include <string.h>
7239
7240 _ACEOF
7241 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7242   $EGREP "memchr" >/dev/null 2>&1; then
7243   :
7244 else
7245   ac_cv_header_stdc=no
7246 fi
7247 rm -f conftest*
7248
7249 fi
7250
7251 if test $ac_cv_header_stdc = yes; then
7252   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7253   cat >conftest.$ac_ext <<_ACEOF
7254 /* confdefs.h.  */
7255 _ACEOF
7256 cat confdefs.h >>conftest.$ac_ext
7257 cat >>conftest.$ac_ext <<_ACEOF
7258 /* end confdefs.h.  */
7259 #include <stdlib.h>
7260
7261 _ACEOF
7262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7263   $EGREP "free" >/dev/null 2>&1; then
7264   :
7265 else
7266   ac_cv_header_stdc=no
7267 fi
7268 rm -f conftest*
7269
7270 fi
7271
7272 if test $ac_cv_header_stdc = yes; then
7273   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7274   if test "$cross_compiling" = yes; then
7275   :
7276 else
7277   cat >conftest.$ac_ext <<_ACEOF
7278 /* confdefs.h.  */
7279 _ACEOF
7280 cat confdefs.h >>conftest.$ac_ext
7281 cat >>conftest.$ac_ext <<_ACEOF
7282 /* end confdefs.h.  */
7283 #include <ctype.h>
7284 #if ((' ' & 0x0FF) == 0x020)
7285 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7286 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7287 #else
7288 # define ISLOWER(c) \
7289                    (('a' <= (c) && (c) <= 'i') \
7290                      || ('j' <= (c) && (c) <= 'r') \
7291                      || ('s' <= (c) && (c) <= 'z'))
7292 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7293 #endif
7294
7295 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7296 int
7297 main ()
7298 {
7299   int i;
7300   for (i = 0; i < 256; i++)
7301     if (XOR (islower (i), ISLOWER (i))
7302         || toupper (i) != TOUPPER (i))
7303       exit(2);
7304   exit (0);
7305 }
7306 _ACEOF
7307 rm -f conftest$ac_exeext
7308 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7309   (eval $ac_link) 2>&5
7310   ac_status=$?
7311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7312   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7314   (eval $ac_try) 2>&5
7315   ac_status=$?
7316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7317   (exit $ac_status); }; }; then
7318   :
7319 else
7320   echo "$as_me: program exited with status $ac_status" >&5
7321 echo "$as_me: failed program was:" >&5
7322 sed 's/^/| /' conftest.$ac_ext >&5
7323
7324 ( exit $ac_status )
7325 ac_cv_header_stdc=no
7326 fi
7327 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7328 fi
7329 fi
7330 fi
7331 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7332 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7333 if test $ac_cv_header_stdc = yes; then
7334
7335 cat >>confdefs.h <<\_ACEOF
7336 #define STDC_HEADERS 1
7337 _ACEOF
7338
7339 fi
7340
7341 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7352                   inttypes.h stdint.h unistd.h
7353 do
7354 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7355 echo "$as_me:$LINENO: checking for $ac_header" >&5
7356 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7357 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7358   echo $ECHO_N "(cached) $ECHO_C" >&6
7359 else
7360   cat >conftest.$ac_ext <<_ACEOF
7361 /* confdefs.h.  */
7362 _ACEOF
7363 cat confdefs.h >>conftest.$ac_ext
7364 cat >>conftest.$ac_ext <<_ACEOF
7365 /* end confdefs.h.  */
7366 $ac_includes_default
7367
7368 #include <$ac_header>
7369 _ACEOF
7370 rm -f conftest.$ac_objext
7371 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7372   (eval $ac_compile) 2>conftest.er1
7373   ac_status=$?
7374   grep -v '^ *+' conftest.er1 >conftest.err
7375   rm -f conftest.er1
7376   cat conftest.err >&5
7377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7378   (exit $ac_status); } &&
7379          { ac_try='test -z "$ac_c_werror_flag"
7380                          || test ! -s conftest.err'
7381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7382   (eval $ac_try) 2>&5
7383   ac_status=$?
7384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7385   (exit $ac_status); }; } &&
7386          { ac_try='test -s conftest.$ac_objext'
7387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7388   (eval $ac_try) 2>&5
7389   ac_status=$?
7390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7391   (exit $ac_status); }; }; then
7392   eval "$as_ac_Header=yes"
7393 else
7394   echo "$as_me: failed program was:" >&5
7395 sed 's/^/| /' conftest.$ac_ext >&5
7396
7397 eval "$as_ac_Header=no"
7398 fi
7399 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7400 fi
7401 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7402 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7403 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7404   cat >>confdefs.h <<_ACEOF
7405 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7406 _ACEOF
7407
7408 fi
7409
7410 done
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438 for ac_header in crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h langinfo.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/time.h sys/un.h termios.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h
7439 do
7440 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7441 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7442   echo "$as_me:$LINENO: checking for $ac_header" >&5
7443 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7444 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7445   echo $ECHO_N "(cached) $ECHO_C" >&6
7446 fi
7447 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7448 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7449 else
7450   # Is the header compilable?
7451 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7452 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7453 cat >conftest.$ac_ext <<_ACEOF
7454 /* confdefs.h.  */
7455 _ACEOF
7456 cat confdefs.h >>conftest.$ac_ext
7457 cat >>conftest.$ac_ext <<_ACEOF
7458 /* end confdefs.h.  */
7459 $ac_includes_default
7460 #include <$ac_header>
7461 _ACEOF
7462 rm -f conftest.$ac_objext
7463 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7464   (eval $ac_compile) 2>conftest.er1
7465   ac_status=$?
7466   grep -v '^ *+' conftest.er1 >conftest.err
7467   rm -f conftest.er1
7468   cat conftest.err >&5
7469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7470   (exit $ac_status); } &&
7471          { ac_try='test -z "$ac_c_werror_flag"
7472                          || test ! -s conftest.err'
7473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7474   (eval $ac_try) 2>&5
7475   ac_status=$?
7476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7477   (exit $ac_status); }; } &&
7478          { ac_try='test -s conftest.$ac_objext'
7479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7480   (eval $ac_try) 2>&5
7481   ac_status=$?
7482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483   (exit $ac_status); }; }; then
7484   ac_header_compiler=yes
7485 else
7486   echo "$as_me: failed program was:" >&5
7487 sed 's/^/| /' conftest.$ac_ext >&5
7488
7489 ac_header_compiler=no
7490 fi
7491 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7492 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7493 echo "${ECHO_T}$ac_header_compiler" >&6
7494
7495 # Is the header present?
7496 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7497 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7498 cat >conftest.$ac_ext <<_ACEOF
7499 /* confdefs.h.  */
7500 _ACEOF
7501 cat confdefs.h >>conftest.$ac_ext
7502 cat >>conftest.$ac_ext <<_ACEOF
7503 /* end confdefs.h.  */
7504 #include <$ac_header>
7505 _ACEOF
7506 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7507   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7508   ac_status=$?
7509   grep -v '^ *+' conftest.er1 >conftest.err
7510   rm -f conftest.er1
7511   cat conftest.err >&5
7512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7513   (exit $ac_status); } >/dev/null; then
7514   if test -s conftest.err; then
7515     ac_cpp_err=$ac_c_preproc_warn_flag
7516     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7517   else
7518     ac_cpp_err=
7519   fi
7520 else
7521   ac_cpp_err=yes
7522 fi
7523 if test -z "$ac_cpp_err"; then
7524   ac_header_preproc=yes
7525 else
7526   echo "$as_me: failed program was:" >&5
7527 sed 's/^/| /' conftest.$ac_ext >&5
7528
7529   ac_header_preproc=no
7530 fi
7531 rm -f conftest.err conftest.$ac_ext
7532 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7533 echo "${ECHO_T}$ac_header_preproc" >&6
7534
7535 # So?  What about this header?
7536 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7537   yes:no: )
7538     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7539 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7540     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7541 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7542     ac_header_preproc=yes
7543     ;;
7544   no:yes:* )
7545     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7546 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7547     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7548 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7549     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7550 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7551     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7552 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7553     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7554 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7555     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7556 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7557     (
7558       cat <<\_ASBOX
7559 ## ---------------------------------------- ##
7560 ## Report this to pgsql-bugs@postgresql.org ##
7561 ## ---------------------------------------- ##
7562 _ASBOX
7563     ) |
7564       sed "s/^/$as_me: WARNING:     /" >&2
7565     ;;
7566 esac
7567 echo "$as_me:$LINENO: checking for $ac_header" >&5
7568 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7569 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7570   echo $ECHO_N "(cached) $ECHO_C" >&6
7571 else
7572   eval "$as_ac_Header=\$ac_header_preproc"
7573 fi
7574 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7575 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7576
7577 fi
7578 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7579   cat >>confdefs.h <<_ACEOF
7580 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7581 _ACEOF
7582
7583 fi
7584
7585 done
7586
7587
7588 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
7589 # netinet/in.h is included first.
7590
7591 for ac_header in netinet/in.h
7592 do
7593 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7594 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7595   echo "$as_me:$LINENO: checking for $ac_header" >&5
7596 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7597 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7598   echo $ECHO_N "(cached) $ECHO_C" >&6
7599 fi
7600 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7601 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7602 else
7603   # Is the header compilable?
7604 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7605 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7606 cat >conftest.$ac_ext <<_ACEOF
7607 /* confdefs.h.  */
7608 _ACEOF
7609 cat confdefs.h >>conftest.$ac_ext
7610 cat >>conftest.$ac_ext <<_ACEOF
7611 /* end confdefs.h.  */
7612 $ac_includes_default
7613 #include <$ac_header>
7614 _ACEOF
7615 rm -f conftest.$ac_objext
7616 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7617   (eval $ac_compile) 2>conftest.er1
7618   ac_status=$?
7619   grep -v '^ *+' conftest.er1 >conftest.err
7620   rm -f conftest.er1
7621   cat conftest.err >&5
7622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7623   (exit $ac_status); } &&
7624          { ac_try='test -z "$ac_c_werror_flag"
7625                          || test ! -s conftest.err'
7626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7627   (eval $ac_try) 2>&5
7628   ac_status=$?
7629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7630   (exit $ac_status); }; } &&
7631          { ac_try='test -s conftest.$ac_objext'
7632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7633   (eval $ac_try) 2>&5
7634   ac_status=$?
7635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7636   (exit $ac_status); }; }; then
7637   ac_header_compiler=yes
7638 else
7639   echo "$as_me: failed program was:" >&5
7640 sed 's/^/| /' conftest.$ac_ext >&5
7641
7642 ac_header_compiler=no
7643 fi
7644 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7645 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7646 echo "${ECHO_T}$ac_header_compiler" >&6
7647
7648 # Is the header present?
7649 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7650 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7651 cat >conftest.$ac_ext <<_ACEOF
7652 /* confdefs.h.  */
7653 _ACEOF
7654 cat confdefs.h >>conftest.$ac_ext
7655 cat >>conftest.$ac_ext <<_ACEOF
7656 /* end confdefs.h.  */
7657 #include <$ac_header>
7658 _ACEOF
7659 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7660   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7661   ac_status=$?
7662   grep -v '^ *+' conftest.er1 >conftest.err
7663   rm -f conftest.er1
7664   cat conftest.err >&5
7665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7666   (exit $ac_status); } >/dev/null; then
7667   if test -s conftest.err; then
7668     ac_cpp_err=$ac_c_preproc_warn_flag
7669     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7670   else
7671     ac_cpp_err=
7672   fi
7673 else
7674   ac_cpp_err=yes
7675 fi
7676 if test -z "$ac_cpp_err"; then
7677   ac_header_preproc=yes
7678 else
7679   echo "$as_me: failed program was:" >&5
7680 sed 's/^/| /' conftest.$ac_ext >&5
7681
7682   ac_header_preproc=no
7683 fi
7684 rm -f conftest.err conftest.$ac_ext
7685 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7686 echo "${ECHO_T}$ac_header_preproc" >&6
7687
7688 # So?  What about this header?
7689 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7690   yes:no: )
7691     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7692 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7693     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7694 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7695     ac_header_preproc=yes
7696     ;;
7697   no:yes:* )
7698     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7699 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7700     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7701 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7702     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7703 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7704     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7705 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7706     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7707 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7708     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7709 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7710     (
7711       cat <<\_ASBOX
7712 ## ---------------------------------------- ##
7713 ## Report this to pgsql-bugs@postgresql.org ##
7714 ## ---------------------------------------- ##
7715 _ASBOX
7716     ) |
7717       sed "s/^/$as_me: WARNING:     /" >&2
7718     ;;
7719 esac
7720 echo "$as_me:$LINENO: checking for $ac_header" >&5
7721 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7722 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7723   echo $ECHO_N "(cached) $ECHO_C" >&6
7724 else
7725   eval "$as_ac_Header=\$ac_header_preproc"
7726 fi
7727 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7728 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7729
7730 fi
7731 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7732   cat >>confdefs.h <<_ACEOF
7733 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7734 _ACEOF
7735
7736 fi
7737
7738 done
7739
7740
7741 for ac_header in netinet/tcp.h
7742 do
7743 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7744 echo "$as_me:$LINENO: checking for $ac_header" >&5
7745 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7746 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7747   echo $ECHO_N "(cached) $ECHO_C" >&6
7748 else
7749   cat >conftest.$ac_ext <<_ACEOF
7750 /* confdefs.h.  */
7751 _ACEOF
7752 cat confdefs.h >>conftest.$ac_ext
7753 cat >>conftest.$ac_ext <<_ACEOF
7754 /* end confdefs.h.  */
7755 $ac_includes_default
7756 #ifdef HAVE_NETINET_IN_H
7757 #include <netinet/in.h>
7758 #endif
7759
7760
7761 #include <$ac_header>
7762 _ACEOF
7763 rm -f conftest.$ac_objext
7764 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7765   (eval $ac_compile) 2>conftest.er1
7766   ac_status=$?
7767   grep -v '^ *+' conftest.er1 >conftest.err
7768   rm -f conftest.er1
7769   cat conftest.err >&5
7770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7771   (exit $ac_status); } &&
7772          { ac_try='test -z "$ac_c_werror_flag"
7773                          || test ! -s conftest.err'
7774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7775   (eval $ac_try) 2>&5
7776   ac_status=$?
7777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7778   (exit $ac_status); }; } &&
7779          { ac_try='test -s conftest.$ac_objext'
7780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7781   (eval $ac_try) 2>&5
7782   ac_status=$?
7783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7784   (exit $ac_status); }; }; then
7785   eval "$as_ac_Header=yes"
7786 else
7787   echo "$as_me: failed program was:" >&5
7788 sed 's/^/| /' conftest.$ac_ext >&5
7789
7790 eval "$as_ac_Header=no"
7791 fi
7792 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7793 fi
7794 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7795 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7796 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7797   cat >>confdefs.h <<_ACEOF
7798 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7799 _ACEOF
7800
7801 fi
7802
7803 done
7804
7805
7806 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
7807
7808 for ac_header in readline/readline.h
7809 do
7810 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7811 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7812   echo "$as_me:$LINENO: checking for $ac_header" >&5
7813 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7814 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7815   echo $ECHO_N "(cached) $ECHO_C" >&6
7816 fi
7817 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7818 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7819 else
7820   # Is the header compilable?
7821 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7822 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7823 cat >conftest.$ac_ext <<_ACEOF
7824 /* confdefs.h.  */
7825 _ACEOF
7826 cat confdefs.h >>conftest.$ac_ext
7827 cat >>conftest.$ac_ext <<_ACEOF
7828 /* end confdefs.h.  */
7829 $ac_includes_default
7830 #include <$ac_header>
7831 _ACEOF
7832 rm -f conftest.$ac_objext
7833 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7834   (eval $ac_compile) 2>conftest.er1
7835   ac_status=$?
7836   grep -v '^ *+' conftest.er1 >conftest.err
7837   rm -f conftest.er1
7838   cat conftest.err >&5
7839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7840   (exit $ac_status); } &&
7841          { ac_try='test -z "$ac_c_werror_flag"
7842                          || test ! -s conftest.err'
7843   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7844   (eval $ac_try) 2>&5
7845   ac_status=$?
7846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7847   (exit $ac_status); }; } &&
7848          { ac_try='test -s conftest.$ac_objext'
7849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7850   (eval $ac_try) 2>&5
7851   ac_status=$?
7852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7853   (exit $ac_status); }; }; then
7854   ac_header_compiler=yes
7855 else
7856   echo "$as_me: failed program was:" >&5
7857 sed 's/^/| /' conftest.$ac_ext >&5
7858
7859 ac_header_compiler=no
7860 fi
7861 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7862 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7863 echo "${ECHO_T}$ac_header_compiler" >&6
7864
7865 # Is the header present?
7866 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7867 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7868 cat >conftest.$ac_ext <<_ACEOF
7869 /* confdefs.h.  */
7870 _ACEOF
7871 cat confdefs.h >>conftest.$ac_ext
7872 cat >>conftest.$ac_ext <<_ACEOF
7873 /* end confdefs.h.  */
7874 #include <$ac_header>
7875 _ACEOF
7876 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7877   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7878   ac_status=$?
7879   grep -v '^ *+' conftest.er1 >conftest.err
7880   rm -f conftest.er1
7881   cat conftest.err >&5
7882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7883   (exit $ac_status); } >/dev/null; then
7884   if test -s conftest.err; then
7885     ac_cpp_err=$ac_c_preproc_warn_flag
7886     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7887   else
7888     ac_cpp_err=
7889   fi
7890 else
7891   ac_cpp_err=yes
7892 fi
7893 if test -z "$ac_cpp_err"; then
7894   ac_header_preproc=yes
7895 else
7896   echo "$as_me: failed program was:" >&5
7897 sed 's/^/| /' conftest.$ac_ext >&5
7898
7899   ac_header_preproc=no
7900 fi
7901 rm -f conftest.err conftest.$ac_ext
7902 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7903 echo "${ECHO_T}$ac_header_preproc" >&6
7904
7905 # So?  What about this header?
7906 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7907   yes:no: )
7908     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7909 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7910     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7911 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7912     ac_header_preproc=yes
7913     ;;
7914   no:yes:* )
7915     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7916 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7917     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7918 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7919     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7920 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7921     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7922 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7923     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7924 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7925     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7926 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7927     (
7928       cat <<\_ASBOX
7929 ## ---------------------------------------- ##
7930 ## Report this to pgsql-bugs@postgresql.org ##
7931 ## ---------------------------------------- ##
7932 _ASBOX
7933     ) |
7934       sed "s/^/$as_me: WARNING:     /" >&2
7935     ;;
7936 esac
7937 echo "$as_me:$LINENO: checking for $ac_header" >&5
7938 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7939 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7940   echo $ECHO_N "(cached) $ECHO_C" >&6
7941 else
7942   eval "$as_ac_Header=\$ac_header_preproc"
7943 fi
7944 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7945 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7946
7947 fi
7948 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7949   cat >>confdefs.h <<_ACEOF
7950 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7951 _ACEOF
7952
7953 else
7954
7955 for ac_header in readline.h
7956 do
7957 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7958 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7959   echo "$as_me:$LINENO: checking for $ac_header" >&5
7960 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7961 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7962   echo $ECHO_N "(cached) $ECHO_C" >&6
7963 fi
7964 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7965 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7966 else
7967   # Is the header compilable?
7968 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7969 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7970 cat >conftest.$ac_ext <<_ACEOF
7971 /* confdefs.h.  */
7972 _ACEOF
7973 cat confdefs.h >>conftest.$ac_ext
7974 cat >>conftest.$ac_ext <<_ACEOF
7975 /* end confdefs.h.  */
7976 $ac_includes_default
7977 #include <$ac_header>
7978 _ACEOF
7979 rm -f conftest.$ac_objext
7980 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7981   (eval $ac_compile) 2>conftest.er1
7982   ac_status=$?
7983   grep -v '^ *+' conftest.er1 >conftest.err
7984   rm -f conftest.er1
7985   cat conftest.err >&5
7986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7987   (exit $ac_status); } &&
7988          { ac_try='test -z "$ac_c_werror_flag"
7989                          || test ! -s conftest.err'
7990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7991   (eval $ac_try) 2>&5
7992   ac_status=$?
7993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7994   (exit $ac_status); }; } &&
7995          { ac_try='test -s conftest.$ac_objext'
7996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7997   (eval $ac_try) 2>&5
7998   ac_status=$?
7999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8000   (exit $ac_status); }; }; then
8001   ac_header_compiler=yes
8002 else
8003   echo "$as_me: failed program was:" >&5
8004 sed 's/^/| /' conftest.$ac_ext >&5
8005
8006 ac_header_compiler=no
8007 fi
8008 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8009 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8010 echo "${ECHO_T}$ac_header_compiler" >&6
8011
8012 # Is the header present?
8013 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8014 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8015 cat >conftest.$ac_ext <<_ACEOF
8016 /* confdefs.h.  */
8017 _ACEOF
8018 cat confdefs.h >>conftest.$ac_ext
8019 cat >>conftest.$ac_ext <<_ACEOF
8020 /* end confdefs.h.  */
8021 #include <$ac_header>
8022 _ACEOF
8023 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8024   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8025   ac_status=$?
8026   grep -v '^ *+' conftest.er1 >conftest.err
8027   rm -f conftest.er1
8028   cat conftest.err >&5
8029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8030   (exit $ac_status); } >/dev/null; then
8031   if test -s conftest.err; then
8032     ac_cpp_err=$ac_c_preproc_warn_flag
8033     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8034   else
8035     ac_cpp_err=
8036   fi
8037 else
8038   ac_cpp_err=yes
8039 fi
8040 if test -z "$ac_cpp_err"; then
8041   ac_header_preproc=yes
8042 else
8043   echo "$as_me: failed program was:" >&5
8044 sed 's/^/| /' conftest.$ac_ext >&5
8045
8046   ac_header_preproc=no
8047 fi
8048 rm -f conftest.err conftest.$ac_ext
8049 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8050 echo "${ECHO_T}$ac_header_preproc" >&6
8051
8052 # So?  What about this header?
8053 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8054   yes:no: )
8055     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8056 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8057     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8058 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8059     ac_header_preproc=yes
8060     ;;
8061   no:yes:* )
8062     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8063 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8064     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8065 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8066     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8067 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8068     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8069 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8070     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8071 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8072     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8073 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8074     (
8075       cat <<\_ASBOX
8076 ## ---------------------------------------- ##
8077 ## Report this to pgsql-bugs@postgresql.org ##
8078 ## ---------------------------------------- ##
8079 _ASBOX
8080     ) |
8081       sed "s/^/$as_me: WARNING:     /" >&2
8082     ;;
8083 esac
8084 echo "$as_me:$LINENO: checking for $ac_header" >&5
8085 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8086 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8087   echo $ECHO_N "(cached) $ECHO_C" >&6
8088 else
8089   eval "$as_ac_Header=\$ac_header_preproc"
8090 fi
8091 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8092 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8093
8094 fi
8095 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8096   cat >>confdefs.h <<_ACEOF
8097 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8098 _ACEOF
8099
8100 else
8101   { { echo "$as_me:$LINENO: error: readline header not found
8102 If you have readline already installed, see config.log for details on the
8103 failure.  It is possible the compiler isn't looking in the proper directory.
8104 Use --without-readline to disable readline support." >&5
8105 echo "$as_me: error: readline header not found
8106 If you have readline already installed, see config.log for details on the
8107 failure.  It is possible the compiler isn't looking in the proper directory.
8108 Use --without-readline to disable readline support." >&2;}
8109    { (exit 1); exit 1; }; }
8110 fi
8111
8112 done
8113
8114 fi
8115
8116 done
8117
8118
8119 for ac_header in readline/history.h
8120 do
8121 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8122 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8123   echo "$as_me:$LINENO: checking for $ac_header" >&5
8124 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8125 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8126   echo $ECHO_N "(cached) $ECHO_C" >&6
8127 fi
8128 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8129 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8130 else
8131   # Is the header compilable?
8132 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8133 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8134 cat >conftest.$ac_ext <<_ACEOF
8135 /* confdefs.h.  */
8136 _ACEOF
8137 cat confdefs.h >>conftest.$ac_ext
8138 cat >>conftest.$ac_ext <<_ACEOF
8139 /* end confdefs.h.  */
8140 $ac_includes_default
8141 #include <$ac_header>
8142 _ACEOF
8143 rm -f conftest.$ac_objext
8144 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8145   (eval $ac_compile) 2>conftest.er1
8146   ac_status=$?
8147   grep -v '^ *+' conftest.er1 >conftest.err
8148   rm -f conftest.er1
8149   cat conftest.err >&5
8150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8151   (exit $ac_status); } &&
8152          { ac_try='test -z "$ac_c_werror_flag"
8153                          || test ! -s conftest.err'
8154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8155   (eval $ac_try) 2>&5
8156   ac_status=$?
8157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8158   (exit $ac_status); }; } &&
8159          { ac_try='test -s conftest.$ac_objext'
8160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8161   (eval $ac_try) 2>&5
8162   ac_status=$?
8163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8164   (exit $ac_status); }; }; then
8165   ac_header_compiler=yes
8166 else
8167   echo "$as_me: failed program was:" >&5
8168 sed 's/^/| /' conftest.$ac_ext >&5
8169
8170 ac_header_compiler=no
8171 fi
8172 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8173 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8174 echo "${ECHO_T}$ac_header_compiler" >&6
8175
8176 # Is the header present?
8177 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8178 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8179 cat >conftest.$ac_ext <<_ACEOF
8180 /* confdefs.h.  */
8181 _ACEOF
8182 cat confdefs.h >>conftest.$ac_ext
8183 cat >>conftest.$ac_ext <<_ACEOF
8184 /* end confdefs.h.  */
8185 #include <$ac_header>
8186 _ACEOF
8187 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8188   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8189   ac_status=$?
8190   grep -v '^ *+' conftest.er1 >conftest.err
8191   rm -f conftest.er1
8192   cat conftest.err >&5
8193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8194   (exit $ac_status); } >/dev/null; then
8195   if test -s conftest.err; then
8196     ac_cpp_err=$ac_c_preproc_warn_flag
8197     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8198   else
8199     ac_cpp_err=
8200   fi
8201 else
8202   ac_cpp_err=yes
8203 fi
8204 if test -z "$ac_cpp_err"; then
8205   ac_header_preproc=yes
8206 else
8207   echo "$as_me: failed program was:" >&5
8208 sed 's/^/| /' conftest.$ac_ext >&5
8209
8210   ac_header_preproc=no
8211 fi
8212 rm -f conftest.err conftest.$ac_ext
8213 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8214 echo "${ECHO_T}$ac_header_preproc" >&6
8215
8216 # So?  What about this header?
8217 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8218   yes:no: )
8219     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8220 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8221     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8222 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8223     ac_header_preproc=yes
8224     ;;
8225   no:yes:* )
8226     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8227 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8228     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8229 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8230     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8231 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8232     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8233 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8234     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8235 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8236     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8237 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8238     (
8239       cat <<\_ASBOX
8240 ## ---------------------------------------- ##
8241 ## Report this to pgsql-bugs@postgresql.org ##
8242 ## ---------------------------------------- ##
8243 _ASBOX
8244     ) |
8245       sed "s/^/$as_me: WARNING:     /" >&2
8246     ;;
8247 esac
8248 echo "$as_me:$LINENO: checking for $ac_header" >&5
8249 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8250 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8251   echo $ECHO_N "(cached) $ECHO_C" >&6
8252 else
8253   eval "$as_ac_Header=\$ac_header_preproc"
8254 fi
8255 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8256 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8257
8258 fi
8259 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8260   cat >>confdefs.h <<_ACEOF
8261 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8262 _ACEOF
8263
8264 else
8265
8266 for ac_header in history.h
8267 do
8268 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8269 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8270   echo "$as_me:$LINENO: checking for $ac_header" >&5
8271 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8272 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8273   echo $ECHO_N "(cached) $ECHO_C" >&6
8274 fi
8275 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8276 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8277 else
8278   # Is the header compilable?
8279 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8280 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8281 cat >conftest.$ac_ext <<_ACEOF
8282 /* confdefs.h.  */
8283 _ACEOF
8284 cat confdefs.h >>conftest.$ac_ext
8285 cat >>conftest.$ac_ext <<_ACEOF
8286 /* end confdefs.h.  */
8287 $ac_includes_default
8288 #include <$ac_header>
8289 _ACEOF
8290 rm -f conftest.$ac_objext
8291 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8292   (eval $ac_compile) 2>conftest.er1
8293   ac_status=$?
8294   grep -v '^ *+' conftest.er1 >conftest.err
8295   rm -f conftest.er1
8296   cat conftest.err >&5
8297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8298   (exit $ac_status); } &&
8299          { ac_try='test -z "$ac_c_werror_flag"
8300                          || test ! -s conftest.err'
8301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8302   (eval $ac_try) 2>&5
8303   ac_status=$?
8304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8305   (exit $ac_status); }; } &&
8306          { ac_try='test -s conftest.$ac_objext'
8307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8308   (eval $ac_try) 2>&5
8309   ac_status=$?
8310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8311   (exit $ac_status); }; }; then
8312   ac_header_compiler=yes
8313 else
8314   echo "$as_me: failed program was:" >&5
8315 sed 's/^/| /' conftest.$ac_ext >&5
8316
8317 ac_header_compiler=no
8318 fi
8319 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8320 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8321 echo "${ECHO_T}$ac_header_compiler" >&6
8322
8323 # Is the header present?
8324 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8325 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8326 cat >conftest.$ac_ext <<_ACEOF
8327 /* confdefs.h.  */
8328 _ACEOF
8329 cat confdefs.h >>conftest.$ac_ext
8330 cat >>conftest.$ac_ext <<_ACEOF
8331 /* end confdefs.h.  */
8332 #include <$ac_header>
8333 _ACEOF
8334 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8335   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8336   ac_status=$?
8337   grep -v '^ *+' conftest.er1 >conftest.err
8338   rm -f conftest.er1
8339   cat conftest.err >&5
8340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8341   (exit $ac_status); } >/dev/null; then
8342   if test -s conftest.err; then
8343     ac_cpp_err=$ac_c_preproc_warn_flag
8344     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8345   else
8346     ac_cpp_err=
8347   fi
8348 else
8349   ac_cpp_err=yes
8350 fi
8351 if test -z "$ac_cpp_err"; then
8352   ac_header_preproc=yes
8353 else
8354   echo "$as_me: failed program was:" >&5
8355 sed 's/^/| /' conftest.$ac_ext >&5
8356
8357   ac_header_preproc=no
8358 fi
8359 rm -f conftest.err conftest.$ac_ext
8360 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8361 echo "${ECHO_T}$ac_header_preproc" >&6
8362
8363 # So?  What about this header?
8364 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8365   yes:no: )
8366     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8367 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8368     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8369 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8370     ac_header_preproc=yes
8371     ;;
8372   no:yes:* )
8373     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8374 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8375     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8376 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8377     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8378 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8379     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8380 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8381     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8382 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8383     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8384 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8385     (
8386       cat <<\_ASBOX
8387 ## ---------------------------------------- ##
8388 ## Report this to pgsql-bugs@postgresql.org ##
8389 ## ---------------------------------------- ##
8390 _ASBOX
8391     ) |
8392       sed "s/^/$as_me: WARNING:     /" >&2
8393     ;;
8394 esac
8395 echo "$as_me:$LINENO: checking for $ac_header" >&5
8396 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8397 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8398   echo $ECHO_N "(cached) $ECHO_C" >&6
8399 else
8400   eval "$as_ac_Header=\$ac_header_preproc"
8401 fi
8402 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8403 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8404
8405 fi
8406 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8407   cat >>confdefs.h <<_ACEOF
8408 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8409 _ACEOF
8410
8411 else
8412   { { echo "$as_me:$LINENO: error: history header not found
8413 If you have readline already installed, see config.log for details on the
8414 failure.  It is possible the compiler isn't looking in the proper directory.
8415 Use --without-readline to disable readline support." >&5
8416 echo "$as_me: error: history header not found
8417 If you have readline already installed, see config.log for details on the
8418 failure.  It is possible the compiler isn't looking in the proper directory.
8419 Use --without-readline to disable readline support." >&2;}
8420    { (exit 1); exit 1; }; }
8421 fi
8422
8423 done
8424
8425 fi
8426
8427 done
8428
8429 fi
8430
8431 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8432 # Some installations of libedit usurp /usr/include/readline/, which seems
8433 # bad practice, since in combined installations readline will have its headers
8434 # there.  We might have to resort to AC_EGREP checks to make sure we found
8435 # the proper header...
8436
8437 for ac_header in editline/readline.h
8438 do
8439 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8440 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8441   echo "$as_me:$LINENO: checking for $ac_header" >&5
8442 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8443 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8444   echo $ECHO_N "(cached) $ECHO_C" >&6
8445 fi
8446 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8447 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8448 else
8449   # Is the header compilable?
8450 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8451 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8452 cat >conftest.$ac_ext <<_ACEOF
8453 /* confdefs.h.  */
8454 _ACEOF
8455 cat confdefs.h >>conftest.$ac_ext
8456 cat >>conftest.$ac_ext <<_ACEOF
8457 /* end confdefs.h.  */
8458 $ac_includes_default
8459 #include <$ac_header>
8460 _ACEOF
8461 rm -f conftest.$ac_objext
8462 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8463   (eval $ac_compile) 2>conftest.er1
8464   ac_status=$?
8465   grep -v '^ *+' conftest.er1 >conftest.err
8466   rm -f conftest.er1
8467   cat conftest.err >&5
8468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8469   (exit $ac_status); } &&
8470          { ac_try='test -z "$ac_c_werror_flag"
8471                          || test ! -s conftest.err'
8472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8473   (eval $ac_try) 2>&5
8474   ac_status=$?
8475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8476   (exit $ac_status); }; } &&
8477          { ac_try='test -s conftest.$ac_objext'
8478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8479   (eval $ac_try) 2>&5
8480   ac_status=$?
8481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8482   (exit $ac_status); }; }; then
8483   ac_header_compiler=yes
8484 else
8485   echo "$as_me: failed program was:" >&5
8486 sed 's/^/| /' conftest.$ac_ext >&5
8487
8488 ac_header_compiler=no
8489 fi
8490 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8491 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8492 echo "${ECHO_T}$ac_header_compiler" >&6
8493
8494 # Is the header present?
8495 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8496 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8497 cat >conftest.$ac_ext <<_ACEOF
8498 /* confdefs.h.  */
8499 _ACEOF
8500 cat confdefs.h >>conftest.$ac_ext
8501 cat >>conftest.$ac_ext <<_ACEOF
8502 /* end confdefs.h.  */
8503 #include <$ac_header>
8504 _ACEOF
8505 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8506   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8507   ac_status=$?
8508   grep -v '^ *+' conftest.er1 >conftest.err
8509   rm -f conftest.er1
8510   cat conftest.err >&5
8511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8512   (exit $ac_status); } >/dev/null; then
8513   if test -s conftest.err; then
8514     ac_cpp_err=$ac_c_preproc_warn_flag
8515     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8516   else
8517     ac_cpp_err=
8518   fi
8519 else
8520   ac_cpp_err=yes
8521 fi
8522 if test -z "$ac_cpp_err"; then
8523   ac_header_preproc=yes
8524 else
8525   echo "$as_me: failed program was:" >&5
8526 sed 's/^/| /' conftest.$ac_ext >&5
8527
8528   ac_header_preproc=no
8529 fi
8530 rm -f conftest.err conftest.$ac_ext
8531 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8532 echo "${ECHO_T}$ac_header_preproc" >&6
8533
8534 # So?  What about this header?
8535 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8536   yes:no: )
8537     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8538 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8539     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8540 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8541     ac_header_preproc=yes
8542     ;;
8543   no:yes:* )
8544     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8545 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8546     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8547 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8548     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8549 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8550     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8551 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8552     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8553 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8554     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8555 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8556     (
8557       cat <<\_ASBOX
8558 ## ---------------------------------------- ##
8559 ## Report this to pgsql-bugs@postgresql.org ##
8560 ## ---------------------------------------- ##
8561 _ASBOX
8562     ) |
8563       sed "s/^/$as_me: WARNING:     /" >&2
8564     ;;
8565 esac
8566 echo "$as_me:$LINENO: checking for $ac_header" >&5
8567 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8568 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8569   echo $ECHO_N "(cached) $ECHO_C" >&6
8570 else
8571   eval "$as_ac_Header=\$ac_header_preproc"
8572 fi
8573 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8574 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8575
8576 fi
8577 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8578   cat >>confdefs.h <<_ACEOF
8579 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8580 _ACEOF
8581
8582 else
8583
8584 for ac_header in readline.h
8585 do
8586 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8587 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8588   echo "$as_me:$LINENO: checking for $ac_header" >&5
8589 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8590 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8591   echo $ECHO_N "(cached) $ECHO_C" >&6
8592 fi
8593 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8594 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8595 else
8596   # Is the header compilable?
8597 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8598 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8599 cat >conftest.$ac_ext <<_ACEOF
8600 /* confdefs.h.  */
8601 _ACEOF
8602 cat confdefs.h >>conftest.$ac_ext
8603 cat >>conftest.$ac_ext <<_ACEOF
8604 /* end confdefs.h.  */
8605 $ac_includes_default
8606 #include <$ac_header>
8607 _ACEOF
8608 rm -f conftest.$ac_objext
8609 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8610   (eval $ac_compile) 2>conftest.er1
8611   ac_status=$?
8612   grep -v '^ *+' conftest.er1 >conftest.err
8613   rm -f conftest.er1
8614   cat conftest.err >&5
8615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8616   (exit $ac_status); } &&
8617          { ac_try='test -z "$ac_c_werror_flag"
8618                          || test ! -s conftest.err'
8619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8620   (eval $ac_try) 2>&5
8621   ac_status=$?
8622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8623   (exit $ac_status); }; } &&
8624          { ac_try='test -s conftest.$ac_objext'
8625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8626   (eval $ac_try) 2>&5
8627   ac_status=$?
8628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8629   (exit $ac_status); }; }; then
8630   ac_header_compiler=yes
8631 else
8632   echo "$as_me: failed program was:" >&5
8633 sed 's/^/| /' conftest.$ac_ext >&5
8634
8635 ac_header_compiler=no
8636 fi
8637 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8638 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8639 echo "${ECHO_T}$ac_header_compiler" >&6
8640
8641 # Is the header present?
8642 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8643 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8644 cat >conftest.$ac_ext <<_ACEOF
8645 /* confdefs.h.  */
8646 _ACEOF
8647 cat confdefs.h >>conftest.$ac_ext
8648 cat >>conftest.$ac_ext <<_ACEOF
8649 /* end confdefs.h.  */
8650 #include <$ac_header>
8651 _ACEOF
8652 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8653   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8654   ac_status=$?
8655   grep -v '^ *+' conftest.er1 >conftest.err
8656   rm -f conftest.er1
8657   cat conftest.err >&5
8658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8659   (exit $ac_status); } >/dev/null; then
8660   if test -s conftest.err; then
8661     ac_cpp_err=$ac_c_preproc_warn_flag
8662     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8663   else
8664     ac_cpp_err=
8665   fi
8666 else
8667   ac_cpp_err=yes
8668 fi
8669 if test -z "$ac_cpp_err"; then
8670   ac_header_preproc=yes
8671 else
8672   echo "$as_me: failed program was:" >&5
8673 sed 's/^/| /' conftest.$ac_ext >&5
8674
8675   ac_header_preproc=no
8676 fi
8677 rm -f conftest.err conftest.$ac_ext
8678 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8679 echo "${ECHO_T}$ac_header_preproc" >&6
8680
8681 # So?  What about this header?
8682 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8683   yes:no: )
8684     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8685 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8686     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8687 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8688     ac_header_preproc=yes
8689     ;;
8690   no:yes:* )
8691     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8692 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8693     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8694 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8695     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8696 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8697     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8698 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8699     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8700 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8701     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8702 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8703     (
8704       cat <<\_ASBOX
8705 ## ---------------------------------------- ##
8706 ## Report this to pgsql-bugs@postgresql.org ##
8707 ## ---------------------------------------- ##
8708 _ASBOX
8709     ) |
8710       sed "s/^/$as_me: WARNING:     /" >&2
8711     ;;
8712 esac
8713 echo "$as_me:$LINENO: checking for $ac_header" >&5
8714 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8715 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8716   echo $ECHO_N "(cached) $ECHO_C" >&6
8717 else
8718   eval "$as_ac_Header=\$ac_header_preproc"
8719 fi
8720 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8721 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8722
8723 fi
8724 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8725   cat >>confdefs.h <<_ACEOF
8726 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8727 _ACEOF
8728
8729 else
8730
8731 for ac_header in readline/readline.h
8732 do
8733 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8734 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8735   echo "$as_me:$LINENO: checking for $ac_header" >&5
8736 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8737 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8738   echo $ECHO_N "(cached) $ECHO_C" >&6
8739 fi
8740 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8741 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8742 else
8743   # Is the header compilable?
8744 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8745 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8746 cat >conftest.$ac_ext <<_ACEOF
8747 /* confdefs.h.  */
8748 _ACEOF
8749 cat confdefs.h >>conftest.$ac_ext
8750 cat >>conftest.$ac_ext <<_ACEOF
8751 /* end confdefs.h.  */
8752 $ac_includes_default
8753 #include <$ac_header>
8754 _ACEOF
8755 rm -f conftest.$ac_objext
8756 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8757   (eval $ac_compile) 2>conftest.er1
8758   ac_status=$?
8759   grep -v '^ *+' conftest.er1 >conftest.err
8760   rm -f conftest.er1
8761   cat conftest.err >&5
8762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8763   (exit $ac_status); } &&
8764          { ac_try='test -z "$ac_c_werror_flag"
8765                          || test ! -s conftest.err'
8766   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8767   (eval $ac_try) 2>&5
8768   ac_status=$?
8769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8770   (exit $ac_status); }; } &&
8771          { ac_try='test -s conftest.$ac_objext'
8772   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8773   (eval $ac_try) 2>&5
8774   ac_status=$?
8775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8776   (exit $ac_status); }; }; then
8777   ac_header_compiler=yes
8778 else
8779   echo "$as_me: failed program was:" >&5
8780 sed 's/^/| /' conftest.$ac_ext >&5
8781
8782 ac_header_compiler=no
8783 fi
8784 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8785 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8786 echo "${ECHO_T}$ac_header_compiler" >&6
8787
8788 # Is the header present?
8789 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8790 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8791 cat >conftest.$ac_ext <<_ACEOF
8792 /* confdefs.h.  */
8793 _ACEOF
8794 cat confdefs.h >>conftest.$ac_ext
8795 cat >>conftest.$ac_ext <<_ACEOF
8796 /* end confdefs.h.  */
8797 #include <$ac_header>
8798 _ACEOF
8799 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8800   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8801   ac_status=$?
8802   grep -v '^ *+' conftest.er1 >conftest.err
8803   rm -f conftest.er1
8804   cat conftest.err >&5
8805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8806   (exit $ac_status); } >/dev/null; then
8807   if test -s conftest.err; then
8808     ac_cpp_err=$ac_c_preproc_warn_flag
8809     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8810   else
8811     ac_cpp_err=
8812   fi
8813 else
8814   ac_cpp_err=yes
8815 fi
8816 if test -z "$ac_cpp_err"; then
8817   ac_header_preproc=yes
8818 else
8819   echo "$as_me: failed program was:" >&5
8820 sed 's/^/| /' conftest.$ac_ext >&5
8821
8822   ac_header_preproc=no
8823 fi
8824 rm -f conftest.err conftest.$ac_ext
8825 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8826 echo "${ECHO_T}$ac_header_preproc" >&6
8827
8828 # So?  What about this header?
8829 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8830   yes:no: )
8831     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8832 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8833     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8834 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8835     ac_header_preproc=yes
8836     ;;
8837   no:yes:* )
8838     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8839 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8840     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8841 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8842     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8843 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8844     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8845 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8846     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8847 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8848     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8849 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8850     (
8851       cat <<\_ASBOX
8852 ## ---------------------------------------- ##
8853 ## Report this to pgsql-bugs@postgresql.org ##
8854 ## ---------------------------------------- ##
8855 _ASBOX
8856     ) |
8857       sed "s/^/$as_me: WARNING:     /" >&2
8858     ;;
8859 esac
8860 echo "$as_me:$LINENO: checking for $ac_header" >&5
8861 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8862 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8863   echo $ECHO_N "(cached) $ECHO_C" >&6
8864 else
8865   eval "$as_ac_Header=\$ac_header_preproc"
8866 fi
8867 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8868 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8869
8870 fi
8871 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8872   cat >>confdefs.h <<_ACEOF
8873 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8874 _ACEOF
8875
8876 else
8877   { { echo "$as_me:$LINENO: error: readline header not found
8878 If you have libedit already installed, see config.log for details on the
8879 failure.  It is possible the compiler isn't looking in the proper directory.
8880 Use --without-readline to disable libedit support." >&5
8881 echo "$as_me: error: readline header not found
8882 If you have libedit already installed, see config.log for details on the
8883 failure.  It is possible the compiler isn't looking in the proper directory.
8884 Use --without-readline to disable libedit support." >&2;}
8885    { (exit 1); exit 1; }; }
8886 fi
8887
8888 done
8889
8890 fi
8891
8892 done
8893
8894 fi
8895
8896 done
8897
8898
8899 for ac_header in editline/history.h
8900 do
8901 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8902 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8903   echo "$as_me:$LINENO: checking for $ac_header" >&5
8904 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8905 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8906   echo $ECHO_N "(cached) $ECHO_C" >&6
8907 fi
8908 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8909 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8910 else
8911   # Is the header compilable?
8912 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8913 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8914 cat >conftest.$ac_ext <<_ACEOF
8915 /* confdefs.h.  */
8916 _ACEOF
8917 cat confdefs.h >>conftest.$ac_ext
8918 cat >>conftest.$ac_ext <<_ACEOF
8919 /* end confdefs.h.  */
8920 $ac_includes_default
8921 #include <$ac_header>
8922 _ACEOF
8923 rm -f conftest.$ac_objext
8924 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8925   (eval $ac_compile) 2>conftest.er1
8926   ac_status=$?
8927   grep -v '^ *+' conftest.er1 >conftest.err
8928   rm -f conftest.er1
8929   cat conftest.err >&5
8930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8931   (exit $ac_status); } &&
8932          { ac_try='test -z "$ac_c_werror_flag"
8933                          || test ! -s conftest.err'
8934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8935   (eval $ac_try) 2>&5
8936   ac_status=$?
8937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8938   (exit $ac_status); }; } &&
8939          { ac_try='test -s conftest.$ac_objext'
8940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8941   (eval $ac_try) 2>&5
8942   ac_status=$?
8943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8944   (exit $ac_status); }; }; then
8945   ac_header_compiler=yes
8946 else
8947   echo "$as_me: failed program was:" >&5
8948 sed 's/^/| /' conftest.$ac_ext >&5
8949
8950 ac_header_compiler=no
8951 fi
8952 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8953 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8954 echo "${ECHO_T}$ac_header_compiler" >&6
8955
8956 # Is the header present?
8957 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8958 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8959 cat >conftest.$ac_ext <<_ACEOF
8960 /* confdefs.h.  */
8961 _ACEOF
8962 cat confdefs.h >>conftest.$ac_ext
8963 cat >>conftest.$ac_ext <<_ACEOF
8964 /* end confdefs.h.  */
8965 #include <$ac_header>
8966 _ACEOF
8967 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8968   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8969   ac_status=$?
8970   grep -v '^ *+' conftest.er1 >conftest.err
8971   rm -f conftest.er1
8972   cat conftest.err >&5
8973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8974   (exit $ac_status); } >/dev/null; then
8975   if test -s conftest.err; then
8976     ac_cpp_err=$ac_c_preproc_warn_flag
8977     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8978   else
8979     ac_cpp_err=
8980   fi
8981 else
8982   ac_cpp_err=yes
8983 fi
8984 if test -z "$ac_cpp_err"; then
8985   ac_header_preproc=yes
8986 else
8987   echo "$as_me: failed program was:" >&5
8988 sed 's/^/| /' conftest.$ac_ext >&5
8989
8990   ac_header_preproc=no
8991 fi
8992 rm -f conftest.err conftest.$ac_ext
8993 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8994 echo "${ECHO_T}$ac_header_preproc" >&6
8995
8996 # So?  What about this header?
8997 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8998   yes:no: )
8999     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9000 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9001     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9002 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9003     ac_header_preproc=yes
9004     ;;
9005   no:yes:* )
9006     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9007 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9008     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9009 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9010     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9011 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9012     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9013 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9014     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9015 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9016     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9017 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9018     (
9019       cat <<\_ASBOX
9020 ## ---------------------------------------- ##
9021 ## Report this to pgsql-bugs@postgresql.org ##
9022 ## ---------------------------------------- ##
9023 _ASBOX
9024     ) |
9025       sed "s/^/$as_me: WARNING:     /" >&2
9026     ;;
9027 esac
9028 echo "$as_me:$LINENO: checking for $ac_header" >&5
9029 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9030 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9031   echo $ECHO_N "(cached) $ECHO_C" >&6
9032 else
9033   eval "$as_ac_Header=\$ac_header_preproc"
9034 fi
9035 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9036 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9037
9038 fi
9039 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9040   cat >>confdefs.h <<_ACEOF
9041 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9042 _ACEOF
9043
9044 else
9045
9046 for ac_header in history.h
9047 do
9048 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9049 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9050   echo "$as_me:$LINENO: checking for $ac_header" >&5
9051 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9052 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9053   echo $ECHO_N "(cached) $ECHO_C" >&6
9054 fi
9055 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9056 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9057 else
9058   # Is the header compilable?
9059 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9060 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9061 cat >conftest.$ac_ext <<_ACEOF
9062 /* confdefs.h.  */
9063 _ACEOF
9064 cat confdefs.h >>conftest.$ac_ext
9065 cat >>conftest.$ac_ext <<_ACEOF
9066 /* end confdefs.h.  */
9067 $ac_includes_default
9068 #include <$ac_header>
9069 _ACEOF
9070 rm -f conftest.$ac_objext
9071 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9072   (eval $ac_compile) 2>conftest.er1
9073   ac_status=$?
9074   grep -v '^ *+' conftest.er1 >conftest.err
9075   rm -f conftest.er1
9076   cat conftest.err >&5
9077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9078   (exit $ac_status); } &&
9079          { ac_try='test -z "$ac_c_werror_flag"
9080                          || test ! -s conftest.err'
9081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9082   (eval $ac_try) 2>&5
9083   ac_status=$?
9084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9085   (exit $ac_status); }; } &&
9086          { ac_try='test -s conftest.$ac_objext'
9087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9088   (eval $ac_try) 2>&5
9089   ac_status=$?
9090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9091   (exit $ac_status); }; }; then
9092   ac_header_compiler=yes
9093 else
9094   echo "$as_me: failed program was:" >&5
9095 sed 's/^/| /' conftest.$ac_ext >&5
9096
9097 ac_header_compiler=no
9098 fi
9099 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9100 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9101 echo "${ECHO_T}$ac_header_compiler" >&6
9102
9103 # Is the header present?
9104 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9105 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9106 cat >conftest.$ac_ext <<_ACEOF
9107 /* confdefs.h.  */
9108 _ACEOF
9109 cat confdefs.h >>conftest.$ac_ext
9110 cat >>conftest.$ac_ext <<_ACEOF
9111 /* end confdefs.h.  */
9112 #include <$ac_header>
9113 _ACEOF
9114 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9115   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9116   ac_status=$?
9117   grep -v '^ *+' conftest.er1 >conftest.err
9118   rm -f conftest.er1
9119   cat conftest.err >&5
9120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9121   (exit $ac_status); } >/dev/null; then
9122   if test -s conftest.err; then
9123     ac_cpp_err=$ac_c_preproc_warn_flag
9124     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9125   else
9126     ac_cpp_err=
9127   fi
9128 else
9129   ac_cpp_err=yes
9130 fi
9131 if test -z "$ac_cpp_err"; then
9132   ac_header_preproc=yes
9133 else
9134   echo "$as_me: failed program was:" >&5
9135 sed 's/^/| /' conftest.$ac_ext >&5
9136
9137   ac_header_preproc=no
9138 fi
9139 rm -f conftest.err conftest.$ac_ext
9140 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9141 echo "${ECHO_T}$ac_header_preproc" >&6
9142
9143 # So?  What about this header?
9144 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9145   yes:no: )
9146     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9147 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9148     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9149 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9150     ac_header_preproc=yes
9151     ;;
9152   no:yes:* )
9153     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9154 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9155     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9156 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9157     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9158 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9159     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9160 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9161     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9162 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9163     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9164 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9165     (
9166       cat <<\_ASBOX
9167 ## ---------------------------------------- ##
9168 ## Report this to pgsql-bugs@postgresql.org ##
9169 ## ---------------------------------------- ##
9170 _ASBOX
9171     ) |
9172       sed "s/^/$as_me: WARNING:     /" >&2
9173     ;;
9174 esac
9175 echo "$as_me:$LINENO: checking for $ac_header" >&5
9176 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9177 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9178   echo $ECHO_N "(cached) $ECHO_C" >&6
9179 else
9180   eval "$as_ac_Header=\$ac_header_preproc"
9181 fi
9182 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9183 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9184
9185 fi
9186 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9187   cat >>confdefs.h <<_ACEOF
9188 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9189 _ACEOF
9190
9191 else
9192
9193 for ac_header in readline/history.h
9194 do
9195 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9196 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9197   echo "$as_me:$LINENO: checking for $ac_header" >&5
9198 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9199 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9200   echo $ECHO_N "(cached) $ECHO_C" >&6
9201 fi
9202 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9203 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9204 else
9205   # Is the header compilable?
9206 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9207 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9208 cat >conftest.$ac_ext <<_ACEOF
9209 /* confdefs.h.  */
9210 _ACEOF
9211 cat confdefs.h >>conftest.$ac_ext
9212 cat >>conftest.$ac_ext <<_ACEOF
9213 /* end confdefs.h.  */
9214 $ac_includes_default
9215 #include <$ac_header>
9216 _ACEOF
9217 rm -f conftest.$ac_objext
9218 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9219   (eval $ac_compile) 2>conftest.er1
9220   ac_status=$?
9221   grep -v '^ *+' conftest.er1 >conftest.err
9222   rm -f conftest.er1
9223   cat conftest.err >&5
9224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9225   (exit $ac_status); } &&
9226          { ac_try='test -z "$ac_c_werror_flag"
9227                          || test ! -s conftest.err'
9228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9229   (eval $ac_try) 2>&5
9230   ac_status=$?
9231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9232   (exit $ac_status); }; } &&
9233          { ac_try='test -s conftest.$ac_objext'
9234   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9235   (eval $ac_try) 2>&5
9236   ac_status=$?
9237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9238   (exit $ac_status); }; }; then
9239   ac_header_compiler=yes
9240 else
9241   echo "$as_me: failed program was:" >&5
9242 sed 's/^/| /' conftest.$ac_ext >&5
9243
9244 ac_header_compiler=no
9245 fi
9246 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9247 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9248 echo "${ECHO_T}$ac_header_compiler" >&6
9249
9250 # Is the header present?
9251 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9252 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9253 cat >conftest.$ac_ext <<_ACEOF
9254 /* confdefs.h.  */
9255 _ACEOF
9256 cat confdefs.h >>conftest.$ac_ext
9257 cat >>conftest.$ac_ext <<_ACEOF
9258 /* end confdefs.h.  */
9259 #include <$ac_header>
9260 _ACEOF
9261 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9262   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9263   ac_status=$?
9264   grep -v '^ *+' conftest.er1 >conftest.err
9265   rm -f conftest.er1
9266   cat conftest.err >&5
9267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9268   (exit $ac_status); } >/dev/null; then
9269   if test -s conftest.err; then
9270     ac_cpp_err=$ac_c_preproc_warn_flag
9271     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9272   else
9273     ac_cpp_err=
9274   fi
9275 else
9276   ac_cpp_err=yes
9277 fi
9278 if test -z "$ac_cpp_err"; then
9279   ac_header_preproc=yes
9280 else
9281   echo "$as_me: failed program was:" >&5
9282 sed 's/^/| /' conftest.$ac_ext >&5
9283
9284   ac_header_preproc=no
9285 fi
9286 rm -f conftest.err conftest.$ac_ext
9287 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9288 echo "${ECHO_T}$ac_header_preproc" >&6
9289
9290 # So?  What about this header?
9291 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9292   yes:no: )
9293     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9294 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9295     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9296 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9297     ac_header_preproc=yes
9298     ;;
9299   no:yes:* )
9300     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9301 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9302     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9303 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9304     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9305 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9306     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9307 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9308     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9309 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9310     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9311 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9312     (
9313       cat <<\_ASBOX
9314 ## ---------------------------------------- ##
9315 ## Report this to pgsql-bugs@postgresql.org ##
9316 ## ---------------------------------------- ##
9317 _ASBOX
9318     ) |
9319       sed "s/^/$as_me: WARNING:     /" >&2
9320     ;;
9321 esac
9322 echo "$as_me:$LINENO: checking for $ac_header" >&5
9323 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9324 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9325   echo $ECHO_N "(cached) $ECHO_C" >&6
9326 else
9327   eval "$as_ac_Header=\$ac_header_preproc"
9328 fi
9329 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9330 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9331
9332 fi
9333 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9334   cat >>confdefs.h <<_ACEOF
9335 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9336 _ACEOF
9337
9338 else
9339   { { echo "$as_me:$LINENO: error: history header not found
9340 If you have libedit already installed, see config.log for details on the
9341 failure.  It is possible the compiler isn't looking in the proper directory.
9342 Use --without-readline to disable libedit support." >&5
9343 echo "$as_me: error: history header not found
9344 If you have libedit already installed, see config.log for details on the
9345 failure.  It is possible the compiler isn't looking in the proper directory.
9346 Use --without-readline to disable libedit support." >&2;}
9347    { (exit 1); exit 1; }; }
9348 fi
9349
9350 done
9351
9352 fi
9353
9354 done
9355
9356 fi
9357
9358 done
9359
9360 fi
9361
9362 if test "$with_zlib" = yes; then
9363   if test "${ac_cv_header_zlib_h+set}" = set; then
9364   echo "$as_me:$LINENO: checking for zlib.h" >&5
9365 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9366 if test "${ac_cv_header_zlib_h+set}" = set; then
9367   echo $ECHO_N "(cached) $ECHO_C" >&6
9368 fi
9369 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9370 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9371 else
9372   # Is the header compilable?
9373 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9374 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9375 cat >conftest.$ac_ext <<_ACEOF
9376 /* confdefs.h.  */
9377 _ACEOF
9378 cat confdefs.h >>conftest.$ac_ext
9379 cat >>conftest.$ac_ext <<_ACEOF
9380 /* end confdefs.h.  */
9381 $ac_includes_default
9382 #include <zlib.h>
9383 _ACEOF
9384 rm -f conftest.$ac_objext
9385 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9386   (eval $ac_compile) 2>conftest.er1
9387   ac_status=$?
9388   grep -v '^ *+' conftest.er1 >conftest.err
9389   rm -f conftest.er1
9390   cat conftest.err >&5
9391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9392   (exit $ac_status); } &&
9393          { ac_try='test -z "$ac_c_werror_flag"
9394                          || test ! -s conftest.err'
9395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9396   (eval $ac_try) 2>&5
9397   ac_status=$?
9398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9399   (exit $ac_status); }; } &&
9400          { ac_try='test -s conftest.$ac_objext'
9401   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9402   (eval $ac_try) 2>&5
9403   ac_status=$?
9404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9405   (exit $ac_status); }; }; then
9406   ac_header_compiler=yes
9407 else
9408   echo "$as_me: failed program was:" >&5
9409 sed 's/^/| /' conftest.$ac_ext >&5
9410
9411 ac_header_compiler=no
9412 fi
9413 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9414 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9415 echo "${ECHO_T}$ac_header_compiler" >&6
9416
9417 # Is the header present?
9418 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9419 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9420 cat >conftest.$ac_ext <<_ACEOF
9421 /* confdefs.h.  */
9422 _ACEOF
9423 cat confdefs.h >>conftest.$ac_ext
9424 cat >>conftest.$ac_ext <<_ACEOF
9425 /* end confdefs.h.  */
9426 #include <zlib.h>
9427 _ACEOF
9428 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9429   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9430   ac_status=$?
9431   grep -v '^ *+' conftest.er1 >conftest.err
9432   rm -f conftest.er1
9433   cat conftest.err >&5
9434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9435   (exit $ac_status); } >/dev/null; then
9436   if test -s conftest.err; then
9437     ac_cpp_err=$ac_c_preproc_warn_flag
9438     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9439   else
9440     ac_cpp_err=
9441   fi
9442 else
9443   ac_cpp_err=yes
9444 fi
9445 if test -z "$ac_cpp_err"; then
9446   ac_header_preproc=yes
9447 else
9448   echo "$as_me: failed program was:" >&5
9449 sed 's/^/| /' conftest.$ac_ext >&5
9450
9451   ac_header_preproc=no
9452 fi
9453 rm -f conftest.err conftest.$ac_ext
9454 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9455 echo "${ECHO_T}$ac_header_preproc" >&6
9456
9457 # So?  What about this header?
9458 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9459   yes:no: )
9460     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9461 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9462     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9463 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9464     ac_header_preproc=yes
9465     ;;
9466   no:yes:* )
9467     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9468 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9469     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9470 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9471     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9472 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9473     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9474 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9475     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9476 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9477     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9478 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9479     (
9480       cat <<\_ASBOX
9481 ## ---------------------------------------- ##
9482 ## Report this to pgsql-bugs@postgresql.org ##
9483 ## ---------------------------------------- ##
9484 _ASBOX
9485     ) |
9486       sed "s/^/$as_me: WARNING:     /" >&2
9487     ;;
9488 esac
9489 echo "$as_me:$LINENO: checking for zlib.h" >&5
9490 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9491 if test "${ac_cv_header_zlib_h+set}" = set; then
9492   echo $ECHO_N "(cached) $ECHO_C" >&6
9493 else
9494   ac_cv_header_zlib_h=$ac_header_preproc
9495 fi
9496 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9497 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9498
9499 fi
9500 if test $ac_cv_header_zlib_h = yes; then
9501   :
9502 else
9503   { { echo "$as_me:$LINENO: error: zlib header not found
9504 If you have zlib already installed, see config.log for details on the
9505 failure.  It is possible the compiler isn't looking in the proper directory.
9506 Use --without-zlib to disable zlib support." >&5
9507 echo "$as_me: error: zlib header not found
9508 If you have zlib already installed, see config.log for details on the
9509 failure.  It is possible the compiler isn't looking in the proper directory.
9510 Use --without-zlib to disable zlib support." >&2;}
9511    { (exit 1); exit 1; }; }
9512 fi
9513
9514
9515 fi
9516
9517 if test "$with_krb5" = yes ; then
9518   if test "${ac_cv_header_krb5_h+set}" = set; then
9519   echo "$as_me:$LINENO: checking for krb5.h" >&5
9520 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9521 if test "${ac_cv_header_krb5_h+set}" = set; then
9522   echo $ECHO_N "(cached) $ECHO_C" >&6
9523 fi
9524 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9525 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9526 else
9527   # Is the header compilable?
9528 echo "$as_me:$LINENO: checking krb5.h usability" >&5
9529 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
9530 cat >conftest.$ac_ext <<_ACEOF
9531 /* confdefs.h.  */
9532 _ACEOF
9533 cat confdefs.h >>conftest.$ac_ext
9534 cat >>conftest.$ac_ext <<_ACEOF
9535 /* end confdefs.h.  */
9536 $ac_includes_default
9537 #include <krb5.h>
9538 _ACEOF
9539 rm -f conftest.$ac_objext
9540 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9541   (eval $ac_compile) 2>conftest.er1
9542   ac_status=$?
9543   grep -v '^ *+' conftest.er1 >conftest.err
9544   rm -f conftest.er1
9545   cat conftest.err >&5
9546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9547   (exit $ac_status); } &&
9548          { ac_try='test -z "$ac_c_werror_flag"
9549                          || test ! -s conftest.err'
9550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9551   (eval $ac_try) 2>&5
9552   ac_status=$?
9553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9554   (exit $ac_status); }; } &&
9555          { ac_try='test -s conftest.$ac_objext'
9556   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9557   (eval $ac_try) 2>&5
9558   ac_status=$?
9559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9560   (exit $ac_status); }; }; then
9561   ac_header_compiler=yes
9562 else
9563   echo "$as_me: failed program was:" >&5
9564 sed 's/^/| /' conftest.$ac_ext >&5
9565
9566 ac_header_compiler=no
9567 fi
9568 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9569 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9570 echo "${ECHO_T}$ac_header_compiler" >&6
9571
9572 # Is the header present?
9573 echo "$as_me:$LINENO: checking krb5.h presence" >&5
9574 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
9575 cat >conftest.$ac_ext <<_ACEOF
9576 /* confdefs.h.  */
9577 _ACEOF
9578 cat confdefs.h >>conftest.$ac_ext
9579 cat >>conftest.$ac_ext <<_ACEOF
9580 /* end confdefs.h.  */
9581 #include <krb5.h>
9582 _ACEOF
9583 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9584   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9585   ac_status=$?
9586   grep -v '^ *+' conftest.er1 >conftest.err
9587   rm -f conftest.er1
9588   cat conftest.err >&5
9589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9590   (exit $ac_status); } >/dev/null; then
9591   if test -s conftest.err; then
9592     ac_cpp_err=$ac_c_preproc_warn_flag
9593     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9594   else
9595     ac_cpp_err=
9596   fi
9597 else
9598   ac_cpp_err=yes
9599 fi
9600 if test -z "$ac_cpp_err"; then
9601   ac_header_preproc=yes
9602 else
9603   echo "$as_me: failed program was:" >&5
9604 sed 's/^/| /' conftest.$ac_ext >&5
9605
9606   ac_header_preproc=no
9607 fi
9608 rm -f conftest.err conftest.$ac_ext
9609 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9610 echo "${ECHO_T}$ac_header_preproc" >&6
9611
9612 # So?  What about this header?
9613 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9614   yes:no: )
9615     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
9616 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9617     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
9618 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
9619     ac_header_preproc=yes
9620     ;;
9621   no:yes:* )
9622     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
9623 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
9624     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
9625 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
9626     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
9627 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
9628     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
9629 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9630     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
9631 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
9632     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
9633 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
9634     (
9635       cat <<\_ASBOX
9636 ## ---------------------------------------- ##
9637 ## Report this to pgsql-bugs@postgresql.org ##
9638 ## ---------------------------------------- ##
9639 _ASBOX
9640     ) |
9641       sed "s/^/$as_me: WARNING:     /" >&2
9642     ;;
9643 esac
9644 echo "$as_me:$LINENO: checking for krb5.h" >&5
9645 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9646 if test "${ac_cv_header_krb5_h+set}" = set; then
9647   echo $ECHO_N "(cached) $ECHO_C" >&6
9648 else
9649   ac_cv_header_krb5_h=$ac_header_preproc
9650 fi
9651 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9652 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9653
9654 fi
9655 if test $ac_cv_header_krb5_h = yes; then
9656   :
9657 else
9658   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
9659 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
9660    { (exit 1); exit 1; }; }
9661 fi
9662
9663
9664 fi
9665
9666 if test "$with_openssl" = yes ; then
9667   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9668   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9669 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9670 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9671   echo $ECHO_N "(cached) $ECHO_C" >&6
9672 fi
9673 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9674 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9675 else
9676   # Is the header compilable?
9677 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
9678 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
9679 cat >conftest.$ac_ext <<_ACEOF
9680 /* confdefs.h.  */
9681 _ACEOF
9682 cat confdefs.h >>conftest.$ac_ext
9683 cat >>conftest.$ac_ext <<_ACEOF
9684 /* end confdefs.h.  */
9685 $ac_includes_default
9686 #include <openssl/ssl.h>
9687 _ACEOF
9688 rm -f conftest.$ac_objext
9689 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9690   (eval $ac_compile) 2>conftest.er1
9691   ac_status=$?
9692   grep -v '^ *+' conftest.er1 >conftest.err
9693   rm -f conftest.er1
9694   cat conftest.err >&5
9695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9696   (exit $ac_status); } &&
9697          { ac_try='test -z "$ac_c_werror_flag"
9698                          || test ! -s conftest.err'
9699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9700   (eval $ac_try) 2>&5
9701   ac_status=$?
9702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9703   (exit $ac_status); }; } &&
9704          { ac_try='test -s conftest.$ac_objext'
9705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9706   (eval $ac_try) 2>&5
9707   ac_status=$?
9708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9709   (exit $ac_status); }; }; then
9710   ac_header_compiler=yes
9711 else
9712   echo "$as_me: failed program was:" >&5
9713 sed 's/^/| /' conftest.$ac_ext >&5
9714
9715 ac_header_compiler=no
9716 fi
9717 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9718 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9719 echo "${ECHO_T}$ac_header_compiler" >&6
9720
9721 # Is the header present?
9722 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
9723 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
9724 cat >conftest.$ac_ext <<_ACEOF
9725 /* confdefs.h.  */
9726 _ACEOF
9727 cat confdefs.h >>conftest.$ac_ext
9728 cat >>conftest.$ac_ext <<_ACEOF
9729 /* end confdefs.h.  */
9730 #include <openssl/ssl.h>
9731 _ACEOF
9732 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9733   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9734   ac_status=$?
9735   grep -v '^ *+' conftest.er1 >conftest.err
9736   rm -f conftest.er1
9737   cat conftest.err >&5
9738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9739   (exit $ac_status); } >/dev/null; then
9740   if test -s conftest.err; then
9741     ac_cpp_err=$ac_c_preproc_warn_flag
9742     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9743   else
9744     ac_cpp_err=
9745   fi
9746 else
9747   ac_cpp_err=yes
9748 fi
9749 if test -z "$ac_cpp_err"; then
9750   ac_header_preproc=yes
9751 else
9752   echo "$as_me: failed program was:" >&5
9753 sed 's/^/| /' conftest.$ac_ext >&5
9754
9755   ac_header_preproc=no
9756 fi
9757 rm -f conftest.err conftest.$ac_ext
9758 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9759 echo "${ECHO_T}$ac_header_preproc" >&6
9760
9761 # So?  What about this header?
9762 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9763   yes:no: )
9764     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9765 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9766     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
9767 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
9768     ac_header_preproc=yes
9769     ;;
9770   no:yes:* )
9771     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
9772 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
9773     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
9774 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
9775     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
9776 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
9777     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
9778 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9779     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
9780 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
9781     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
9782 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
9783     (
9784       cat <<\_ASBOX
9785 ## ---------------------------------------- ##
9786 ## Report this to pgsql-bugs@postgresql.org ##
9787 ## ---------------------------------------- ##
9788 _ASBOX
9789     ) |
9790       sed "s/^/$as_me: WARNING:     /" >&2
9791     ;;
9792 esac
9793 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9794 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9795 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9796   echo $ECHO_N "(cached) $ECHO_C" >&6
9797 else
9798   ac_cv_header_openssl_ssl_h=$ac_header_preproc
9799 fi
9800 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9801 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9802
9803 fi
9804 if test $ac_cv_header_openssl_ssl_h = yes; then
9805   :
9806 else
9807   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
9808 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
9809    { (exit 1); exit 1; }; }
9810 fi
9811
9812
9813   if test "${ac_cv_header_openssl_err_h+set}" = set; then
9814   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
9815 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
9816 if test "${ac_cv_header_openssl_err_h+set}" = set; then
9817   echo $ECHO_N "(cached) $ECHO_C" >&6
9818 fi
9819 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
9820 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
9821 else
9822   # Is the header compilable?
9823 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
9824 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
9825 cat >conftest.$ac_ext <<_ACEOF
9826 /* confdefs.h.  */
9827 _ACEOF
9828 cat confdefs.h >>conftest.$ac_ext
9829 cat >>conftest.$ac_ext <<_ACEOF
9830 /* end confdefs.h.  */
9831 $ac_includes_default
9832 #include <openssl/err.h>
9833 _ACEOF
9834 rm -f conftest.$ac_objext
9835 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9836   (eval $ac_compile) 2>conftest.er1
9837   ac_status=$?
9838   grep -v '^ *+' conftest.er1 >conftest.err
9839   rm -f conftest.er1
9840   cat conftest.err >&5
9841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9842   (exit $ac_status); } &&
9843          { ac_try='test -z "$ac_c_werror_flag"
9844                          || test ! -s conftest.err'
9845   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9846   (eval $ac_try) 2>&5
9847   ac_status=$?
9848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9849   (exit $ac_status); }; } &&
9850          { ac_try='test -s conftest.$ac_objext'
9851   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9852   (eval $ac_try) 2>&5
9853   ac_status=$?
9854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9855   (exit $ac_status); }; }; then
9856   ac_header_compiler=yes
9857 else
9858   echo "$as_me: failed program was:" >&5
9859 sed 's/^/| /' conftest.$ac_ext >&5
9860
9861 ac_header_compiler=no
9862 fi
9863 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9864 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9865 echo "${ECHO_T}$ac_header_compiler" >&6
9866
9867 # Is the header present?
9868 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
9869 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
9870 cat >conftest.$ac_ext <<_ACEOF
9871 /* confdefs.h.  */
9872 _ACEOF
9873 cat confdefs.h >>conftest.$ac_ext
9874 cat >>conftest.$ac_ext <<_ACEOF
9875 /* end confdefs.h.  */
9876 #include <openssl/err.h>
9877 _ACEOF
9878 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9879   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9880   ac_status=$?
9881   grep -v '^ *+' conftest.er1 >conftest.err
9882   rm -f conftest.er1
9883   cat conftest.err >&5
9884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9885   (exit $ac_status); } >/dev/null; then
9886   if test -s conftest.err; then
9887     ac_cpp_err=$ac_c_preproc_warn_flag
9888     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9889   else
9890     ac_cpp_err=
9891   fi
9892 else
9893   ac_cpp_err=yes
9894 fi
9895 if test -z "$ac_cpp_err"; then
9896   ac_header_preproc=yes
9897 else
9898   echo "$as_me: failed program was:" >&5
9899 sed 's/^/| /' conftest.$ac_ext >&5
9900
9901   ac_header_preproc=no
9902 fi
9903 rm -f conftest.err conftest.$ac_ext
9904 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9905 echo "${ECHO_T}$ac_header_preproc" >&6
9906
9907 # So?  What about this header?
9908 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9909   yes:no: )
9910     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
9911 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9912     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
9913 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
9914     ac_header_preproc=yes
9915     ;;
9916   no:yes:* )
9917     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
9918 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
9919     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
9920 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
9921     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
9922 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
9923     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
9924 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9925     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
9926 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
9927     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
9928 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
9929     (
9930       cat <<\_ASBOX
9931 ## ---------------------------------------- ##
9932 ## Report this to pgsql-bugs@postgresql.org ##
9933 ## ---------------------------------------- ##
9934 _ASBOX
9935     ) |
9936       sed "s/^/$as_me: WARNING:     /" >&2
9937     ;;
9938 esac
9939 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
9940 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
9941 if test "${ac_cv_header_openssl_err_h+set}" = set; then
9942   echo $ECHO_N "(cached) $ECHO_C" >&6
9943 else
9944   ac_cv_header_openssl_err_h=$ac_header_preproc
9945 fi
9946 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
9947 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
9948
9949 fi
9950 if test $ac_cv_header_openssl_err_h = yes; then
9951   :
9952 else
9953   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
9954 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
9955    { (exit 1); exit 1; }; }
9956 fi
9957
9958
9959 fi
9960
9961 if test "$with_pam" = yes ; then
9962
9963 for ac_header in security/pam_appl.h
9964 do
9965 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9966 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9967   echo "$as_me:$LINENO: checking for $ac_header" >&5
9968 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9969 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9970   echo $ECHO_N "(cached) $ECHO_C" >&6
9971 fi
9972 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9973 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9974 else
9975   # Is the header compilable?
9976 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9977 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9978 cat >conftest.$ac_ext <<_ACEOF
9979 /* confdefs.h.  */
9980 _ACEOF
9981 cat confdefs.h >>conftest.$ac_ext
9982 cat >>conftest.$ac_ext <<_ACEOF
9983 /* end confdefs.h.  */
9984 $ac_includes_default
9985 #include <$ac_header>
9986 _ACEOF
9987 rm -f conftest.$ac_objext
9988 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9989   (eval $ac_compile) 2>conftest.er1
9990   ac_status=$?
9991   grep -v '^ *+' conftest.er1 >conftest.err
9992   rm -f conftest.er1
9993   cat conftest.err >&5
9994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9995   (exit $ac_status); } &&
9996          { ac_try='test -z "$ac_c_werror_flag"
9997                          || test ! -s conftest.err'
9998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9999   (eval $ac_try) 2>&5
10000   ac_status=$?
10001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10002   (exit $ac_status); }; } &&
10003          { ac_try='test -s conftest.$ac_objext'
10004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10005   (eval $ac_try) 2>&5
10006   ac_status=$?
10007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10008   (exit $ac_status); }; }; then
10009   ac_header_compiler=yes
10010 else
10011   echo "$as_me: failed program was:" >&5
10012 sed 's/^/| /' conftest.$ac_ext >&5
10013
10014 ac_header_compiler=no
10015 fi
10016 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10017 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10018 echo "${ECHO_T}$ac_header_compiler" >&6
10019
10020 # Is the header present?
10021 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10022 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10023 cat >conftest.$ac_ext <<_ACEOF
10024 /* confdefs.h.  */
10025 _ACEOF
10026 cat confdefs.h >>conftest.$ac_ext
10027 cat >>conftest.$ac_ext <<_ACEOF
10028 /* end confdefs.h.  */
10029 #include <$ac_header>
10030 _ACEOF
10031 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10032   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10033   ac_status=$?
10034   grep -v '^ *+' conftest.er1 >conftest.err
10035   rm -f conftest.er1
10036   cat conftest.err >&5
10037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10038   (exit $ac_status); } >/dev/null; then
10039   if test -s conftest.err; then
10040     ac_cpp_err=$ac_c_preproc_warn_flag
10041     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10042   else
10043     ac_cpp_err=
10044   fi
10045 else
10046   ac_cpp_err=yes
10047 fi
10048 if test -z "$ac_cpp_err"; then
10049   ac_header_preproc=yes
10050 else
10051   echo "$as_me: failed program was:" >&5
10052 sed 's/^/| /' conftest.$ac_ext >&5
10053
10054   ac_header_preproc=no
10055 fi
10056 rm -f conftest.err conftest.$ac_ext
10057 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10058 echo "${ECHO_T}$ac_header_preproc" >&6
10059
10060 # So?  What about this header?
10061 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10062   yes:no: )
10063     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10064 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10065     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10066 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10067     ac_header_preproc=yes
10068     ;;
10069   no:yes:* )
10070     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10071 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10072     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10073 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10074     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10075 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10076     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10077 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10078     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10079 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10080     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10081 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10082     (
10083       cat <<\_ASBOX
10084 ## ---------------------------------------- ##
10085 ## Report this to pgsql-bugs@postgresql.org ##
10086 ## ---------------------------------------- ##
10087 _ASBOX
10088     ) |
10089       sed "s/^/$as_me: WARNING:     /" >&2
10090     ;;
10091 esac
10092 echo "$as_me:$LINENO: checking for $ac_header" >&5
10093 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10094 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10095   echo $ECHO_N "(cached) $ECHO_C" >&6
10096 else
10097   eval "$as_ac_Header=\$ac_header_preproc"
10098 fi
10099 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10100 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10101
10102 fi
10103 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10104   cat >>confdefs.h <<_ACEOF
10105 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10106 _ACEOF
10107
10108 else
10109
10110 for ac_header in pam/pam_appl.h
10111 do
10112 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10113 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10114   echo "$as_me:$LINENO: checking for $ac_header" >&5
10115 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10116 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10117   echo $ECHO_N "(cached) $ECHO_C" >&6
10118 fi
10119 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10120 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10121 else
10122   # Is the header compilable?
10123 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10124 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10125 cat >conftest.$ac_ext <<_ACEOF
10126 /* confdefs.h.  */
10127 _ACEOF
10128 cat confdefs.h >>conftest.$ac_ext
10129 cat >>conftest.$ac_ext <<_ACEOF
10130 /* end confdefs.h.  */
10131 $ac_includes_default
10132 #include <$ac_header>
10133 _ACEOF
10134 rm -f conftest.$ac_objext
10135 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10136   (eval $ac_compile) 2>conftest.er1
10137   ac_status=$?
10138   grep -v '^ *+' conftest.er1 >conftest.err
10139   rm -f conftest.er1
10140   cat conftest.err >&5
10141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10142   (exit $ac_status); } &&
10143          { ac_try='test -z "$ac_c_werror_flag"
10144                          || test ! -s conftest.err'
10145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10146   (eval $ac_try) 2>&5
10147   ac_status=$?
10148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10149   (exit $ac_status); }; } &&
10150          { ac_try='test -s conftest.$ac_objext'
10151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10152   (eval $ac_try) 2>&5
10153   ac_status=$?
10154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10155   (exit $ac_status); }; }; then
10156   ac_header_compiler=yes
10157 else
10158   echo "$as_me: failed program was:" >&5
10159 sed 's/^/| /' conftest.$ac_ext >&5
10160
10161 ac_header_compiler=no
10162 fi
10163 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10164 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10165 echo "${ECHO_T}$ac_header_compiler" >&6
10166
10167 # Is the header present?
10168 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10169 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10170 cat >conftest.$ac_ext <<_ACEOF
10171 /* confdefs.h.  */
10172 _ACEOF
10173 cat confdefs.h >>conftest.$ac_ext
10174 cat >>conftest.$ac_ext <<_ACEOF
10175 /* end confdefs.h.  */
10176 #include <$ac_header>
10177 _ACEOF
10178 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10180   ac_status=$?
10181   grep -v '^ *+' conftest.er1 >conftest.err
10182   rm -f conftest.er1
10183   cat conftest.err >&5
10184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10185   (exit $ac_status); } >/dev/null; then
10186   if test -s conftest.err; then
10187     ac_cpp_err=$ac_c_preproc_warn_flag
10188     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10189   else
10190     ac_cpp_err=
10191   fi
10192 else
10193   ac_cpp_err=yes
10194 fi
10195 if test -z "$ac_cpp_err"; then
10196   ac_header_preproc=yes
10197 else
10198   echo "$as_me: failed program was:" >&5
10199 sed 's/^/| /' conftest.$ac_ext >&5
10200
10201   ac_header_preproc=no
10202 fi
10203 rm -f conftest.err conftest.$ac_ext
10204 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10205 echo "${ECHO_T}$ac_header_preproc" >&6
10206
10207 # So?  What about this header?
10208 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10209   yes:no: )
10210     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10211 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10212     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10213 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10214     ac_header_preproc=yes
10215     ;;
10216   no:yes:* )
10217     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10218 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10219     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10220 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10221     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10222 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10223     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10224 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10225     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10226 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10227     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10228 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10229     (
10230       cat <<\_ASBOX
10231 ## ---------------------------------------- ##
10232 ## Report this to pgsql-bugs@postgresql.org ##
10233 ## ---------------------------------------- ##
10234 _ASBOX
10235     ) |
10236       sed "s/^/$as_me: WARNING:     /" >&2
10237     ;;
10238 esac
10239 echo "$as_me:$LINENO: checking for $ac_header" >&5
10240 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10241 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10242   echo $ECHO_N "(cached) $ECHO_C" >&6
10243 else
10244   eval "$as_ac_Header=\$ac_header_preproc"
10245 fi
10246 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10247 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10248
10249 fi
10250 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10251   cat >>confdefs.h <<_ACEOF
10252 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10253 _ACEOF
10254
10255 else
10256   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10257 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10258    { (exit 1); exit 1; }; }
10259 fi
10260
10261 done
10262
10263 fi
10264
10265 done
10266
10267 fi
10268
10269 if test "$with_bonjour" = yes ; then
10270   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10271   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10272 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10273 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10274   echo $ECHO_N "(cached) $ECHO_C" >&6
10275 fi
10276 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10277 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10278 else
10279   # Is the header compilable?
10280 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10281 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10282 cat >conftest.$ac_ext <<_ACEOF
10283 /* confdefs.h.  */
10284 _ACEOF
10285 cat confdefs.h >>conftest.$ac_ext
10286 cat >>conftest.$ac_ext <<_ACEOF
10287 /* end confdefs.h.  */
10288 $ac_includes_default
10289 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10290 _ACEOF
10291 rm -f conftest.$ac_objext
10292 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10293   (eval $ac_compile) 2>conftest.er1
10294   ac_status=$?
10295   grep -v '^ *+' conftest.er1 >conftest.err
10296   rm -f conftest.er1
10297   cat conftest.err >&5
10298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10299   (exit $ac_status); } &&
10300          { ac_try='test -z "$ac_c_werror_flag"
10301                          || test ! -s conftest.err'
10302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10303   (eval $ac_try) 2>&5
10304   ac_status=$?
10305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10306   (exit $ac_status); }; } &&
10307          { ac_try='test -s conftest.$ac_objext'
10308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10309   (eval $ac_try) 2>&5
10310   ac_status=$?
10311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10312   (exit $ac_status); }; }; then
10313   ac_header_compiler=yes
10314 else
10315   echo "$as_me: failed program was:" >&5
10316 sed 's/^/| /' conftest.$ac_ext >&5
10317
10318 ac_header_compiler=no
10319 fi
10320 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10321 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10322 echo "${ECHO_T}$ac_header_compiler" >&6
10323
10324 # Is the header present?
10325 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10326 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
10327 cat >conftest.$ac_ext <<_ACEOF
10328 /* confdefs.h.  */
10329 _ACEOF
10330 cat confdefs.h >>conftest.$ac_ext
10331 cat >>conftest.$ac_ext <<_ACEOF
10332 /* end confdefs.h.  */
10333 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10334 _ACEOF
10335 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10336   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10337   ac_status=$?
10338   grep -v '^ *+' conftest.er1 >conftest.err
10339   rm -f conftest.er1
10340   cat conftest.err >&5
10341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10342   (exit $ac_status); } >/dev/null; then
10343   if test -s conftest.err; then
10344     ac_cpp_err=$ac_c_preproc_warn_flag
10345     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10346   else
10347     ac_cpp_err=
10348   fi
10349 else
10350   ac_cpp_err=yes
10351 fi
10352 if test -z "$ac_cpp_err"; then
10353   ac_header_preproc=yes
10354 else
10355   echo "$as_me: failed program was:" >&5
10356 sed 's/^/| /' conftest.$ac_ext >&5
10357
10358   ac_header_preproc=no
10359 fi
10360 rm -f conftest.err conftest.$ac_ext
10361 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10362 echo "${ECHO_T}$ac_header_preproc" >&6
10363
10364 # So?  What about this header?
10365 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10366   yes:no: )
10367     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
10368 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10369     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
10370 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
10371     ac_header_preproc=yes
10372     ;;
10373   no:yes:* )
10374     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
10375 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
10376     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
10377 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
10378     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
10379 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
10380     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
10381 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10382     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
10383 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
10384     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
10385 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
10386     (
10387       cat <<\_ASBOX
10388 ## ---------------------------------------- ##
10389 ## Report this to pgsql-bugs@postgresql.org ##
10390 ## ---------------------------------------- ##
10391 _ASBOX
10392     ) |
10393       sed "s/^/$as_me: WARNING:     /" >&2
10394     ;;
10395 esac
10396 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10397 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10398 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10399   echo $ECHO_N "(cached) $ECHO_C" >&6
10400 else
10401   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
10402 fi
10403 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10404 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10405
10406 fi
10407 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
10408   :
10409 else
10410   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
10411 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
10412    { (exit 1); exit 1; }; }
10413 fi
10414
10415
10416 fi
10417
10418
10419 ##
10420 ## Types, structures, compiler characteristics
10421 ##
10422
10423  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
10424 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10425 if test "${ac_cv_c_const+set}" = set; then
10426   echo $ECHO_N "(cached) $ECHO_C" >&6
10427 else
10428   cat >conftest.$ac_ext <<_ACEOF
10429 /* confdefs.h.  */
10430 _ACEOF
10431 cat confdefs.h >>conftest.$ac_ext
10432 cat >>conftest.$ac_ext <<_ACEOF
10433 /* end confdefs.h.  */
10434
10435 int
10436 main ()
10437 {
10438 /* FIXME: Include the comments suggested by Paul. */
10439 #ifndef __cplusplus
10440   /* Ultrix mips cc rejects this.  */
10441   typedef int charset[2];
10442   const charset x;
10443   /* SunOS 4.1.1 cc rejects this.  */
10444   char const *const *ccp;
10445   char **p;
10446   /* NEC SVR4.0.2 mips cc rejects this.  */
10447   struct point {int x, y;};
10448   static struct point const zero = {0,0};
10449   /* AIX XL C 1.02.0.0 rejects this.
10450      It does not let you subtract one const X* pointer from another in
10451      an arm of an if-expression whose if-part is not a constant
10452      expression */
10453   const char *g = "string";
10454   ccp = &g + (g ? g-g : 0);
10455   /* HPUX 7.0 cc rejects these. */
10456   ++ccp;
10457   p = (char**) ccp;
10458   ccp = (char const *const *) p;
10459   { /* SCO 3.2v4 cc rejects this.  */
10460     char *t;
10461     char const *s = 0 ? (char *) 0 : (char const *) 0;
10462
10463     *t++ = 0;
10464   }
10465   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10466     int x[] = {25, 17};
10467     const int *foo = &x[0];
10468     ++foo;
10469   }
10470   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10471     typedef const int *iptr;
10472     iptr p = 0;
10473     ++p;
10474   }
10475   { /* AIX XL C 1.02.0.0 rejects this saying
10476        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10477     struct s { int j; const int *ap[3]; };
10478     struct s *b; b->j = 5;
10479   }
10480   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10481     const int foo = 10;
10482   }
10483 #endif
10484
10485   ;
10486   return 0;
10487 }
10488 _ACEOF
10489 rm -f conftest.$ac_objext
10490 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10491   (eval $ac_compile) 2>conftest.er1
10492   ac_status=$?
10493   grep -v '^ *+' conftest.er1 >conftest.err
10494   rm -f conftest.er1
10495   cat conftest.err >&5
10496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10497   (exit $ac_status); } &&
10498          { ac_try='test -z "$ac_c_werror_flag"
10499                          || test ! -s conftest.err'
10500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10501   (eval $ac_try) 2>&5
10502   ac_status=$?
10503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10504   (exit $ac_status); }; } &&
10505          { ac_try='test -s conftest.$ac_objext'
10506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10507   (eval $ac_try) 2>&5
10508   ac_status=$?
10509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10510   (exit $ac_status); }; }; then
10511   ac_cv_c_const=yes
10512 else
10513   echo "$as_me: failed program was:" >&5
10514 sed 's/^/| /' conftest.$ac_ext >&5
10515
10516 ac_cv_c_const=no
10517 fi
10518 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10519 fi
10520 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
10521 echo "${ECHO_T}$ac_cv_c_const" >&6
10522 if test $ac_cv_c_const = no; then
10523
10524 cat >>confdefs.h <<\_ACEOF
10525 #define const
10526 _ACEOF
10527
10528 fi
10529
10530
10531 echo "$as_me:$LINENO: checking for inline" >&5
10532 echo $ECHO_N "checking for inline... $ECHO_C" >&6
10533 if test "${ac_cv_c_inline+set}" = set; then
10534   echo $ECHO_N "(cached) $ECHO_C" >&6
10535 else
10536   ac_cv_c_inline=no
10537 for ac_kw in inline __inline__ __inline; do
10538   cat >conftest.$ac_ext <<_ACEOF
10539 /* confdefs.h.  */
10540 _ACEOF
10541 cat confdefs.h >>conftest.$ac_ext
10542 cat >>conftest.$ac_ext <<_ACEOF
10543 /* end confdefs.h.  */
10544 #ifndef __cplusplus
10545 typedef int foo_t;
10546 static $ac_kw foo_t static_foo () {return 0; }
10547 $ac_kw int foo () {return 0; }
10548 #endif
10549
10550 _ACEOF
10551 rm -f conftest.$ac_objext
10552 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10553   (eval $ac_compile) 2>conftest.er1
10554   ac_status=$?
10555   grep -v '^ *+' conftest.er1 >conftest.err
10556   rm -f conftest.er1
10557   cat conftest.err >&5
10558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10559   (exit $ac_status); } &&
10560          { ac_try='test -z "$ac_c_werror_flag"
10561                          || test ! -s conftest.err'
10562   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10563   (eval $ac_try) 2>&5
10564   ac_status=$?
10565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10566   (exit $ac_status); }; } &&
10567          { ac_try='test -s conftest.$ac_objext'
10568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10569   (eval $ac_try) 2>&5
10570   ac_status=$?
10571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10572   (exit $ac_status); }; }; then
10573   ac_cv_c_inline=$ac_kw; break
10574 else
10575   echo "$as_me: failed program was:" >&5
10576 sed 's/^/| /' conftest.$ac_ext >&5
10577
10578 fi
10579 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10580 done
10581
10582 fi
10583 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
10584 echo "${ECHO_T}$ac_cv_c_inline" >&6
10585 case $ac_cv_c_inline in
10586   inline | yes) ;;
10587   no)
10588 cat >>confdefs.h <<\_ACEOF
10589 #define inline
10590 _ACEOF
10591  ;;
10592   *)  cat >>confdefs.h <<_ACEOF
10593 #define inline $ac_cv_c_inline
10594 _ACEOF
10595  ;;
10596 esac
10597
10598 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
10599 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
10600 if test "${ac_cv_c_stringize+set}" = set; then
10601   echo $ECHO_N "(cached) $ECHO_C" >&6
10602 else
10603   cat >conftest.$ac_ext <<_ACEOF
10604 /* confdefs.h.  */
10605 _ACEOF
10606 cat confdefs.h >>conftest.$ac_ext
10607 cat >>conftest.$ac_ext <<_ACEOF
10608 /* end confdefs.h.  */
10609 #define x(y) #y
10610
10611 char *s = x(teststring);
10612 _ACEOF
10613 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10614   $EGREP "#teststring" >/dev/null 2>&1; then
10615   ac_cv_c_stringize=no
10616 else
10617   ac_cv_c_stringize=yes
10618 fi
10619 rm -f conftest*
10620
10621 fi
10622 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
10623 echo "${ECHO_T}$ac_cv_c_stringize" >&6
10624 if test $ac_cv_c_stringize = yes; then
10625
10626 cat >>confdefs.h <<\_ACEOF
10627 #define HAVE_STRINGIZE 1
10628 _ACEOF
10629
10630 fi
10631
10632 echo "$as_me:$LINENO: checking for signed types" >&5
10633 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
10634 if test "${pgac_cv_c_signed+set}" = set; then
10635   echo $ECHO_N "(cached) $ECHO_C" >&6
10636 else
10637   cat >conftest.$ac_ext <<_ACEOF
10638 /* confdefs.h.  */
10639 _ACEOF
10640 cat confdefs.h >>conftest.$ac_ext
10641 cat >>conftest.$ac_ext <<_ACEOF
10642 /* end confdefs.h.  */
10643
10644 int
10645 main ()
10646 {
10647 signed char c; signed short s; signed int i;
10648   ;
10649   return 0;
10650 }
10651 _ACEOF
10652 rm -f conftest.$ac_objext
10653 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10654   (eval $ac_compile) 2>conftest.er1
10655   ac_status=$?
10656   grep -v '^ *+' conftest.er1 >conftest.err
10657   rm -f conftest.er1
10658   cat conftest.err >&5
10659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10660   (exit $ac_status); } &&
10661          { ac_try='test -z "$ac_c_werror_flag"
10662                          || test ! -s conftest.err'
10663   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10664   (eval $ac_try) 2>&5
10665   ac_status=$?
10666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10667   (exit $ac_status); }; } &&
10668          { ac_try='test -s conftest.$ac_objext'
10669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10670   (eval $ac_try) 2>&5
10671   ac_status=$?
10672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10673   (exit $ac_status); }; }; then
10674   pgac_cv_c_signed=yes
10675 else
10676   echo "$as_me: failed program was:" >&5
10677 sed 's/^/| /' conftest.$ac_ext >&5
10678
10679 pgac_cv_c_signed=no
10680 fi
10681 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10682 fi
10683 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
10684 echo "${ECHO_T}$pgac_cv_c_signed" >&6
10685 if test x"$pgac_cv_c_signed" = xno ; then
10686
10687 cat >>confdefs.h <<\_ACEOF
10688 #define signed
10689 _ACEOF
10690
10691 fi
10692 echo "$as_me:$LINENO: checking for working volatile" >&5
10693 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
10694 if test "${ac_cv_c_volatile+set}" = set; then
10695   echo $ECHO_N "(cached) $ECHO_C" >&6
10696 else
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
10704 int
10705 main ()
10706 {
10707
10708 volatile int x;
10709 int * volatile y;
10710   ;
10711   return 0;
10712 }
10713 _ACEOF
10714 rm -f conftest.$ac_objext
10715 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10716   (eval $ac_compile) 2>conftest.er1
10717   ac_status=$?
10718   grep -v '^ *+' conftest.er1 >conftest.err
10719   rm -f conftest.er1
10720   cat conftest.err >&5
10721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10722   (exit $ac_status); } &&
10723          { ac_try='test -z "$ac_c_werror_flag"
10724                          || test ! -s conftest.err'
10725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10726   (eval $ac_try) 2>&5
10727   ac_status=$?
10728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10729   (exit $ac_status); }; } &&
10730          { ac_try='test -s conftest.$ac_objext'
10731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10732   (eval $ac_try) 2>&5
10733   ac_status=$?
10734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10735   (exit $ac_status); }; }; then
10736   ac_cv_c_volatile=yes
10737 else
10738   echo "$as_me: failed program was:" >&5
10739 sed 's/^/| /' conftest.$ac_ext >&5
10740
10741 ac_cv_c_volatile=no
10742 fi
10743 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10744 fi
10745 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
10746 echo "${ECHO_T}$ac_cv_c_volatile" >&6
10747 if test $ac_cv_c_volatile = no; then
10748
10749 cat >>confdefs.h <<\_ACEOF
10750 #define volatile
10751 _ACEOF
10752
10753 fi
10754
10755 echo "$as_me:$LINENO: checking for __func__" >&5
10756 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
10757 if test "${pgac_cv_funcname_func_support+set}" = set; then
10758   echo $ECHO_N "(cached) $ECHO_C" >&6
10759 else
10760   cat >conftest.$ac_ext <<_ACEOF
10761 /* confdefs.h.  */
10762 _ACEOF
10763 cat confdefs.h >>conftest.$ac_ext
10764 cat >>conftest.$ac_ext <<_ACEOF
10765 /* end confdefs.h.  */
10766 #include <stdio.h>
10767 int
10768 main ()
10769 {
10770 printf("%s\n", __func__);
10771   ;
10772   return 0;
10773 }
10774 _ACEOF
10775 rm -f conftest.$ac_objext
10776 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10777   (eval $ac_compile) 2>conftest.er1
10778   ac_status=$?
10779   grep -v '^ *+' conftest.er1 >conftest.err
10780   rm -f conftest.er1
10781   cat conftest.err >&5
10782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10783   (exit $ac_status); } &&
10784          { ac_try='test -z "$ac_c_werror_flag"
10785                          || test ! -s conftest.err'
10786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10787   (eval $ac_try) 2>&5
10788   ac_status=$?
10789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10790   (exit $ac_status); }; } &&
10791          { ac_try='test -s conftest.$ac_objext'
10792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10793   (eval $ac_try) 2>&5
10794   ac_status=$?
10795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10796   (exit $ac_status); }; }; then
10797   pgac_cv_funcname_func_support=yes
10798 else
10799   echo "$as_me: failed program was:" >&5
10800 sed 's/^/| /' conftest.$ac_ext >&5
10801
10802 pgac_cv_funcname_func_support=no
10803 fi
10804 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10805 fi
10806 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
10807 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
10808 if test x"$pgac_cv_funcname_func_support" = xyes ; then
10809
10810 cat >>confdefs.h <<\_ACEOF
10811 #define HAVE_FUNCNAME__FUNC 1
10812 _ACEOF
10813
10814 else
10815 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
10816 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
10817 if test "${pgac_cv_funcname_function_support+set}" = set; then
10818   echo $ECHO_N "(cached) $ECHO_C" >&6
10819 else
10820   cat >conftest.$ac_ext <<_ACEOF
10821 /* confdefs.h.  */
10822 _ACEOF
10823 cat confdefs.h >>conftest.$ac_ext
10824 cat >>conftest.$ac_ext <<_ACEOF
10825 /* end confdefs.h.  */
10826 #include <stdio.h>
10827 int
10828 main ()
10829 {
10830 printf("%s\n", __FUNCTION__);
10831   ;
10832   return 0;
10833 }
10834 _ACEOF
10835 rm -f conftest.$ac_objext
10836 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10837   (eval $ac_compile) 2>conftest.er1
10838   ac_status=$?
10839   grep -v '^ *+' conftest.er1 >conftest.err
10840   rm -f conftest.er1
10841   cat conftest.err >&5
10842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10843   (exit $ac_status); } &&
10844          { ac_try='test -z "$ac_c_werror_flag"
10845                          || test ! -s conftest.err'
10846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10847   (eval $ac_try) 2>&5
10848   ac_status=$?
10849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10850   (exit $ac_status); }; } &&
10851          { ac_try='test -s conftest.$ac_objext'
10852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10853   (eval $ac_try) 2>&5
10854   ac_status=$?
10855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10856   (exit $ac_status); }; }; then
10857   pgac_cv_funcname_function_support=yes
10858 else
10859   echo "$as_me: failed program was:" >&5
10860 sed 's/^/| /' conftest.$ac_ext >&5
10861
10862 pgac_cv_funcname_function_support=no
10863 fi
10864 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10865 fi
10866 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
10867 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
10868 if test x"$pgac_cv_funcname_function_support" = xyes ; then
10869
10870 cat >>confdefs.h <<\_ACEOF
10871 #define HAVE_FUNCNAME__FUNCTION 1
10872 _ACEOF
10873
10874 fi
10875 fi
10876 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
10877 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
10878 if test "${ac_cv_struct_tm+set}" = set; then
10879   echo $ECHO_N "(cached) $ECHO_C" >&6
10880 else
10881   cat >conftest.$ac_ext <<_ACEOF
10882 /* confdefs.h.  */
10883 _ACEOF
10884 cat confdefs.h >>conftest.$ac_ext
10885 cat >>conftest.$ac_ext <<_ACEOF
10886 /* end confdefs.h.  */
10887 #include <sys/types.h>
10888 #include <time.h>
10889
10890 int
10891 main ()
10892 {
10893 struct tm *tp; tp->tm_sec;
10894   ;
10895   return 0;
10896 }
10897 _ACEOF
10898 rm -f conftest.$ac_objext
10899 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10900   (eval $ac_compile) 2>conftest.er1
10901   ac_status=$?
10902   grep -v '^ *+' conftest.er1 >conftest.err
10903   rm -f conftest.er1
10904   cat conftest.err >&5
10905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10906   (exit $ac_status); } &&
10907          { ac_try='test -z "$ac_c_werror_flag"
10908                          || test ! -s conftest.err'
10909   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10910   (eval $ac_try) 2>&5
10911   ac_status=$?
10912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10913   (exit $ac_status); }; } &&
10914          { ac_try='test -s conftest.$ac_objext'
10915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10916   (eval $ac_try) 2>&5
10917   ac_status=$?
10918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10919   (exit $ac_status); }; }; then
10920   ac_cv_struct_tm=time.h
10921 else
10922   echo "$as_me: failed program was:" >&5
10923 sed 's/^/| /' conftest.$ac_ext >&5
10924
10925 ac_cv_struct_tm=sys/time.h
10926 fi
10927 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10928 fi
10929 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
10930 echo "${ECHO_T}$ac_cv_struct_tm" >&6
10931 if test $ac_cv_struct_tm = sys/time.h; then
10932
10933 cat >>confdefs.h <<\_ACEOF
10934 #define TM_IN_SYS_TIME 1
10935 _ACEOF
10936
10937 fi
10938
10939 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
10940 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
10941 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
10942   echo $ECHO_N "(cached) $ECHO_C" >&6
10943 else
10944   cat >conftest.$ac_ext <<_ACEOF
10945 /* confdefs.h.  */
10946 _ACEOF
10947 cat confdefs.h >>conftest.$ac_ext
10948 cat >>conftest.$ac_ext <<_ACEOF
10949 /* end confdefs.h.  */
10950 #include <sys/types.h>
10951 #include <$ac_cv_struct_tm>
10952
10953
10954 int
10955 main ()
10956 {
10957 static struct tm ac_aggr;
10958 if (ac_aggr.tm_zone)
10959 return 0;
10960   ;
10961   return 0;
10962 }
10963 _ACEOF
10964 rm -f conftest.$ac_objext
10965 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10966   (eval $ac_compile) 2>conftest.er1
10967   ac_status=$?
10968   grep -v '^ *+' conftest.er1 >conftest.err
10969   rm -f conftest.er1
10970   cat conftest.err >&5
10971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10972   (exit $ac_status); } &&
10973          { ac_try='test -z "$ac_c_werror_flag"
10974                          || test ! -s conftest.err'
10975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10976   (eval $ac_try) 2>&5
10977   ac_status=$?
10978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10979   (exit $ac_status); }; } &&
10980          { ac_try='test -s conftest.$ac_objext'
10981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10982   (eval $ac_try) 2>&5
10983   ac_status=$?
10984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10985   (exit $ac_status); }; }; then
10986   ac_cv_member_struct_tm_tm_zone=yes
10987 else
10988   echo "$as_me: failed program was:" >&5
10989 sed 's/^/| /' conftest.$ac_ext >&5
10990
10991 cat >conftest.$ac_ext <<_ACEOF
10992 /* confdefs.h.  */
10993 _ACEOF
10994 cat confdefs.h >>conftest.$ac_ext
10995 cat >>conftest.$ac_ext <<_ACEOF
10996 /* end confdefs.h.  */
10997 #include <sys/types.h>
10998 #include <$ac_cv_struct_tm>
10999
11000
11001 int
11002 main ()
11003 {
11004 static struct tm ac_aggr;
11005 if (sizeof ac_aggr.tm_zone)
11006 return 0;
11007   ;
11008   return 0;
11009 }
11010 _ACEOF
11011 rm -f conftest.$ac_objext
11012 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11013   (eval $ac_compile) 2>conftest.er1
11014   ac_status=$?
11015   grep -v '^ *+' conftest.er1 >conftest.err
11016   rm -f conftest.er1
11017   cat conftest.err >&5
11018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11019   (exit $ac_status); } &&
11020          { ac_try='test -z "$ac_c_werror_flag"
11021                          || test ! -s conftest.err'
11022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11023   (eval $ac_try) 2>&5
11024   ac_status=$?
11025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11026   (exit $ac_status); }; } &&
11027          { ac_try='test -s conftest.$ac_objext'
11028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11029   (eval $ac_try) 2>&5
11030   ac_status=$?
11031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11032   (exit $ac_status); }; }; then
11033   ac_cv_member_struct_tm_tm_zone=yes
11034 else
11035   echo "$as_me: failed program was:" >&5
11036 sed 's/^/| /' conftest.$ac_ext >&5
11037
11038 ac_cv_member_struct_tm_tm_zone=no
11039 fi
11040 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11041 fi
11042 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11043 fi
11044 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11045 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11046 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11047
11048 cat >>confdefs.h <<_ACEOF
11049 #define HAVE_STRUCT_TM_TM_ZONE 1
11050 _ACEOF
11051
11052
11053 fi
11054
11055 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11056
11057 cat >>confdefs.h <<\_ACEOF
11058 #define HAVE_TM_ZONE 1
11059 _ACEOF
11060
11061 fi
11062 echo "$as_me:$LINENO: checking for tzname" >&5
11063 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11064 if test "${ac_cv_var_tzname+set}" = set; then
11065   echo $ECHO_N "(cached) $ECHO_C" >&6
11066 else
11067   cat >conftest.$ac_ext <<_ACEOF
11068 /* confdefs.h.  */
11069 _ACEOF
11070 cat confdefs.h >>conftest.$ac_ext
11071 cat >>conftest.$ac_ext <<_ACEOF
11072 /* end confdefs.h.  */
11073 #include <time.h>
11074 #ifndef tzname /* For SGI.  */
11075 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11076 #endif
11077
11078 int
11079 main ()
11080 {
11081 atoi(*tzname);
11082   ;
11083   return 0;
11084 }
11085 _ACEOF
11086 rm -f conftest.$ac_objext conftest$ac_exeext
11087 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11088   (eval $ac_link) 2>conftest.er1
11089   ac_status=$?
11090   grep -v '^ *+' conftest.er1 >conftest.err
11091   rm -f conftest.er1
11092   cat conftest.err >&5
11093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11094   (exit $ac_status); } &&
11095          { ac_try='test -z "$ac_c_werror_flag"
11096                          || test ! -s conftest.err'
11097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11098   (eval $ac_try) 2>&5
11099   ac_status=$?
11100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11101   (exit $ac_status); }; } &&
11102          { ac_try='test -s conftest$ac_exeext'
11103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11104   (eval $ac_try) 2>&5
11105   ac_status=$?
11106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11107   (exit $ac_status); }; }; then
11108   ac_cv_var_tzname=yes
11109 else
11110   echo "$as_me: failed program was:" >&5
11111 sed 's/^/| /' conftest.$ac_ext >&5
11112
11113 ac_cv_var_tzname=no
11114 fi
11115 rm -f conftest.err conftest.$ac_objext \
11116       conftest$ac_exeext conftest.$ac_ext
11117 fi
11118 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11119 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11120 if test $ac_cv_var_tzname = yes; then
11121
11122 cat >>confdefs.h <<\_ACEOF
11123 #define HAVE_TZNAME 1
11124 _ACEOF
11125
11126 fi
11127
11128 echo "$as_me:$LINENO: checking for union semun" >&5
11129 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11130 if test "${ac_cv_type_union_semun+set}" = set; then
11131   echo $ECHO_N "(cached) $ECHO_C" >&6
11132 else
11133   cat >conftest.$ac_ext <<_ACEOF
11134 /* confdefs.h.  */
11135 _ACEOF
11136 cat confdefs.h >>conftest.$ac_ext
11137 cat >>conftest.$ac_ext <<_ACEOF
11138 /* end confdefs.h.  */
11139 #include <sys/types.h>
11140 #include <sys/ipc.h>
11141 #include <sys/sem.h>
11142
11143 int
11144 main ()
11145 {
11146 if ((union semun *) 0)
11147   return 0;
11148 if (sizeof (union semun))
11149   return 0;
11150   ;
11151   return 0;
11152 }
11153 _ACEOF
11154 rm -f conftest.$ac_objext
11155 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11156   (eval $ac_compile) 2>conftest.er1
11157   ac_status=$?
11158   grep -v '^ *+' conftest.er1 >conftest.err
11159   rm -f conftest.er1
11160   cat conftest.err >&5
11161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11162   (exit $ac_status); } &&
11163          { ac_try='test -z "$ac_c_werror_flag"
11164                          || test ! -s conftest.err'
11165   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11166   (eval $ac_try) 2>&5
11167   ac_status=$?
11168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11169   (exit $ac_status); }; } &&
11170          { ac_try='test -s conftest.$ac_objext'
11171   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11172   (eval $ac_try) 2>&5
11173   ac_status=$?
11174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11175   (exit $ac_status); }; }; then
11176   ac_cv_type_union_semun=yes
11177 else
11178   echo "$as_me: failed program was:" >&5
11179 sed 's/^/| /' conftest.$ac_ext >&5
11180
11181 ac_cv_type_union_semun=no
11182 fi
11183 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11184 fi
11185 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11186 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11187 if test $ac_cv_type_union_semun = yes; then
11188
11189 cat >>confdefs.h <<_ACEOF
11190 #define HAVE_UNION_SEMUN 1
11191 _ACEOF
11192
11193
11194 fi
11195
11196 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11197 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11198 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11199   echo $ECHO_N "(cached) $ECHO_C" >&6
11200 else
11201   cat >conftest.$ac_ext <<_ACEOF
11202 /* confdefs.h.  */
11203 _ACEOF
11204 cat confdefs.h >>conftest.$ac_ext
11205 cat >>conftest.$ac_ext <<_ACEOF
11206 /* end confdefs.h.  */
11207 #include <sys/types.h>
11208 #ifdef HAVE_SYS_UN_H
11209 #include <sys/un.h>
11210 #endif
11211
11212
11213 int
11214 main ()
11215 {
11216 if ((struct sockaddr_un *) 0)
11217   return 0;
11218 if (sizeof (struct sockaddr_un))
11219   return 0;
11220   ;
11221   return 0;
11222 }
11223 _ACEOF
11224 rm -f conftest.$ac_objext
11225 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11226   (eval $ac_compile) 2>conftest.er1
11227   ac_status=$?
11228   grep -v '^ *+' conftest.er1 >conftest.err
11229   rm -f conftest.er1
11230   cat conftest.err >&5
11231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11232   (exit $ac_status); } &&
11233          { ac_try='test -z "$ac_c_werror_flag"
11234                          || test ! -s conftest.err'
11235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11236   (eval $ac_try) 2>&5
11237   ac_status=$?
11238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11239   (exit $ac_status); }; } &&
11240          { ac_try='test -s conftest.$ac_objext'
11241   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11242   (eval $ac_try) 2>&5
11243   ac_status=$?
11244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11245   (exit $ac_status); }; }; then
11246   ac_cv_type_struct_sockaddr_un=yes
11247 else
11248   echo "$as_me: failed program was:" >&5
11249 sed 's/^/| /' conftest.$ac_ext >&5
11250
11251 ac_cv_type_struct_sockaddr_un=no
11252 fi
11253 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11254 fi
11255 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11256 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11257 if test $ac_cv_type_struct_sockaddr_un = yes; then
11258
11259 cat >>confdefs.h <<_ACEOF
11260 #define HAVE_STRUCT_SOCKADDR_UN 1
11261 _ACEOF
11262
11263
11264 cat >>confdefs.h <<\_ACEOF
11265 #define HAVE_UNIX_SOCKETS 1
11266 _ACEOF
11267
11268 fi
11269
11270 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11271 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11272 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11273   echo $ECHO_N "(cached) $ECHO_C" >&6
11274 else
11275   cat >conftest.$ac_ext <<_ACEOF
11276 /* confdefs.h.  */
11277 _ACEOF
11278 cat confdefs.h >>conftest.$ac_ext
11279 cat >>conftest.$ac_ext <<_ACEOF
11280 /* end confdefs.h.  */
11281 #include <sys/types.h>
11282 #ifdef HAVE_SYS_SOCKET_H
11283 #include <sys/socket.h>
11284 #endif
11285
11286
11287 int
11288 main ()
11289 {
11290 if ((struct sockaddr_storage *) 0)
11291   return 0;
11292 if (sizeof (struct sockaddr_storage))
11293   return 0;
11294   ;
11295   return 0;
11296 }
11297 _ACEOF
11298 rm -f conftest.$ac_objext
11299 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11300   (eval $ac_compile) 2>conftest.er1
11301   ac_status=$?
11302   grep -v '^ *+' conftest.er1 >conftest.err
11303   rm -f conftest.er1
11304   cat conftest.err >&5
11305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11306   (exit $ac_status); } &&
11307          { ac_try='test -z "$ac_c_werror_flag"
11308                          || test ! -s conftest.err'
11309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11310   (eval $ac_try) 2>&5
11311   ac_status=$?
11312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11313   (exit $ac_status); }; } &&
11314          { ac_try='test -s conftest.$ac_objext'
11315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11316   (eval $ac_try) 2>&5
11317   ac_status=$?
11318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11319   (exit $ac_status); }; }; then
11320   ac_cv_type_struct_sockaddr_storage=yes
11321 else
11322   echo "$as_me: failed program was:" >&5
11323 sed 's/^/| /' conftest.$ac_ext >&5
11324
11325 ac_cv_type_struct_sockaddr_storage=no
11326 fi
11327 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11328 fi
11329 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11330 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11331 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11332
11333 cat >>confdefs.h <<_ACEOF
11334 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11335 _ACEOF
11336
11337
11338 fi
11339
11340 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11341 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11342 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11343   echo $ECHO_N "(cached) $ECHO_C" >&6
11344 else
11345   cat >conftest.$ac_ext <<_ACEOF
11346 /* confdefs.h.  */
11347 _ACEOF
11348 cat confdefs.h >>conftest.$ac_ext
11349 cat >>conftest.$ac_ext <<_ACEOF
11350 /* end confdefs.h.  */
11351 #include <sys/types.h>
11352 #ifdef HAVE_SYS_SOCKET_H
11353 #include <sys/socket.h>
11354 #endif
11355
11356
11357 int
11358 main ()
11359 {
11360 static struct sockaddr_storage ac_aggr;
11361 if (ac_aggr.ss_family)
11362 return 0;
11363   ;
11364   return 0;
11365 }
11366 _ACEOF
11367 rm -f conftest.$ac_objext
11368 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11369   (eval $ac_compile) 2>conftest.er1
11370   ac_status=$?
11371   grep -v '^ *+' conftest.er1 >conftest.err
11372   rm -f conftest.er1
11373   cat conftest.err >&5
11374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11375   (exit $ac_status); } &&
11376          { ac_try='test -z "$ac_c_werror_flag"
11377                          || test ! -s conftest.err'
11378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11379   (eval $ac_try) 2>&5
11380   ac_status=$?
11381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11382   (exit $ac_status); }; } &&
11383          { ac_try='test -s conftest.$ac_objext'
11384   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11385   (eval $ac_try) 2>&5
11386   ac_status=$?
11387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11388   (exit $ac_status); }; }; then
11389   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11390 else
11391   echo "$as_me: failed program was:" >&5
11392 sed 's/^/| /' conftest.$ac_ext >&5
11393
11394 cat >conftest.$ac_ext <<_ACEOF
11395 /* confdefs.h.  */
11396 _ACEOF
11397 cat confdefs.h >>conftest.$ac_ext
11398 cat >>conftest.$ac_ext <<_ACEOF
11399 /* end confdefs.h.  */
11400 #include <sys/types.h>
11401 #ifdef HAVE_SYS_SOCKET_H
11402 #include <sys/socket.h>
11403 #endif
11404
11405
11406 int
11407 main ()
11408 {
11409 static struct sockaddr_storage ac_aggr;
11410 if (sizeof ac_aggr.ss_family)
11411 return 0;
11412   ;
11413   return 0;
11414 }
11415 _ACEOF
11416 rm -f conftest.$ac_objext
11417 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11418   (eval $ac_compile) 2>conftest.er1
11419   ac_status=$?
11420   grep -v '^ *+' conftest.er1 >conftest.err
11421   rm -f conftest.er1
11422   cat conftest.err >&5
11423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11424   (exit $ac_status); } &&
11425          { ac_try='test -z "$ac_c_werror_flag"
11426                          || test ! -s conftest.err'
11427   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11428   (eval $ac_try) 2>&5
11429   ac_status=$?
11430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11431   (exit $ac_status); }; } &&
11432          { ac_try='test -s conftest.$ac_objext'
11433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11434   (eval $ac_try) 2>&5
11435   ac_status=$?
11436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11437   (exit $ac_status); }; }; then
11438   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11439 else
11440   echo "$as_me: failed program was:" >&5
11441 sed 's/^/| /' conftest.$ac_ext >&5
11442
11443 ac_cv_member_struct_sockaddr_storage_ss_family=no
11444 fi
11445 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11446 fi
11447 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11448 fi
11449 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
11450 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
11451 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
11452
11453 cat >>confdefs.h <<_ACEOF
11454 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11455 _ACEOF
11456
11457
11458 fi
11459 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
11460 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
11461 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
11462   echo $ECHO_N "(cached) $ECHO_C" >&6
11463 else
11464   cat >conftest.$ac_ext <<_ACEOF
11465 /* confdefs.h.  */
11466 _ACEOF
11467 cat confdefs.h >>conftest.$ac_ext
11468 cat >>conftest.$ac_ext <<_ACEOF
11469 /* end confdefs.h.  */
11470 #include <sys/types.h>
11471 #ifdef HAVE_SYS_SOCKET_H
11472 #include <sys/socket.h>
11473 #endif
11474
11475
11476 int
11477 main ()
11478 {
11479 static struct sockaddr_storage ac_aggr;
11480 if (ac_aggr.__ss_family)
11481 return 0;
11482   ;
11483   return 0;
11484 }
11485 _ACEOF
11486 rm -f conftest.$ac_objext
11487 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11488   (eval $ac_compile) 2>conftest.er1
11489   ac_status=$?
11490   grep -v '^ *+' conftest.er1 >conftest.err
11491   rm -f conftest.er1
11492   cat conftest.err >&5
11493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11494   (exit $ac_status); } &&
11495          { ac_try='test -z "$ac_c_werror_flag"
11496                          || test ! -s conftest.err'
11497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11498   (eval $ac_try) 2>&5
11499   ac_status=$?
11500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11501   (exit $ac_status); }; } &&
11502          { ac_try='test -s conftest.$ac_objext'
11503   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11504   (eval $ac_try) 2>&5
11505   ac_status=$?
11506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11507   (exit $ac_status); }; }; then
11508   ac_cv_member_struct_sockaddr_storage___ss_family=yes
11509 else
11510   echo "$as_me: failed program was:" >&5
11511 sed 's/^/| /' conftest.$ac_ext >&5
11512
11513 cat >conftest.$ac_ext <<_ACEOF
11514 /* confdefs.h.  */
11515 _ACEOF
11516 cat confdefs.h >>conftest.$ac_ext
11517 cat >>conftest.$ac_ext <<_ACEOF
11518 /* end confdefs.h.  */
11519 #include <sys/types.h>
11520 #ifdef HAVE_SYS_SOCKET_H
11521 #include <sys/socket.h>
11522 #endif
11523
11524
11525 int
11526 main ()
11527 {
11528 static struct sockaddr_storage ac_aggr;
11529 if (sizeof ac_aggr.__ss_family)
11530 return 0;
11531   ;
11532   return 0;
11533 }
11534 _ACEOF
11535 rm -f conftest.$ac_objext
11536 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11537   (eval $ac_compile) 2>conftest.er1
11538   ac_status=$?
11539   grep -v '^ *+' conftest.er1 >conftest.err
11540   rm -f conftest.er1
11541   cat conftest.err >&5
11542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11543   (exit $ac_status); } &&
11544          { ac_try='test -z "$ac_c_werror_flag"
11545                          || test ! -s conftest.err'
11546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11547   (eval $ac_try) 2>&5
11548   ac_status=$?
11549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11550   (exit $ac_status); }; } &&
11551          { ac_try='test -s conftest.$ac_objext'
11552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11553   (eval $ac_try) 2>&5
11554   ac_status=$?
11555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11556   (exit $ac_status); }; }; then
11557   ac_cv_member_struct_sockaddr_storage___ss_family=yes
11558 else
11559   echo "$as_me: failed program was:" >&5
11560 sed 's/^/| /' conftest.$ac_ext >&5
11561
11562 ac_cv_member_struct_sockaddr_storage___ss_family=no
11563 fi
11564 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11565 fi
11566 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11567 fi
11568 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
11569 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
11570 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
11571
11572 cat >>confdefs.h <<_ACEOF
11573 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
11574 _ACEOF
11575
11576
11577 fi
11578 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
11579 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
11580 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
11581   echo $ECHO_N "(cached) $ECHO_C" >&6
11582 else
11583   cat >conftest.$ac_ext <<_ACEOF
11584 /* confdefs.h.  */
11585 _ACEOF
11586 cat confdefs.h >>conftest.$ac_ext
11587 cat >>conftest.$ac_ext <<_ACEOF
11588 /* end confdefs.h.  */
11589 #include <sys/types.h>
11590 #ifdef HAVE_SYS_SOCKET_H
11591 #include <sys/socket.h>
11592 #endif
11593
11594
11595 int
11596 main ()
11597 {
11598 static struct sockaddr_storage ac_aggr;
11599 if (ac_aggr.ss_len)
11600 return 0;
11601   ;
11602   return 0;
11603 }
11604 _ACEOF
11605 rm -f conftest.$ac_objext
11606 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11607   (eval $ac_compile) 2>conftest.er1
11608   ac_status=$?
11609   grep -v '^ *+' conftest.er1 >conftest.err
11610   rm -f conftest.er1
11611   cat conftest.err >&5
11612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11613   (exit $ac_status); } &&
11614          { ac_try='test -z "$ac_c_werror_flag"
11615                          || test ! -s conftest.err'
11616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11617   (eval $ac_try) 2>&5
11618   ac_status=$?
11619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11620   (exit $ac_status); }; } &&
11621          { ac_try='test -s conftest.$ac_objext'
11622   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11623   (eval $ac_try) 2>&5
11624   ac_status=$?
11625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11626   (exit $ac_status); }; }; then
11627   ac_cv_member_struct_sockaddr_storage_ss_len=yes
11628 else
11629   echo "$as_me: failed program was:" >&5
11630 sed 's/^/| /' conftest.$ac_ext >&5
11631
11632 cat >conftest.$ac_ext <<_ACEOF
11633 /* confdefs.h.  */
11634 _ACEOF
11635 cat confdefs.h >>conftest.$ac_ext
11636 cat >>conftest.$ac_ext <<_ACEOF
11637 /* end confdefs.h.  */
11638 #include <sys/types.h>
11639 #ifdef HAVE_SYS_SOCKET_H
11640 #include <sys/socket.h>
11641 #endif
11642
11643
11644 int
11645 main ()
11646 {
11647 static struct sockaddr_storage ac_aggr;
11648 if (sizeof ac_aggr.ss_len)
11649 return 0;
11650   ;
11651   return 0;
11652 }
11653 _ACEOF
11654 rm -f conftest.$ac_objext
11655 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11656   (eval $ac_compile) 2>conftest.er1
11657   ac_status=$?
11658   grep -v '^ *+' conftest.er1 >conftest.err
11659   rm -f conftest.er1
11660   cat conftest.err >&5
11661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11662   (exit $ac_status); } &&
11663          { ac_try='test -z "$ac_c_werror_flag"
11664                          || test ! -s conftest.err'
11665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11666   (eval $ac_try) 2>&5
11667   ac_status=$?
11668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11669   (exit $ac_status); }; } &&
11670          { ac_try='test -s conftest.$ac_objext'
11671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11672   (eval $ac_try) 2>&5
11673   ac_status=$?
11674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11675   (exit $ac_status); }; }; then
11676   ac_cv_member_struct_sockaddr_storage_ss_len=yes
11677 else
11678   echo "$as_me: failed program was:" >&5
11679 sed 's/^/| /' conftest.$ac_ext >&5
11680
11681 ac_cv_member_struct_sockaddr_storage_ss_len=no
11682 fi
11683 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11684 fi
11685 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11686 fi
11687 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
11688 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
11689 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
11690
11691 cat >>confdefs.h <<_ACEOF
11692 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
11693 _ACEOF
11694
11695
11696 fi
11697 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
11698 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
11699 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
11700   echo $ECHO_N "(cached) $ECHO_C" >&6
11701 else
11702   cat >conftest.$ac_ext <<_ACEOF
11703 /* confdefs.h.  */
11704 _ACEOF
11705 cat confdefs.h >>conftest.$ac_ext
11706 cat >>conftest.$ac_ext <<_ACEOF
11707 /* end confdefs.h.  */
11708 #include <sys/types.h>
11709 #ifdef HAVE_SYS_SOCKET_H
11710 #include <sys/socket.h>
11711 #endif
11712
11713
11714 int
11715 main ()
11716 {
11717 static struct sockaddr_storage ac_aggr;
11718 if (ac_aggr.__ss_len)
11719 return 0;
11720   ;
11721   return 0;
11722 }
11723 _ACEOF
11724 rm -f conftest.$ac_objext
11725 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11726   (eval $ac_compile) 2>conftest.er1
11727   ac_status=$?
11728   grep -v '^ *+' conftest.er1 >conftest.err
11729   rm -f conftest.er1
11730   cat conftest.err >&5
11731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11732   (exit $ac_status); } &&
11733          { ac_try='test -z "$ac_c_werror_flag"
11734                          || test ! -s conftest.err'
11735   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11736   (eval $ac_try) 2>&5
11737   ac_status=$?
11738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11739   (exit $ac_status); }; } &&
11740          { ac_try='test -s conftest.$ac_objext'
11741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11742   (eval $ac_try) 2>&5
11743   ac_status=$?
11744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11745   (exit $ac_status); }; }; then
11746   ac_cv_member_struct_sockaddr_storage___ss_len=yes
11747 else
11748   echo "$as_me: failed program was:" >&5
11749 sed 's/^/| /' conftest.$ac_ext >&5
11750
11751 cat >conftest.$ac_ext <<_ACEOF
11752 /* confdefs.h.  */
11753 _ACEOF
11754 cat confdefs.h >>conftest.$ac_ext
11755 cat >>conftest.$ac_ext <<_ACEOF
11756 /* end confdefs.h.  */
11757 #include <sys/types.h>
11758 #ifdef HAVE_SYS_SOCKET_H
11759 #include <sys/socket.h>
11760 #endif
11761
11762
11763 int
11764 main ()
11765 {
11766 static struct sockaddr_storage ac_aggr;
11767 if (sizeof ac_aggr.__ss_len)
11768 return 0;
11769   ;
11770   return 0;
11771 }
11772 _ACEOF
11773 rm -f conftest.$ac_objext
11774 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11775   (eval $ac_compile) 2>conftest.er1
11776   ac_status=$?
11777   grep -v '^ *+' conftest.er1 >conftest.err
11778   rm -f conftest.er1
11779   cat conftest.err >&5
11780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11781   (exit $ac_status); } &&
11782          { ac_try='test -z "$ac_c_werror_flag"
11783                          || test ! -s conftest.err'
11784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11785   (eval $ac_try) 2>&5
11786   ac_status=$?
11787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11788   (exit $ac_status); }; } &&
11789          { ac_try='test -s conftest.$ac_objext'
11790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11791   (eval $ac_try) 2>&5
11792   ac_status=$?
11793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11794   (exit $ac_status); }; }; then
11795   ac_cv_member_struct_sockaddr_storage___ss_len=yes
11796 else
11797   echo "$as_me: failed program was:" >&5
11798 sed 's/^/| /' conftest.$ac_ext >&5
11799
11800 ac_cv_member_struct_sockaddr_storage___ss_len=no
11801 fi
11802 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11803 fi
11804 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11805 fi
11806 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
11807 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
11808 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
11809
11810 cat >>confdefs.h <<_ACEOF
11811 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
11812 _ACEOF
11813
11814
11815 fi
11816 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
11817 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
11818 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
11819   echo $ECHO_N "(cached) $ECHO_C" >&6
11820 else
11821   cat >conftest.$ac_ext <<_ACEOF
11822 /* confdefs.h.  */
11823 _ACEOF
11824 cat confdefs.h >>conftest.$ac_ext
11825 cat >>conftest.$ac_ext <<_ACEOF
11826 /* end confdefs.h.  */
11827 #include <sys/types.h>
11828 #ifdef HAVE_SYS_SOCKET_H
11829 #include <sys/socket.h>
11830 #endif
11831
11832
11833 int
11834 main ()
11835 {
11836 static struct sockaddr ac_aggr;
11837 if (ac_aggr.sa_len)
11838 return 0;
11839   ;
11840   return 0;
11841 }
11842 _ACEOF
11843 rm -f conftest.$ac_objext
11844 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11845   (eval $ac_compile) 2>conftest.er1
11846   ac_status=$?
11847   grep -v '^ *+' conftest.er1 >conftest.err
11848   rm -f conftest.er1
11849   cat conftest.err >&5
11850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11851   (exit $ac_status); } &&
11852          { ac_try='test -z "$ac_c_werror_flag"
11853                          || test ! -s conftest.err'
11854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11855   (eval $ac_try) 2>&5
11856   ac_status=$?
11857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11858   (exit $ac_status); }; } &&
11859          { ac_try='test -s conftest.$ac_objext'
11860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11861   (eval $ac_try) 2>&5
11862   ac_status=$?
11863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11864   (exit $ac_status); }; }; then
11865   ac_cv_member_struct_sockaddr_sa_len=yes
11866 else
11867   echo "$as_me: failed program was:" >&5
11868 sed 's/^/| /' conftest.$ac_ext >&5
11869
11870 cat >conftest.$ac_ext <<_ACEOF
11871 /* confdefs.h.  */
11872 _ACEOF
11873 cat confdefs.h >>conftest.$ac_ext
11874 cat >>conftest.$ac_ext <<_ACEOF
11875 /* end confdefs.h.  */
11876 #include <sys/types.h>
11877 #ifdef HAVE_SYS_SOCKET_H
11878 #include <sys/socket.h>
11879 #endif
11880
11881
11882 int
11883 main ()
11884 {
11885 static struct sockaddr ac_aggr;
11886 if (sizeof ac_aggr.sa_len)
11887 return 0;
11888   ;
11889   return 0;
11890 }
11891 _ACEOF
11892 rm -f conftest.$ac_objext
11893 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11894   (eval $ac_compile) 2>conftest.er1
11895   ac_status=$?
11896   grep -v '^ *+' conftest.er1 >conftest.err
11897   rm -f conftest.er1
11898   cat conftest.err >&5
11899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11900   (exit $ac_status); } &&
11901          { ac_try='test -z "$ac_c_werror_flag"
11902                          || test ! -s conftest.err'
11903   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11904   (eval $ac_try) 2>&5
11905   ac_status=$?
11906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11907   (exit $ac_status); }; } &&
11908          { ac_try='test -s conftest.$ac_objext'
11909   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11910   (eval $ac_try) 2>&5
11911   ac_status=$?
11912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11913   (exit $ac_status); }; }; then
11914   ac_cv_member_struct_sockaddr_sa_len=yes
11915 else
11916   echo "$as_me: failed program was:" >&5
11917 sed 's/^/| /' conftest.$ac_ext >&5
11918
11919 ac_cv_member_struct_sockaddr_sa_len=no
11920 fi
11921 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11922 fi
11923 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11924 fi
11925 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
11926 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
11927 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
11928
11929 cat >>confdefs.h <<_ACEOF
11930 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
11931 _ACEOF
11932
11933
11934 fi
11935
11936 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
11937 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
11938 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
11939   echo $ECHO_N "(cached) $ECHO_C" >&6
11940 else
11941   cat >conftest.$ac_ext <<_ACEOF
11942 /* confdefs.h.  */
11943 _ACEOF
11944 cat confdefs.h >>conftest.$ac_ext
11945 cat >>conftest.$ac_ext <<_ACEOF
11946 /* end confdefs.h.  */
11947 #include <sys/types.h>
11948 #include <sys/socket.h>
11949 #include <netdb.h>
11950
11951
11952 int
11953 main ()
11954 {
11955 if ((struct addrinfo *) 0)
11956   return 0;
11957 if (sizeof (struct addrinfo))
11958   return 0;
11959   ;
11960   return 0;
11961 }
11962 _ACEOF
11963 rm -f conftest.$ac_objext
11964 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11965   (eval $ac_compile) 2>conftest.er1
11966   ac_status=$?
11967   grep -v '^ *+' conftest.er1 >conftest.err
11968   rm -f conftest.er1
11969   cat conftest.err >&5
11970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11971   (exit $ac_status); } &&
11972          { ac_try='test -z "$ac_c_werror_flag"
11973                          || test ! -s conftest.err'
11974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11975   (eval $ac_try) 2>&5
11976   ac_status=$?
11977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11978   (exit $ac_status); }; } &&
11979          { ac_try='test -s conftest.$ac_objext'
11980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11981   (eval $ac_try) 2>&5
11982   ac_status=$?
11983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11984   (exit $ac_status); }; }; then
11985   ac_cv_type_struct_addrinfo=yes
11986 else
11987   echo "$as_me: failed program was:" >&5
11988 sed 's/^/| /' conftest.$ac_ext >&5
11989
11990 ac_cv_type_struct_addrinfo=no
11991 fi
11992 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11993 fi
11994 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
11995 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
11996 if test $ac_cv_type_struct_addrinfo = yes; then
11997
11998 cat >>confdefs.h <<_ACEOF
11999 #define HAVE_STRUCT_ADDRINFO 1
12000 _ACEOF
12001
12002
12003 fi
12004
12005
12006 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12007 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12008 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12009   echo $ECHO_N "(cached) $ECHO_C" >&6
12010 else
12011   cat >conftest.$ac_ext <<_ACEOF
12012 /* confdefs.h.  */
12013 _ACEOF
12014 cat confdefs.h >>conftest.$ac_ext
12015 cat >>conftest.$ac_ext <<_ACEOF
12016 /* end confdefs.h.  */
12017 #include <sys/param.h>
12018 #include <sys/types.h>
12019 #include <sys/socket.h>
12020 #include <sys/ucred.h>
12021
12022 int
12023 main ()
12024 {
12025 if ((struct cmsgcred *) 0)
12026   return 0;
12027 if (sizeof (struct cmsgcred))
12028   return 0;
12029   ;
12030   return 0;
12031 }
12032 _ACEOF
12033 rm -f conftest.$ac_objext
12034 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12035   (eval $ac_compile) 2>conftest.er1
12036   ac_status=$?
12037   grep -v '^ *+' conftest.er1 >conftest.err
12038   rm -f conftest.er1
12039   cat conftest.err >&5
12040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12041   (exit $ac_status); } &&
12042          { ac_try='test -z "$ac_c_werror_flag"
12043                          || test ! -s conftest.err'
12044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12045   (eval $ac_try) 2>&5
12046   ac_status=$?
12047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12048   (exit $ac_status); }; } &&
12049          { ac_try='test -s conftest.$ac_objext'
12050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12051   (eval $ac_try) 2>&5
12052   ac_status=$?
12053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12054   (exit $ac_status); }; }; then
12055   ac_cv_type_struct_cmsgcred=yes
12056 else
12057   echo "$as_me: failed program was:" >&5
12058 sed 's/^/| /' conftest.$ac_ext >&5
12059
12060 ac_cv_type_struct_cmsgcred=no
12061 fi
12062 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12063 fi
12064 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12065 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12066 if test $ac_cv_type_struct_cmsgcred = yes; then
12067
12068 cat >>confdefs.h <<_ACEOF
12069 #define HAVE_STRUCT_CMSGCRED 1
12070 _ACEOF
12071
12072
12073 fi
12074 echo "$as_me:$LINENO: checking for struct fcred" >&5
12075 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12076 if test "${ac_cv_type_struct_fcred+set}" = set; then
12077   echo $ECHO_N "(cached) $ECHO_C" >&6
12078 else
12079   cat >conftest.$ac_ext <<_ACEOF
12080 /* confdefs.h.  */
12081 _ACEOF
12082 cat confdefs.h >>conftest.$ac_ext
12083 cat >>conftest.$ac_ext <<_ACEOF
12084 /* end confdefs.h.  */
12085 #include <sys/param.h>
12086 #include <sys/types.h>
12087 #include <sys/socket.h>
12088 #include <sys/ucred.h>
12089
12090 int
12091 main ()
12092 {
12093 if ((struct fcred *) 0)
12094   return 0;
12095 if (sizeof (struct fcred))
12096   return 0;
12097   ;
12098   return 0;
12099 }
12100 _ACEOF
12101 rm -f conftest.$ac_objext
12102 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12103   (eval $ac_compile) 2>conftest.er1
12104   ac_status=$?
12105   grep -v '^ *+' conftest.er1 >conftest.err
12106   rm -f conftest.er1
12107   cat conftest.err >&5
12108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12109   (exit $ac_status); } &&
12110          { ac_try='test -z "$ac_c_werror_flag"
12111                          || test ! -s conftest.err'
12112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12113   (eval $ac_try) 2>&5
12114   ac_status=$?
12115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12116   (exit $ac_status); }; } &&
12117          { ac_try='test -s conftest.$ac_objext'
12118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12119   (eval $ac_try) 2>&5
12120   ac_status=$?
12121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12122   (exit $ac_status); }; }; then
12123   ac_cv_type_struct_fcred=yes
12124 else
12125   echo "$as_me: failed program was:" >&5
12126 sed 's/^/| /' conftest.$ac_ext >&5
12127
12128 ac_cv_type_struct_fcred=no
12129 fi
12130 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12131 fi
12132 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12133 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12134 if test $ac_cv_type_struct_fcred = yes; then
12135
12136 cat >>confdefs.h <<_ACEOF
12137 #define HAVE_STRUCT_FCRED 1
12138 _ACEOF
12139
12140
12141 fi
12142 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12143 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12144 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12145   echo $ECHO_N "(cached) $ECHO_C" >&6
12146 else
12147   cat >conftest.$ac_ext <<_ACEOF
12148 /* confdefs.h.  */
12149 _ACEOF
12150 cat confdefs.h >>conftest.$ac_ext
12151 cat >>conftest.$ac_ext <<_ACEOF
12152 /* end confdefs.h.  */
12153 #include <sys/param.h>
12154 #include <sys/types.h>
12155 #include <sys/socket.h>
12156 #include <sys/ucred.h>
12157
12158 int
12159 main ()
12160 {
12161 if ((struct sockcred *) 0)
12162   return 0;
12163 if (sizeof (struct sockcred))
12164   return 0;
12165   ;
12166   return 0;
12167 }
12168 _ACEOF
12169 rm -f conftest.$ac_objext
12170 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12171   (eval $ac_compile) 2>conftest.er1
12172   ac_status=$?
12173   grep -v '^ *+' conftest.er1 >conftest.err
12174   rm -f conftest.er1
12175   cat conftest.err >&5
12176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12177   (exit $ac_status); } &&
12178          { ac_try='test -z "$ac_c_werror_flag"
12179                          || test ! -s conftest.err'
12180   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12181   (eval $ac_try) 2>&5
12182   ac_status=$?
12183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12184   (exit $ac_status); }; } &&
12185          { ac_try='test -s conftest.$ac_objext'
12186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12187   (eval $ac_try) 2>&5
12188   ac_status=$?
12189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12190   (exit $ac_status); }; }; then
12191   ac_cv_type_struct_sockcred=yes
12192 else
12193   echo "$as_me: failed program was:" >&5
12194 sed 's/^/| /' conftest.$ac_ext >&5
12195
12196 ac_cv_type_struct_sockcred=no
12197 fi
12198 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12199 fi
12200 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12201 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12202 if test $ac_cv_type_struct_sockcred = yes; then
12203
12204 cat >>confdefs.h <<_ACEOF
12205 #define HAVE_STRUCT_SOCKCRED 1
12206 _ACEOF
12207
12208
12209 fi
12210
12211
12212 echo "$as_me:$LINENO: checking for struct option" >&5
12213 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12214 if test "${ac_cv_type_struct_option+set}" = set; then
12215   echo $ECHO_N "(cached) $ECHO_C" >&6
12216 else
12217   cat >conftest.$ac_ext <<_ACEOF
12218 /* confdefs.h.  */
12219 _ACEOF
12220 cat confdefs.h >>conftest.$ac_ext
12221 cat >>conftest.$ac_ext <<_ACEOF
12222 /* end confdefs.h.  */
12223 #ifdef HAVE_GETOPT_H
12224 #include <getopt.h>
12225 #endif
12226
12227 int
12228 main ()
12229 {
12230 if ((struct option *) 0)
12231   return 0;
12232 if (sizeof (struct option))
12233   return 0;
12234   ;
12235   return 0;
12236 }
12237 _ACEOF
12238 rm -f conftest.$ac_objext
12239 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12240   (eval $ac_compile) 2>conftest.er1
12241   ac_status=$?
12242   grep -v '^ *+' conftest.er1 >conftest.err
12243   rm -f conftest.er1
12244   cat conftest.err >&5
12245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12246   (exit $ac_status); } &&
12247          { ac_try='test -z "$ac_c_werror_flag"
12248                          || test ! -s conftest.err'
12249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12250   (eval $ac_try) 2>&5
12251   ac_status=$?
12252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12253   (exit $ac_status); }; } &&
12254          { ac_try='test -s conftest.$ac_objext'
12255   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12256   (eval $ac_try) 2>&5
12257   ac_status=$?
12258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12259   (exit $ac_status); }; }; then
12260   ac_cv_type_struct_option=yes
12261 else
12262   echo "$as_me: failed program was:" >&5
12263 sed 's/^/| /' conftest.$ac_ext >&5
12264
12265 ac_cv_type_struct_option=no
12266 fi
12267 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12268 fi
12269 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12270 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12271 if test $ac_cv_type_struct_option = yes; then
12272
12273 cat >>confdefs.h <<_ACEOF
12274 #define HAVE_STRUCT_OPTION 1
12275 _ACEOF
12276
12277
12278 fi
12279
12280
12281 if test "$with_zlib" = yes; then
12282   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12283   # did not).  While we could work around the lack of z_streamp, it
12284   # seems unwise to encourage people to use such old zlib versions...
12285   echo "$as_me:$LINENO: checking for z_streamp" >&5
12286 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12287 if test "${ac_cv_type_z_streamp+set}" = set; then
12288   echo $ECHO_N "(cached) $ECHO_C" >&6
12289 else
12290   cat >conftest.$ac_ext <<_ACEOF
12291 /* confdefs.h.  */
12292 _ACEOF
12293 cat confdefs.h >>conftest.$ac_ext
12294 cat >>conftest.$ac_ext <<_ACEOF
12295 /* end confdefs.h.  */
12296 #include <zlib.h>
12297
12298 int
12299 main ()
12300 {
12301 if ((z_streamp *) 0)
12302   return 0;
12303 if (sizeof (z_streamp))
12304   return 0;
12305   ;
12306   return 0;
12307 }
12308 _ACEOF
12309 rm -f conftest.$ac_objext
12310 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12311   (eval $ac_compile) 2>conftest.er1
12312   ac_status=$?
12313   grep -v '^ *+' conftest.er1 >conftest.err
12314   rm -f conftest.er1
12315   cat conftest.err >&5
12316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12317   (exit $ac_status); } &&
12318          { ac_try='test -z "$ac_c_werror_flag"
12319                          || test ! -s conftest.err'
12320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12321   (eval $ac_try) 2>&5
12322   ac_status=$?
12323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12324   (exit $ac_status); }; } &&
12325          { ac_try='test -s conftest.$ac_objext'
12326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12327   (eval $ac_try) 2>&5
12328   ac_status=$?
12329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12330   (exit $ac_status); }; }; then
12331   ac_cv_type_z_streamp=yes
12332 else
12333   echo "$as_me: failed program was:" >&5
12334 sed 's/^/| /' conftest.$ac_ext >&5
12335
12336 ac_cv_type_z_streamp=no
12337 fi
12338 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12339 fi
12340 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12341 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12342 if test $ac_cv_type_z_streamp = yes; then
12343   :
12344 else
12345   { { echo "$as_me:$LINENO: error: zlib version is too old
12346 Use --without-zlib to disable zlib support." >&5
12347 echo "$as_me: error: zlib version is too old
12348 Use --without-zlib to disable zlib support." >&2;}
12349    { (exit 1); exit 1; }; }
12350 fi
12351
12352 fi
12353
12354 if test "$with_krb5" = yes; then
12355 # Check for differences between MIT and Heimdal (KTH) releases
12356   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
12357 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
12358 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
12359   echo $ECHO_N "(cached) $ECHO_C" >&6
12360 else
12361   cat >conftest.$ac_ext <<_ACEOF
12362 /* confdefs.h.  */
12363 _ACEOF
12364 cat confdefs.h >>conftest.$ac_ext
12365 cat >>conftest.$ac_ext <<_ACEOF
12366 /* end confdefs.h.  */
12367 #include <krb5.h>
12368
12369 int
12370 main ()
12371 {
12372 static krb5_ticket ac_aggr;
12373 if (ac_aggr.enc_part2)
12374 return 0;
12375   ;
12376   return 0;
12377 }
12378 _ACEOF
12379 rm -f conftest.$ac_objext
12380 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12381   (eval $ac_compile) 2>conftest.er1
12382   ac_status=$?
12383   grep -v '^ *+' conftest.er1 >conftest.err
12384   rm -f conftest.er1
12385   cat conftest.err >&5
12386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12387   (exit $ac_status); } &&
12388          { ac_try='test -z "$ac_c_werror_flag"
12389                          || test ! -s conftest.err'
12390   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12391   (eval $ac_try) 2>&5
12392   ac_status=$?
12393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12394   (exit $ac_status); }; } &&
12395          { ac_try='test -s conftest.$ac_objext'
12396   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12397   (eval $ac_try) 2>&5
12398   ac_status=$?
12399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12400   (exit $ac_status); }; }; then
12401   ac_cv_member_krb5_ticket_enc_part2=yes
12402 else
12403   echo "$as_me: failed program was:" >&5
12404 sed 's/^/| /' conftest.$ac_ext >&5
12405
12406 cat >conftest.$ac_ext <<_ACEOF
12407 /* confdefs.h.  */
12408 _ACEOF
12409 cat confdefs.h >>conftest.$ac_ext
12410 cat >>conftest.$ac_ext <<_ACEOF
12411 /* end confdefs.h.  */
12412 #include <krb5.h>
12413
12414 int
12415 main ()
12416 {
12417 static krb5_ticket ac_aggr;
12418 if (sizeof ac_aggr.enc_part2)
12419 return 0;
12420   ;
12421   return 0;
12422 }
12423 _ACEOF
12424 rm -f conftest.$ac_objext
12425 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12426   (eval $ac_compile) 2>conftest.er1
12427   ac_status=$?
12428   grep -v '^ *+' conftest.er1 >conftest.err
12429   rm -f conftest.er1
12430   cat conftest.err >&5
12431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12432   (exit $ac_status); } &&
12433          { ac_try='test -z "$ac_c_werror_flag"
12434                          || test ! -s conftest.err'
12435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12436   (eval $ac_try) 2>&5
12437   ac_status=$?
12438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12439   (exit $ac_status); }; } &&
12440          { ac_try='test -s conftest.$ac_objext'
12441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12442   (eval $ac_try) 2>&5
12443   ac_status=$?
12444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12445   (exit $ac_status); }; }; then
12446   ac_cv_member_krb5_ticket_enc_part2=yes
12447 else
12448   echo "$as_me: failed program was:" >&5
12449 sed 's/^/| /' conftest.$ac_ext >&5
12450
12451 ac_cv_member_krb5_ticket_enc_part2=no
12452 fi
12453 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12454 fi
12455 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12456 fi
12457 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
12458 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
12459 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
12460
12461 cat >>confdefs.h <<_ACEOF
12462 #define HAVE_KRB5_TICKET_ENC_PART2 1
12463 _ACEOF
12464
12465
12466 else
12467   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
12468 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
12469 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
12470   echo $ECHO_N "(cached) $ECHO_C" >&6
12471 else
12472   cat >conftest.$ac_ext <<_ACEOF
12473 /* confdefs.h.  */
12474 _ACEOF
12475 cat confdefs.h >>conftest.$ac_ext
12476 cat >>conftest.$ac_ext <<_ACEOF
12477 /* end confdefs.h.  */
12478 #include <krb5.h>
12479
12480 int
12481 main ()
12482 {
12483 static krb5_ticket ac_aggr;
12484 if (ac_aggr.client)
12485 return 0;
12486   ;
12487   return 0;
12488 }
12489 _ACEOF
12490 rm -f conftest.$ac_objext
12491 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12492   (eval $ac_compile) 2>conftest.er1
12493   ac_status=$?
12494   grep -v '^ *+' conftest.er1 >conftest.err
12495   rm -f conftest.er1
12496   cat conftest.err >&5
12497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12498   (exit $ac_status); } &&
12499          { ac_try='test -z "$ac_c_werror_flag"
12500                          || test ! -s conftest.err'
12501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12502   (eval $ac_try) 2>&5
12503   ac_status=$?
12504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12505   (exit $ac_status); }; } &&
12506          { ac_try='test -s conftest.$ac_objext'
12507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12508   (eval $ac_try) 2>&5
12509   ac_status=$?
12510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12511   (exit $ac_status); }; }; then
12512   ac_cv_member_krb5_ticket_client=yes
12513 else
12514   echo "$as_me: failed program was:" >&5
12515 sed 's/^/| /' conftest.$ac_ext >&5
12516
12517 cat >conftest.$ac_ext <<_ACEOF
12518 /* confdefs.h.  */
12519 _ACEOF
12520 cat confdefs.h >>conftest.$ac_ext
12521 cat >>conftest.$ac_ext <<_ACEOF
12522 /* end confdefs.h.  */
12523 #include <krb5.h>
12524
12525 int
12526 main ()
12527 {
12528 static krb5_ticket ac_aggr;
12529 if (sizeof ac_aggr.client)
12530 return 0;
12531   ;
12532   return 0;
12533 }
12534 _ACEOF
12535 rm -f conftest.$ac_objext
12536 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12537   (eval $ac_compile) 2>conftest.er1
12538   ac_status=$?
12539   grep -v '^ *+' conftest.er1 >conftest.err
12540   rm -f conftest.er1
12541   cat conftest.err >&5
12542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12543   (exit $ac_status); } &&
12544          { ac_try='test -z "$ac_c_werror_flag"
12545                          || test ! -s conftest.err'
12546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12547   (eval $ac_try) 2>&5
12548   ac_status=$?
12549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12550   (exit $ac_status); }; } &&
12551          { ac_try='test -s conftest.$ac_objext'
12552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12553   (eval $ac_try) 2>&5
12554   ac_status=$?
12555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12556   (exit $ac_status); }; }; then
12557   ac_cv_member_krb5_ticket_client=yes
12558 else
12559   echo "$as_me: failed program was:" >&5
12560 sed 's/^/| /' conftest.$ac_ext >&5
12561
12562 ac_cv_member_krb5_ticket_client=no
12563 fi
12564 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12565 fi
12566 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12567 fi
12568 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
12569 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
12570 if test $ac_cv_member_krb5_ticket_client = yes; then
12571
12572 cat >>confdefs.h <<_ACEOF
12573 #define HAVE_KRB5_TICKET_CLIENT 1
12574 _ACEOF
12575
12576
12577 else
12578   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
12579 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
12580    { (exit 1); exit 1; }; }
12581 fi
12582
12583 fi
12584
12585   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
12586 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
12587 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
12588   echo $ECHO_N "(cached) $ECHO_C" >&6
12589 else
12590   cat >conftest.$ac_ext <<_ACEOF
12591 /* confdefs.h.  */
12592 _ACEOF
12593 cat confdefs.h >>conftest.$ac_ext
12594 cat >>conftest.$ac_ext <<_ACEOF
12595 /* end confdefs.h.  */
12596 #include <krb5.h>
12597
12598 int
12599 main ()
12600 {
12601 static krb5_error ac_aggr;
12602 if (ac_aggr.text.data)
12603 return 0;
12604   ;
12605   return 0;
12606 }
12607 _ACEOF
12608 rm -f conftest.$ac_objext
12609 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12610   (eval $ac_compile) 2>conftest.er1
12611   ac_status=$?
12612   grep -v '^ *+' conftest.er1 >conftest.err
12613   rm -f conftest.er1
12614   cat conftest.err >&5
12615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12616   (exit $ac_status); } &&
12617          { ac_try='test -z "$ac_c_werror_flag"
12618                          || test ! -s conftest.err'
12619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12620   (eval $ac_try) 2>&5
12621   ac_status=$?
12622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12623   (exit $ac_status); }; } &&
12624          { ac_try='test -s conftest.$ac_objext'
12625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12626   (eval $ac_try) 2>&5
12627   ac_status=$?
12628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12629   (exit $ac_status); }; }; then
12630   ac_cv_member_krb5_error_text_data=yes
12631 else
12632   echo "$as_me: failed program was:" >&5
12633 sed 's/^/| /' conftest.$ac_ext >&5
12634
12635 cat >conftest.$ac_ext <<_ACEOF
12636 /* confdefs.h.  */
12637 _ACEOF
12638 cat confdefs.h >>conftest.$ac_ext
12639 cat >>conftest.$ac_ext <<_ACEOF
12640 /* end confdefs.h.  */
12641 #include <krb5.h>
12642
12643 int
12644 main ()
12645 {
12646 static krb5_error ac_aggr;
12647 if (sizeof ac_aggr.text.data)
12648 return 0;
12649   ;
12650   return 0;
12651 }
12652 _ACEOF
12653 rm -f conftest.$ac_objext
12654 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12655   (eval $ac_compile) 2>conftest.er1
12656   ac_status=$?
12657   grep -v '^ *+' conftest.er1 >conftest.err
12658   rm -f conftest.er1
12659   cat conftest.err >&5
12660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12661   (exit $ac_status); } &&
12662          { ac_try='test -z "$ac_c_werror_flag"
12663                          || test ! -s conftest.err'
12664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12665   (eval $ac_try) 2>&5
12666   ac_status=$?
12667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12668   (exit $ac_status); }; } &&
12669          { ac_try='test -s conftest.$ac_objext'
12670   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12671   (eval $ac_try) 2>&5
12672   ac_status=$?
12673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12674   (exit $ac_status); }; }; then
12675   ac_cv_member_krb5_error_text_data=yes
12676 else
12677   echo "$as_me: failed program was:" >&5
12678 sed 's/^/| /' conftest.$ac_ext >&5
12679
12680 ac_cv_member_krb5_error_text_data=no
12681 fi
12682 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12683 fi
12684 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12685 fi
12686 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
12687 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
12688 if test $ac_cv_member_krb5_error_text_data = yes; then
12689
12690 cat >>confdefs.h <<_ACEOF
12691 #define HAVE_KRB5_ERROR_TEXT_DATA 1
12692 _ACEOF
12693
12694
12695 else
12696   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
12697 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
12698 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
12699   echo $ECHO_N "(cached) $ECHO_C" >&6
12700 else
12701   cat >conftest.$ac_ext <<_ACEOF
12702 /* confdefs.h.  */
12703 _ACEOF
12704 cat confdefs.h >>conftest.$ac_ext
12705 cat >>conftest.$ac_ext <<_ACEOF
12706 /* end confdefs.h.  */
12707 #include <krb5.h>
12708
12709 int
12710 main ()
12711 {
12712 static krb5_error ac_aggr;
12713 if (ac_aggr.e_data)
12714 return 0;
12715   ;
12716   return 0;
12717 }
12718 _ACEOF
12719 rm -f conftest.$ac_objext
12720 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12721   (eval $ac_compile) 2>conftest.er1
12722   ac_status=$?
12723   grep -v '^ *+' conftest.er1 >conftest.err
12724   rm -f conftest.er1
12725   cat conftest.err >&5
12726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12727   (exit $ac_status); } &&
12728          { ac_try='test -z "$ac_c_werror_flag"
12729                          || test ! -s conftest.err'
12730   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12731   (eval $ac_try) 2>&5
12732   ac_status=$?
12733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12734   (exit $ac_status); }; } &&
12735          { ac_try='test -s conftest.$ac_objext'
12736   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12737   (eval $ac_try) 2>&5
12738   ac_status=$?
12739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12740   (exit $ac_status); }; }; then
12741   ac_cv_member_krb5_error_e_data=yes
12742 else
12743   echo "$as_me: failed program was:" >&5
12744 sed 's/^/| /' conftest.$ac_ext >&5
12745
12746 cat >conftest.$ac_ext <<_ACEOF
12747 /* confdefs.h.  */
12748 _ACEOF
12749 cat confdefs.h >>conftest.$ac_ext
12750 cat >>conftest.$ac_ext <<_ACEOF
12751 /* end confdefs.h.  */
12752 #include <krb5.h>
12753
12754 int
12755 main ()
12756 {
12757 static krb5_error ac_aggr;
12758 if (sizeof ac_aggr.e_data)
12759 return 0;
12760   ;
12761   return 0;
12762 }
12763 _ACEOF
12764 rm -f conftest.$ac_objext
12765 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12766   (eval $ac_compile) 2>conftest.er1
12767   ac_status=$?
12768   grep -v '^ *+' conftest.er1 >conftest.err
12769   rm -f conftest.er1
12770   cat conftest.err >&5
12771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12772   (exit $ac_status); } &&
12773          { ac_try='test -z "$ac_c_werror_flag"
12774                          || test ! -s conftest.err'
12775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12776   (eval $ac_try) 2>&5
12777   ac_status=$?
12778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12779   (exit $ac_status); }; } &&
12780          { ac_try='test -s conftest.$ac_objext'
12781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12782   (eval $ac_try) 2>&5
12783   ac_status=$?
12784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12785   (exit $ac_status); }; }; then
12786   ac_cv_member_krb5_error_e_data=yes
12787 else
12788   echo "$as_me: failed program was:" >&5
12789 sed 's/^/| /' conftest.$ac_ext >&5
12790
12791 ac_cv_member_krb5_error_e_data=no
12792 fi
12793 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12794 fi
12795 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12796 fi
12797 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
12798 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
12799 if test $ac_cv_member_krb5_error_e_data = yes; then
12800
12801 cat >>confdefs.h <<_ACEOF
12802 #define HAVE_KRB5_ERROR_E_DATA 1
12803 _ACEOF
12804
12805
12806 else
12807   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
12808 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
12809    { (exit 1); exit 1; }; }
12810 fi
12811
12812 fi
12813
12814 fi
12815
12816 # This is probably only present on Darwin, but may as well check always
12817 echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
12818 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6
12819 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
12820   echo $ECHO_N "(cached) $ECHO_C" >&6
12821 else
12822   cat >conftest.$ac_ext <<_ACEOF
12823 /* confdefs.h.  */
12824 _ACEOF
12825 cat confdefs.h >>conftest.$ac_ext
12826 cat >>conftest.$ac_ext <<_ACEOF
12827 /* end confdefs.h.  */
12828 #include <fcntl.h>
12829
12830 int
12831 main ()
12832 {
12833 #ifndef F_FULLFSYNC
12834   char *p = (char *) F_FULLFSYNC;
12835 #endif
12836
12837   ;
12838   return 0;
12839 }
12840 _ACEOF
12841 rm -f conftest.$ac_objext
12842 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12843   (eval $ac_compile) 2>conftest.er1
12844   ac_status=$?
12845   grep -v '^ *+' conftest.er1 >conftest.err
12846   rm -f conftest.er1
12847   cat conftest.err >&5
12848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12849   (exit $ac_status); } &&
12850          { ac_try='test -z "$ac_c_werror_flag"
12851                          || test ! -s conftest.err'
12852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12853   (eval $ac_try) 2>&5
12854   ac_status=$?
12855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12856   (exit $ac_status); }; } &&
12857          { ac_try='test -s conftest.$ac_objext'
12858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12859   (eval $ac_try) 2>&5
12860   ac_status=$?
12861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12862   (exit $ac_status); }; }; then
12863   ac_cv_have_decl_F_FULLFSYNC=yes
12864 else
12865   echo "$as_me: failed program was:" >&5
12866 sed 's/^/| /' conftest.$ac_ext >&5
12867
12868 ac_cv_have_decl_F_FULLFSYNC=no
12869 fi
12870 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12871 fi
12872 echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
12873 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6
12874 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
12875
12876 cat >>confdefs.h <<_ACEOF
12877 #define HAVE_DECL_F_FULLFSYNC 1
12878 _ACEOF
12879
12880
12881 else
12882   cat >>confdefs.h <<_ACEOF
12883 #define HAVE_DECL_F_FULLFSYNC 0
12884 _ACEOF
12885
12886
12887 fi
12888
12889
12890
12891 ##
12892 ## Functions, global variables
12893 ##
12894
12895 echo "$as_me:$LINENO: checking for int timezone" >&5
12896 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
12897 if test "${pgac_cv_var_int_timezone+set}" = set; then
12898   echo $ECHO_N "(cached) $ECHO_C" >&6
12899 else
12900   cat >conftest.$ac_ext <<_ACEOF
12901 /* confdefs.h.  */
12902 _ACEOF
12903 cat confdefs.h >>conftest.$ac_ext
12904 cat >>conftest.$ac_ext <<_ACEOF
12905 /* end confdefs.h.  */
12906 #include <time.h>
12907 int res;
12908 int
12909 main ()
12910 {
12911 #ifndef __CYGWIN__
12912 res = timezone / 60;
12913 #else
12914 res = _timezone / 60;
12915 #endif
12916   ;
12917   return 0;
12918 }
12919 _ACEOF
12920 rm -f conftest.$ac_objext conftest$ac_exeext
12921 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12922   (eval $ac_link) 2>conftest.er1
12923   ac_status=$?
12924   grep -v '^ *+' conftest.er1 >conftest.err
12925   rm -f conftest.er1
12926   cat conftest.err >&5
12927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12928   (exit $ac_status); } &&
12929          { ac_try='test -z "$ac_c_werror_flag"
12930                          || test ! -s conftest.err'
12931   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12932   (eval $ac_try) 2>&5
12933   ac_status=$?
12934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12935   (exit $ac_status); }; } &&
12936          { ac_try='test -s conftest$ac_exeext'
12937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12938   (eval $ac_try) 2>&5
12939   ac_status=$?
12940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12941   (exit $ac_status); }; }; then
12942   pgac_cv_var_int_timezone=yes
12943 else
12944   echo "$as_me: failed program was:" >&5
12945 sed 's/^/| /' conftest.$ac_ext >&5
12946
12947 pgac_cv_var_int_timezone=no
12948 fi
12949 rm -f conftest.err conftest.$ac_objext \
12950       conftest$ac_exeext conftest.$ac_ext
12951 fi
12952 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
12953 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
12954 if test x"$pgac_cv_var_int_timezone" = xyes ; then
12955
12956 cat >>confdefs.h <<\_ACEOF
12957 #define HAVE_INT_TIMEZONE
12958 _ACEOF
12959
12960 fi
12961 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
12962 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
12963  if test "${ac_cv_func_accept_return+set}" = set; then
12964   echo $ECHO_N "(cached) $ECHO_C" >&6
12965 else
12966    if test "${ac_cv_func_accept_arg1+set}" = set; then
12967   echo $ECHO_N "(cached) $ECHO_C" >&6
12968 else
12969     if test "${ac_cv_func_accept_arg2+set}" = set; then
12970   echo $ECHO_N "(cached) $ECHO_C" >&6
12971 else
12972      if test "${ac_cv_func_accept_arg3+set}" = set; then
12973   echo $ECHO_N "(cached) $ECHO_C" >&6
12974 else
12975       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
12976       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
12977        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12978         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12979          cat >conftest.$ac_ext <<_ACEOF
12980 /* confdefs.h.  */
12981 _ACEOF
12982 cat confdefs.h >>conftest.$ac_ext
12983 cat >>conftest.$ac_ext <<_ACEOF
12984 /* end confdefs.h.  */
12985 #ifdef HAVE_SYS_TYPES_H
12986 #include <sys/types.h>
12987 #endif
12988 #ifdef HAVE_SYS_SOCKET_H
12989 #include <sys/socket.h>
12990 #endif
12991 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12992 int
12993 main ()
12994 {
12995
12996   ;
12997   return 0;
12998 }
12999 _ACEOF
13000 rm -f conftest.$ac_objext
13001 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13002   (eval $ac_compile) 2>conftest.er1
13003   ac_status=$?
13004   grep -v '^ *+' conftest.er1 >conftest.err
13005   rm -f conftest.er1
13006   cat conftest.err >&5
13007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13008   (exit $ac_status); } &&
13009          { ac_try='test -z "$ac_c_werror_flag"
13010                          || test ! -s conftest.err'
13011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13012   (eval $ac_try) 2>&5
13013   ac_status=$?
13014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13015   (exit $ac_status); }; } &&
13016          { ac_try='test -s conftest.$ac_objext'
13017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13018   (eval $ac_try) 2>&5
13019   ac_status=$?
13020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13021   (exit $ac_status); }; }; then
13022   ac_not_found=no; break 4
13023 else
13024   echo "$as_me: failed program was:" >&5
13025 sed 's/^/| /' conftest.$ac_ext >&5
13026
13027 ac_not_found=yes
13028 fi
13029 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13030        done
13031       done
13032      done
13033     done
13034     if test "$ac_not_found" = yes; then
13035       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13036 echo "$as_me: error: could not determine argument types" >&2;}
13037    { (exit 1); exit 1; }; }
13038     fi
13039     if test "$ac_cv_func_accept_arg3" = "void"; then
13040       ac_cv_func_accept_arg3=int
13041     fi
13042
13043 fi
13044
13045 fi
13046
13047 fi
13048
13049 fi
13050  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
13051 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13052
13053 cat >>confdefs.h <<_ACEOF
13054 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13055 _ACEOF
13056
13057
13058 cat >>confdefs.h <<_ACEOF
13059 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13060 _ACEOF
13061
13062
13063 cat >>confdefs.h <<_ACEOF
13064 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13065 _ACEOF
13066
13067
13068 cat >>confdefs.h <<_ACEOF
13069 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13070 _ACEOF
13071
13072
13073 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13074 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13075 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13076   echo $ECHO_N "(cached) $ECHO_C" >&6
13077 else
13078   cat >conftest.$ac_ext <<_ACEOF
13079 /* confdefs.h.  */
13080 _ACEOF
13081 cat confdefs.h >>conftest.$ac_ext
13082 cat >>conftest.$ac_ext <<_ACEOF
13083 /* end confdefs.h.  */
13084 #include <sys/time.h>
13085 int
13086 main ()
13087 {
13088 struct timeval *tp;
13089 struct timezone *tzp;
13090 gettimeofday(tp,tzp);
13091   ;
13092   return 0;
13093 }
13094 _ACEOF
13095 rm -f conftest.$ac_objext
13096 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13097   (eval $ac_compile) 2>conftest.er1
13098   ac_status=$?
13099   grep -v '^ *+' conftest.er1 >conftest.err
13100   rm -f conftest.er1
13101   cat conftest.err >&5
13102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13103   (exit $ac_status); } &&
13104          { ac_try='test -z "$ac_c_werror_flag"
13105                          || test ! -s conftest.err'
13106   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13107   (eval $ac_try) 2>&5
13108   ac_status=$?
13109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13110   (exit $ac_status); }; } &&
13111          { ac_try='test -s conftest.$ac_objext'
13112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13113   (eval $ac_try) 2>&5
13114   ac_status=$?
13115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13116   (exit $ac_status); }; }; then
13117   pgac_cv_func_gettimeofday_1arg=no
13118 else
13119   echo "$as_me: failed program was:" >&5
13120 sed 's/^/| /' conftest.$ac_ext >&5
13121
13122 pgac_cv_func_gettimeofday_1arg=yes
13123 fi
13124 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13125 fi
13126 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13127 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13128 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13129
13130 cat >>confdefs.h <<\_ACEOF
13131 #define GETTIMEOFDAY_1ARG
13132 _ACEOF
13133
13134 fi
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157 for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13158 do
13159 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13160 echo "$as_me:$LINENO: checking for $ac_func" >&5
13161 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13162 if eval "test \"\${$as_ac_var+set}\" = set"; then
13163   echo $ECHO_N "(cached) $ECHO_C" >&6
13164 else
13165   cat >conftest.$ac_ext <<_ACEOF
13166 /* confdefs.h.  */
13167 _ACEOF
13168 cat confdefs.h >>conftest.$ac_ext
13169 cat >>conftest.$ac_ext <<_ACEOF
13170 /* end confdefs.h.  */
13171 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13172    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13173 #define $ac_func innocuous_$ac_func
13174
13175 /* System header to define __stub macros and hopefully few prototypes,
13176     which can conflict with char $ac_func (); below.
13177     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13178     <limits.h> exists even on freestanding compilers.  */
13179
13180 #ifdef __STDC__
13181 # include <limits.h>
13182 #else
13183 # include <assert.h>
13184 #endif
13185
13186 #undef $ac_func
13187
13188 /* Override any gcc2 internal prototype to avoid an error.  */
13189 #ifdef __cplusplus
13190 extern "C"
13191 {
13192 #endif
13193 /* We use char because int might match the return type of a gcc2
13194    builtin and then its argument prototype would still apply.  */
13195 char $ac_func ();
13196 /* The GNU C library defines this for functions which it implements
13197     to always fail with ENOSYS.  Some functions are actually named
13198     something starting with __ and the normal name is an alias.  */
13199 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13200 choke me
13201 #else
13202 char (*f) () = $ac_func;
13203 #endif
13204 #ifdef __cplusplus
13205 }
13206 #endif
13207
13208 int
13209 main ()
13210 {
13211 return f != $ac_func;
13212   ;
13213   return 0;
13214 }
13215 _ACEOF
13216 rm -f conftest.$ac_objext conftest$ac_exeext
13217 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13218   (eval $ac_link) 2>conftest.er1
13219   ac_status=$?
13220   grep -v '^ *+' conftest.er1 >conftest.err
13221   rm -f conftest.er1
13222   cat conftest.err >&5
13223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13224   (exit $ac_status); } &&
13225          { ac_try='test -z "$ac_c_werror_flag"
13226                          || test ! -s conftest.err'
13227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13228   (eval $ac_try) 2>&5
13229   ac_status=$?
13230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13231   (exit $ac_status); }; } &&
13232          { ac_try='test -s conftest$ac_exeext'
13233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13234   (eval $ac_try) 2>&5
13235   ac_status=$?
13236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13237   (exit $ac_status); }; }; then
13238   eval "$as_ac_var=yes"
13239 else
13240   echo "$as_me: failed program was:" >&5
13241 sed 's/^/| /' conftest.$ac_ext >&5
13242
13243 eval "$as_ac_var=no"
13244 fi
13245 rm -f conftest.err conftest.$ac_objext \
13246       conftest$ac_exeext conftest.$ac_ext
13247 fi
13248 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13249 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13250 if test `eval echo '${'$as_ac_var'}'` = yes; then
13251   cat >>confdefs.h <<_ACEOF
13252 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13253 _ACEOF
13254
13255 fi
13256 done
13257
13258
13259 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13260 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13261 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13262   echo $ECHO_N "(cached) $ECHO_C" >&6
13263 else
13264   cat >conftest.$ac_ext <<_ACEOF
13265 /* confdefs.h.  */
13266 _ACEOF
13267 cat confdefs.h >>conftest.$ac_ext
13268 cat >>conftest.$ac_ext <<_ACEOF
13269 /* end confdefs.h.  */
13270 #include <unistd.h>
13271
13272 int
13273 main ()
13274 {
13275 #ifndef fdatasync
13276   char *p = (char *) fdatasync;
13277 #endif
13278
13279   ;
13280   return 0;
13281 }
13282 _ACEOF
13283 rm -f conftest.$ac_objext
13284 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13285   (eval $ac_compile) 2>conftest.er1
13286   ac_status=$?
13287   grep -v '^ *+' conftest.er1 >conftest.err
13288   rm -f conftest.er1
13289   cat conftest.err >&5
13290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13291   (exit $ac_status); } &&
13292          { ac_try='test -z "$ac_c_werror_flag"
13293                          || test ! -s conftest.err'
13294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13295   (eval $ac_try) 2>&5
13296   ac_status=$?
13297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13298   (exit $ac_status); }; } &&
13299          { ac_try='test -s conftest.$ac_objext'
13300   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13301   (eval $ac_try) 2>&5
13302   ac_status=$?
13303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13304   (exit $ac_status); }; }; then
13305   ac_cv_have_decl_fdatasync=yes
13306 else
13307   echo "$as_me: failed program was:" >&5
13308 sed 's/^/| /' conftest.$ac_ext >&5
13309
13310 ac_cv_have_decl_fdatasync=no
13311 fi
13312 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13313 fi
13314 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13315 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13316 if test $ac_cv_have_decl_fdatasync = yes; then
13317
13318 cat >>confdefs.h <<_ACEOF
13319 #define HAVE_DECL_FDATASYNC 1
13320 _ACEOF
13321
13322
13323 else
13324   cat >>confdefs.h <<_ACEOF
13325 #define HAVE_DECL_FDATASYNC 0
13326 _ACEOF
13327
13328
13329 fi
13330
13331
13332
13333 HAVE_IPV6=no
13334 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
13335 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
13336 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
13337   echo $ECHO_N "(cached) $ECHO_C" >&6
13338 else
13339   cat >conftest.$ac_ext <<_ACEOF
13340 /* confdefs.h.  */
13341 _ACEOF
13342 cat confdefs.h >>conftest.$ac_ext
13343 cat >>conftest.$ac_ext <<_ACEOF
13344 /* end confdefs.h.  */
13345 $ac_includes_default
13346 #include <netinet/in.h>
13347
13348 int
13349 main ()
13350 {
13351 if ((struct sockaddr_in6 *) 0)
13352   return 0;
13353 if (sizeof (struct sockaddr_in6))
13354   return 0;
13355   ;
13356   return 0;
13357 }
13358 _ACEOF
13359 rm -f conftest.$ac_objext
13360 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13361   (eval $ac_compile) 2>conftest.er1
13362   ac_status=$?
13363   grep -v '^ *+' conftest.er1 >conftest.err
13364   rm -f conftest.er1
13365   cat conftest.err >&5
13366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13367   (exit $ac_status); } &&
13368          { ac_try='test -z "$ac_c_werror_flag"
13369                          || test ! -s conftest.err'
13370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13371   (eval $ac_try) 2>&5
13372   ac_status=$?
13373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13374   (exit $ac_status); }; } &&
13375          { ac_try='test -s conftest.$ac_objext'
13376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13377   (eval $ac_try) 2>&5
13378   ac_status=$?
13379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13380   (exit $ac_status); }; }; then
13381   ac_cv_type_struct_sockaddr_in6=yes
13382 else
13383   echo "$as_me: failed program was:" >&5
13384 sed 's/^/| /' conftest.$ac_ext >&5
13385
13386 ac_cv_type_struct_sockaddr_in6=no
13387 fi
13388 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13389 fi
13390 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
13391 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
13392 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
13393
13394 cat >>confdefs.h <<\_ACEOF
13395 #define HAVE_IPV6 1
13396 _ACEOF
13397
13398          HAVE_IPV6=yes
13399 fi
13400
13401
13402
13403 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
13404 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
13405 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
13406   echo $ECHO_N "(cached) $ECHO_C" >&6
13407 else
13408   cat >conftest.$ac_ext <<_ACEOF
13409 /* confdefs.h.  */
13410 _ACEOF
13411 cat confdefs.h >>conftest.$ac_ext
13412 cat >>conftest.$ac_ext <<_ACEOF
13413 /* end confdefs.h.  */
13414 #include <machine/vmparam.h>
13415 #include <sys/exec.h>
13416
13417 int
13418 main ()
13419 {
13420 PS_STRINGS->ps_nargvstr = 1;
13421 PS_STRINGS->ps_argvstr = "foo";
13422   ;
13423   return 0;
13424 }
13425 _ACEOF
13426 rm -f conftest.$ac_objext conftest$ac_exeext
13427 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13428   (eval $ac_link) 2>conftest.er1
13429   ac_status=$?
13430   grep -v '^ *+' conftest.er1 >conftest.err
13431   rm -f conftest.er1
13432   cat conftest.err >&5
13433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13434   (exit $ac_status); } &&
13435          { ac_try='test -z "$ac_c_werror_flag"
13436                          || test ! -s conftest.err'
13437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13438   (eval $ac_try) 2>&5
13439   ac_status=$?
13440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13441   (exit $ac_status); }; } &&
13442          { ac_try='test -s conftest$ac_exeext'
13443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13444   (eval $ac_try) 2>&5
13445   ac_status=$?
13446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13447   (exit $ac_status); }; }; then
13448   pgac_cv_var_PS_STRINGS=yes
13449 else
13450   echo "$as_me: failed program was:" >&5
13451 sed 's/^/| /' conftest.$ac_ext >&5
13452
13453 pgac_cv_var_PS_STRINGS=no
13454 fi
13455 rm -f conftest.err conftest.$ac_objext \
13456       conftest$ac_exeext conftest.$ac_ext
13457 fi
13458 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
13459 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
13460 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13461
13462 cat >>confdefs.h <<\_ACEOF
13463 #define HAVE_PS_STRINGS
13464 _ACEOF
13465
13466 fi
13467
13468
13469 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13470 # is missing.  Yes, there are machines that have only one.  We may
13471 # also decide to use snprintf.c if snprintf() is present but does not
13472 # have all the features we need --- see below.
13473
13474 if test "$PORTNAME" = "win32"; then
13475   # Win32 gets snprintf.c built unconditionally.
13476   #
13477   # To properly translate all NLS languages strings, we must support the
13478   # *printf() %$ format, which allows *printf() arguments to be selected
13479   # by position in the translated string.
13480   #
13481   # libintl versions < 0.13 use the native *printf() functions, and Win32
13482   # *printf() doesn't understand %$, so we must use our /port versions,
13483   # which do understand %$. libintl versions >= 0.13 include their own
13484   # *printf versions on Win32.  The libintl 0.13 release note text is:
13485   #
13486   #   C format strings with positions, as they arise when a translator
13487   #   needs to reorder a sentence, are now supported on all platforms.
13488   #   On those few platforms (NetBSD and Woe32) for which the native
13489   #   printf()/fprintf()/... functions don't support such format
13490   #   strings, replacements are provided through <libintl.h>.
13491   #
13492   # We could use libintl >= 0.13's *printf() if we were sure that we had
13493   # a litint >= 0.13 at runtime, but seeing that there is no clean way
13494   # to guarantee that, it is best to just use our own, so we are sure to
13495   # get %$ support. In include/port.h we disable the *printf() macros
13496   # that might have been defined by libintl.
13497   #
13498   # We do this unconditionally whether NLS is used or not so we are sure
13499   # that all Win32 libraries and binaries behave the same.
13500   pgac_need_repl_snprintf=yes
13501 else
13502   pgac_need_repl_snprintf=no
13503
13504 for ac_func in snprintf
13505 do
13506 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13507 echo "$as_me:$LINENO: checking for $ac_func" >&5
13508 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13509 if eval "test \"\${$as_ac_var+set}\" = set"; then
13510   echo $ECHO_N "(cached) $ECHO_C" >&6
13511 else
13512   cat >conftest.$ac_ext <<_ACEOF
13513 /* confdefs.h.  */
13514 _ACEOF
13515 cat confdefs.h >>conftest.$ac_ext
13516 cat >>conftest.$ac_ext <<_ACEOF
13517 /* end confdefs.h.  */
13518 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13519    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13520 #define $ac_func innocuous_$ac_func
13521
13522 /* System header to define __stub macros and hopefully few prototypes,
13523     which can conflict with char $ac_func (); below.
13524     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13525     <limits.h> exists even on freestanding compilers.  */
13526
13527 #ifdef __STDC__
13528 # include <limits.h>
13529 #else
13530 # include <assert.h>
13531 #endif
13532
13533 #undef $ac_func
13534
13535 /* Override any gcc2 internal prototype to avoid an error.  */
13536 #ifdef __cplusplus
13537 extern "C"
13538 {
13539 #endif
13540 /* We use char because int might match the return type of a gcc2
13541    builtin and then its argument prototype would still apply.  */
13542 char $ac_func ();
13543 /* The GNU C library defines this for functions which it implements
13544     to always fail with ENOSYS.  Some functions are actually named
13545     something starting with __ and the normal name is an alias.  */
13546 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13547 choke me
13548 #else
13549 char (*f) () = $ac_func;
13550 #endif
13551 #ifdef __cplusplus
13552 }
13553 #endif
13554
13555 int
13556 main ()
13557 {
13558 return f != $ac_func;
13559   ;
13560   return 0;
13561 }
13562 _ACEOF
13563 rm -f conftest.$ac_objext conftest$ac_exeext
13564 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13565   (eval $ac_link) 2>conftest.er1
13566   ac_status=$?
13567   grep -v '^ *+' conftest.er1 >conftest.err
13568   rm -f conftest.er1
13569   cat conftest.err >&5
13570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13571   (exit $ac_status); } &&
13572          { ac_try='test -z "$ac_c_werror_flag"
13573                          || test ! -s conftest.err'
13574   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13575   (eval $ac_try) 2>&5
13576   ac_status=$?
13577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13578   (exit $ac_status); }; } &&
13579          { ac_try='test -s conftest$ac_exeext'
13580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13581   (eval $ac_try) 2>&5
13582   ac_status=$?
13583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13584   (exit $ac_status); }; }; then
13585   eval "$as_ac_var=yes"
13586 else
13587   echo "$as_me: failed program was:" >&5
13588 sed 's/^/| /' conftest.$ac_ext >&5
13589
13590 eval "$as_ac_var=no"
13591 fi
13592 rm -f conftest.err conftest.$ac_objext \
13593       conftest$ac_exeext conftest.$ac_ext
13594 fi
13595 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13596 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13597 if test `eval echo '${'$as_ac_var'}'` = yes; then
13598   cat >>confdefs.h <<_ACEOF
13599 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13600 _ACEOF
13601
13602 else
13603   pgac_need_repl_snprintf=yes
13604 fi
13605 done
13606
13607
13608 for ac_func in vsnprintf
13609 do
13610 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13611 echo "$as_me:$LINENO: checking for $ac_func" >&5
13612 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13613 if eval "test \"\${$as_ac_var+set}\" = set"; then
13614   echo $ECHO_N "(cached) $ECHO_C" >&6
13615 else
13616   cat >conftest.$ac_ext <<_ACEOF
13617 /* confdefs.h.  */
13618 _ACEOF
13619 cat confdefs.h >>conftest.$ac_ext
13620 cat >>conftest.$ac_ext <<_ACEOF
13621 /* end confdefs.h.  */
13622 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13623    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13624 #define $ac_func innocuous_$ac_func
13625
13626 /* System header to define __stub macros and hopefully few prototypes,
13627     which can conflict with char $ac_func (); below.
13628     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13629     <limits.h> exists even on freestanding compilers.  */
13630
13631 #ifdef __STDC__
13632 # include <limits.h>
13633 #else
13634 # include <assert.h>
13635 #endif
13636
13637 #undef $ac_func
13638
13639 /* Override any gcc2 internal prototype to avoid an error.  */
13640 #ifdef __cplusplus
13641 extern "C"
13642 {
13643 #endif
13644 /* We use char because int might match the return type of a gcc2
13645    builtin and then its argument prototype would still apply.  */
13646 char $ac_func ();
13647 /* The GNU C library defines this for functions which it implements
13648     to always fail with ENOSYS.  Some functions are actually named
13649     something starting with __ and the normal name is an alias.  */
13650 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13651 choke me
13652 #else
13653 char (*f) () = $ac_func;
13654 #endif
13655 #ifdef __cplusplus
13656 }
13657 #endif
13658
13659 int
13660 main ()
13661 {
13662 return f != $ac_func;
13663   ;
13664   return 0;
13665 }
13666 _ACEOF
13667 rm -f conftest.$ac_objext conftest$ac_exeext
13668 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13669   (eval $ac_link) 2>conftest.er1
13670   ac_status=$?
13671   grep -v '^ *+' conftest.er1 >conftest.err
13672   rm -f conftest.er1
13673   cat conftest.err >&5
13674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13675   (exit $ac_status); } &&
13676          { ac_try='test -z "$ac_c_werror_flag"
13677                          || test ! -s conftest.err'
13678   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13679   (eval $ac_try) 2>&5
13680   ac_status=$?
13681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13682   (exit $ac_status); }; } &&
13683          { ac_try='test -s conftest$ac_exeext'
13684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13685   (eval $ac_try) 2>&5
13686   ac_status=$?
13687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13688   (exit $ac_status); }; }; then
13689   eval "$as_ac_var=yes"
13690 else
13691   echo "$as_me: failed program was:" >&5
13692 sed 's/^/| /' conftest.$ac_ext >&5
13693
13694 eval "$as_ac_var=no"
13695 fi
13696 rm -f conftest.err conftest.$ac_objext \
13697       conftest$ac_exeext conftest.$ac_ext
13698 fi
13699 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13700 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13701 if test `eval echo '${'$as_ac_var'}'` = yes; then
13702   cat >>confdefs.h <<_ACEOF
13703 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13704 _ACEOF
13705
13706 else
13707   pgac_need_repl_snprintf=yes
13708 fi
13709 done
13710
13711 fi
13712
13713
13714 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
13715 # include/c.h will provide declarations.  Note this is a separate test
13716 # from whether the functions exist in the C library --- there are
13717 # systems that have the functions but don't bother to declare them :-(
13718
13719 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
13720 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
13721 if test "${ac_cv_have_decl_snprintf+set}" = set; then
13722   echo $ECHO_N "(cached) $ECHO_C" >&6
13723 else
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 $ac_includes_default
13731 int
13732 main ()
13733 {
13734 #ifndef snprintf
13735   char *p = (char *) snprintf;
13736 #endif
13737
13738   ;
13739   return 0;
13740 }
13741 _ACEOF
13742 rm -f conftest.$ac_objext
13743 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13744   (eval $ac_compile) 2>conftest.er1
13745   ac_status=$?
13746   grep -v '^ *+' conftest.er1 >conftest.err
13747   rm -f conftest.er1
13748   cat conftest.err >&5
13749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13750   (exit $ac_status); } &&
13751          { ac_try='test -z "$ac_c_werror_flag"
13752                          || test ! -s conftest.err'
13753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13754   (eval $ac_try) 2>&5
13755   ac_status=$?
13756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13757   (exit $ac_status); }; } &&
13758          { ac_try='test -s conftest.$ac_objext'
13759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13760   (eval $ac_try) 2>&5
13761   ac_status=$?
13762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13763   (exit $ac_status); }; }; then
13764   ac_cv_have_decl_snprintf=yes
13765 else
13766   echo "$as_me: failed program was:" >&5
13767 sed 's/^/| /' conftest.$ac_ext >&5
13768
13769 ac_cv_have_decl_snprintf=no
13770 fi
13771 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13772 fi
13773 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
13774 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
13775 if test $ac_cv_have_decl_snprintf = yes; then
13776
13777 cat >>confdefs.h <<_ACEOF
13778 #define HAVE_DECL_SNPRINTF 1
13779 _ACEOF
13780
13781
13782 else
13783   cat >>confdefs.h <<_ACEOF
13784 #define HAVE_DECL_SNPRINTF 0
13785 _ACEOF
13786
13787
13788 fi
13789 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
13790 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
13791 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
13792   echo $ECHO_N "(cached) $ECHO_C" >&6
13793 else
13794   cat >conftest.$ac_ext <<_ACEOF
13795 /* confdefs.h.  */
13796 _ACEOF
13797 cat confdefs.h >>conftest.$ac_ext
13798 cat >>conftest.$ac_ext <<_ACEOF
13799 /* end confdefs.h.  */
13800 $ac_includes_default
13801 int
13802 main ()
13803 {
13804 #ifndef vsnprintf
13805   char *p = (char *) vsnprintf;
13806 #endif
13807
13808   ;
13809   return 0;
13810 }
13811 _ACEOF
13812 rm -f conftest.$ac_objext
13813 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13814   (eval $ac_compile) 2>conftest.er1
13815   ac_status=$?
13816   grep -v '^ *+' conftest.er1 >conftest.err
13817   rm -f conftest.er1
13818   cat conftest.err >&5
13819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13820   (exit $ac_status); } &&
13821          { ac_try='test -z "$ac_c_werror_flag"
13822                          || test ! -s conftest.err'
13823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13824   (eval $ac_try) 2>&5
13825   ac_status=$?
13826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13827   (exit $ac_status); }; } &&
13828          { ac_try='test -s conftest.$ac_objext'
13829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13830   (eval $ac_try) 2>&5
13831   ac_status=$?
13832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13833   (exit $ac_status); }; }; then
13834   ac_cv_have_decl_vsnprintf=yes
13835 else
13836   echo "$as_me: failed program was:" >&5
13837 sed 's/^/| /' conftest.$ac_ext >&5
13838
13839 ac_cv_have_decl_vsnprintf=no
13840 fi
13841 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13842 fi
13843 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
13844 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
13845 if test $ac_cv_have_decl_vsnprintf = yes; then
13846
13847 cat >>confdefs.h <<_ACEOF
13848 #define HAVE_DECL_VSNPRINTF 1
13849 _ACEOF
13850
13851
13852 else
13853   cat >>confdefs.h <<_ACEOF
13854 #define HAVE_DECL_VSNPRINTF 0
13855 _ACEOF
13856
13857
13858 fi
13859
13860
13861
13862
13863 echo "$as_me:$LINENO: checking for isinf" >&5
13864 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
13865 if test "${ac_cv_func_isinf+set}" = set; then
13866   echo $ECHO_N "(cached) $ECHO_C" >&6
13867 else
13868   cat >conftest.$ac_ext <<_ACEOF
13869 /* confdefs.h.  */
13870 _ACEOF
13871 cat confdefs.h >>conftest.$ac_ext
13872 cat >>conftest.$ac_ext <<_ACEOF
13873 /* end confdefs.h.  */
13874
13875 #include <math.h>
13876 double glob_double;
13877
13878 int
13879 main ()
13880 {
13881 return isinf(glob_double) ? 0 : 1;
13882   ;
13883   return 0;
13884 }
13885 _ACEOF
13886 rm -f conftest.$ac_objext conftest$ac_exeext
13887 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13888   (eval $ac_link) 2>conftest.er1
13889   ac_status=$?
13890   grep -v '^ *+' conftest.er1 >conftest.err
13891   rm -f conftest.er1
13892   cat conftest.err >&5
13893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13894   (exit $ac_status); } &&
13895          { ac_try='test -z "$ac_c_werror_flag"
13896                          || test ! -s conftest.err'
13897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13898   (eval $ac_try) 2>&5
13899   ac_status=$?
13900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13901   (exit $ac_status); }; } &&
13902          { ac_try='test -s conftest$ac_exeext'
13903   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13904   (eval $ac_try) 2>&5
13905   ac_status=$?
13906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13907   (exit $ac_status); }; }; then
13908   ac_cv_func_isinf=yes
13909 else
13910   echo "$as_me: failed program was:" >&5
13911 sed 's/^/| /' conftest.$ac_ext >&5
13912
13913 ac_cv_func_isinf=no
13914 fi
13915 rm -f conftest.err conftest.$ac_objext \
13916       conftest$ac_exeext conftest.$ac_ext
13917 fi
13918 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
13919 echo "${ECHO_T}$ac_cv_func_isinf" >&6
13920
13921 if test $ac_cv_func_isinf = yes ; then
13922
13923 cat >>confdefs.h <<\_ACEOF
13924 #define HAVE_ISINF 1
13925 _ACEOF
13926
13927 else
13928   case $LIBOBJS in
13929     "isinf.$ac_objext"   | \
13930   *" isinf.$ac_objext"   | \
13931     "isinf.$ac_objext "* | \
13932   *" isinf.$ac_objext "* ) ;;
13933   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
13934 esac
13935
13936   # Look for a way to implement a substitute for isinf()
13937
13938
13939
13940
13941 for ac_func in fpclass fp_class fp_class_d class
13942 do
13943 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13944 echo "$as_me:$LINENO: checking for $ac_func" >&5
13945 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13946 if eval "test \"\${$as_ac_var+set}\" = set"; then
13947   echo $ECHO_N "(cached) $ECHO_C" >&6
13948 else
13949   cat >conftest.$ac_ext <<_ACEOF
13950 /* confdefs.h.  */
13951 _ACEOF
13952 cat confdefs.h >>conftest.$ac_ext
13953 cat >>conftest.$ac_ext <<_ACEOF
13954 /* end confdefs.h.  */
13955 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13956    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13957 #define $ac_func innocuous_$ac_func
13958
13959 /* System header to define __stub macros and hopefully few prototypes,
13960     which can conflict with char $ac_func (); below.
13961     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13962     <limits.h> exists even on freestanding compilers.  */
13963
13964 #ifdef __STDC__
13965 # include <limits.h>
13966 #else
13967 # include <assert.h>
13968 #endif
13969
13970 #undef $ac_func
13971
13972 /* Override any gcc2 internal prototype to avoid an error.  */
13973 #ifdef __cplusplus
13974 extern "C"
13975 {
13976 #endif
13977 /* We use char because int might match the return type of a gcc2
13978    builtin and then its argument prototype would still apply.  */
13979 char $ac_func ();
13980 /* The GNU C library defines this for functions which it implements
13981     to always fail with ENOSYS.  Some functions are actually named
13982     something starting with __ and the normal name is an alias.  */
13983 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13984 choke me
13985 #else
13986 char (*f) () = $ac_func;
13987 #endif
13988 #ifdef __cplusplus
13989 }
13990 #endif
13991
13992 int
13993 main ()
13994 {
13995 return f != $ac_func;
13996   ;
13997   return 0;
13998 }
13999 _ACEOF
14000 rm -f conftest.$ac_objext conftest$ac_exeext
14001 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14002   (eval $ac_link) 2>conftest.er1
14003   ac_status=$?
14004   grep -v '^ *+' conftest.er1 >conftest.err
14005   rm -f conftest.er1
14006   cat conftest.err >&5
14007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14008   (exit $ac_status); } &&
14009          { ac_try='test -z "$ac_c_werror_flag"
14010                          || test ! -s conftest.err'
14011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14012   (eval $ac_try) 2>&5
14013   ac_status=$?
14014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14015   (exit $ac_status); }; } &&
14016          { ac_try='test -s conftest$ac_exeext'
14017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14018   (eval $ac_try) 2>&5
14019   ac_status=$?
14020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14021   (exit $ac_status); }; }; then
14022   eval "$as_ac_var=yes"
14023 else
14024   echo "$as_me: failed program was:" >&5
14025 sed 's/^/| /' conftest.$ac_ext >&5
14026
14027 eval "$as_ac_var=no"
14028 fi
14029 rm -f conftest.err conftest.$ac_objext \
14030       conftest$ac_exeext conftest.$ac_ext
14031 fi
14032 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14033 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14034 if test `eval echo '${'$as_ac_var'}'` = yes; then
14035   cat >>confdefs.h <<_ACEOF
14036 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14037 _ACEOF
14038  break
14039 fi
14040 done
14041
14042 fi
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strtol strtoul unsetenv
14058 do
14059 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14060 echo "$as_me:$LINENO: checking for $ac_func" >&5
14061 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14062 if eval "test \"\${$as_ac_var+set}\" = set"; then
14063   echo $ECHO_N "(cached) $ECHO_C" >&6
14064 else
14065   cat >conftest.$ac_ext <<_ACEOF
14066 /* confdefs.h.  */
14067 _ACEOF
14068 cat confdefs.h >>conftest.$ac_ext
14069 cat >>conftest.$ac_ext <<_ACEOF
14070 /* end confdefs.h.  */
14071 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14072    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14073 #define $ac_func innocuous_$ac_func
14074
14075 /* System header to define __stub macros and hopefully few prototypes,
14076     which can conflict with char $ac_func (); below.
14077     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14078     <limits.h> exists even on freestanding compilers.  */
14079
14080 #ifdef __STDC__
14081 # include <limits.h>
14082 #else
14083 # include <assert.h>
14084 #endif
14085
14086 #undef $ac_func
14087
14088 /* Override any gcc2 internal prototype to avoid an error.  */
14089 #ifdef __cplusplus
14090 extern "C"
14091 {
14092 #endif
14093 /* We use char because int might match the return type of a gcc2
14094    builtin and then its argument prototype would still apply.  */
14095 char $ac_func ();
14096 /* The GNU C library defines this for functions which it implements
14097     to always fail with ENOSYS.  Some functions are actually named
14098     something starting with __ and the normal name is an alias.  */
14099 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14100 choke me
14101 #else
14102 char (*f) () = $ac_func;
14103 #endif
14104 #ifdef __cplusplus
14105 }
14106 #endif
14107
14108 int
14109 main ()
14110 {
14111 return f != $ac_func;
14112   ;
14113   return 0;
14114 }
14115 _ACEOF
14116 rm -f conftest.$ac_objext conftest$ac_exeext
14117 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14118   (eval $ac_link) 2>conftest.er1
14119   ac_status=$?
14120   grep -v '^ *+' conftest.er1 >conftest.err
14121   rm -f conftest.er1
14122   cat conftest.err >&5
14123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14124   (exit $ac_status); } &&
14125          { ac_try='test -z "$ac_c_werror_flag"
14126                          || test ! -s conftest.err'
14127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14128   (eval $ac_try) 2>&5
14129   ac_status=$?
14130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14131   (exit $ac_status); }; } &&
14132          { ac_try='test -s conftest$ac_exeext'
14133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14134   (eval $ac_try) 2>&5
14135   ac_status=$?
14136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14137   (exit $ac_status); }; }; then
14138   eval "$as_ac_var=yes"
14139 else
14140   echo "$as_me: failed program was:" >&5
14141 sed 's/^/| /' conftest.$ac_ext >&5
14142
14143 eval "$as_ac_var=no"
14144 fi
14145 rm -f conftest.err conftest.$ac_objext \
14146       conftest$ac_exeext conftest.$ac_ext
14147 fi
14148 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14149 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14150 if test `eval echo '${'$as_ac_var'}'` = yes; then
14151   cat >>confdefs.h <<_ACEOF
14152 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14153 _ACEOF
14154
14155 else
14156   case $LIBOBJS in
14157     "$ac_func.$ac_objext"   | \
14158   *" $ac_func.$ac_objext"   | \
14159     "$ac_func.$ac_objext "* | \
14160   *" $ac_func.$ac_objext "* ) ;;
14161   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14162 esac
14163
14164 fi
14165 done
14166
14167
14168
14169 # System's version of getaddrinfo(), if any, may be used only if we found
14170 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14171 # (Note: the AC_TRY_LINK probe fails on Windows, where the available
14172 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14173 # because we want to use our own getaddrinfo.c on Windows anyway.)
14174 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14175     echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14176 echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14177   cat >conftest.$ac_ext <<_ACEOF
14178 /* confdefs.h.  */
14179 _ACEOF
14180 cat confdefs.h >>conftest.$ac_ext
14181 cat >>conftest.$ac_ext <<_ACEOF
14182 /* end confdefs.h.  */
14183
14184 #include <sys/socket.h>
14185 #include <netdb.h>
14186
14187 int
14188 main ()
14189 {
14190 return getaddrinfo("", "", NULL, NULL) ? 0 : 1;
14191   ;
14192   return 0;
14193 }
14194 _ACEOF
14195 rm -f conftest.$ac_objext conftest$ac_exeext
14196 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14197   (eval $ac_link) 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          { ac_try='test -z "$ac_c_werror_flag"
14205                          || test ! -s conftest.err'
14206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14207   (eval $ac_try) 2>&5
14208   ac_status=$?
14209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14210   (exit $ac_status); }; } &&
14211          { ac_try='test -s conftest$ac_exeext'
14212   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14213   (eval $ac_try) 2>&5
14214   ac_status=$?
14215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14216   (exit $ac_status); }; }; then
14217
14218 cat >>confdefs.h <<\_ACEOF
14219 #define HAVE_GETADDRINFO 1
14220 _ACEOF
14221
14222   echo "$as_me:$LINENO: result: yes" >&5
14223 echo "${ECHO_T}yes" >&6
14224 else
14225   echo "$as_me: failed program was:" >&5
14226 sed 's/^/| /' conftest.$ac_ext >&5
14227
14228 echo "$as_me:$LINENO: result: no" >&5
14229 echo "${ECHO_T}no" >&6
14230              case $LIBOBJS in
14231     "getaddrinfo.$ac_objext"   | \
14232   *" getaddrinfo.$ac_objext"   | \
14233     "getaddrinfo.$ac_objext "* | \
14234   *" getaddrinfo.$ac_objext "* ) ;;
14235   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14236 esac
14237
14238 fi
14239 rm -f conftest.err conftest.$ac_objext \
14240       conftest$ac_exeext conftest.$ac_ext
14241 else
14242   case $LIBOBJS in
14243     "getaddrinfo.$ac_objext"   | \
14244   *" getaddrinfo.$ac_objext"   | \
14245     "getaddrinfo.$ac_objext "* | \
14246   *" getaddrinfo.$ac_objext "* ) ;;
14247   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14248 esac
14249
14250 fi
14251
14252 # similarly, use system's getopt_long() only if system provides struct option.
14253 if test x"$ac_cv_type_struct_option" = xyes ; then
14254
14255 for ac_func in getopt_long
14256 do
14257 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14258 echo "$as_me:$LINENO: checking for $ac_func" >&5
14259 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14260 if eval "test \"\${$as_ac_var+set}\" = set"; then
14261   echo $ECHO_N "(cached) $ECHO_C" >&6
14262 else
14263   cat >conftest.$ac_ext <<_ACEOF
14264 /* confdefs.h.  */
14265 _ACEOF
14266 cat confdefs.h >>conftest.$ac_ext
14267 cat >>conftest.$ac_ext <<_ACEOF
14268 /* end confdefs.h.  */
14269 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14270    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14271 #define $ac_func innocuous_$ac_func
14272
14273 /* System header to define __stub macros and hopefully few prototypes,
14274     which can conflict with char $ac_func (); below.
14275     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14276     <limits.h> exists even on freestanding compilers.  */
14277
14278 #ifdef __STDC__
14279 # include <limits.h>
14280 #else
14281 # include <assert.h>
14282 #endif
14283
14284 #undef $ac_func
14285
14286 /* Override any gcc2 internal prototype to avoid an error.  */
14287 #ifdef __cplusplus
14288 extern "C"
14289 {
14290 #endif
14291 /* We use char because int might match the return type of a gcc2
14292    builtin and then its argument prototype would still apply.  */
14293 char $ac_func ();
14294 /* The GNU C library defines this for functions which it implements
14295     to always fail with ENOSYS.  Some functions are actually named
14296     something starting with __ and the normal name is an alias.  */
14297 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14298 choke me
14299 #else
14300 char (*f) () = $ac_func;
14301 #endif
14302 #ifdef __cplusplus
14303 }
14304 #endif
14305
14306 int
14307 main ()
14308 {
14309 return f != $ac_func;
14310   ;
14311   return 0;
14312 }
14313 _ACEOF
14314 rm -f conftest.$ac_objext conftest$ac_exeext
14315 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14316   (eval $ac_link) 2>conftest.er1
14317   ac_status=$?
14318   grep -v '^ *+' conftest.er1 >conftest.err
14319   rm -f conftest.er1
14320   cat conftest.err >&5
14321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14322   (exit $ac_status); } &&
14323          { ac_try='test -z "$ac_c_werror_flag"
14324                          || test ! -s conftest.err'
14325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14326   (eval $ac_try) 2>&5
14327   ac_status=$?
14328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14329   (exit $ac_status); }; } &&
14330          { ac_try='test -s conftest$ac_exeext'
14331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14332   (eval $ac_try) 2>&5
14333   ac_status=$?
14334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14335   (exit $ac_status); }; }; then
14336   eval "$as_ac_var=yes"
14337 else
14338   echo "$as_me: failed program was:" >&5
14339 sed 's/^/| /' conftest.$ac_ext >&5
14340
14341 eval "$as_ac_var=no"
14342 fi
14343 rm -f conftest.err conftest.$ac_objext \
14344       conftest$ac_exeext conftest.$ac_ext
14345 fi
14346 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14347 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14348 if test `eval echo '${'$as_ac_var'}'` = yes; then
14349   cat >>confdefs.h <<_ACEOF
14350 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14351 _ACEOF
14352
14353 else
14354   case $LIBOBJS in
14355     "$ac_func.$ac_objext"   | \
14356   *" $ac_func.$ac_objext"   | \
14357     "$ac_func.$ac_objext "* | \
14358   *" $ac_func.$ac_objext "* ) ;;
14359   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14360 esac
14361
14362 fi
14363 done
14364
14365
14366 else
14367   case $LIBOBJS in
14368     "getopt_long.$ac_objext"   | \
14369   *" getopt_long.$ac_objext"   | \
14370     "getopt_long.$ac_objext "* | \
14371   *" getopt_long.$ac_objext "* ) ;;
14372   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
14373 esac
14374
14375 fi
14376
14377 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
14378 # We override the previous test that said fseeko/ftello didn't exist
14379 # OS tests are also done in include/c.h and port/fseeko.c
14380 case $host_os in bsdi*|netbsd*)
14381 ac_cv_func_fseeko=yes
14382 esac
14383
14384 # Solaris has a very slow qsort in certain cases, so we replace it:
14385 #   http://forum.sun.com/thread.jspa?forumID=4&threadID=7231
14386 # Supposedly it is fixed in Solaris, but not sure which version, and
14387 # no confirmed testing.  2005-12-16
14388 if test "$PORTNAME" = "solaris"; then
14389 case $LIBOBJS in
14390     "qsort.$ac_objext"   | \
14391   *" qsort.$ac_objext"   | \
14392     "qsort.$ac_objext "* | \
14393   *" qsort.$ac_objext "* ) ;;
14394   *) LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
14395 esac
14396
14397 fi
14398
14399 # Win32 support
14400 if test "$PORTNAME" = "win32"; then
14401 case $LIBOBJS in
14402     "gettimeofday.$ac_objext"   | \
14403   *" gettimeofday.$ac_objext"   | \
14404     "gettimeofday.$ac_objext "* | \
14405   *" gettimeofday.$ac_objext "* ) ;;
14406   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
14407 esac
14408
14409 case $LIBOBJS in
14410     "kill.$ac_objext"   | \
14411   *" kill.$ac_objext"   | \
14412     "kill.$ac_objext "* | \
14413   *" kill.$ac_objext "* ) ;;
14414   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
14415 esac
14416
14417 case $LIBOBJS in
14418     "open.$ac_objext"   | \
14419   *" open.$ac_objext"   | \
14420     "open.$ac_objext "* | \
14421   *" open.$ac_objext "* ) ;;
14422   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
14423 esac
14424
14425 case $LIBOBJS in
14426     "rand.$ac_objext"   | \
14427   *" rand.$ac_objext"   | \
14428     "rand.$ac_objext "* | \
14429   *" rand.$ac_objext "* ) ;;
14430   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
14431 esac
14432
14433
14434 cat >>confdefs.h <<\_ACEOF
14435 #define HAVE_SYMLINK 1
14436 _ACEOF
14437
14438 fi
14439
14440 if test "$with_readline" = yes; then
14441   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
14442 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
14443 cat >conftest.$ac_ext <<_ACEOF
14444 /* confdefs.h.  */
14445 _ACEOF
14446 cat confdefs.h >>conftest.$ac_ext
14447 cat >>conftest.$ac_ext <<_ACEOF
14448 /* end confdefs.h.  */
14449 #include <stdio.h>
14450 #ifdef HAVE_READLINE_READLINE_H
14451 # include <readline/readline.h>
14452 #elif defined(HAVE_READLINE_H)
14453 # include <readline.h>
14454 #endif
14455
14456 int
14457 main ()
14458 {
14459 rl_completion_append_character = 'x';
14460   ;
14461   return 0;
14462 }
14463 _ACEOF
14464 rm -f conftest.$ac_objext conftest$ac_exeext
14465 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14466   (eval $ac_link) 2>conftest.er1
14467   ac_status=$?
14468   grep -v '^ *+' conftest.er1 >conftest.err
14469   rm -f conftest.er1
14470   cat conftest.err >&5
14471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14472   (exit $ac_status); } &&
14473          { ac_try='test -z "$ac_c_werror_flag"
14474                          || test ! -s conftest.err'
14475   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14476   (eval $ac_try) 2>&5
14477   ac_status=$?
14478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14479   (exit $ac_status); }; } &&
14480          { ac_try='test -s conftest$ac_exeext'
14481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14482   (eval $ac_try) 2>&5
14483   ac_status=$?
14484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14485   (exit $ac_status); }; }; then
14486   echo "$as_me:$LINENO: result: yes" >&5
14487 echo "${ECHO_T}yes" >&6
14488
14489 cat >>confdefs.h <<\_ACEOF
14490 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
14491 _ACEOF
14492
14493 else
14494   echo "$as_me: failed program was:" >&5
14495 sed 's/^/| /' conftest.$ac_ext >&5
14496
14497 echo "$as_me:$LINENO: result: no" >&5
14498 echo "${ECHO_T}no" >&6
14499 fi
14500 rm -f conftest.err conftest.$ac_objext \
14501       conftest$ac_exeext conftest.$ac_ext
14502
14503
14504 for ac_func in rl_completion_matches rl_filename_completion_function
14505 do
14506 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14507 echo "$as_me:$LINENO: checking for $ac_func" >&5
14508 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14509 if eval "test \"\${$as_ac_var+set}\" = set"; then
14510   echo $ECHO_N "(cached) $ECHO_C" >&6
14511 else
14512   cat >conftest.$ac_ext <<_ACEOF
14513 /* confdefs.h.  */
14514 _ACEOF
14515 cat confdefs.h >>conftest.$ac_ext
14516 cat >>conftest.$ac_ext <<_ACEOF
14517 /* end confdefs.h.  */
14518 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14519    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14520 #define $ac_func innocuous_$ac_func
14521
14522 /* System header to define __stub macros and hopefully few prototypes,
14523     which can conflict with char $ac_func (); below.
14524     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14525     <limits.h> exists even on freestanding compilers.  */
14526
14527 #ifdef __STDC__
14528 # include <limits.h>
14529 #else
14530 # include <assert.h>
14531 #endif
14532
14533 #undef $ac_func
14534
14535 /* Override any gcc2 internal prototype to avoid an error.  */
14536 #ifdef __cplusplus
14537 extern "C"
14538 {
14539 #endif
14540 /* We use char because int might match the return type of a gcc2
14541    builtin and then its argument prototype would still apply.  */
14542 char $ac_func ();
14543 /* The GNU C library defines this for functions which it implements
14544     to always fail with ENOSYS.  Some functions are actually named
14545     something starting with __ and the normal name is an alias.  */
14546 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14547 choke me
14548 #else
14549 char (*f) () = $ac_func;
14550 #endif
14551 #ifdef __cplusplus
14552 }
14553 #endif
14554
14555 int
14556 main ()
14557 {
14558 return f != $ac_func;
14559   ;
14560   return 0;
14561 }
14562 _ACEOF
14563 rm -f conftest.$ac_objext conftest$ac_exeext
14564 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14565   (eval $ac_link) 2>conftest.er1
14566   ac_status=$?
14567   grep -v '^ *+' conftest.er1 >conftest.err
14568   rm -f conftest.er1
14569   cat conftest.err >&5
14570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14571   (exit $ac_status); } &&
14572          { ac_try='test -z "$ac_c_werror_flag"
14573                          || test ! -s conftest.err'
14574   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14575   (eval $ac_try) 2>&5
14576   ac_status=$?
14577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14578   (exit $ac_status); }; } &&
14579          { ac_try='test -s conftest$ac_exeext'
14580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14581   (eval $ac_try) 2>&5
14582   ac_status=$?
14583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14584   (exit $ac_status); }; }; then
14585   eval "$as_ac_var=yes"
14586 else
14587   echo "$as_me: failed program was:" >&5
14588 sed 's/^/| /' conftest.$ac_ext >&5
14589
14590 eval "$as_ac_var=no"
14591 fi
14592 rm -f conftest.err conftest.$ac_objext \
14593       conftest$ac_exeext conftest.$ac_ext
14594 fi
14595 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14596 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14597 if test `eval echo '${'$as_ac_var'}'` = yes; then
14598   cat >>confdefs.h <<_ACEOF
14599 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14600 _ACEOF
14601
14602 fi
14603 done
14604
14605
14606 for ac_func in replace_history_entry
14607 do
14608 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14609 echo "$as_me:$LINENO: checking for $ac_func" >&5
14610 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14611 if eval "test \"\${$as_ac_var+set}\" = set"; then
14612   echo $ECHO_N "(cached) $ECHO_C" >&6
14613 else
14614   cat >conftest.$ac_ext <<_ACEOF
14615 /* confdefs.h.  */
14616 _ACEOF
14617 cat confdefs.h >>conftest.$ac_ext
14618 cat >>conftest.$ac_ext <<_ACEOF
14619 /* end confdefs.h.  */
14620 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14621    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14622 #define $ac_func innocuous_$ac_func
14623
14624 /* System header to define __stub macros and hopefully few prototypes,
14625     which can conflict with char $ac_func (); below.
14626     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14627     <limits.h> exists even on freestanding compilers.  */
14628
14629 #ifdef __STDC__
14630 # include <limits.h>
14631 #else
14632 # include <assert.h>
14633 #endif
14634
14635 #undef $ac_func
14636
14637 /* Override any gcc2 internal prototype to avoid an error.  */
14638 #ifdef __cplusplus
14639 extern "C"
14640 {
14641 #endif
14642 /* We use char because int might match the return type of a gcc2
14643    builtin and then its argument prototype would still apply.  */
14644 char $ac_func ();
14645 /* The GNU C library defines this for functions which it implements
14646     to always fail with ENOSYS.  Some functions are actually named
14647     something starting with __ and the normal name is an alias.  */
14648 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14649 choke me
14650 #else
14651 char (*f) () = $ac_func;
14652 #endif
14653 #ifdef __cplusplus
14654 }
14655 #endif
14656
14657 int
14658 main ()
14659 {
14660 return f != $ac_func;
14661   ;
14662   return 0;
14663 }
14664 _ACEOF
14665 rm -f conftest.$ac_objext conftest$ac_exeext
14666 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14667   (eval $ac_link) 2>conftest.er1
14668   ac_status=$?
14669   grep -v '^ *+' conftest.er1 >conftest.err
14670   rm -f conftest.er1
14671   cat conftest.err >&5
14672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14673   (exit $ac_status); } &&
14674          { ac_try='test -z "$ac_c_werror_flag"
14675                          || test ! -s conftest.err'
14676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14677   (eval $ac_try) 2>&5
14678   ac_status=$?
14679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14680   (exit $ac_status); }; } &&
14681          { ac_try='test -s conftest$ac_exeext'
14682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14683   (eval $ac_try) 2>&5
14684   ac_status=$?
14685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14686   (exit $ac_status); }; }; then
14687   eval "$as_ac_var=yes"
14688 else
14689   echo "$as_me: failed program was:" >&5
14690 sed 's/^/| /' conftest.$ac_ext >&5
14691
14692 eval "$as_ac_var=no"
14693 fi
14694 rm -f conftest.err conftest.$ac_objext \
14695       conftest$ac_exeext conftest.$ac_ext
14696 fi
14697 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14698 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14699 if test `eval echo '${'$as_ac_var'}'` = yes; then
14700   cat >>confdefs.h <<_ACEOF
14701 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14702 _ACEOF
14703
14704 fi
14705 done
14706
14707 fi
14708
14709
14710 echo "$as_me:$LINENO: checking for finite" >&5
14711 echo $ECHO_N "checking for finite... $ECHO_C" >&6
14712 cat >conftest.$ac_ext <<_ACEOF
14713 /* confdefs.h.  */
14714 _ACEOF
14715 cat confdefs.h >>conftest.$ac_ext
14716 cat >>conftest.$ac_ext <<_ACEOF
14717 /* end confdefs.h.  */
14718
14719 #include <math.h>
14720 double glob_double;
14721
14722 int
14723 main ()
14724 {
14725 return finite(glob_double) ? 0 : 1;
14726   ;
14727   return 0;
14728 }
14729 _ACEOF
14730 rm -f conftest.$ac_objext conftest$ac_exeext
14731 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14732   (eval $ac_link) 2>conftest.er1
14733   ac_status=$?
14734   grep -v '^ *+' conftest.er1 >conftest.err
14735   rm -f conftest.er1
14736   cat conftest.err >&5
14737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14738   (exit $ac_status); } &&
14739          { ac_try='test -z "$ac_c_werror_flag"
14740                          || test ! -s conftest.err'
14741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14742   (eval $ac_try) 2>&5
14743   ac_status=$?
14744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14745   (exit $ac_status); }; } &&
14746          { ac_try='test -s conftest$ac_exeext'
14747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14748   (eval $ac_try) 2>&5
14749   ac_status=$?
14750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14751   (exit $ac_status); }; }; then
14752
14753 cat >>confdefs.h <<\_ACEOF
14754 #define HAVE_FINITE 1
14755 _ACEOF
14756
14757 echo "$as_me:$LINENO: result: yes" >&5
14758 echo "${ECHO_T}yes" >&6
14759 else
14760   echo "$as_me: failed program was:" >&5
14761 sed 's/^/| /' conftest.$ac_ext >&5
14762
14763 echo "$as_me:$LINENO: result: no" >&5
14764 echo "${ECHO_T}no" >&6
14765 fi
14766 rm -f conftest.err conftest.$ac_objext \
14767       conftest$ac_exeext conftest.$ac_ext
14768
14769 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
14770 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
14771 cat >conftest.$ac_ext <<_ACEOF
14772 /* confdefs.h.  */
14773 _ACEOF
14774 cat confdefs.h >>conftest.$ac_ext
14775 cat >>conftest.$ac_ext <<_ACEOF
14776 /* end confdefs.h.  */
14777 #include <setjmp.h>
14778 int
14779 main ()
14780 {
14781 sigjmp_buf x; sigsetjmp(x, 1);
14782   ;
14783   return 0;
14784 }
14785 _ACEOF
14786 rm -f conftest.$ac_objext conftest$ac_exeext
14787 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14788   (eval $ac_link) 2>conftest.er1
14789   ac_status=$?
14790   grep -v '^ *+' conftest.er1 >conftest.err
14791   rm -f conftest.er1
14792   cat conftest.err >&5
14793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14794   (exit $ac_status); } &&
14795          { ac_try='test -z "$ac_c_werror_flag"
14796                          || test ! -s conftest.err'
14797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14798   (eval $ac_try) 2>&5
14799   ac_status=$?
14800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14801   (exit $ac_status); }; } &&
14802          { ac_try='test -s conftest$ac_exeext'
14803   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14804   (eval $ac_try) 2>&5
14805   ac_status=$?
14806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14807   (exit $ac_status); }; }; then
14808
14809 cat >>confdefs.h <<\_ACEOF
14810 #define HAVE_SIGSETJMP 1
14811 _ACEOF
14812
14813 echo "$as_me:$LINENO: result: yes" >&5
14814 echo "${ECHO_T}yes" >&6
14815 else
14816   echo "$as_me: failed program was:" >&5
14817 sed 's/^/| /' conftest.$ac_ext >&5
14818
14819 echo "$as_me:$LINENO: result: no" >&5
14820 echo "${ECHO_T}no" >&6
14821 fi
14822 rm -f conftest.err conftest.$ac_objext \
14823       conftest$ac_exeext conftest.$ac_ext
14824
14825 echo "$as_me:$LINENO: checking for syslog" >&5
14826 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
14827 if test "${ac_cv_func_syslog+set}" = set; then
14828   echo $ECHO_N "(cached) $ECHO_C" >&6
14829 else
14830   cat >conftest.$ac_ext <<_ACEOF
14831 /* confdefs.h.  */
14832 _ACEOF
14833 cat confdefs.h >>conftest.$ac_ext
14834 cat >>conftest.$ac_ext <<_ACEOF
14835 /* end confdefs.h.  */
14836 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
14837    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14838 #define syslog innocuous_syslog
14839
14840 /* System header to define __stub macros and hopefully few prototypes,
14841     which can conflict with char syslog (); below.
14842     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14843     <limits.h> exists even on freestanding compilers.  */
14844
14845 #ifdef __STDC__
14846 # include <limits.h>
14847 #else
14848 # include <assert.h>
14849 #endif
14850
14851 #undef syslog
14852
14853 /* Override any gcc2 internal prototype to avoid an error.  */
14854 #ifdef __cplusplus
14855 extern "C"
14856 {
14857 #endif
14858 /* We use char because int might match the return type of a gcc2
14859    builtin and then its argument prototype would still apply.  */
14860 char syslog ();
14861 /* The GNU C library defines this for functions which it implements
14862     to always fail with ENOSYS.  Some functions are actually named
14863     something starting with __ and the normal name is an alias.  */
14864 #if defined (__stub_syslog) || defined (__stub___syslog)
14865 choke me
14866 #else
14867 char (*f) () = syslog;
14868 #endif
14869 #ifdef __cplusplus
14870 }
14871 #endif
14872
14873 int
14874 main ()
14875 {
14876 return f != syslog;
14877   ;
14878   return 0;
14879 }
14880 _ACEOF
14881 rm -f conftest.$ac_objext conftest$ac_exeext
14882 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14883   (eval $ac_link) 2>conftest.er1
14884   ac_status=$?
14885   grep -v '^ *+' conftest.er1 >conftest.err
14886   rm -f conftest.er1
14887   cat conftest.err >&5
14888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14889   (exit $ac_status); } &&
14890          { ac_try='test -z "$ac_c_werror_flag"
14891                          || test ! -s conftest.err'
14892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14893   (eval $ac_try) 2>&5
14894   ac_status=$?
14895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14896   (exit $ac_status); }; } &&
14897          { ac_try='test -s conftest$ac_exeext'
14898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14899   (eval $ac_try) 2>&5
14900   ac_status=$?
14901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14902   (exit $ac_status); }; }; then
14903   ac_cv_func_syslog=yes
14904 else
14905   echo "$as_me: failed program was:" >&5
14906 sed 's/^/| /' conftest.$ac_ext >&5
14907
14908 ac_cv_func_syslog=no
14909 fi
14910 rm -f conftest.err conftest.$ac_objext \
14911       conftest$ac_exeext conftest.$ac_ext
14912 fi
14913 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
14914 echo "${ECHO_T}$ac_cv_func_syslog" >&6
14915 if test $ac_cv_func_syslog = yes; then
14916   if test "${ac_cv_header_syslog_h+set}" = set; then
14917   echo "$as_me:$LINENO: checking for syslog.h" >&5
14918 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
14919 if test "${ac_cv_header_syslog_h+set}" = set; then
14920   echo $ECHO_N "(cached) $ECHO_C" >&6
14921 fi
14922 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
14923 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
14924 else
14925   # Is the header compilable?
14926 echo "$as_me:$LINENO: checking syslog.h usability" >&5
14927 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
14928 cat >conftest.$ac_ext <<_ACEOF
14929 /* confdefs.h.  */
14930 _ACEOF
14931 cat confdefs.h >>conftest.$ac_ext
14932 cat >>conftest.$ac_ext <<_ACEOF
14933 /* end confdefs.h.  */
14934 $ac_includes_default
14935 #include <syslog.h>
14936 _ACEOF
14937 rm -f conftest.$ac_objext
14938 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14939   (eval $ac_compile) 2>conftest.er1
14940   ac_status=$?
14941   grep -v '^ *+' conftest.er1 >conftest.err
14942   rm -f conftest.er1
14943   cat conftest.err >&5
14944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14945   (exit $ac_status); } &&
14946          { ac_try='test -z "$ac_c_werror_flag"
14947                          || test ! -s conftest.err'
14948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14949   (eval $ac_try) 2>&5
14950   ac_status=$?
14951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14952   (exit $ac_status); }; } &&
14953          { ac_try='test -s conftest.$ac_objext'
14954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14955   (eval $ac_try) 2>&5
14956   ac_status=$?
14957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14958   (exit $ac_status); }; }; then
14959   ac_header_compiler=yes
14960 else
14961   echo "$as_me: failed program was:" >&5
14962 sed 's/^/| /' conftest.$ac_ext >&5
14963
14964 ac_header_compiler=no
14965 fi
14966 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14967 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14968 echo "${ECHO_T}$ac_header_compiler" >&6
14969
14970 # Is the header present?
14971 echo "$as_me:$LINENO: checking syslog.h presence" >&5
14972 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
14973 cat >conftest.$ac_ext <<_ACEOF
14974 /* confdefs.h.  */
14975 _ACEOF
14976 cat confdefs.h >>conftest.$ac_ext
14977 cat >>conftest.$ac_ext <<_ACEOF
14978 /* end confdefs.h.  */
14979 #include <syslog.h>
14980 _ACEOF
14981 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14982   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14983   ac_status=$?
14984   grep -v '^ *+' conftest.er1 >conftest.err
14985   rm -f conftest.er1
14986   cat conftest.err >&5
14987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14988   (exit $ac_status); } >/dev/null; then
14989   if test -s conftest.err; then
14990     ac_cpp_err=$ac_c_preproc_warn_flag
14991     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
14992   else
14993     ac_cpp_err=
14994   fi
14995 else
14996   ac_cpp_err=yes
14997 fi
14998 if test -z "$ac_cpp_err"; then
14999   ac_header_preproc=yes
15000 else
15001   echo "$as_me: failed program was:" >&5
15002 sed 's/^/| /' conftest.$ac_ext >&5
15003
15004   ac_header_preproc=no
15005 fi
15006 rm -f conftest.err conftest.$ac_ext
15007 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15008 echo "${ECHO_T}$ac_header_preproc" >&6
15009
15010 # So?  What about this header?
15011 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15012   yes:no: )
15013     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15014 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15015     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15016 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15017     ac_header_preproc=yes
15018     ;;
15019   no:yes:* )
15020     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15021 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15022     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15023 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15024     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15025 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15026     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15027 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15028     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15029 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15030     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15031 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15032     (
15033       cat <<\_ASBOX
15034 ## ---------------------------------------- ##
15035 ## Report this to pgsql-bugs@postgresql.org ##
15036 ## ---------------------------------------- ##
15037 _ASBOX
15038     ) |
15039       sed "s/^/$as_me: WARNING:     /" >&2
15040     ;;
15041 esac
15042 echo "$as_me:$LINENO: checking for syslog.h" >&5
15043 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15044 if test "${ac_cv_header_syslog_h+set}" = set; then
15045   echo $ECHO_N "(cached) $ECHO_C" >&6
15046 else
15047   ac_cv_header_syslog_h=$ac_header_preproc
15048 fi
15049 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15050 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15051
15052 fi
15053 if test $ac_cv_header_syslog_h = yes; then
15054
15055 cat >>confdefs.h <<\_ACEOF
15056 #define HAVE_SYSLOG 1
15057 _ACEOF
15058
15059 fi
15060
15061
15062 fi
15063
15064
15065 echo "$as_me:$LINENO: checking for optreset" >&5
15066 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15067 if test "${pgac_cv_var_int_optreset+set}" = set; then
15068   echo $ECHO_N "(cached) $ECHO_C" >&6
15069 else
15070   cat >conftest.$ac_ext <<_ACEOF
15071 /* confdefs.h.  */
15072 _ACEOF
15073 cat confdefs.h >>conftest.$ac_ext
15074 cat >>conftest.$ac_ext <<_ACEOF
15075 /* end confdefs.h.  */
15076 #include <unistd.h>
15077 int
15078 main ()
15079 {
15080 extern int optreset; optreset = 1;
15081   ;
15082   return 0;
15083 }
15084 _ACEOF
15085 rm -f conftest.$ac_objext conftest$ac_exeext
15086 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15087   (eval $ac_link) 2>conftest.er1
15088   ac_status=$?
15089   grep -v '^ *+' conftest.er1 >conftest.err
15090   rm -f conftest.er1
15091   cat conftest.err >&5
15092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15093   (exit $ac_status); } &&
15094          { ac_try='test -z "$ac_c_werror_flag"
15095                          || test ! -s conftest.err'
15096   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15097   (eval $ac_try) 2>&5
15098   ac_status=$?
15099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15100   (exit $ac_status); }; } &&
15101          { ac_try='test -s conftest$ac_exeext'
15102   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15103   (eval $ac_try) 2>&5
15104   ac_status=$?
15105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15106   (exit $ac_status); }; }; then
15107   pgac_cv_var_int_optreset=yes
15108 else
15109   echo "$as_me: failed program was:" >&5
15110 sed 's/^/| /' conftest.$ac_ext >&5
15111
15112 pgac_cv_var_int_optreset=no
15113 fi
15114 rm -f conftest.err conftest.$ac_objext \
15115       conftest$ac_exeext conftest.$ac_ext
15116 fi
15117 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15118 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15119 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15120
15121 cat >>confdefs.h <<\_ACEOF
15122 #define HAVE_INT_OPTRESET 1
15123 _ACEOF
15124
15125 fi
15126
15127
15128
15129 for ac_func in strtoll strtoq
15130 do
15131 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15132 echo "$as_me:$LINENO: checking for $ac_func" >&5
15133 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15134 if eval "test \"\${$as_ac_var+set}\" = set"; then
15135   echo $ECHO_N "(cached) $ECHO_C" >&6
15136 else
15137   cat >conftest.$ac_ext <<_ACEOF
15138 /* confdefs.h.  */
15139 _ACEOF
15140 cat confdefs.h >>conftest.$ac_ext
15141 cat >>conftest.$ac_ext <<_ACEOF
15142 /* end confdefs.h.  */
15143 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15144    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15145 #define $ac_func innocuous_$ac_func
15146
15147 /* System header to define __stub macros and hopefully few prototypes,
15148     which can conflict with char $ac_func (); below.
15149     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15150     <limits.h> exists even on freestanding compilers.  */
15151
15152 #ifdef __STDC__
15153 # include <limits.h>
15154 #else
15155 # include <assert.h>
15156 #endif
15157
15158 #undef $ac_func
15159
15160 /* Override any gcc2 internal prototype to avoid an error.  */
15161 #ifdef __cplusplus
15162 extern "C"
15163 {
15164 #endif
15165 /* We use char because int might match the return type of a gcc2
15166    builtin and then its argument prototype would still apply.  */
15167 char $ac_func ();
15168 /* The GNU C library defines this for functions which it implements
15169     to always fail with ENOSYS.  Some functions are actually named
15170     something starting with __ and the normal name is an alias.  */
15171 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15172 choke me
15173 #else
15174 char (*f) () = $ac_func;
15175 #endif
15176 #ifdef __cplusplus
15177 }
15178 #endif
15179
15180 int
15181 main ()
15182 {
15183 return f != $ac_func;
15184   ;
15185   return 0;
15186 }
15187 _ACEOF
15188 rm -f conftest.$ac_objext conftest$ac_exeext
15189 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15190   (eval $ac_link) 2>conftest.er1
15191   ac_status=$?
15192   grep -v '^ *+' conftest.er1 >conftest.err
15193   rm -f conftest.er1
15194   cat conftest.err >&5
15195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15196   (exit $ac_status); } &&
15197          { ac_try='test -z "$ac_c_werror_flag"
15198                          || test ! -s conftest.err'
15199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15200   (eval $ac_try) 2>&5
15201   ac_status=$?
15202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15203   (exit $ac_status); }; } &&
15204          { ac_try='test -s conftest$ac_exeext'
15205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15206   (eval $ac_try) 2>&5
15207   ac_status=$?
15208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15209   (exit $ac_status); }; }; then
15210   eval "$as_ac_var=yes"
15211 else
15212   echo "$as_me: failed program was:" >&5
15213 sed 's/^/| /' conftest.$ac_ext >&5
15214
15215 eval "$as_ac_var=no"
15216 fi
15217 rm -f conftest.err conftest.$ac_objext \
15218       conftest$ac_exeext conftest.$ac_ext
15219 fi
15220 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15221 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15222 if test `eval echo '${'$as_ac_var'}'` = yes; then
15223   cat >>confdefs.h <<_ACEOF
15224 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15225 _ACEOF
15226  break
15227 fi
15228 done
15229
15230
15231
15232 for ac_func in strtoull strtouq
15233 do
15234 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15235 echo "$as_me:$LINENO: checking for $ac_func" >&5
15236 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15237 if eval "test \"\${$as_ac_var+set}\" = set"; then
15238   echo $ECHO_N "(cached) $ECHO_C" >&6
15239 else
15240   cat >conftest.$ac_ext <<_ACEOF
15241 /* confdefs.h.  */
15242 _ACEOF
15243 cat confdefs.h >>conftest.$ac_ext
15244 cat >>conftest.$ac_ext <<_ACEOF
15245 /* end confdefs.h.  */
15246 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15247    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15248 #define $ac_func innocuous_$ac_func
15249
15250 /* System header to define __stub macros and hopefully few prototypes,
15251     which can conflict with char $ac_func (); below.
15252     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15253     <limits.h> exists even on freestanding compilers.  */
15254
15255 #ifdef __STDC__
15256 # include <limits.h>
15257 #else
15258 # include <assert.h>
15259 #endif
15260
15261 #undef $ac_func
15262
15263 /* Override any gcc2 internal prototype to avoid an error.  */
15264 #ifdef __cplusplus
15265 extern "C"
15266 {
15267 #endif
15268 /* We use char because int might match the return type of a gcc2
15269    builtin and then its argument prototype would still apply.  */
15270 char $ac_func ();
15271 /* The GNU C library defines this for functions which it implements
15272     to always fail with ENOSYS.  Some functions are actually named
15273     something starting with __ and the normal name is an alias.  */
15274 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15275 choke me
15276 #else
15277 char (*f) () = $ac_func;
15278 #endif
15279 #ifdef __cplusplus
15280 }
15281 #endif
15282
15283 int
15284 main ()
15285 {
15286 return f != $ac_func;
15287   ;
15288   return 0;
15289 }
15290 _ACEOF
15291 rm -f conftest.$ac_objext conftest$ac_exeext
15292 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15293   (eval $ac_link) 2>conftest.er1
15294   ac_status=$?
15295   grep -v '^ *+' conftest.er1 >conftest.err
15296   rm -f conftest.er1
15297   cat conftest.err >&5
15298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15299   (exit $ac_status); } &&
15300          { ac_try='test -z "$ac_c_werror_flag"
15301                          || test ! -s conftest.err'
15302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15303   (eval $ac_try) 2>&5
15304   ac_status=$?
15305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15306   (exit $ac_status); }; } &&
15307          { ac_try='test -s conftest$ac_exeext'
15308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15309   (eval $ac_try) 2>&5
15310   ac_status=$?
15311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15312   (exit $ac_status); }; }; then
15313   eval "$as_ac_var=yes"
15314 else
15315   echo "$as_me: failed program was:" >&5
15316 sed 's/^/| /' conftest.$ac_ext >&5
15317
15318 eval "$as_ac_var=no"
15319 fi
15320 rm -f conftest.err conftest.$ac_objext \
15321       conftest$ac_exeext conftest.$ac_ext
15322 fi
15323 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15324 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15325 if test `eval echo '${'$as_ac_var'}'` = yes; then
15326   cat >>confdefs.h <<_ACEOF
15327 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15328 _ACEOF
15329  break
15330 fi
15331 done
15332
15333
15334 # Check for one of atexit() or on_exit()
15335
15336 for ac_func in atexit
15337 do
15338 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15339 echo "$as_me:$LINENO: checking for $ac_func" >&5
15340 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15341 if eval "test \"\${$as_ac_var+set}\" = set"; then
15342   echo $ECHO_N "(cached) $ECHO_C" >&6
15343 else
15344   cat >conftest.$ac_ext <<_ACEOF
15345 /* confdefs.h.  */
15346 _ACEOF
15347 cat confdefs.h >>conftest.$ac_ext
15348 cat >>conftest.$ac_ext <<_ACEOF
15349 /* end confdefs.h.  */
15350 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15351    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15352 #define $ac_func innocuous_$ac_func
15353
15354 /* System header to define __stub macros and hopefully few prototypes,
15355     which can conflict with char $ac_func (); below.
15356     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15357     <limits.h> exists even on freestanding compilers.  */
15358
15359 #ifdef __STDC__
15360 # include <limits.h>
15361 #else
15362 # include <assert.h>
15363 #endif
15364
15365 #undef $ac_func
15366
15367 /* Override any gcc2 internal prototype to avoid an error.  */
15368 #ifdef __cplusplus
15369 extern "C"
15370 {
15371 #endif
15372 /* We use char because int might match the return type of a gcc2
15373    builtin and then its argument prototype would still apply.  */
15374 char $ac_func ();
15375 /* The GNU C library defines this for functions which it implements
15376     to always fail with ENOSYS.  Some functions are actually named
15377     something starting with __ and the normal name is an alias.  */
15378 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15379 choke me
15380 #else
15381 char (*f) () = $ac_func;
15382 #endif
15383 #ifdef __cplusplus
15384 }
15385 #endif
15386
15387 int
15388 main ()
15389 {
15390 return f != $ac_func;
15391   ;
15392   return 0;
15393 }
15394 _ACEOF
15395 rm -f conftest.$ac_objext conftest$ac_exeext
15396 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15397   (eval $ac_link) 2>conftest.er1
15398   ac_status=$?
15399   grep -v '^ *+' conftest.er1 >conftest.err
15400   rm -f conftest.er1
15401   cat conftest.err >&5
15402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15403   (exit $ac_status); } &&
15404          { ac_try='test -z "$ac_c_werror_flag"
15405                          || test ! -s conftest.err'
15406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15407   (eval $ac_try) 2>&5
15408   ac_status=$?
15409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15410   (exit $ac_status); }; } &&
15411          { ac_try='test -s conftest$ac_exeext'
15412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15413   (eval $ac_try) 2>&5
15414   ac_status=$?
15415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15416   (exit $ac_status); }; }; then
15417   eval "$as_ac_var=yes"
15418 else
15419   echo "$as_me: failed program was:" >&5
15420 sed 's/^/| /' conftest.$ac_ext >&5
15421
15422 eval "$as_ac_var=no"
15423 fi
15424 rm -f conftest.err conftest.$ac_objext \
15425       conftest$ac_exeext conftest.$ac_ext
15426 fi
15427 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15428 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15429 if test `eval echo '${'$as_ac_var'}'` = yes; then
15430   cat >>confdefs.h <<_ACEOF
15431 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15432 _ACEOF
15433
15434 else
15435
15436 for ac_func in on_exit
15437 do
15438 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15439 echo "$as_me:$LINENO: checking for $ac_func" >&5
15440 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15441 if eval "test \"\${$as_ac_var+set}\" = set"; then
15442   echo $ECHO_N "(cached) $ECHO_C" >&6
15443 else
15444   cat >conftest.$ac_ext <<_ACEOF
15445 /* confdefs.h.  */
15446 _ACEOF
15447 cat confdefs.h >>conftest.$ac_ext
15448 cat >>conftest.$ac_ext <<_ACEOF
15449 /* end confdefs.h.  */
15450 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15451    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15452 #define $ac_func innocuous_$ac_func
15453
15454 /* System header to define __stub macros and hopefully few prototypes,
15455     which can conflict with char $ac_func (); below.
15456     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15457     <limits.h> exists even on freestanding compilers.  */
15458
15459 #ifdef __STDC__
15460 # include <limits.h>
15461 #else
15462 # include <assert.h>
15463 #endif
15464
15465 #undef $ac_func
15466
15467 /* Override any gcc2 internal prototype to avoid an error.  */
15468 #ifdef __cplusplus
15469 extern "C"
15470 {
15471 #endif
15472 /* We use char because int might match the return type of a gcc2
15473    builtin and then its argument prototype would still apply.  */
15474 char $ac_func ();
15475 /* The GNU C library defines this for functions which it implements
15476     to always fail with ENOSYS.  Some functions are actually named
15477     something starting with __ and the normal name is an alias.  */
15478 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15479 choke me
15480 #else
15481 char (*f) () = $ac_func;
15482 #endif
15483 #ifdef __cplusplus
15484 }
15485 #endif
15486
15487 int
15488 main ()
15489 {
15490 return f != $ac_func;
15491   ;
15492   return 0;
15493 }
15494 _ACEOF
15495 rm -f conftest.$ac_objext conftest$ac_exeext
15496 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15497   (eval $ac_link) 2>conftest.er1
15498   ac_status=$?
15499   grep -v '^ *+' conftest.er1 >conftest.err
15500   rm -f conftest.er1
15501   cat conftest.err >&5
15502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15503   (exit $ac_status); } &&
15504          { ac_try='test -z "$ac_c_werror_flag"
15505                          || test ! -s conftest.err'
15506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15507   (eval $ac_try) 2>&5
15508   ac_status=$?
15509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15510   (exit $ac_status); }; } &&
15511          { ac_try='test -s conftest$ac_exeext'
15512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15513   (eval $ac_try) 2>&5
15514   ac_status=$?
15515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15516   (exit $ac_status); }; }; then
15517   eval "$as_ac_var=yes"
15518 else
15519   echo "$as_me: failed program was:" >&5
15520 sed 's/^/| /' conftest.$ac_ext >&5
15521
15522 eval "$as_ac_var=no"
15523 fi
15524 rm -f conftest.err conftest.$ac_objext \
15525       conftest$ac_exeext conftest.$ac_ext
15526 fi
15527 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15528 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15529 if test `eval echo '${'$as_ac_var'}'` = yes; then
15530   cat >>confdefs.h <<_ACEOF
15531 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15532 _ACEOF
15533
15534 else
15535   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
15536 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
15537    { (exit 1); exit 1; }; }
15538 fi
15539 done
15540
15541 fi
15542 done
15543
15544
15545 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15546 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
15547 if test "${ac_cv_sys_largefile_source+set}" = set; then
15548   echo $ECHO_N "(cached) $ECHO_C" >&6
15549 else
15550   while :; do
15551   ac_cv_sys_largefile_source=no
15552   cat >conftest.$ac_ext <<_ACEOF
15553 /* confdefs.h.  */
15554 _ACEOF
15555 cat confdefs.h >>conftest.$ac_ext
15556 cat >>conftest.$ac_ext <<_ACEOF
15557 /* end confdefs.h.  */
15558 #include <stdio.h>
15559 int
15560 main ()
15561 {
15562 return !fseeko;
15563   ;
15564   return 0;
15565 }
15566 _ACEOF
15567 rm -f conftest.$ac_objext
15568 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15569   (eval $ac_compile) 2>conftest.er1
15570   ac_status=$?
15571   grep -v '^ *+' conftest.er1 >conftest.err
15572   rm -f conftest.er1
15573   cat conftest.err >&5
15574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15575   (exit $ac_status); } &&
15576          { ac_try='test -z "$ac_c_werror_flag"
15577                          || test ! -s conftest.err'
15578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15579   (eval $ac_try) 2>&5
15580   ac_status=$?
15581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15582   (exit $ac_status); }; } &&
15583          { ac_try='test -s conftest.$ac_objext'
15584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15585   (eval $ac_try) 2>&5
15586   ac_status=$?
15587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15588   (exit $ac_status); }; }; then
15589   break
15590 else
15591   echo "$as_me: failed program was:" >&5
15592 sed 's/^/| /' conftest.$ac_ext >&5
15593
15594 fi
15595 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15596   cat >conftest.$ac_ext <<_ACEOF
15597 /* confdefs.h.  */
15598 _ACEOF
15599 cat confdefs.h >>conftest.$ac_ext
15600 cat >>conftest.$ac_ext <<_ACEOF
15601 /* end confdefs.h.  */
15602 #define _LARGEFILE_SOURCE 1
15603 #include <stdio.h>
15604 int
15605 main ()
15606 {
15607 return !fseeko;
15608   ;
15609   return 0;
15610 }
15611 _ACEOF
15612 rm -f conftest.$ac_objext
15613 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15614   (eval $ac_compile) 2>conftest.er1
15615   ac_status=$?
15616   grep -v '^ *+' conftest.er1 >conftest.err
15617   rm -f conftest.er1
15618   cat conftest.err >&5
15619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15620   (exit $ac_status); } &&
15621          { ac_try='test -z "$ac_c_werror_flag"
15622                          || test ! -s conftest.err'
15623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15624   (eval $ac_try) 2>&5
15625   ac_status=$?
15626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15627   (exit $ac_status); }; } &&
15628          { ac_try='test -s conftest.$ac_objext'
15629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15630   (eval $ac_try) 2>&5
15631   ac_status=$?
15632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15633   (exit $ac_status); }; }; then
15634   ac_cv_sys_largefile_source=1; break
15635 else
15636   echo "$as_me: failed program was:" >&5
15637 sed 's/^/| /' conftest.$ac_ext >&5
15638
15639 fi
15640 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15641   break
15642 done
15643 fi
15644 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
15645 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
15646 if test "$ac_cv_sys_largefile_source" != no; then
15647
15648 cat >>confdefs.h <<_ACEOF
15649 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15650 _ACEOF
15651
15652 fi
15653 rm -f conftest*
15654
15655 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15656 # in glibc 2.1.3, but that breaks too many other things.
15657 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15658 echo "$as_me:$LINENO: checking for fseeko" >&5
15659 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
15660 if test "${ac_cv_func_fseeko+set}" = set; then
15661   echo $ECHO_N "(cached) $ECHO_C" >&6
15662 else
15663   cat >conftest.$ac_ext <<_ACEOF
15664 /* confdefs.h.  */
15665 _ACEOF
15666 cat confdefs.h >>conftest.$ac_ext
15667 cat >>conftest.$ac_ext <<_ACEOF
15668 /* end confdefs.h.  */
15669 #include <stdio.h>
15670 int
15671 main ()
15672 {
15673 return fseeko && fseeko (stdin, 0, 0);
15674   ;
15675   return 0;
15676 }
15677 _ACEOF
15678 rm -f conftest.$ac_objext conftest$ac_exeext
15679 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15680   (eval $ac_link) 2>conftest.er1
15681   ac_status=$?
15682   grep -v '^ *+' conftest.er1 >conftest.err
15683   rm -f conftest.er1
15684   cat conftest.err >&5
15685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15686   (exit $ac_status); } &&
15687          { ac_try='test -z "$ac_c_werror_flag"
15688                          || test ! -s conftest.err'
15689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15690   (eval $ac_try) 2>&5
15691   ac_status=$?
15692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15693   (exit $ac_status); }; } &&
15694          { ac_try='test -s conftest$ac_exeext'
15695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15696   (eval $ac_try) 2>&5
15697   ac_status=$?
15698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15699   (exit $ac_status); }; }; then
15700   ac_cv_func_fseeko=yes
15701 else
15702   echo "$as_me: failed program was:" >&5
15703 sed 's/^/| /' conftest.$ac_ext >&5
15704
15705 ac_cv_func_fseeko=no
15706 fi
15707 rm -f conftest.err conftest.$ac_objext \
15708       conftest$ac_exeext conftest.$ac_ext
15709 fi
15710 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
15711 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
15712 if test $ac_cv_func_fseeko = yes; then
15713
15714 cat >>confdefs.h <<\_ACEOF
15715 #define HAVE_FSEEKO 1
15716 _ACEOF
15717
15718 fi
15719
15720
15721 #
15722 # Pthreads
15723 #
15724 # For each platform, we need to know about any special compile and link
15725 # libraries, and whether the normal C function names are thread-safe.
15726 # See the comment at the top of src/port/thread.c for more information.
15727 #
15728 if test "$enable_thread_safety" = yes; then
15729
15730
15731
15732
15733 ac_ext=c
15734 ac_cpp='$CPP $CPPFLAGS'
15735 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15736 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15737 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15738
15739 acx_pthread_ok=no
15740
15741 # We used to check for pthread.h first, but this fails if pthread.h
15742 # requires special compiler flags (e.g. on True64 or Sequent).
15743 # It gets checked for in the link test anyway.
15744
15745 # First of all, check if the user has set any of the PTHREAD_LIBS,
15746 # etcetera environment variables, and if threads linking works using
15747 # them:
15748 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
15749         save_CFLAGS="$CFLAGS"
15750         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
15751         save_LIBS="$LIBS"
15752         LIBS="$PTHREAD_LIBS $LIBS"
15753         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
15754 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
15755         cat >conftest.$ac_ext <<_ACEOF
15756 /* confdefs.h.  */
15757 _ACEOF
15758 cat confdefs.h >>conftest.$ac_ext
15759 cat >>conftest.$ac_ext <<_ACEOF
15760 /* end confdefs.h.  */
15761
15762 /* Override any gcc2 internal prototype to avoid an error.  */
15763 #ifdef __cplusplus
15764 extern "C"
15765 #endif
15766 /* We use char because int might match the return type of a gcc2
15767    builtin and then its argument prototype would still apply.  */
15768 char pthread_join ();
15769 int
15770 main ()
15771 {
15772 pthread_join ();
15773   ;
15774   return 0;
15775 }
15776 _ACEOF
15777 rm -f conftest.$ac_objext conftest$ac_exeext
15778 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15779   (eval $ac_link) 2>conftest.er1
15780   ac_status=$?
15781   grep -v '^ *+' conftest.er1 >conftest.err
15782   rm -f conftest.er1
15783   cat conftest.err >&5
15784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15785   (exit $ac_status); } &&
15786          { ac_try='test -z "$ac_c_werror_flag"
15787                          || test ! -s conftest.err'
15788   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15789   (eval $ac_try) 2>&5
15790   ac_status=$?
15791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15792   (exit $ac_status); }; } &&
15793          { ac_try='test -s conftest$ac_exeext'
15794   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15795   (eval $ac_try) 2>&5
15796   ac_status=$?
15797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15798   (exit $ac_status); }; }; then
15799   acx_pthread_ok=yes
15800 else
15801   echo "$as_me: failed program was:" >&5
15802 sed 's/^/| /' conftest.$ac_ext >&5
15803
15804 fi
15805 rm -f conftest.err conftest.$ac_objext \
15806       conftest$ac_exeext conftest.$ac_ext
15807         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
15808 echo "${ECHO_T}$acx_pthread_ok" >&6
15809         if test x"$acx_pthread_ok" = xno; then
15810                 PTHREAD_LIBS=""
15811                 PTHREAD_CFLAGS=""
15812         fi
15813         LIBS="$save_LIBS"
15814         CFLAGS="$save_CFLAGS"
15815 fi
15816
15817 # We must check for the threads library under a number of different
15818 # names; the ordering is very important because some systems
15819 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
15820 # libraries is broken (non-POSIX).
15821
15822 # Create a list of thread flags to try.  Items starting with a "-" are
15823 # C compiler flags, and other items are library names, except for "none"
15824 # which indicates that we try without any flags at all, and "pthread-config"
15825 # which is a program returning the flags for the Pth emulation library.
15826
15827 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
15828
15829 # The ordering *is* (sometimes) important.  Some notes on the
15830 # individual items follow:
15831
15832 # pthreads: AIX (must check this before -lpthread)
15833 # none: in case threads are in libc; should be tried before -Kthread and
15834 #       other compiler flags to prevent continual compiler warnings
15835 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
15836 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
15837 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
15838 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
15839 # -pthreads: Solaris/gcc
15840 # -mthreads: Mingw32/gcc, Lynx/gcc
15841 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
15842 #      doesn't hurt to check since this sometimes defines pthreads too;
15843 #      also defines -D_REENTRANT)
15844 # pthread: Linux, etcetera
15845 # --thread-safe: KAI C++
15846 # pthread-config: use pthread-config program (for GNU Pth library)
15847
15848 case "${host_cpu}-${host_os}" in
15849         *solaris*)
15850
15851         # On Solaris (at least, for some versions), libc contains stubbed
15852         # (non-functional) versions of the pthreads routines, so link-based
15853         # tests will erroneously succeed.  (We need to link with -pthread or
15854         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
15855         # a function called by this macro, so we could check for that, but
15856         # who knows whether they'll stub that too in a future libc.)  So,
15857         # we'll just look for -pthreads and -lpthread first:
15858
15859         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
15860         ;;
15861 esac
15862
15863 if test x"$acx_pthread_ok" = xno; then
15864 for flag in $acx_pthread_flags; do
15865
15866         tryPTHREAD_CFLAGS=""
15867         tryPTHREAD_LIBS=""
15868         case $flag in
15869                 none)
15870                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
15871 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
15872                 ;;
15873
15874                 -*)
15875                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
15876 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
15877                 tryPTHREAD_CFLAGS="$flag"
15878                 ;;
15879
15880                 pthread-config)
15881                 # skip this if we already have flags defined, for PostgreSQL
15882                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
15883                 # Extract the first word of "pthread-config", so it can be a program name with args.
15884 set dummy pthread-config; ac_word=$2
15885 echo "$as_me:$LINENO: checking for $ac_word" >&5
15886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15887 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
15888   echo $ECHO_N "(cached) $ECHO_C" >&6
15889 else
15890   if test -n "$acx_pthread_config"; then
15891   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
15892 else
15893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15894 for as_dir in $PATH
15895 do
15896   IFS=$as_save_IFS
15897   test -z "$as_dir" && as_dir=.
15898   for ac_exec_ext in '' $ac_executable_extensions; do
15899   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15900     ac_cv_prog_acx_pthread_config="yes"
15901     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15902     break 2
15903   fi
15904 done
15905 done
15906
15907   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
15908 fi
15909 fi
15910 acx_pthread_config=$ac_cv_prog_acx_pthread_config
15911 if test -n "$acx_pthread_config"; then
15912   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
15913 echo "${ECHO_T}$acx_pthread_config" >&6
15914 else
15915   echo "$as_me:$LINENO: result: no" >&5
15916 echo "${ECHO_T}no" >&6
15917 fi
15918
15919                 if test x"$acx_pthread_config" = xno; then continue; fi
15920                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
15921                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
15922                 ;;
15923
15924                 *)
15925                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
15926 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
15927                 tryPTHREAD_LIBS="-l$flag"
15928                 ;;
15929         esac
15930
15931         save_LIBS="$LIBS"
15932         save_CFLAGS="$CFLAGS"
15933         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
15934         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
15935
15936         # Check for various functions.  We must include pthread.h,
15937         # since some functions may be macros.  (On the Sequent, we
15938         # need a special flag -Kthread to make this header compile.)
15939         # We check for pthread_join because it is in -lpthread on IRIX
15940         # while pthread_create is in libc.  We check for pthread_attr_init
15941         # due to DEC craziness with -lpthreads.  We check for
15942         # pthread_cleanup_push because it is one of the few pthread
15943         # functions on Solaris that doesn't have a non-functional libc stub.
15944         # We try pthread_create on general principles.
15945         cat >conftest.$ac_ext <<_ACEOF
15946 /* confdefs.h.  */
15947 _ACEOF
15948 cat confdefs.h >>conftest.$ac_ext
15949 cat >>conftest.$ac_ext <<_ACEOF
15950 /* end confdefs.h.  */
15951 #include <pthread.h>
15952 int
15953 main ()
15954 {
15955 pthread_t th; pthread_join(th, 0);
15956                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
15957                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
15958   ;
15959   return 0;
15960 }
15961 _ACEOF
15962 rm -f conftest.$ac_objext conftest$ac_exeext
15963 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15964   (eval $ac_link) 2>conftest.er1
15965   ac_status=$?
15966   grep -v '^ *+' conftest.er1 >conftest.err
15967   rm -f conftest.er1
15968   cat conftest.err >&5
15969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15970   (exit $ac_status); } &&
15971          { ac_try='test -z "$ac_c_werror_flag"
15972                          || test ! -s conftest.err'
15973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15974   (eval $ac_try) 2>&5
15975   ac_status=$?
15976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15977   (exit $ac_status); }; } &&
15978          { ac_try='test -s conftest$ac_exeext'
15979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15980   (eval $ac_try) 2>&5
15981   ac_status=$?
15982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15983   (exit $ac_status); }; }; then
15984   acx_pthread_ok=yes
15985 else
15986   echo "$as_me: failed program was:" >&5
15987 sed 's/^/| /' conftest.$ac_ext >&5
15988
15989 acx_pthread_ok=no
15990 fi
15991 rm -f conftest.err conftest.$ac_objext \
15992       conftest$ac_exeext conftest.$ac_ext
15993
15994         if test "x$acx_pthread_ok" = xyes; then
15995             # Don't use options that are ignored by the compiler.
15996             # We find them by checking stderror.
15997             cat >conftest.$ac_ext <<_ACEOF
15998 int
15999 main (int argc, char **argv)
16000 {
16001   (void) argc;
16002   (void) argv;
16003   return 0;
16004 }
16005 _ACEOF
16006             rm -f conftest.$ac_objext conftest$ac_exeext
16007             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16008                 # we continue with more flags because Linux needs -lpthread
16009                 # for libpq builds on PostgreSQL.  The test above only
16010                 # tests for building binaries, not shared libraries.
16011                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16012                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16013             else   acx_pthread_ok=no
16014             fi
16015         fi
16016
16017         LIBS="$save_LIBS"
16018         CFLAGS="$save_CFLAGS"
16019
16020         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16021 echo "${ECHO_T}$acx_pthread_ok" >&6
16022 done
16023 fi
16024
16025 # Various other checks:
16026 if test "x$acx_pthread_ok" = xyes; then
16027         save_LIBS="$LIBS"
16028         LIBS="$PTHREAD_LIBS $LIBS"
16029         save_CFLAGS="$CFLAGS"
16030         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16031
16032         # Detect AIX lossage: threads are created detached by default
16033         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16034         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16035 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16036         cat >conftest.$ac_ext <<_ACEOF
16037 /* confdefs.h.  */
16038 _ACEOF
16039 cat confdefs.h >>conftest.$ac_ext
16040 cat >>conftest.$ac_ext <<_ACEOF
16041 /* end confdefs.h.  */
16042 #include <pthread.h>
16043 int
16044 main ()
16045 {
16046 int attr=PTHREAD_CREATE_JOINABLE;
16047   ;
16048   return 0;
16049 }
16050 _ACEOF
16051 rm -f conftest.$ac_objext conftest$ac_exeext
16052 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16053   (eval $ac_link) 2>conftest.er1
16054   ac_status=$?
16055   grep -v '^ *+' conftest.er1 >conftest.err
16056   rm -f conftest.er1
16057   cat conftest.err >&5
16058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16059   (exit $ac_status); } &&
16060          { ac_try='test -z "$ac_c_werror_flag"
16061                          || test ! -s conftest.err'
16062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16063   (eval $ac_try) 2>&5
16064   ac_status=$?
16065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16066   (exit $ac_status); }; } &&
16067          { ac_try='test -s conftest$ac_exeext'
16068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16069   (eval $ac_try) 2>&5
16070   ac_status=$?
16071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16072   (exit $ac_status); }; }; then
16073   ok=PTHREAD_CREATE_JOINABLE
16074 else
16075   echo "$as_me: failed program was:" >&5
16076 sed 's/^/| /' conftest.$ac_ext >&5
16077
16078 ok=unknown
16079 fi
16080 rm -f conftest.err conftest.$ac_objext \
16081       conftest$ac_exeext conftest.$ac_ext
16082         if test x"$ok" = xunknown; then
16083                 cat >conftest.$ac_ext <<_ACEOF
16084 /* confdefs.h.  */
16085 _ACEOF
16086 cat confdefs.h >>conftest.$ac_ext
16087 cat >>conftest.$ac_ext <<_ACEOF
16088 /* end confdefs.h.  */
16089 #include <pthread.h>
16090 int
16091 main ()
16092 {
16093 int attr=PTHREAD_CREATE_UNDETACHED;
16094   ;
16095   return 0;
16096 }
16097 _ACEOF
16098 rm -f conftest.$ac_objext conftest$ac_exeext
16099 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16100   (eval $ac_link) 2>conftest.er1
16101   ac_status=$?
16102   grep -v '^ *+' conftest.er1 >conftest.err
16103   rm -f conftest.er1
16104   cat conftest.err >&5
16105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16106   (exit $ac_status); } &&
16107          { ac_try='test -z "$ac_c_werror_flag"
16108                          || test ! -s conftest.err'
16109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16110   (eval $ac_try) 2>&5
16111   ac_status=$?
16112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16113   (exit $ac_status); }; } &&
16114          { ac_try='test -s conftest$ac_exeext'
16115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16116   (eval $ac_try) 2>&5
16117   ac_status=$?
16118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16119   (exit $ac_status); }; }; then
16120   ok=PTHREAD_CREATE_UNDETACHED
16121 else
16122   echo "$as_me: failed program was:" >&5
16123 sed 's/^/| /' conftest.$ac_ext >&5
16124
16125 ok=unknown
16126 fi
16127 rm -f conftest.err conftest.$ac_objext \
16128       conftest$ac_exeext conftest.$ac_ext
16129         fi
16130         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16131
16132 cat >>confdefs.h <<\_ACEOF
16133 #define PTHREAD_CREATE_JOINABLE $ok
16134 _ACEOF
16135
16136         fi
16137         echo "$as_me:$LINENO: result: ${ok}" >&5
16138 echo "${ECHO_T}${ok}" >&6
16139         if test x"$ok" = xunknown; then
16140                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16141 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16142         fi
16143
16144         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16145 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16146         flag=no
16147 # We always add these in PostgreSQL
16148 #       case "${host_cpu}-${host_os}" in
16149 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16150 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16151 #       esac
16152         echo "$as_me:$LINENO: result: ${flag}" >&5
16153 echo "${ECHO_T}${flag}" >&6
16154         if test "x$flag" != xno; then
16155                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16156         fi
16157
16158         LIBS="$save_LIBS"
16159         CFLAGS="$save_CFLAGS"
16160
16161 # Supporting cc_r would require a special CC in all places that
16162 # use libpq, and that is ugly, so we don't do it.  Users can still
16163 # define their compiler as cc_r to do thread builds of everything.
16164         # More AIX lossage: must compile with cc_r
16165         # Extract the first word of "cc_r", so it can be a program name with args.
16166 set dummy cc_r; ac_word=$2
16167 echo "$as_me:$LINENO: checking for $ac_word" >&5
16168 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16169 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16170   echo $ECHO_N "(cached) $ECHO_C" >&6
16171 else
16172   if test -n "$PTHREAD_CC"; then
16173   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16174 else
16175 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16176 for as_dir in $PATH
16177 do
16178   IFS=$as_save_IFS
16179   test -z "$as_dir" && as_dir=.
16180   for ac_exec_ext in '' $ac_executable_extensions; do
16181   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16182     ac_cv_prog_PTHREAD_CC="cc_r"
16183     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16184     break 2
16185   fi
16186 done
16187 done
16188
16189   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16190 fi
16191 fi
16192 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16193 if test -n "$PTHREAD_CC"; then
16194   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16195 echo "${ECHO_T}$PTHREAD_CC" >&6
16196 else
16197   echo "$as_me:$LINENO: result: no" >&5
16198 echo "${ECHO_T}no" >&6
16199 fi
16200
16201 else
16202         PTHREAD_CC="$CC"
16203 fi
16204
16205
16206
16207
16208
16209 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16210 if test x"$acx_pthread_ok" = xyes; then
16211
16212 cat >>confdefs.h <<\_ACEOF
16213 #define HAVE_PTHREAD 1
16214 _ACEOF
16215
16216         :
16217 else
16218         acx_pthread_ok=no
16219
16220 fi
16221 ac_ext=c
16222 ac_cpp='$CPP $CPPFLAGS'
16223 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16224 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16225 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16226
16227         # set thread flags
16228
16229 # Some platforms use these, so just defineed them.  They can't hurt if they
16230 # are not supported.
16231 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16232
16233
16234 # At this point, we don't want to muck with the compiler name for threading.
16235 # Let's see who fails, perhaps AIX.  2004-04-23
16236 if test "$PTHREAD_CC" != "$CC"; then
16237 { { echo "$as_me:$LINENO: error:
16238 PostgreSQL does not support platforms that require a special
16239 compiler binary for thread-safety.
16240 " >&5
16241 echo "$as_me: error:
16242 PostgreSQL does not support platforms that require a special
16243 compiler binary for thread-safety.
16244 " >&2;}
16245    { (exit 1); exit 1; }; }
16246 fi
16247
16248 if test "$THREAD_SUPPORT" = no; then
16249 { { echo "$as_me:$LINENO: error:
16250 Cannot enable threads on your platform.
16251 Your platform is known to not support thread-safe programs.
16252 For details, compile and run src/bin/pg_thread_test.
16253 " >&5
16254 echo "$as_me: error:
16255 Cannot enable threads on your platform.
16256 Your platform is known to not support thread-safe programs.
16257 For details, compile and run src/bin/pg_thread_test.
16258 " >&2;}
16259    { (exit 1); exit 1; }; }
16260 fi
16261
16262 # Check for *_r functions
16263 _CFLAGS="$CFLAGS"
16264 _LIBS="$LIBS"
16265 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16266 LIBS="$LIBS $PTHREAD_LIBS"
16267
16268 if test "${ac_cv_header_pthread_h+set}" = set; then
16269   echo "$as_me:$LINENO: checking for pthread.h" >&5
16270 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16271 if test "${ac_cv_header_pthread_h+set}" = set; then
16272   echo $ECHO_N "(cached) $ECHO_C" >&6
16273 fi
16274 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16275 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16276 else
16277   # Is the header compilable?
16278 echo "$as_me:$LINENO: checking pthread.h usability" >&5
16279 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
16280 cat >conftest.$ac_ext <<_ACEOF
16281 /* confdefs.h.  */
16282 _ACEOF
16283 cat confdefs.h >>conftest.$ac_ext
16284 cat >>conftest.$ac_ext <<_ACEOF
16285 /* end confdefs.h.  */
16286 $ac_includes_default
16287 #include <pthread.h>
16288 _ACEOF
16289 rm -f conftest.$ac_objext
16290 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16291   (eval $ac_compile) 2>conftest.er1
16292   ac_status=$?
16293   grep -v '^ *+' conftest.er1 >conftest.err
16294   rm -f conftest.er1
16295   cat conftest.err >&5
16296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16297   (exit $ac_status); } &&
16298          { ac_try='test -z "$ac_c_werror_flag"
16299                          || test ! -s conftest.err'
16300   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16301   (eval $ac_try) 2>&5
16302   ac_status=$?
16303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16304   (exit $ac_status); }; } &&
16305          { ac_try='test -s conftest.$ac_objext'
16306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16307   (eval $ac_try) 2>&5
16308   ac_status=$?
16309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16310   (exit $ac_status); }; }; then
16311   ac_header_compiler=yes
16312 else
16313   echo "$as_me: failed program was:" >&5
16314 sed 's/^/| /' conftest.$ac_ext >&5
16315
16316 ac_header_compiler=no
16317 fi
16318 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16319 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16320 echo "${ECHO_T}$ac_header_compiler" >&6
16321
16322 # Is the header present?
16323 echo "$as_me:$LINENO: checking pthread.h presence" >&5
16324 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
16325 cat >conftest.$ac_ext <<_ACEOF
16326 /* confdefs.h.  */
16327 _ACEOF
16328 cat confdefs.h >>conftest.$ac_ext
16329 cat >>conftest.$ac_ext <<_ACEOF
16330 /* end confdefs.h.  */
16331 #include <pthread.h>
16332 _ACEOF
16333 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16334   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16335   ac_status=$?
16336   grep -v '^ *+' conftest.er1 >conftest.err
16337   rm -f conftest.er1
16338   cat conftest.err >&5
16339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16340   (exit $ac_status); } >/dev/null; then
16341   if test -s conftest.err; then
16342     ac_cpp_err=$ac_c_preproc_warn_flag
16343     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16344   else
16345     ac_cpp_err=
16346   fi
16347 else
16348   ac_cpp_err=yes
16349 fi
16350 if test -z "$ac_cpp_err"; then
16351   ac_header_preproc=yes
16352 else
16353   echo "$as_me: failed program was:" >&5
16354 sed 's/^/| /' conftest.$ac_ext >&5
16355
16356   ac_header_preproc=no
16357 fi
16358 rm -f conftest.err conftest.$ac_ext
16359 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16360 echo "${ECHO_T}$ac_header_preproc" >&6
16361
16362 # So?  What about this header?
16363 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16364   yes:no: )
16365     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
16366 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16367     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
16368 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
16369     ac_header_preproc=yes
16370     ;;
16371   no:yes:* )
16372     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
16373 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
16374     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
16375 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
16376     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
16377 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
16378     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
16379 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16380     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
16381 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
16382     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
16383 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
16384     (
16385       cat <<\_ASBOX
16386 ## ---------------------------------------- ##
16387 ## Report this to pgsql-bugs@postgresql.org ##
16388 ## ---------------------------------------- ##
16389 _ASBOX
16390     ) |
16391       sed "s/^/$as_me: WARNING:     /" >&2
16392     ;;
16393 esac
16394 echo "$as_me:$LINENO: checking for pthread.h" >&5
16395 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16396 if test "${ac_cv_header_pthread_h+set}" = set; then
16397   echo $ECHO_N "(cached) $ECHO_C" >&6
16398 else
16399   ac_cv_header_pthread_h=$ac_header_preproc
16400 fi
16401 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16402 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16403
16404 fi
16405 if test $ac_cv_header_pthread_h = yes; then
16406   :
16407 else
16408   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
16409 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
16410    { (exit 1); exit 1; }; }
16411 fi
16412
16413
16414
16415
16416
16417
16418 for ac_func in strerror_r getpwuid_r gethostbyname_r
16419 do
16420 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16421 echo "$as_me:$LINENO: checking for $ac_func" >&5
16422 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16423 if eval "test \"\${$as_ac_var+set}\" = set"; then
16424   echo $ECHO_N "(cached) $ECHO_C" >&6
16425 else
16426   cat >conftest.$ac_ext <<_ACEOF
16427 /* confdefs.h.  */
16428 _ACEOF
16429 cat confdefs.h >>conftest.$ac_ext
16430 cat >>conftest.$ac_ext <<_ACEOF
16431 /* end confdefs.h.  */
16432 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16433    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16434 #define $ac_func innocuous_$ac_func
16435
16436 /* System header to define __stub macros and hopefully few prototypes,
16437     which can conflict with char $ac_func (); below.
16438     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16439     <limits.h> exists even on freestanding compilers.  */
16440
16441 #ifdef __STDC__
16442 # include <limits.h>
16443 #else
16444 # include <assert.h>
16445 #endif
16446
16447 #undef $ac_func
16448
16449 /* Override any gcc2 internal prototype to avoid an error.  */
16450 #ifdef __cplusplus
16451 extern "C"
16452 {
16453 #endif
16454 /* We use char because int might match the return type of a gcc2
16455    builtin and then its argument prototype would still apply.  */
16456 char $ac_func ();
16457 /* The GNU C library defines this for functions which it implements
16458     to always fail with ENOSYS.  Some functions are actually named
16459     something starting with __ and the normal name is an alias.  */
16460 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16461 choke me
16462 #else
16463 char (*f) () = $ac_func;
16464 #endif
16465 #ifdef __cplusplus
16466 }
16467 #endif
16468
16469 int
16470 main ()
16471 {
16472 return f != $ac_func;
16473   ;
16474   return 0;
16475 }
16476 _ACEOF
16477 rm -f conftest.$ac_objext conftest$ac_exeext
16478 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16479   (eval $ac_link) 2>conftest.er1
16480   ac_status=$?
16481   grep -v '^ *+' conftest.er1 >conftest.err
16482   rm -f conftest.er1
16483   cat conftest.err >&5
16484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16485   (exit $ac_status); } &&
16486          { ac_try='test -z "$ac_c_werror_flag"
16487                          || test ! -s conftest.err'
16488   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16489   (eval $ac_try) 2>&5
16490   ac_status=$?
16491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16492   (exit $ac_status); }; } &&
16493          { ac_try='test -s conftest$ac_exeext'
16494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16495   (eval $ac_try) 2>&5
16496   ac_status=$?
16497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16498   (exit $ac_status); }; }; then
16499   eval "$as_ac_var=yes"
16500 else
16501   echo "$as_me: failed program was:" >&5
16502 sed 's/^/| /' conftest.$ac_ext >&5
16503
16504 eval "$as_ac_var=no"
16505 fi
16506 rm -f conftest.err conftest.$ac_objext \
16507       conftest$ac_exeext conftest.$ac_ext
16508 fi
16509 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16510 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16511 if test `eval echo '${'$as_ac_var'}'` = yes; then
16512   cat >>confdefs.h <<_ACEOF
16513 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16514 _ACEOF
16515
16516 fi
16517 done
16518
16519
16520 # Do test here with the proper thread flags
16521 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
16522 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
16523 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
16524   echo $ECHO_N "(cached) $ECHO_C" >&6
16525 else
16526   cat >conftest.$ac_ext <<_ACEOF
16527 /* confdefs.h.  */
16528 _ACEOF
16529 cat confdefs.h >>conftest.$ac_ext
16530 cat >>conftest.$ac_ext <<_ACEOF
16531 /* end confdefs.h.  */
16532 #include <sys/types.h>
16533 #include <pwd.h>
16534 int
16535 main ()
16536 {
16537 uid_t uid;
16538 struct passwd *space;
16539 char *buf;
16540 size_t bufsize;
16541 struct passwd **result;
16542 getpwuid_r(uid, space, buf, bufsize, result);
16543   ;
16544   return 0;
16545 }
16546 _ACEOF
16547 rm -f conftest.$ac_objext
16548 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16549   (eval $ac_compile) 2>conftest.er1
16550   ac_status=$?
16551   grep -v '^ *+' conftest.er1 >conftest.err
16552   rm -f conftest.er1
16553   cat conftest.err >&5
16554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16555   (exit $ac_status); } &&
16556          { ac_try='test -z "$ac_c_werror_flag"
16557                          || test ! -s conftest.err'
16558   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16559   (eval $ac_try) 2>&5
16560   ac_status=$?
16561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16562   (exit $ac_status); }; } &&
16563          { ac_try='test -s conftest.$ac_objext'
16564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16565   (eval $ac_try) 2>&5
16566   ac_status=$?
16567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16568   (exit $ac_status); }; }; then
16569   pgac_func_getpwuid_r_5arg=yes
16570 else
16571   echo "$as_me: failed program was:" >&5
16572 sed 's/^/| /' conftest.$ac_ext >&5
16573
16574 pgac_func_getpwuid_r_5arg=no
16575 fi
16576 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16577 fi
16578 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
16579 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
16580 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
16581
16582 cat >>confdefs.h <<\_ACEOF
16583 #define GETPWUID_R_5ARG
16584 _ACEOF
16585
16586 fi
16587
16588 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
16589 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
16590 if test "${pgac_func_strerror_r_int+set}" = set; then
16591   echo $ECHO_N "(cached) $ECHO_C" >&6
16592 else
16593   cat >conftest.$ac_ext <<_ACEOF
16594 /* confdefs.h.  */
16595 _ACEOF
16596 cat confdefs.h >>conftest.$ac_ext
16597 cat >>conftest.$ac_ext <<_ACEOF
16598 /* end confdefs.h.  */
16599 #include <string.h>
16600 int
16601 main ()
16602 {
16603 #ifndef _AIX
16604 int strerror_r(int, char *, size_t);
16605 #else
16606 /* Older AIX has 'int' for the third argument so we don't test the args. */
16607 int strerror_r();
16608 #endif
16609   ;
16610   return 0;
16611 }
16612 _ACEOF
16613 rm -f conftest.$ac_objext
16614 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16615   (eval $ac_compile) 2>conftest.er1
16616   ac_status=$?
16617   grep -v '^ *+' conftest.er1 >conftest.err
16618   rm -f conftest.er1
16619   cat conftest.err >&5
16620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16621   (exit $ac_status); } &&
16622          { ac_try='test -z "$ac_c_werror_flag"
16623                          || test ! -s conftest.err'
16624   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16625   (eval $ac_try) 2>&5
16626   ac_status=$?
16627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16628   (exit $ac_status); }; } &&
16629          { ac_try='test -s conftest.$ac_objext'
16630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16631   (eval $ac_try) 2>&5
16632   ac_status=$?
16633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16634   (exit $ac_status); }; }; then
16635   pgac_func_strerror_r_int=yes
16636 else
16637   echo "$as_me: failed program was:" >&5
16638 sed 's/^/| /' conftest.$ac_ext >&5
16639
16640 pgac_func_strerror_r_int=no
16641 fi
16642 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16643 fi
16644 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
16645 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
16646 if test x"$pgac_func_strerror_r_int" = xyes ; then
16647
16648 cat >>confdefs.h <<\_ACEOF
16649 #define STRERROR_R_INT
16650 _ACEOF
16651
16652 fi
16653
16654
16655 CFLAGS="$_CFLAGS"
16656 LIBS="$_LIBS"
16657
16658 else
16659 # do not use values from template file
16660 PTHREAD_CFLAGS=
16661 PTHREAD_LIBS=
16662 fi
16663
16664
16665
16666
16667
16668 # This test makes sure that run tests work at all.  Sometimes a shared
16669 # library is found by the linker, but the runtime linker can't find it.
16670 # This check should come after all modifications of compiler or linker
16671 # variables, and before any other run tests.
16672 echo "$as_me:$LINENO: checking test program" >&5
16673 echo $ECHO_N "checking test program... $ECHO_C" >&6
16674 if test "$cross_compiling" = yes; then
16675   echo "$as_me:$LINENO: result: cross-compiling" >&5
16676 echo "${ECHO_T}cross-compiling" >&6
16677 else
16678   cat >conftest.$ac_ext <<_ACEOF
16679 /* confdefs.h.  */
16680 _ACEOF
16681 cat confdefs.h >>conftest.$ac_ext
16682 cat >>conftest.$ac_ext <<_ACEOF
16683 /* end confdefs.h.  */
16684 int main() { return 0; }
16685 _ACEOF
16686 rm -f conftest$ac_exeext
16687 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16688   (eval $ac_link) 2>&5
16689   ac_status=$?
16690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16691   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16693   (eval $ac_try) 2>&5
16694   ac_status=$?
16695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16696   (exit $ac_status); }; }; then
16697   echo "$as_me:$LINENO: result: ok" >&5
16698 echo "${ECHO_T}ok" >&6
16699 else
16700   echo "$as_me: program exited with status $ac_status" >&5
16701 echo "$as_me: failed program was:" >&5
16702 sed 's/^/| /' conftest.$ac_ext >&5
16703
16704 ( exit $ac_status )
16705 echo "$as_me:$LINENO: result: failed" >&5
16706 echo "${ECHO_T}failed" >&6
16707 { { echo "$as_me:$LINENO: error:
16708 *** Could not execute a simple test program.  This may be a problem
16709 *** related to locating shared libraries.  Check the file 'config.log'
16710 *** for the exact reason." >&5
16711 echo "$as_me: error:
16712 *** Could not execute a simple test program.  This may be a problem
16713 *** related to locating shared libraries.  Check the file 'config.log'
16714 *** for the exact reason." >&2;}
16715    { (exit 1); exit 1; }; }
16716 fi
16717 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16718 fi
16719
16720 # --------------------
16721 # Run tests below here
16722 # --------------------
16723
16724 # Force use of our snprintf if system's doesn't do arg control
16725 # See comment above at snprintf test for details.
16726 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
16727   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
16728 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
16729 if test "${pgac_cv_printf_arg_control+set}" = set; then
16730   echo $ECHO_N "(cached) $ECHO_C" >&6
16731 else
16732   if test "$cross_compiling" = yes; then
16733   pgac_cv_printf_arg_control=cross
16734 else
16735   cat >conftest.$ac_ext <<_ACEOF
16736 /* confdefs.h.  */
16737 _ACEOF
16738 cat confdefs.h >>conftest.$ac_ext
16739 cat >>conftest.$ac_ext <<_ACEOF
16740 /* end confdefs.h.  */
16741 #include <stdio.h>
16742 #include <string.h>
16743
16744 int main()
16745 {
16746   char buf[100];
16747
16748   /* can it swap arguments? */
16749   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
16750   if (strcmp(buf, "4 3") != 0)
16751     return 1;
16752   return 0;
16753 }
16754 _ACEOF
16755 rm -f conftest$ac_exeext
16756 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16757   (eval $ac_link) 2>&5
16758   ac_status=$?
16759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16760   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16761   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16762   (eval $ac_try) 2>&5
16763   ac_status=$?
16764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16765   (exit $ac_status); }; }; then
16766   pgac_cv_printf_arg_control=yes
16767 else
16768   echo "$as_me: program exited with status $ac_status" >&5
16769 echo "$as_me: failed program was:" >&5
16770 sed 's/^/| /' conftest.$ac_ext >&5
16771
16772 ( exit $ac_status )
16773 pgac_cv_printf_arg_control=no
16774 fi
16775 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16776 fi
16777
16778 fi
16779 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
16780 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
16781
16782   if test $pgac_cv_printf_arg_control != yes ; then
16783     pgac_need_repl_snprintf=yes
16784   fi
16785 fi
16786
16787
16788
16789 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
16790 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
16791 if test "${pgac_cv_type_long_int_64+set}" = set; then
16792   echo $ECHO_N "(cached) $ECHO_C" >&6
16793 else
16794   if test "$cross_compiling" = yes; then
16795   # If cross-compiling, check the size reported by the compiler and
16796 # trust that the arithmetic works.
16797 cat >conftest.$ac_ext <<_ACEOF
16798 /* confdefs.h.  */
16799 _ACEOF
16800 cat confdefs.h >>conftest.$ac_ext
16801 cat >>conftest.$ac_ext <<_ACEOF
16802 /* end confdefs.h.  */
16803
16804 int
16805 main ()
16806 {
16807 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16808 test_array [0] = 0
16809
16810   ;
16811   return 0;
16812 }
16813 _ACEOF
16814 rm -f conftest.$ac_objext
16815 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16816   (eval $ac_compile) 2>conftest.er1
16817   ac_status=$?
16818   grep -v '^ *+' conftest.er1 >conftest.err
16819   rm -f conftest.er1
16820   cat conftest.err >&5
16821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16822   (exit $ac_status); } &&
16823          { ac_try='test -z "$ac_c_werror_flag"
16824                          || test ! -s conftest.err'
16825   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16826   (eval $ac_try) 2>&5
16827   ac_status=$?
16828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16829   (exit $ac_status); }; } &&
16830          { ac_try='test -s conftest.$ac_objext'
16831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16832   (eval $ac_try) 2>&5
16833   ac_status=$?
16834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16835   (exit $ac_status); }; }; then
16836   pgac_cv_type_long_int_64=yes
16837 else
16838   echo "$as_me: failed program was:" >&5
16839 sed 's/^/| /' conftest.$ac_ext >&5
16840
16841 pgac_cv_type_long_int_64=no
16842 fi
16843 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16844 else
16845   cat >conftest.$ac_ext <<_ACEOF
16846 /* confdefs.h.  */
16847 _ACEOF
16848 cat confdefs.h >>conftest.$ac_ext
16849 cat >>conftest.$ac_ext <<_ACEOF
16850 /* end confdefs.h.  */
16851 typedef long int ac_int64;
16852
16853 /*
16854  * These are globals to discourage the compiler from folding all the
16855  * arithmetic tests down to compile-time constants.
16856  */
16857 ac_int64 a = 20000001;
16858 ac_int64 b = 40000005;
16859
16860 int does_int64_work()
16861 {
16862   ac_int64 c,d;
16863
16864   if (sizeof(ac_int64) != 8)
16865     return 0;                   /* definitely not the right size */
16866
16867   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16868   c = a * b;
16869   d = (c + b) / b;
16870   if (d != a+1)
16871     return 0;
16872   return 1;
16873 }
16874 main() {
16875   exit(! does_int64_work());
16876 }
16877 _ACEOF
16878 rm -f conftest$ac_exeext
16879 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16880   (eval $ac_link) 2>&5
16881   ac_status=$?
16882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16883   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16884   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16885   (eval $ac_try) 2>&5
16886   ac_status=$?
16887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16888   (exit $ac_status); }; }; then
16889   pgac_cv_type_long_int_64=yes
16890 else
16891   echo "$as_me: program exited with status $ac_status" >&5
16892 echo "$as_me: failed program was:" >&5
16893 sed 's/^/| /' conftest.$ac_ext >&5
16894
16895 ( exit $ac_status )
16896 pgac_cv_type_long_int_64=no
16897 fi
16898 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16899 fi
16900 fi
16901 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
16902 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
16903
16904 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16905 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16906
16907 cat >>confdefs.h <<\_ACEOF
16908 #define HAVE_LONG_INT_64
16909 _ACEOF
16910
16911 fi
16912
16913
16914 if test x"$HAVE_LONG_INT_64" = x"no" ; then
16915   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
16916 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
16917 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
16918   echo $ECHO_N "(cached) $ECHO_C" >&6
16919 else
16920   if test "$cross_compiling" = yes; then
16921   # If cross-compiling, check the size reported by the compiler and
16922 # trust that the arithmetic works.
16923 cat >conftest.$ac_ext <<_ACEOF
16924 /* confdefs.h.  */
16925 _ACEOF
16926 cat confdefs.h >>conftest.$ac_ext
16927 cat >>conftest.$ac_ext <<_ACEOF
16928 /* end confdefs.h.  */
16929
16930 int
16931 main ()
16932 {
16933 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16934 test_array [0] = 0
16935
16936   ;
16937   return 0;
16938 }
16939 _ACEOF
16940 rm -f conftest.$ac_objext
16941 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16942   (eval $ac_compile) 2>conftest.er1
16943   ac_status=$?
16944   grep -v '^ *+' conftest.er1 >conftest.err
16945   rm -f conftest.er1
16946   cat conftest.err >&5
16947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16948   (exit $ac_status); } &&
16949          { ac_try='test -z "$ac_c_werror_flag"
16950                          || test ! -s conftest.err'
16951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16952   (eval $ac_try) 2>&5
16953   ac_status=$?
16954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16955   (exit $ac_status); }; } &&
16956          { ac_try='test -s conftest.$ac_objext'
16957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16958   (eval $ac_try) 2>&5
16959   ac_status=$?
16960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16961   (exit $ac_status); }; }; then
16962   pgac_cv_type_long_long_int_64=yes
16963 else
16964   echo "$as_me: failed program was:" >&5
16965 sed 's/^/| /' conftest.$ac_ext >&5
16966
16967 pgac_cv_type_long_long_int_64=no
16968 fi
16969 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16970 else
16971   cat >conftest.$ac_ext <<_ACEOF
16972 /* confdefs.h.  */
16973 _ACEOF
16974 cat confdefs.h >>conftest.$ac_ext
16975 cat >>conftest.$ac_ext <<_ACEOF
16976 /* end confdefs.h.  */
16977 typedef long long int ac_int64;
16978
16979 /*
16980  * These are globals to discourage the compiler from folding all the
16981  * arithmetic tests down to compile-time constants.
16982  */
16983 ac_int64 a = 20000001;
16984 ac_int64 b = 40000005;
16985
16986 int does_int64_work()
16987 {
16988   ac_int64 c,d;
16989
16990   if (sizeof(ac_int64) != 8)
16991     return 0;                   /* definitely not the right size */
16992
16993   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16994   c = a * b;
16995   d = (c + b) / b;
16996   if (d != a+1)
16997     return 0;
16998   return 1;
16999 }
17000 main() {
17001   exit(! does_int64_work());
17002 }
17003 _ACEOF
17004 rm -f conftest$ac_exeext
17005 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17006   (eval $ac_link) 2>&5
17007   ac_status=$?
17008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17009   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17011   (eval $ac_try) 2>&5
17012   ac_status=$?
17013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17014   (exit $ac_status); }; }; then
17015   pgac_cv_type_long_long_int_64=yes
17016 else
17017   echo "$as_me: program exited with status $ac_status" >&5
17018 echo "$as_me: failed program was:" >&5
17019 sed 's/^/| /' conftest.$ac_ext >&5
17020
17021 ( exit $ac_status )
17022 pgac_cv_type_long_long_int_64=no
17023 fi
17024 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17025 fi
17026 fi
17027 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
17028 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
17029
17030 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17031 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17032
17033 cat >>confdefs.h <<\_ACEOF
17034 #define HAVE_LONG_LONG_INT_64
17035 _ACEOF
17036
17037 fi
17038
17039 fi
17040
17041
17042
17043 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
17044   cat >conftest.$ac_ext <<_ACEOF
17045 /* confdefs.h.  */
17046 _ACEOF
17047 cat confdefs.h >>conftest.$ac_ext
17048 cat >>conftest.$ac_ext <<_ACEOF
17049 /* end confdefs.h.  */
17050
17051 #define INT64CONST(x)  x##LL
17052 long long int foo = INT64CONST(0x1234567890123456);
17053
17054 int
17055 main ()
17056 {
17057
17058   ;
17059   return 0;
17060 }
17061 _ACEOF
17062 rm -f conftest.$ac_objext
17063 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17064   (eval $ac_compile) 2>conftest.er1
17065   ac_status=$?
17066   grep -v '^ *+' conftest.er1 >conftest.err
17067   rm -f conftest.er1
17068   cat conftest.err >&5
17069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17070   (exit $ac_status); } &&
17071          { ac_try='test -z "$ac_c_werror_flag"
17072                          || test ! -s conftest.err'
17073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17074   (eval $ac_try) 2>&5
17075   ac_status=$?
17076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17077   (exit $ac_status); }; } &&
17078          { ac_try='test -s conftest.$ac_objext'
17079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17080   (eval $ac_try) 2>&5
17081   ac_status=$?
17082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17083   (exit $ac_status); }; }; then
17084
17085 cat >>confdefs.h <<\_ACEOF
17086 #define HAVE_LL_CONSTANTS 1
17087 _ACEOF
17088
17089 else
17090   echo "$as_me: failed program was:" >&5
17091 sed 's/^/| /' conftest.$ac_ext >&5
17092
17093 fi
17094 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17095 fi
17096
17097
17098 # If we found "long int" is 64 bits, assume snprintf handles it.  If
17099 # we found we need to use "long long int", better check.  We cope with
17100 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
17101 # work, fall back to our own snprintf emulation (which we know uses %lld).
17102
17103 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
17104   if test $pgac_need_repl_snprintf = no; then
17105     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
17106 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
17107 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
17108   echo $ECHO_N "(cached) $ECHO_C" >&6
17109 else
17110   for pgac_format in '%lld' '%qd' '%I64d'; do
17111 if test "$cross_compiling" = yes; then
17112   pgac_cv_snprintf_long_long_int_format=cross; break
17113 else
17114   cat >conftest.$ac_ext <<_ACEOF
17115 /* confdefs.h.  */
17116 _ACEOF
17117 cat confdefs.h >>conftest.$ac_ext
17118 cat >>conftest.$ac_ext <<_ACEOF
17119 /* end confdefs.h.  */
17120 #include <stdio.h>
17121 typedef long long int ac_int64;
17122 #define INT64_FORMAT "$pgac_format"
17123
17124 ac_int64 a = 20000001;
17125 ac_int64 b = 40000005;
17126
17127 int does_int64_snprintf_work()
17128 {
17129   ac_int64 c;
17130   char buf[100];
17131
17132   if (sizeof(ac_int64) != 8)
17133     return 0;                   /* doesn't look like the right size */
17134
17135   c = a * b;
17136   snprintf(buf, 100, INT64_FORMAT, c);
17137   if (strcmp(buf, "800000140000005") != 0)
17138     return 0;                   /* either multiply or snprintf is busted */
17139   return 1;
17140 }
17141 main() {
17142   exit(! does_int64_snprintf_work());
17143 }
17144 _ACEOF
17145 rm -f conftest$ac_exeext
17146 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17147   (eval $ac_link) 2>&5
17148   ac_status=$?
17149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17150   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17152   (eval $ac_try) 2>&5
17153   ac_status=$?
17154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17155   (exit $ac_status); }; }; then
17156   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
17157 else
17158   echo "$as_me: program exited with status $ac_status" >&5
17159 echo "$as_me: failed program was:" >&5
17160 sed 's/^/| /' conftest.$ac_ext >&5
17161
17162 fi
17163 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17164 fi
17165 done
17166 fi
17167
17168 LONG_LONG_INT_FORMAT=''
17169
17170 case $pgac_cv_snprintf_long_long_int_format in
17171   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
17172 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
17173   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
17174 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
17175          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
17176   *)     echo "$as_me:$LINENO: result: none" >&5
17177 echo "${ECHO_T}none" >&6;;
17178 esac
17179     if test "$LONG_LONG_INT_FORMAT" = ""; then
17180       # Force usage of our own snprintf, since system snprintf is broken
17181       pgac_need_repl_snprintf=yes
17182       LONG_LONG_INT_FORMAT='%lld'
17183     fi
17184   else
17185     # Here if we previously decided we needed to use our own snprintf
17186     LONG_LONG_INT_FORMAT='%lld'
17187   fi
17188   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
17189   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
17190   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
17191 else
17192   # Here if we are not using 'long long int' at all
17193   INT64_FORMAT='"%ld"'
17194   UINT64_FORMAT='"%lu"'
17195 fi
17196
17197
17198 cat >>confdefs.h <<_ACEOF
17199 #define INT64_FORMAT $INT64_FORMAT
17200 _ACEOF
17201
17202
17203
17204 cat >>confdefs.h <<_ACEOF
17205 #define UINT64_FORMAT $UINT64_FORMAT
17206 _ACEOF
17207
17208
17209 # Now we have checked all the reasons to replace snprintf
17210 if test $pgac_need_repl_snprintf = yes; then
17211
17212 cat >>confdefs.h <<\_ACEOF
17213 #define USE_REPL_SNPRINTF 1
17214 _ACEOF
17215
17216   case $LIBOBJS in
17217     "snprintf.$ac_objext"   | \
17218   *" snprintf.$ac_objext"   | \
17219     "snprintf.$ac_objext "* | \
17220   *" snprintf.$ac_objext "* ) ;;
17221   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
17222 esac
17223
17224 fi
17225
17226 # Need a #define for the size of Datum (unsigned long)
17227 echo "$as_me:$LINENO: checking for unsigned long" >&5
17228 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
17229 if test "${ac_cv_type_unsigned_long+set}" = set; then
17230   echo $ECHO_N "(cached) $ECHO_C" >&6
17231 else
17232   cat >conftest.$ac_ext <<_ACEOF
17233 /* confdefs.h.  */
17234 _ACEOF
17235 cat confdefs.h >>conftest.$ac_ext
17236 cat >>conftest.$ac_ext <<_ACEOF
17237 /* end confdefs.h.  */
17238 $ac_includes_default
17239 int
17240 main ()
17241 {
17242 if ((unsigned long *) 0)
17243   return 0;
17244 if (sizeof (unsigned long))
17245   return 0;
17246   ;
17247   return 0;
17248 }
17249 _ACEOF
17250 rm -f conftest.$ac_objext
17251 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17252   (eval $ac_compile) 2>conftest.er1
17253   ac_status=$?
17254   grep -v '^ *+' conftest.er1 >conftest.err
17255   rm -f conftest.er1
17256   cat conftest.err >&5
17257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17258   (exit $ac_status); } &&
17259          { ac_try='test -z "$ac_c_werror_flag"
17260                          || test ! -s conftest.err'
17261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17262   (eval $ac_try) 2>&5
17263   ac_status=$?
17264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17265   (exit $ac_status); }; } &&
17266          { ac_try='test -s conftest.$ac_objext'
17267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17268   (eval $ac_try) 2>&5
17269   ac_status=$?
17270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17271   (exit $ac_status); }; }; then
17272   ac_cv_type_unsigned_long=yes
17273 else
17274   echo "$as_me: failed program was:" >&5
17275 sed 's/^/| /' conftest.$ac_ext >&5
17276
17277 ac_cv_type_unsigned_long=no
17278 fi
17279 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17280 fi
17281 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
17282 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
17283
17284 echo "$as_me:$LINENO: checking size of unsigned long" >&5
17285 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
17286 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
17287   echo $ECHO_N "(cached) $ECHO_C" >&6
17288 else
17289   if test "$ac_cv_type_unsigned_long" = yes; then
17290   # The cast to unsigned long works around a bug in the HP C Compiler
17291   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17292   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17293   # This bug is HP SR number 8606223364.
17294   if test "$cross_compiling" = yes; then
17295   # Depending upon the size, compute the lo and hi bounds.
17296 cat >conftest.$ac_ext <<_ACEOF
17297 /* confdefs.h.  */
17298 _ACEOF
17299 cat confdefs.h >>conftest.$ac_ext
17300 cat >>conftest.$ac_ext <<_ACEOF
17301 /* end confdefs.h.  */
17302 $ac_includes_default
17303 int
17304 main ()
17305 {
17306 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
17307 test_array [0] = 0
17308
17309   ;
17310   return 0;
17311 }
17312 _ACEOF
17313 rm -f conftest.$ac_objext
17314 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17315   (eval $ac_compile) 2>conftest.er1
17316   ac_status=$?
17317   grep -v '^ *+' conftest.er1 >conftest.err
17318   rm -f conftest.er1
17319   cat conftest.err >&5
17320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17321   (exit $ac_status); } &&
17322          { ac_try='test -z "$ac_c_werror_flag"
17323                          || test ! -s conftest.err'
17324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17325   (eval $ac_try) 2>&5
17326   ac_status=$?
17327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17328   (exit $ac_status); }; } &&
17329          { ac_try='test -s conftest.$ac_objext'
17330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17331   (eval $ac_try) 2>&5
17332   ac_status=$?
17333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17334   (exit $ac_status); }; }; then
17335   ac_lo=0 ac_mid=0
17336   while :; do
17337     cat >conftest.$ac_ext <<_ACEOF
17338 /* confdefs.h.  */
17339 _ACEOF
17340 cat confdefs.h >>conftest.$ac_ext
17341 cat >>conftest.$ac_ext <<_ACEOF
17342 /* end confdefs.h.  */
17343 $ac_includes_default
17344 int
17345 main ()
17346 {
17347 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17348 test_array [0] = 0
17349
17350   ;
17351   return 0;
17352 }
17353 _ACEOF
17354 rm -f conftest.$ac_objext
17355 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17356   (eval $ac_compile) 2>conftest.er1
17357   ac_status=$?
17358   grep -v '^ *+' conftest.er1 >conftest.err
17359   rm -f conftest.er1
17360   cat conftest.err >&5
17361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17362   (exit $ac_status); } &&
17363          { ac_try='test -z "$ac_c_werror_flag"
17364                          || test ! -s conftest.err'
17365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17366   (eval $ac_try) 2>&5
17367   ac_status=$?
17368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17369   (exit $ac_status); }; } &&
17370          { ac_try='test -s conftest.$ac_objext'
17371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17372   (eval $ac_try) 2>&5
17373   ac_status=$?
17374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17375   (exit $ac_status); }; }; then
17376   ac_hi=$ac_mid; break
17377 else
17378   echo "$as_me: failed program was:" >&5
17379 sed 's/^/| /' conftest.$ac_ext >&5
17380
17381 ac_lo=`expr $ac_mid + 1`
17382                     if test $ac_lo -le $ac_mid; then
17383                       ac_lo= ac_hi=
17384                       break
17385                     fi
17386                     ac_mid=`expr 2 '*' $ac_mid + 1`
17387 fi
17388 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17389   done
17390 else
17391   echo "$as_me: failed program was:" >&5
17392 sed 's/^/| /' conftest.$ac_ext >&5
17393
17394 cat >conftest.$ac_ext <<_ACEOF
17395 /* confdefs.h.  */
17396 _ACEOF
17397 cat confdefs.h >>conftest.$ac_ext
17398 cat >>conftest.$ac_ext <<_ACEOF
17399 /* end confdefs.h.  */
17400 $ac_includes_default
17401 int
17402 main ()
17403 {
17404 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
17405 test_array [0] = 0
17406
17407   ;
17408   return 0;
17409 }
17410 _ACEOF
17411 rm -f conftest.$ac_objext
17412 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17413   (eval $ac_compile) 2>conftest.er1
17414   ac_status=$?
17415   grep -v '^ *+' conftest.er1 >conftest.err
17416   rm -f conftest.er1
17417   cat conftest.err >&5
17418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17419   (exit $ac_status); } &&
17420          { ac_try='test -z "$ac_c_werror_flag"
17421                          || test ! -s conftest.err'
17422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17423   (eval $ac_try) 2>&5
17424   ac_status=$?
17425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17426   (exit $ac_status); }; } &&
17427          { ac_try='test -s conftest.$ac_objext'
17428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17429   (eval $ac_try) 2>&5
17430   ac_status=$?
17431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17432   (exit $ac_status); }; }; then
17433   ac_hi=-1 ac_mid=-1
17434   while :; do
17435     cat >conftest.$ac_ext <<_ACEOF
17436 /* confdefs.h.  */
17437 _ACEOF
17438 cat confdefs.h >>conftest.$ac_ext
17439 cat >>conftest.$ac_ext <<_ACEOF
17440 /* end confdefs.h.  */
17441 $ac_includes_default
17442 int
17443 main ()
17444 {
17445 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
17446 test_array [0] = 0
17447
17448   ;
17449   return 0;
17450 }
17451 _ACEOF
17452 rm -f conftest.$ac_objext
17453 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17454   (eval $ac_compile) 2>conftest.er1
17455   ac_status=$?
17456   grep -v '^ *+' conftest.er1 >conftest.err
17457   rm -f conftest.er1
17458   cat conftest.err >&5
17459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17460   (exit $ac_status); } &&
17461          { ac_try='test -z "$ac_c_werror_flag"
17462                          || test ! -s conftest.err'
17463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17464   (eval $ac_try) 2>&5
17465   ac_status=$?
17466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17467   (exit $ac_status); }; } &&
17468          { ac_try='test -s conftest.$ac_objext'
17469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17470   (eval $ac_try) 2>&5
17471   ac_status=$?
17472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17473   (exit $ac_status); }; }; then
17474   ac_lo=$ac_mid; break
17475 else
17476   echo "$as_me: failed program was:" >&5
17477 sed 's/^/| /' conftest.$ac_ext >&5
17478
17479 ac_hi=`expr '(' $ac_mid ')' - 1`
17480                        if test $ac_mid -le $ac_hi; then
17481                          ac_lo= ac_hi=
17482                          break
17483                        fi
17484                        ac_mid=`expr 2 '*' $ac_mid`
17485 fi
17486 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17487   done
17488 else
17489   echo "$as_me: failed program was:" >&5
17490 sed 's/^/| /' conftest.$ac_ext >&5
17491
17492 ac_lo= ac_hi=
17493 fi
17494 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17495 fi
17496 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17497 # Binary search between lo and hi bounds.
17498 while test "x$ac_lo" != "x$ac_hi"; do
17499   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
17500   cat >conftest.$ac_ext <<_ACEOF
17501 /* confdefs.h.  */
17502 _ACEOF
17503 cat confdefs.h >>conftest.$ac_ext
17504 cat >>conftest.$ac_ext <<_ACEOF
17505 /* end confdefs.h.  */
17506 $ac_includes_default
17507 int
17508 main ()
17509 {
17510 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17511 test_array [0] = 0
17512
17513   ;
17514   return 0;
17515 }
17516 _ACEOF
17517 rm -f conftest.$ac_objext
17518 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17519   (eval $ac_compile) 2>conftest.er1
17520   ac_status=$?
17521   grep -v '^ *+' conftest.er1 >conftest.err
17522   rm -f conftest.er1
17523   cat conftest.err >&5
17524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17525   (exit $ac_status); } &&
17526          { ac_try='test -z "$ac_c_werror_flag"
17527                          || test ! -s conftest.err'
17528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17529   (eval $ac_try) 2>&5
17530   ac_status=$?
17531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17532   (exit $ac_status); }; } &&
17533          { ac_try='test -s conftest.$ac_objext'
17534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17535   (eval $ac_try) 2>&5
17536   ac_status=$?
17537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17538   (exit $ac_status); }; }; then
17539   ac_hi=$ac_mid
17540 else
17541   echo "$as_me: failed program was:" >&5
17542 sed 's/^/| /' conftest.$ac_ext >&5
17543
17544 ac_lo=`expr '(' $ac_mid ')' + 1`
17545 fi
17546 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17547 done
17548 case $ac_lo in
17549 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
17550 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
17551 See \`config.log' for more details." >&5
17552 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
17553 See \`config.log' for more details." >&2;}
17554    { (exit 1); exit 1; }; } ;;
17555 esac
17556 else
17557   if test "$cross_compiling" = yes; then
17558   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17559 See \`config.log' for more details." >&5
17560 echo "$as_me: error: cannot run test program while cross compiling
17561 See \`config.log' for more details." >&2;}
17562    { (exit 1); exit 1; }; }
17563 else
17564   cat >conftest.$ac_ext <<_ACEOF
17565 /* confdefs.h.  */
17566 _ACEOF
17567 cat confdefs.h >>conftest.$ac_ext
17568 cat >>conftest.$ac_ext <<_ACEOF
17569 /* end confdefs.h.  */
17570 $ac_includes_default
17571 long longval () { return (long) (sizeof (unsigned long)); }
17572 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
17573 #include <stdio.h>
17574 #include <stdlib.h>
17575 int
17576 main ()
17577 {
17578
17579   FILE *f = fopen ("conftest.val", "w");
17580   if (! f)
17581     exit (1);
17582   if (((long) (sizeof (unsigned long))) < 0)
17583     {
17584       long i = longval ();
17585       if (i != ((long) (sizeof (unsigned long))))
17586         exit (1);
17587       fprintf (f, "%ld\n", i);
17588     }
17589   else
17590     {
17591       unsigned long i = ulongval ();
17592       if (i != ((long) (sizeof (unsigned long))))
17593         exit (1);
17594       fprintf (f, "%lu\n", i);
17595     }
17596   exit (ferror (f) || fclose (f) != 0);
17597
17598   ;
17599   return 0;
17600 }
17601 _ACEOF
17602 rm -f conftest$ac_exeext
17603 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17604   (eval $ac_link) 2>&5
17605   ac_status=$?
17606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17607   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17609   (eval $ac_try) 2>&5
17610   ac_status=$?
17611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17612   (exit $ac_status); }; }; then
17613   ac_cv_sizeof_unsigned_long=`cat conftest.val`
17614 else
17615   echo "$as_me: program exited with status $ac_status" >&5
17616 echo "$as_me: failed program was:" >&5
17617 sed 's/^/| /' conftest.$ac_ext >&5
17618
17619 ( exit $ac_status )
17620 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
17621 See \`config.log' for more details." >&5
17622 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
17623 See \`config.log' for more details." >&2;}
17624    { (exit 1); exit 1; }; }
17625 fi
17626 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17627 fi
17628 fi
17629 rm -f conftest.val
17630 else
17631   ac_cv_sizeof_unsigned_long=0
17632 fi
17633 fi
17634 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
17635 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
17636 cat >>confdefs.h <<_ACEOF
17637 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
17638 _ACEOF
17639
17640
17641
17642 # And one for the size of size_t (enables tweaks for > 32bit address space)
17643 echo "$as_me:$LINENO: checking for size_t" >&5
17644 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
17645 if test "${ac_cv_type_size_t+set}" = set; then
17646   echo $ECHO_N "(cached) $ECHO_C" >&6
17647 else
17648   cat >conftest.$ac_ext <<_ACEOF
17649 /* confdefs.h.  */
17650 _ACEOF
17651 cat confdefs.h >>conftest.$ac_ext
17652 cat >>conftest.$ac_ext <<_ACEOF
17653 /* end confdefs.h.  */
17654 $ac_includes_default
17655 int
17656 main ()
17657 {
17658 if ((size_t *) 0)
17659   return 0;
17660 if (sizeof (size_t))
17661   return 0;
17662   ;
17663   return 0;
17664 }
17665 _ACEOF
17666 rm -f conftest.$ac_objext
17667 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17668   (eval $ac_compile) 2>conftest.er1
17669   ac_status=$?
17670   grep -v '^ *+' conftest.er1 >conftest.err
17671   rm -f conftest.er1
17672   cat conftest.err >&5
17673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17674   (exit $ac_status); } &&
17675          { ac_try='test -z "$ac_c_werror_flag"
17676                          || test ! -s conftest.err'
17677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17678   (eval $ac_try) 2>&5
17679   ac_status=$?
17680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17681   (exit $ac_status); }; } &&
17682          { ac_try='test -s conftest.$ac_objext'
17683   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17684   (eval $ac_try) 2>&5
17685   ac_status=$?
17686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17687   (exit $ac_status); }; }; then
17688   ac_cv_type_size_t=yes
17689 else
17690   echo "$as_me: failed program was:" >&5
17691 sed 's/^/| /' conftest.$ac_ext >&5
17692
17693 ac_cv_type_size_t=no
17694 fi
17695 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17696 fi
17697 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
17698 echo "${ECHO_T}$ac_cv_type_size_t" >&6
17699
17700 echo "$as_me:$LINENO: checking size of size_t" >&5
17701 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
17702 if test "${ac_cv_sizeof_size_t+set}" = set; then
17703   echo $ECHO_N "(cached) $ECHO_C" >&6
17704 else
17705   if test "$ac_cv_type_size_t" = yes; then
17706   # The cast to unsigned long works around a bug in the HP C Compiler
17707   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17708   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17709   # This bug is HP SR number 8606223364.
17710   if test "$cross_compiling" = yes; then
17711   # Depending upon the size, compute the lo and hi bounds.
17712 cat >conftest.$ac_ext <<_ACEOF
17713 /* confdefs.h.  */
17714 _ACEOF
17715 cat confdefs.h >>conftest.$ac_ext
17716 cat >>conftest.$ac_ext <<_ACEOF
17717 /* end confdefs.h.  */
17718 $ac_includes_default
17719 int
17720 main ()
17721 {
17722 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
17723 test_array [0] = 0
17724
17725   ;
17726   return 0;
17727 }
17728 _ACEOF
17729 rm -f conftest.$ac_objext
17730 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17731   (eval $ac_compile) 2>conftest.er1
17732   ac_status=$?
17733   grep -v '^ *+' conftest.er1 >conftest.err
17734   rm -f conftest.er1
17735   cat conftest.err >&5
17736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17737   (exit $ac_status); } &&
17738          { ac_try='test -z "$ac_c_werror_flag"
17739                          || test ! -s conftest.err'
17740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17741   (eval $ac_try) 2>&5
17742   ac_status=$?
17743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17744   (exit $ac_status); }; } &&
17745          { ac_try='test -s conftest.$ac_objext'
17746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17747   (eval $ac_try) 2>&5
17748   ac_status=$?
17749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17750   (exit $ac_status); }; }; then
17751   ac_lo=0 ac_mid=0
17752   while :; do
17753     cat >conftest.$ac_ext <<_ACEOF
17754 /* confdefs.h.  */
17755 _ACEOF
17756 cat confdefs.h >>conftest.$ac_ext
17757 cat >>conftest.$ac_ext <<_ACEOF
17758 /* end confdefs.h.  */
17759 $ac_includes_default
17760 int
17761 main ()
17762 {
17763 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
17764 test_array [0] = 0
17765
17766   ;
17767   return 0;
17768 }
17769 _ACEOF
17770 rm -f conftest.$ac_objext
17771 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17772   (eval $ac_compile) 2>conftest.er1
17773   ac_status=$?
17774   grep -v '^ *+' conftest.er1 >conftest.err
17775   rm -f conftest.er1
17776   cat conftest.err >&5
17777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17778   (exit $ac_status); } &&
17779          { ac_try='test -z "$ac_c_werror_flag"
17780                          || test ! -s conftest.err'
17781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17782   (eval $ac_try) 2>&5
17783   ac_status=$?
17784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17785   (exit $ac_status); }; } &&
17786          { ac_try='test -s conftest.$ac_objext'
17787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17788   (eval $ac_try) 2>&5
17789   ac_status=$?
17790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17791   (exit $ac_status); }; }; then
17792   ac_hi=$ac_mid; break
17793 else
17794   echo "$as_me: failed program was:" >&5
17795 sed 's/^/| /' conftest.$ac_ext >&5
17796
17797 ac_lo=`expr $ac_mid + 1`
17798                     if test $ac_lo -le $ac_mid; then
17799                       ac_lo= ac_hi=
17800                       break
17801                     fi
17802                     ac_mid=`expr 2 '*' $ac_mid + 1`
17803 fi
17804 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17805   done
17806 else
17807   echo "$as_me: failed program was:" >&5
17808 sed 's/^/| /' conftest.$ac_ext >&5
17809
17810 cat >conftest.$ac_ext <<_ACEOF
17811 /* confdefs.h.  */
17812 _ACEOF
17813 cat confdefs.h >>conftest.$ac_ext
17814 cat >>conftest.$ac_ext <<_ACEOF
17815 /* end confdefs.h.  */
17816 $ac_includes_default
17817 int
17818 main ()
17819 {
17820 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
17821 test_array [0] = 0
17822
17823   ;
17824   return 0;
17825 }
17826 _ACEOF
17827 rm -f conftest.$ac_objext
17828 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17829   (eval $ac_compile) 2>conftest.er1
17830   ac_status=$?
17831   grep -v '^ *+' conftest.er1 >conftest.err
17832   rm -f conftest.er1
17833   cat conftest.err >&5
17834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17835   (exit $ac_status); } &&
17836          { ac_try='test -z "$ac_c_werror_flag"
17837                          || test ! -s conftest.err'
17838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17839   (eval $ac_try) 2>&5
17840   ac_status=$?
17841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17842   (exit $ac_status); }; } &&
17843          { ac_try='test -s conftest.$ac_objext'
17844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17845   (eval $ac_try) 2>&5
17846   ac_status=$?
17847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17848   (exit $ac_status); }; }; then
17849   ac_hi=-1 ac_mid=-1
17850   while :; do
17851     cat >conftest.$ac_ext <<_ACEOF
17852 /* confdefs.h.  */
17853 _ACEOF
17854 cat confdefs.h >>conftest.$ac_ext
17855 cat >>conftest.$ac_ext <<_ACEOF
17856 /* end confdefs.h.  */
17857 $ac_includes_default
17858 int
17859 main ()
17860 {
17861 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
17862 test_array [0] = 0
17863
17864   ;
17865   return 0;
17866 }
17867 _ACEOF
17868 rm -f conftest.$ac_objext
17869 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17870   (eval $ac_compile) 2>conftest.er1
17871   ac_status=$?
17872   grep -v '^ *+' conftest.er1 >conftest.err
17873   rm -f conftest.er1
17874   cat conftest.err >&5
17875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17876   (exit $ac_status); } &&
17877          { ac_try='test -z "$ac_c_werror_flag"
17878                          || test ! -s conftest.err'
17879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17880   (eval $ac_try) 2>&5
17881   ac_status=$?
17882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17883   (exit $ac_status); }; } &&
17884          { ac_try='test -s conftest.$ac_objext'
17885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17886   (eval $ac_try) 2>&5
17887   ac_status=$?
17888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17889   (exit $ac_status); }; }; then
17890   ac_lo=$ac_mid; break
17891 else
17892   echo "$as_me: failed program was:" >&5
17893 sed 's/^/| /' conftest.$ac_ext >&5
17894
17895 ac_hi=`expr '(' $ac_mid ')' - 1`
17896                        if test $ac_mid -le $ac_hi; then
17897                          ac_lo= ac_hi=
17898                          break
17899                        fi
17900                        ac_mid=`expr 2 '*' $ac_mid`
17901 fi
17902 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17903   done
17904 else
17905   echo "$as_me: failed program was:" >&5
17906 sed 's/^/| /' conftest.$ac_ext >&5
17907
17908 ac_lo= ac_hi=
17909 fi
17910 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17911 fi
17912 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17913 # Binary search between lo and hi bounds.
17914 while test "x$ac_lo" != "x$ac_hi"; do
17915   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
17916   cat >conftest.$ac_ext <<_ACEOF
17917 /* confdefs.h.  */
17918 _ACEOF
17919 cat confdefs.h >>conftest.$ac_ext
17920 cat >>conftest.$ac_ext <<_ACEOF
17921 /* end confdefs.h.  */
17922 $ac_includes_default
17923 int
17924 main ()
17925 {
17926 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
17927 test_array [0] = 0
17928
17929   ;
17930   return 0;
17931 }
17932 _ACEOF
17933 rm -f conftest.$ac_objext
17934 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17935   (eval $ac_compile) 2>conftest.er1
17936   ac_status=$?
17937   grep -v '^ *+' conftest.er1 >conftest.err
17938   rm -f conftest.er1
17939   cat conftest.err >&5
17940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17941   (exit $ac_status); } &&
17942          { ac_try='test -z "$ac_c_werror_flag"
17943                          || test ! -s conftest.err'
17944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17945   (eval $ac_try) 2>&5
17946   ac_status=$?
17947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17948   (exit $ac_status); }; } &&
17949          { ac_try='test -s conftest.$ac_objext'
17950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17951   (eval $ac_try) 2>&5
17952   ac_status=$?
17953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17954   (exit $ac_status); }; }; then
17955   ac_hi=$ac_mid
17956 else
17957   echo "$as_me: failed program was:" >&5
17958 sed 's/^/| /' conftest.$ac_ext >&5
17959
17960 ac_lo=`expr '(' $ac_mid ')' + 1`
17961 fi
17962 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17963 done
17964 case $ac_lo in
17965 ?*) ac_cv_sizeof_size_t=$ac_lo;;
17966 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
17967 See \`config.log' for more details." >&5
17968 echo "$as_me: error: cannot compute sizeof (size_t), 77
17969 See \`config.log' for more details." >&2;}
17970    { (exit 1); exit 1; }; } ;;
17971 esac
17972 else
17973   if test "$cross_compiling" = yes; then
17974   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17975 See \`config.log' for more details." >&5
17976 echo "$as_me: error: cannot run test program while cross compiling
17977 See \`config.log' for more details." >&2;}
17978    { (exit 1); exit 1; }; }
17979 else
17980   cat >conftest.$ac_ext <<_ACEOF
17981 /* confdefs.h.  */
17982 _ACEOF
17983 cat confdefs.h >>conftest.$ac_ext
17984 cat >>conftest.$ac_ext <<_ACEOF
17985 /* end confdefs.h.  */
17986 $ac_includes_default
17987 long longval () { return (long) (sizeof (size_t)); }
17988 unsigned long ulongval () { return (long) (sizeof (size_t)); }
17989 #include <stdio.h>
17990 #include <stdlib.h>
17991 int
17992 main ()
17993 {
17994
17995   FILE *f = fopen ("conftest.val", "w");
17996   if (! f)
17997     exit (1);
17998   if (((long) (sizeof (size_t))) < 0)
17999     {
18000       long i = longval ();
18001       if (i != ((long) (sizeof (size_t))))
18002         exit (1);
18003       fprintf (f, "%ld\n", i);
18004     }
18005   else
18006     {
18007       unsigned long i = ulongval ();
18008       if (i != ((long) (sizeof (size_t))))
18009         exit (1);
18010       fprintf (f, "%lu\n", i);
18011     }
18012   exit (ferror (f) || fclose (f) != 0);
18013
18014   ;
18015   return 0;
18016 }
18017 _ACEOF
18018 rm -f conftest$ac_exeext
18019 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18020   (eval $ac_link) 2>&5
18021   ac_status=$?
18022   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18023   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18025   (eval $ac_try) 2>&5
18026   ac_status=$?
18027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18028   (exit $ac_status); }; }; then
18029   ac_cv_sizeof_size_t=`cat conftest.val`
18030 else
18031   echo "$as_me: program exited with status $ac_status" >&5
18032 echo "$as_me: failed program was:" >&5
18033 sed 's/^/| /' conftest.$ac_ext >&5
18034
18035 ( exit $ac_status )
18036 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18037 See \`config.log' for more details." >&5
18038 echo "$as_me: error: cannot compute sizeof (size_t), 77
18039 See \`config.log' for more details." >&2;}
18040    { (exit 1); exit 1; }; }
18041 fi
18042 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18043 fi
18044 fi
18045 rm -f conftest.val
18046 else
18047   ac_cv_sizeof_size_t=0
18048 fi
18049 fi
18050 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
18051 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
18052 cat >>confdefs.h <<_ACEOF
18053 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
18054 _ACEOF
18055
18056
18057
18058 # Determine memory alignment requirements for the basic C data types.
18059
18060 echo "$as_me:$LINENO: checking for short" >&5
18061 echo $ECHO_N "checking for short... $ECHO_C" >&6
18062 if test "${ac_cv_type_short+set}" = set; then
18063   echo $ECHO_N "(cached) $ECHO_C" >&6
18064 else
18065   cat >conftest.$ac_ext <<_ACEOF
18066 /* confdefs.h.  */
18067 _ACEOF
18068 cat confdefs.h >>conftest.$ac_ext
18069 cat >>conftest.$ac_ext <<_ACEOF
18070 /* end confdefs.h.  */
18071 $ac_includes_default
18072 int
18073 main ()
18074 {
18075 if ((short *) 0)
18076   return 0;
18077 if (sizeof (short))
18078   return 0;
18079   ;
18080   return 0;
18081 }
18082 _ACEOF
18083 rm -f conftest.$ac_objext
18084 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18085   (eval $ac_compile) 2>conftest.er1
18086   ac_status=$?
18087   grep -v '^ *+' conftest.er1 >conftest.err
18088   rm -f conftest.er1
18089   cat conftest.err >&5
18090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18091   (exit $ac_status); } &&
18092          { ac_try='test -z "$ac_c_werror_flag"
18093                          || test ! -s conftest.err'
18094   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18095   (eval $ac_try) 2>&5
18096   ac_status=$?
18097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18098   (exit $ac_status); }; } &&
18099          { ac_try='test -s conftest.$ac_objext'
18100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18101   (eval $ac_try) 2>&5
18102   ac_status=$?
18103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18104   (exit $ac_status); }; }; then
18105   ac_cv_type_short=yes
18106 else
18107   echo "$as_me: failed program was:" >&5
18108 sed 's/^/| /' conftest.$ac_ext >&5
18109
18110 ac_cv_type_short=no
18111 fi
18112 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18113 fi
18114 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
18115 echo "${ECHO_T}$ac_cv_type_short" >&6
18116
18117 echo "$as_me:$LINENO: checking alignment of short" >&5
18118 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
18119 if test "${pgac_cv_alignof_short+set}" = set; then
18120   echo $ECHO_N "(cached) $ECHO_C" >&6
18121 else
18122   if test "$ac_cv_type_short" = yes; then
18123   if test "$cross_compiling" = yes; then
18124   # Depending upon the size, compute the lo and hi bounds.
18125 cat >conftest.$ac_ext <<_ACEOF
18126 /* confdefs.h.  */
18127 _ACEOF
18128 cat confdefs.h >>conftest.$ac_ext
18129 cat >>conftest.$ac_ext <<_ACEOF
18130 /* end confdefs.h.  */
18131 $ac_includes_default
18132 struct { char filler; short field; } pgac_struct;
18133 int
18134 main ()
18135 {
18136 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18137 test_array [0] = 0
18138
18139   ;
18140   return 0;
18141 }
18142 _ACEOF
18143 rm -f conftest.$ac_objext
18144 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18145   (eval $ac_compile) 2>conftest.er1
18146   ac_status=$?
18147   grep -v '^ *+' conftest.er1 >conftest.err
18148   rm -f conftest.er1
18149   cat conftest.err >&5
18150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18151   (exit $ac_status); } &&
18152          { ac_try='test -z "$ac_c_werror_flag"
18153                          || test ! -s conftest.err'
18154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18155   (eval $ac_try) 2>&5
18156   ac_status=$?
18157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18158   (exit $ac_status); }; } &&
18159          { ac_try='test -s conftest.$ac_objext'
18160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18161   (eval $ac_try) 2>&5
18162   ac_status=$?
18163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18164   (exit $ac_status); }; }; then
18165   ac_lo=0 ac_mid=0
18166   while :; do
18167     cat >conftest.$ac_ext <<_ACEOF
18168 /* confdefs.h.  */
18169 _ACEOF
18170 cat confdefs.h >>conftest.$ac_ext
18171 cat >>conftest.$ac_ext <<_ACEOF
18172 /* end confdefs.h.  */
18173 $ac_includes_default
18174 struct { char filler; short field; } pgac_struct;
18175 int
18176 main ()
18177 {
18178 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18179 test_array [0] = 0
18180
18181   ;
18182   return 0;
18183 }
18184 _ACEOF
18185 rm -f conftest.$ac_objext
18186 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18187   (eval $ac_compile) 2>conftest.er1
18188   ac_status=$?
18189   grep -v '^ *+' conftest.er1 >conftest.err
18190   rm -f conftest.er1
18191   cat conftest.err >&5
18192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18193   (exit $ac_status); } &&
18194          { ac_try='test -z "$ac_c_werror_flag"
18195                          || test ! -s conftest.err'
18196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18197   (eval $ac_try) 2>&5
18198   ac_status=$?
18199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18200   (exit $ac_status); }; } &&
18201          { ac_try='test -s conftest.$ac_objext'
18202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18203   (eval $ac_try) 2>&5
18204   ac_status=$?
18205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18206   (exit $ac_status); }; }; then
18207   ac_hi=$ac_mid; break
18208 else
18209   echo "$as_me: failed program was:" >&5
18210 sed 's/^/| /' conftest.$ac_ext >&5
18211
18212 ac_lo=`expr $ac_mid + 1`
18213                     if test $ac_lo -le $ac_mid; then
18214                       ac_lo= ac_hi=
18215                       break
18216                     fi
18217                     ac_mid=`expr 2 '*' $ac_mid + 1`
18218 fi
18219 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18220   done
18221 else
18222   echo "$as_me: failed program was:" >&5
18223 sed 's/^/| /' conftest.$ac_ext >&5
18224
18225 cat >conftest.$ac_ext <<_ACEOF
18226 /* confdefs.h.  */
18227 _ACEOF
18228 cat confdefs.h >>conftest.$ac_ext
18229 cat >>conftest.$ac_ext <<_ACEOF
18230 /* end confdefs.h.  */
18231 $ac_includes_default
18232 struct { char filler; short field; } pgac_struct;
18233 int
18234 main ()
18235 {
18236 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
18237 test_array [0] = 0
18238
18239   ;
18240   return 0;
18241 }
18242 _ACEOF
18243 rm -f conftest.$ac_objext
18244 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18245   (eval $ac_compile) 2>conftest.er1
18246   ac_status=$?
18247   grep -v '^ *+' conftest.er1 >conftest.err
18248   rm -f conftest.er1
18249   cat conftest.err >&5
18250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18251   (exit $ac_status); } &&
18252          { ac_try='test -z "$ac_c_werror_flag"
18253                          || test ! -s conftest.err'
18254   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18255   (eval $ac_try) 2>&5
18256   ac_status=$?
18257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18258   (exit $ac_status); }; } &&
18259          { ac_try='test -s conftest.$ac_objext'
18260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18261   (eval $ac_try) 2>&5
18262   ac_status=$?
18263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18264   (exit $ac_status); }; }; then
18265   ac_hi=-1 ac_mid=-1
18266   while :; do
18267     cat >conftest.$ac_ext <<_ACEOF
18268 /* confdefs.h.  */
18269 _ACEOF
18270 cat confdefs.h >>conftest.$ac_ext
18271 cat >>conftest.$ac_ext <<_ACEOF
18272 /* end confdefs.h.  */
18273 $ac_includes_default
18274 struct { char filler; short field; } pgac_struct;
18275 int
18276 main ()
18277 {
18278 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
18279 test_array [0] = 0
18280
18281   ;
18282   return 0;
18283 }
18284 _ACEOF
18285 rm -f conftest.$ac_objext
18286 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18287   (eval $ac_compile) 2>conftest.er1
18288   ac_status=$?
18289   grep -v '^ *+' conftest.er1 >conftest.err
18290   rm -f conftest.er1
18291   cat conftest.err >&5
18292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18293   (exit $ac_status); } &&
18294          { ac_try='test -z "$ac_c_werror_flag"
18295                          || test ! -s conftest.err'
18296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18297   (eval $ac_try) 2>&5
18298   ac_status=$?
18299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18300   (exit $ac_status); }; } &&
18301          { ac_try='test -s conftest.$ac_objext'
18302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18303   (eval $ac_try) 2>&5
18304   ac_status=$?
18305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18306   (exit $ac_status); }; }; then
18307   ac_lo=$ac_mid; break
18308 else
18309   echo "$as_me: failed program was:" >&5
18310 sed 's/^/| /' conftest.$ac_ext >&5
18311
18312 ac_hi=`expr '(' $ac_mid ')' - 1`
18313                        if test $ac_mid -le $ac_hi; then
18314                          ac_lo= ac_hi=
18315                          break
18316                        fi
18317                        ac_mid=`expr 2 '*' $ac_mid`
18318 fi
18319 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18320   done
18321 else
18322   echo "$as_me: failed program was:" >&5
18323 sed 's/^/| /' conftest.$ac_ext >&5
18324
18325 ac_lo= ac_hi=
18326 fi
18327 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18328 fi
18329 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18330 # Binary search between lo and hi bounds.
18331 while test "x$ac_lo" != "x$ac_hi"; do
18332   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18333   cat >conftest.$ac_ext <<_ACEOF
18334 /* confdefs.h.  */
18335 _ACEOF
18336 cat confdefs.h >>conftest.$ac_ext
18337 cat >>conftest.$ac_ext <<_ACEOF
18338 /* end confdefs.h.  */
18339 $ac_includes_default
18340 struct { char filler; short field; } pgac_struct;
18341 int
18342 main ()
18343 {
18344 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18345 test_array [0] = 0
18346
18347   ;
18348   return 0;
18349 }
18350 _ACEOF
18351 rm -f conftest.$ac_objext
18352 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18353   (eval $ac_compile) 2>conftest.er1
18354   ac_status=$?
18355   grep -v '^ *+' conftest.er1 >conftest.err
18356   rm -f conftest.er1
18357   cat conftest.err >&5
18358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18359   (exit $ac_status); } &&
18360          { ac_try='test -z "$ac_c_werror_flag"
18361                          || test ! -s conftest.err'
18362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18363   (eval $ac_try) 2>&5
18364   ac_status=$?
18365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18366   (exit $ac_status); }; } &&
18367          { ac_try='test -s conftest.$ac_objext'
18368   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18369   (eval $ac_try) 2>&5
18370   ac_status=$?
18371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18372   (exit $ac_status); }; }; then
18373   ac_hi=$ac_mid
18374 else
18375   echo "$as_me: failed program was:" >&5
18376 sed 's/^/| /' conftest.$ac_ext >&5
18377
18378 ac_lo=`expr '(' $ac_mid ')' + 1`
18379 fi
18380 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18381 done
18382 case $ac_lo in
18383 ?*) pgac_cv_alignof_short=$ac_lo;;
18384 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18385 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18386    { (exit 1); exit 1; }; } ;;
18387 esac
18388 else
18389   if test "$cross_compiling" = yes; then
18390   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18391 See \`config.log' for more details." >&5
18392 echo "$as_me: error: cannot run test program while cross compiling
18393 See \`config.log' for more details." >&2;}
18394    { (exit 1); exit 1; }; }
18395 else
18396   cat >conftest.$ac_ext <<_ACEOF
18397 /* confdefs.h.  */
18398 _ACEOF
18399 cat confdefs.h >>conftest.$ac_ext
18400 cat >>conftest.$ac_ext <<_ACEOF
18401 /* end confdefs.h.  */
18402 $ac_includes_default
18403 struct { char filler; short field; } pgac_struct;
18404 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18405 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18406 #include <stdio.h>
18407 #include <stdlib.h>
18408 int
18409 main ()
18410 {
18411
18412   FILE *f = fopen ("conftest.val", "w");
18413   if (! f)
18414     exit (1);
18415   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
18416     {
18417       long i = longval ();
18418       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18419         exit (1);
18420       fprintf (f, "%ld\n", i);
18421     }
18422   else
18423     {
18424       unsigned long i = ulongval ();
18425       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18426         exit (1);
18427       fprintf (f, "%lu\n", i);
18428     }
18429   exit (ferror (f) || fclose (f) != 0);
18430
18431   ;
18432   return 0;
18433 }
18434 _ACEOF
18435 rm -f conftest$ac_exeext
18436 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18437   (eval $ac_link) 2>&5
18438   ac_status=$?
18439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18440   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18442   (eval $ac_try) 2>&5
18443   ac_status=$?
18444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18445   (exit $ac_status); }; }; then
18446   pgac_cv_alignof_short=`cat conftest.val`
18447 else
18448   echo "$as_me: program exited with status $ac_status" >&5
18449 echo "$as_me: failed program was:" >&5
18450 sed 's/^/| /' conftest.$ac_ext >&5
18451
18452 ( exit $ac_status )
18453 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18454 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18455    { (exit 1); exit 1; }; }
18456 fi
18457 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18458 fi
18459 fi
18460 rm -f conftest.val
18461 else
18462   pgac_cv_alignof_short=0
18463 fi
18464 fi
18465 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
18466 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
18467 cat >>confdefs.h <<_ACEOF
18468 #define ALIGNOF_SHORT $pgac_cv_alignof_short
18469 _ACEOF
18470
18471
18472 echo "$as_me:$LINENO: checking for int" >&5
18473 echo $ECHO_N "checking for int... $ECHO_C" >&6
18474 if test "${ac_cv_type_int+set}" = set; then
18475   echo $ECHO_N "(cached) $ECHO_C" >&6
18476 else
18477   cat >conftest.$ac_ext <<_ACEOF
18478 /* confdefs.h.  */
18479 _ACEOF
18480 cat confdefs.h >>conftest.$ac_ext
18481 cat >>conftest.$ac_ext <<_ACEOF
18482 /* end confdefs.h.  */
18483 $ac_includes_default
18484 int
18485 main ()
18486 {
18487 if ((int *) 0)
18488   return 0;
18489 if (sizeof (int))
18490   return 0;
18491   ;
18492   return 0;
18493 }
18494 _ACEOF
18495 rm -f conftest.$ac_objext
18496 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18497   (eval $ac_compile) 2>conftest.er1
18498   ac_status=$?
18499   grep -v '^ *+' conftest.er1 >conftest.err
18500   rm -f conftest.er1
18501   cat conftest.err >&5
18502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18503   (exit $ac_status); } &&
18504          { ac_try='test -z "$ac_c_werror_flag"
18505                          || test ! -s conftest.err'
18506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18507   (eval $ac_try) 2>&5
18508   ac_status=$?
18509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18510   (exit $ac_status); }; } &&
18511          { ac_try='test -s conftest.$ac_objext'
18512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18513   (eval $ac_try) 2>&5
18514   ac_status=$?
18515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18516   (exit $ac_status); }; }; then
18517   ac_cv_type_int=yes
18518 else
18519   echo "$as_me: failed program was:" >&5
18520 sed 's/^/| /' conftest.$ac_ext >&5
18521
18522 ac_cv_type_int=no
18523 fi
18524 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18525 fi
18526 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
18527 echo "${ECHO_T}$ac_cv_type_int" >&6
18528
18529 echo "$as_me:$LINENO: checking alignment of int" >&5
18530 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
18531 if test "${pgac_cv_alignof_int+set}" = set; then
18532   echo $ECHO_N "(cached) $ECHO_C" >&6
18533 else
18534   if test "$ac_cv_type_int" = yes; then
18535   if test "$cross_compiling" = yes; then
18536   # Depending upon the size, compute the lo and hi bounds.
18537 cat >conftest.$ac_ext <<_ACEOF
18538 /* confdefs.h.  */
18539 _ACEOF
18540 cat confdefs.h >>conftest.$ac_ext
18541 cat >>conftest.$ac_ext <<_ACEOF
18542 /* end confdefs.h.  */
18543 $ac_includes_default
18544 struct { char filler; int field; } pgac_struct;
18545 int
18546 main ()
18547 {
18548 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18549 test_array [0] = 0
18550
18551   ;
18552   return 0;
18553 }
18554 _ACEOF
18555 rm -f conftest.$ac_objext
18556 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18557   (eval $ac_compile) 2>conftest.er1
18558   ac_status=$?
18559   grep -v '^ *+' conftest.er1 >conftest.err
18560   rm -f conftest.er1
18561   cat conftest.err >&5
18562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18563   (exit $ac_status); } &&
18564          { ac_try='test -z "$ac_c_werror_flag"
18565                          || test ! -s conftest.err'
18566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18567   (eval $ac_try) 2>&5
18568   ac_status=$?
18569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18570   (exit $ac_status); }; } &&
18571          { ac_try='test -s conftest.$ac_objext'
18572   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18573   (eval $ac_try) 2>&5
18574   ac_status=$?
18575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18576   (exit $ac_status); }; }; then
18577   ac_lo=0 ac_mid=0
18578   while :; do
18579     cat >conftest.$ac_ext <<_ACEOF
18580 /* confdefs.h.  */
18581 _ACEOF
18582 cat confdefs.h >>conftest.$ac_ext
18583 cat >>conftest.$ac_ext <<_ACEOF
18584 /* end confdefs.h.  */
18585 $ac_includes_default
18586 struct { char filler; int field; } pgac_struct;
18587 int
18588 main ()
18589 {
18590 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18591 test_array [0] = 0
18592
18593   ;
18594   return 0;
18595 }
18596 _ACEOF
18597 rm -f conftest.$ac_objext
18598 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18599   (eval $ac_compile) 2>conftest.er1
18600   ac_status=$?
18601   grep -v '^ *+' conftest.er1 >conftest.err
18602   rm -f conftest.er1
18603   cat conftest.err >&5
18604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18605   (exit $ac_status); } &&
18606          { ac_try='test -z "$ac_c_werror_flag"
18607                          || test ! -s conftest.err'
18608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18609   (eval $ac_try) 2>&5
18610   ac_status=$?
18611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18612   (exit $ac_status); }; } &&
18613          { ac_try='test -s conftest.$ac_objext'
18614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18615   (eval $ac_try) 2>&5
18616   ac_status=$?
18617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18618   (exit $ac_status); }; }; then
18619   ac_hi=$ac_mid; break
18620 else
18621   echo "$as_me: failed program was:" >&5
18622 sed 's/^/| /' conftest.$ac_ext >&5
18623
18624 ac_lo=`expr $ac_mid + 1`
18625                     if test $ac_lo -le $ac_mid; then
18626                       ac_lo= ac_hi=
18627                       break
18628                     fi
18629                     ac_mid=`expr 2 '*' $ac_mid + 1`
18630 fi
18631 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18632   done
18633 else
18634   echo "$as_me: failed program was:" >&5
18635 sed 's/^/| /' conftest.$ac_ext >&5
18636
18637 cat >conftest.$ac_ext <<_ACEOF
18638 /* confdefs.h.  */
18639 _ACEOF
18640 cat confdefs.h >>conftest.$ac_ext
18641 cat >>conftest.$ac_ext <<_ACEOF
18642 /* end confdefs.h.  */
18643 $ac_includes_default
18644 struct { char filler; int field; } pgac_struct;
18645 int
18646 main ()
18647 {
18648 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
18649 test_array [0] = 0
18650
18651   ;
18652   return 0;
18653 }
18654 _ACEOF
18655 rm -f conftest.$ac_objext
18656 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18657   (eval $ac_compile) 2>conftest.er1
18658   ac_status=$?
18659   grep -v '^ *+' conftest.er1 >conftest.err
18660   rm -f conftest.er1
18661   cat conftest.err >&5
18662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18663   (exit $ac_status); } &&
18664          { ac_try='test -z "$ac_c_werror_flag"
18665                          || test ! -s conftest.err'
18666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18667   (eval $ac_try) 2>&5
18668   ac_status=$?
18669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18670   (exit $ac_status); }; } &&
18671          { ac_try='test -s conftest.$ac_objext'
18672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18673   (eval $ac_try) 2>&5
18674   ac_status=$?
18675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18676   (exit $ac_status); }; }; then
18677   ac_hi=-1 ac_mid=-1
18678   while :; do
18679     cat >conftest.$ac_ext <<_ACEOF
18680 /* confdefs.h.  */
18681 _ACEOF
18682 cat confdefs.h >>conftest.$ac_ext
18683 cat >>conftest.$ac_ext <<_ACEOF
18684 /* end confdefs.h.  */
18685 $ac_includes_default
18686 struct { char filler; int field; } pgac_struct;
18687 int
18688 main ()
18689 {
18690 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
18691 test_array [0] = 0
18692
18693   ;
18694   return 0;
18695 }
18696 _ACEOF
18697 rm -f conftest.$ac_objext
18698 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18699   (eval $ac_compile) 2>conftest.er1
18700   ac_status=$?
18701   grep -v '^ *+' conftest.er1 >conftest.err
18702   rm -f conftest.er1
18703   cat conftest.err >&5
18704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18705   (exit $ac_status); } &&
18706          { ac_try='test -z "$ac_c_werror_flag"
18707                          || test ! -s conftest.err'
18708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18709   (eval $ac_try) 2>&5
18710   ac_status=$?
18711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18712   (exit $ac_status); }; } &&
18713          { ac_try='test -s conftest.$ac_objext'
18714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18715   (eval $ac_try) 2>&5
18716   ac_status=$?
18717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18718   (exit $ac_status); }; }; then
18719   ac_lo=$ac_mid; break
18720 else
18721   echo "$as_me: failed program was:" >&5
18722 sed 's/^/| /' conftest.$ac_ext >&5
18723
18724 ac_hi=`expr '(' $ac_mid ')' - 1`
18725                        if test $ac_mid -le $ac_hi; then
18726                          ac_lo= ac_hi=
18727                          break
18728                        fi
18729                        ac_mid=`expr 2 '*' $ac_mid`
18730 fi
18731 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18732   done
18733 else
18734   echo "$as_me: failed program was:" >&5
18735 sed 's/^/| /' conftest.$ac_ext >&5
18736
18737 ac_lo= ac_hi=
18738 fi
18739 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18740 fi
18741 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18742 # Binary search between lo and hi bounds.
18743 while test "x$ac_lo" != "x$ac_hi"; do
18744   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18745   cat >conftest.$ac_ext <<_ACEOF
18746 /* confdefs.h.  */
18747 _ACEOF
18748 cat confdefs.h >>conftest.$ac_ext
18749 cat >>conftest.$ac_ext <<_ACEOF
18750 /* end confdefs.h.  */
18751 $ac_includes_default
18752 struct { char filler; int field; } pgac_struct;
18753 int
18754 main ()
18755 {
18756 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18757 test_array [0] = 0
18758
18759   ;
18760   return 0;
18761 }
18762 _ACEOF
18763 rm -f conftest.$ac_objext
18764 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18765   (eval $ac_compile) 2>conftest.er1
18766   ac_status=$?
18767   grep -v '^ *+' conftest.er1 >conftest.err
18768   rm -f conftest.er1
18769   cat conftest.err >&5
18770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18771   (exit $ac_status); } &&
18772          { ac_try='test -z "$ac_c_werror_flag"
18773                          || test ! -s conftest.err'
18774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18775   (eval $ac_try) 2>&5
18776   ac_status=$?
18777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18778   (exit $ac_status); }; } &&
18779          { ac_try='test -s conftest.$ac_objext'
18780   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18781   (eval $ac_try) 2>&5
18782   ac_status=$?
18783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18784   (exit $ac_status); }; }; then
18785   ac_hi=$ac_mid
18786 else
18787   echo "$as_me: failed program was:" >&5
18788 sed 's/^/| /' conftest.$ac_ext >&5
18789
18790 ac_lo=`expr '(' $ac_mid ')' + 1`
18791 fi
18792 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18793 done
18794 case $ac_lo in
18795 ?*) pgac_cv_alignof_int=$ac_lo;;
18796 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
18797 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
18798    { (exit 1); exit 1; }; } ;;
18799 esac
18800 else
18801   if test "$cross_compiling" = yes; then
18802   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18803 See \`config.log' for more details." >&5
18804 echo "$as_me: error: cannot run test program while cross compiling
18805 See \`config.log' for more details." >&2;}
18806    { (exit 1); exit 1; }; }
18807 else
18808   cat >conftest.$ac_ext <<_ACEOF
18809 /* confdefs.h.  */
18810 _ACEOF
18811 cat confdefs.h >>conftest.$ac_ext
18812 cat >>conftest.$ac_ext <<_ACEOF
18813 /* end confdefs.h.  */
18814 $ac_includes_default
18815 struct { char filler; int field; } pgac_struct;
18816 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18817 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18818 #include <stdio.h>
18819 #include <stdlib.h>
18820 int
18821 main ()
18822 {
18823
18824   FILE *f = fopen ("conftest.val", "w");
18825   if (! f)
18826     exit (1);
18827   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
18828     {
18829       long i = longval ();
18830       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18831         exit (1);
18832       fprintf (f, "%ld\n", i);
18833     }
18834   else
18835     {
18836       unsigned long i = ulongval ();
18837       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18838         exit (1);
18839       fprintf (f, "%lu\n", i);
18840     }
18841   exit (ferror (f) || fclose (f) != 0);
18842
18843   ;
18844   return 0;
18845 }
18846 _ACEOF
18847 rm -f conftest$ac_exeext
18848 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18849   (eval $ac_link) 2>&5
18850   ac_status=$?
18851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18852   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18853   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18854   (eval $ac_try) 2>&5
18855   ac_status=$?
18856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18857   (exit $ac_status); }; }; then
18858   pgac_cv_alignof_int=`cat conftest.val`
18859 else
18860   echo "$as_me: program exited with status $ac_status" >&5
18861 echo "$as_me: failed program was:" >&5
18862 sed 's/^/| /' conftest.$ac_ext >&5
18863
18864 ( exit $ac_status )
18865 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
18866 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
18867    { (exit 1); exit 1; }; }
18868 fi
18869 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18870 fi
18871 fi
18872 rm -f conftest.val
18873 else
18874   pgac_cv_alignof_int=0
18875 fi
18876 fi
18877 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
18878 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
18879 cat >>confdefs.h <<_ACEOF
18880 #define ALIGNOF_INT $pgac_cv_alignof_int
18881 _ACEOF
18882
18883
18884 echo "$as_me:$LINENO: checking for long" >&5
18885 echo $ECHO_N "checking for long... $ECHO_C" >&6
18886 if test "${ac_cv_type_long+set}" = set; then
18887   echo $ECHO_N "(cached) $ECHO_C" >&6
18888 else
18889   cat >conftest.$ac_ext <<_ACEOF
18890 /* confdefs.h.  */
18891 _ACEOF
18892 cat confdefs.h >>conftest.$ac_ext
18893 cat >>conftest.$ac_ext <<_ACEOF
18894 /* end confdefs.h.  */
18895 $ac_includes_default
18896 int
18897 main ()
18898 {
18899 if ((long *) 0)
18900   return 0;
18901 if (sizeof (long))
18902   return 0;
18903   ;
18904   return 0;
18905 }
18906 _ACEOF
18907 rm -f conftest.$ac_objext
18908 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18909   (eval $ac_compile) 2>conftest.er1
18910   ac_status=$?
18911   grep -v '^ *+' conftest.er1 >conftest.err
18912   rm -f conftest.er1
18913   cat conftest.err >&5
18914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18915   (exit $ac_status); } &&
18916          { ac_try='test -z "$ac_c_werror_flag"
18917                          || test ! -s conftest.err'
18918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18919   (eval $ac_try) 2>&5
18920   ac_status=$?
18921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18922   (exit $ac_status); }; } &&
18923          { ac_try='test -s conftest.$ac_objext'
18924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18925   (eval $ac_try) 2>&5
18926   ac_status=$?
18927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18928   (exit $ac_status); }; }; then
18929   ac_cv_type_long=yes
18930 else
18931   echo "$as_me: failed program was:" >&5
18932 sed 's/^/| /' conftest.$ac_ext >&5
18933
18934 ac_cv_type_long=no
18935 fi
18936 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18937 fi
18938 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
18939 echo "${ECHO_T}$ac_cv_type_long" >&6
18940
18941 echo "$as_me:$LINENO: checking alignment of long" >&5
18942 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
18943 if test "${pgac_cv_alignof_long+set}" = set; then
18944   echo $ECHO_N "(cached) $ECHO_C" >&6
18945 else
18946   if test "$ac_cv_type_long" = yes; then
18947   if test "$cross_compiling" = yes; then
18948   # Depending upon the size, compute the lo and hi bounds.
18949 cat >conftest.$ac_ext <<_ACEOF
18950 /* confdefs.h.  */
18951 _ACEOF
18952 cat confdefs.h >>conftest.$ac_ext
18953 cat >>conftest.$ac_ext <<_ACEOF
18954 /* end confdefs.h.  */
18955 $ac_includes_default
18956 struct { char filler; long field; } pgac_struct;
18957 int
18958 main ()
18959 {
18960 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18961 test_array [0] = 0
18962
18963   ;
18964   return 0;
18965 }
18966 _ACEOF
18967 rm -f conftest.$ac_objext
18968 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18969   (eval $ac_compile) 2>conftest.er1
18970   ac_status=$?
18971   grep -v '^ *+' conftest.er1 >conftest.err
18972   rm -f conftest.er1
18973   cat conftest.err >&5
18974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18975   (exit $ac_status); } &&
18976          { ac_try='test -z "$ac_c_werror_flag"
18977                          || test ! -s conftest.err'
18978   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18979   (eval $ac_try) 2>&5
18980   ac_status=$?
18981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18982   (exit $ac_status); }; } &&
18983          { ac_try='test -s conftest.$ac_objext'
18984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18985   (eval $ac_try) 2>&5
18986   ac_status=$?
18987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18988   (exit $ac_status); }; }; then
18989   ac_lo=0 ac_mid=0
18990   while :; do
18991     cat >conftest.$ac_ext <<_ACEOF
18992 /* confdefs.h.  */
18993 _ACEOF
18994 cat confdefs.h >>conftest.$ac_ext
18995 cat >>conftest.$ac_ext <<_ACEOF
18996 /* end confdefs.h.  */
18997 $ac_includes_default
18998 struct { char filler; long field; } pgac_struct;
18999 int
19000 main ()
19001 {
19002 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19003 test_array [0] = 0
19004
19005   ;
19006   return 0;
19007 }
19008 _ACEOF
19009 rm -f conftest.$ac_objext
19010 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19011   (eval $ac_compile) 2>conftest.er1
19012   ac_status=$?
19013   grep -v '^ *+' conftest.er1 >conftest.err
19014   rm -f conftest.er1
19015   cat conftest.err >&5
19016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19017   (exit $ac_status); } &&
19018          { ac_try='test -z "$ac_c_werror_flag"
19019                          || test ! -s conftest.err'
19020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19021   (eval $ac_try) 2>&5
19022   ac_status=$?
19023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19024   (exit $ac_status); }; } &&
19025          { ac_try='test -s conftest.$ac_objext'
19026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19027   (eval $ac_try) 2>&5
19028   ac_status=$?
19029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19030   (exit $ac_status); }; }; then
19031   ac_hi=$ac_mid; break
19032 else
19033   echo "$as_me: failed program was:" >&5
19034 sed 's/^/| /' conftest.$ac_ext >&5
19035
19036 ac_lo=`expr $ac_mid + 1`
19037                     if test $ac_lo -le $ac_mid; then
19038                       ac_lo= ac_hi=
19039                       break
19040                     fi
19041                     ac_mid=`expr 2 '*' $ac_mid + 1`
19042 fi
19043 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19044   done
19045 else
19046   echo "$as_me: failed program was:" >&5
19047 sed 's/^/| /' conftest.$ac_ext >&5
19048
19049 cat >conftest.$ac_ext <<_ACEOF
19050 /* confdefs.h.  */
19051 _ACEOF
19052 cat confdefs.h >>conftest.$ac_ext
19053 cat >>conftest.$ac_ext <<_ACEOF
19054 /* end confdefs.h.  */
19055 $ac_includes_default
19056 struct { char filler; long field; } pgac_struct;
19057 int
19058 main ()
19059 {
19060 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19061 test_array [0] = 0
19062
19063   ;
19064   return 0;
19065 }
19066 _ACEOF
19067 rm -f conftest.$ac_objext
19068 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19069   (eval $ac_compile) 2>conftest.er1
19070   ac_status=$?
19071   grep -v '^ *+' conftest.er1 >conftest.err
19072   rm -f conftest.er1
19073   cat conftest.err >&5
19074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19075   (exit $ac_status); } &&
19076          { ac_try='test -z "$ac_c_werror_flag"
19077                          || test ! -s conftest.err'
19078   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19079   (eval $ac_try) 2>&5
19080   ac_status=$?
19081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19082   (exit $ac_status); }; } &&
19083          { ac_try='test -s conftest.$ac_objext'
19084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19085   (eval $ac_try) 2>&5
19086   ac_status=$?
19087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19088   (exit $ac_status); }; }; then
19089   ac_hi=-1 ac_mid=-1
19090   while :; do
19091     cat >conftest.$ac_ext <<_ACEOF
19092 /* confdefs.h.  */
19093 _ACEOF
19094 cat confdefs.h >>conftest.$ac_ext
19095 cat >>conftest.$ac_ext <<_ACEOF
19096 /* end confdefs.h.  */
19097 $ac_includes_default
19098 struct { char filler; long field; } pgac_struct;
19099 int
19100 main ()
19101 {
19102 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19103 test_array [0] = 0
19104
19105   ;
19106   return 0;
19107 }
19108 _ACEOF
19109 rm -f conftest.$ac_objext
19110 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19111   (eval $ac_compile) 2>conftest.er1
19112   ac_status=$?
19113   grep -v '^ *+' conftest.er1 >conftest.err
19114   rm -f conftest.er1
19115   cat conftest.err >&5
19116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19117   (exit $ac_status); } &&
19118          { ac_try='test -z "$ac_c_werror_flag"
19119                          || test ! -s conftest.err'
19120   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19121   (eval $ac_try) 2>&5
19122   ac_status=$?
19123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19124   (exit $ac_status); }; } &&
19125          { ac_try='test -s conftest.$ac_objext'
19126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19127   (eval $ac_try) 2>&5
19128   ac_status=$?
19129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19130   (exit $ac_status); }; }; then
19131   ac_lo=$ac_mid; break
19132 else
19133   echo "$as_me: failed program was:" >&5
19134 sed 's/^/| /' conftest.$ac_ext >&5
19135
19136 ac_hi=`expr '(' $ac_mid ')' - 1`
19137                        if test $ac_mid -le $ac_hi; then
19138                          ac_lo= ac_hi=
19139                          break
19140                        fi
19141                        ac_mid=`expr 2 '*' $ac_mid`
19142 fi
19143 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19144   done
19145 else
19146   echo "$as_me: failed program was:" >&5
19147 sed 's/^/| /' conftest.$ac_ext >&5
19148
19149 ac_lo= ac_hi=
19150 fi
19151 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19152 fi
19153 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19154 # Binary search between lo and hi bounds.
19155 while test "x$ac_lo" != "x$ac_hi"; do
19156   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19157   cat >conftest.$ac_ext <<_ACEOF
19158 /* confdefs.h.  */
19159 _ACEOF
19160 cat confdefs.h >>conftest.$ac_ext
19161 cat >>conftest.$ac_ext <<_ACEOF
19162 /* end confdefs.h.  */
19163 $ac_includes_default
19164 struct { char filler; long field; } pgac_struct;
19165 int
19166 main ()
19167 {
19168 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19169 test_array [0] = 0
19170
19171   ;
19172   return 0;
19173 }
19174 _ACEOF
19175 rm -f conftest.$ac_objext
19176 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19177   (eval $ac_compile) 2>conftest.er1
19178   ac_status=$?
19179   grep -v '^ *+' conftest.er1 >conftest.err
19180   rm -f conftest.er1
19181   cat conftest.err >&5
19182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19183   (exit $ac_status); } &&
19184          { ac_try='test -z "$ac_c_werror_flag"
19185                          || test ! -s conftest.err'
19186   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19187   (eval $ac_try) 2>&5
19188   ac_status=$?
19189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19190   (exit $ac_status); }; } &&
19191          { ac_try='test -s conftest.$ac_objext'
19192   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19193   (eval $ac_try) 2>&5
19194   ac_status=$?
19195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19196   (exit $ac_status); }; }; then
19197   ac_hi=$ac_mid
19198 else
19199   echo "$as_me: failed program was:" >&5
19200 sed 's/^/| /' conftest.$ac_ext >&5
19201
19202 ac_lo=`expr '(' $ac_mid ')' + 1`
19203 fi
19204 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19205 done
19206 case $ac_lo in
19207 ?*) pgac_cv_alignof_long=$ac_lo;;
19208 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19209 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19210    { (exit 1); exit 1; }; } ;;
19211 esac
19212 else
19213   if test "$cross_compiling" = yes; then
19214   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19215 See \`config.log' for more details." >&5
19216 echo "$as_me: error: cannot run test program while cross compiling
19217 See \`config.log' for more details." >&2;}
19218    { (exit 1); exit 1; }; }
19219 else
19220   cat >conftest.$ac_ext <<_ACEOF
19221 /* confdefs.h.  */
19222 _ACEOF
19223 cat confdefs.h >>conftest.$ac_ext
19224 cat >>conftest.$ac_ext <<_ACEOF
19225 /* end confdefs.h.  */
19226 $ac_includes_default
19227 struct { char filler; long field; } pgac_struct;
19228 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19229 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19230 #include <stdio.h>
19231 #include <stdlib.h>
19232 int
19233 main ()
19234 {
19235
19236   FILE *f = fopen ("conftest.val", "w");
19237   if (! f)
19238     exit (1);
19239   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19240     {
19241       long i = longval ();
19242       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19243         exit (1);
19244       fprintf (f, "%ld\n", i);
19245     }
19246   else
19247     {
19248       unsigned long i = ulongval ();
19249       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19250         exit (1);
19251       fprintf (f, "%lu\n", i);
19252     }
19253   exit (ferror (f) || fclose (f) != 0);
19254
19255   ;
19256   return 0;
19257 }
19258 _ACEOF
19259 rm -f conftest$ac_exeext
19260 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19261   (eval $ac_link) 2>&5
19262   ac_status=$?
19263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19264   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19266   (eval $ac_try) 2>&5
19267   ac_status=$?
19268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19269   (exit $ac_status); }; }; then
19270   pgac_cv_alignof_long=`cat conftest.val`
19271 else
19272   echo "$as_me: program exited with status $ac_status" >&5
19273 echo "$as_me: failed program was:" >&5
19274 sed 's/^/| /' conftest.$ac_ext >&5
19275
19276 ( exit $ac_status )
19277 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19278 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19279    { (exit 1); exit 1; }; }
19280 fi
19281 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19282 fi
19283 fi
19284 rm -f conftest.val
19285 else
19286   pgac_cv_alignof_long=0
19287 fi
19288 fi
19289 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
19290 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
19291 cat >>confdefs.h <<_ACEOF
19292 #define ALIGNOF_LONG $pgac_cv_alignof_long
19293 _ACEOF
19294
19295
19296 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
19297   echo "$as_me:$LINENO: checking for long long int" >&5
19298 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
19299 if test "${ac_cv_type_long_long_int+set}" = set; then
19300   echo $ECHO_N "(cached) $ECHO_C" >&6
19301 else
19302   cat >conftest.$ac_ext <<_ACEOF
19303 /* confdefs.h.  */
19304 _ACEOF
19305 cat confdefs.h >>conftest.$ac_ext
19306 cat >>conftest.$ac_ext <<_ACEOF
19307 /* end confdefs.h.  */
19308 $ac_includes_default
19309 int
19310 main ()
19311 {
19312 if ((long long int *) 0)
19313   return 0;
19314 if (sizeof (long long int))
19315   return 0;
19316   ;
19317   return 0;
19318 }
19319 _ACEOF
19320 rm -f conftest.$ac_objext
19321 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19322   (eval $ac_compile) 2>conftest.er1
19323   ac_status=$?
19324   grep -v '^ *+' conftest.er1 >conftest.err
19325   rm -f conftest.er1
19326   cat conftest.err >&5
19327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19328   (exit $ac_status); } &&
19329          { ac_try='test -z "$ac_c_werror_flag"
19330                          || test ! -s conftest.err'
19331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19332   (eval $ac_try) 2>&5
19333   ac_status=$?
19334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19335   (exit $ac_status); }; } &&
19336          { ac_try='test -s conftest.$ac_objext'
19337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19338   (eval $ac_try) 2>&5
19339   ac_status=$?
19340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19341   (exit $ac_status); }; }; then
19342   ac_cv_type_long_long_int=yes
19343 else
19344   echo "$as_me: failed program was:" >&5
19345 sed 's/^/| /' conftest.$ac_ext >&5
19346
19347 ac_cv_type_long_long_int=no
19348 fi
19349 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19350 fi
19351 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
19352 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
19353
19354 echo "$as_me:$LINENO: checking alignment of long long int" >&5
19355 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
19356 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
19357   echo $ECHO_N "(cached) $ECHO_C" >&6
19358 else
19359   if test "$ac_cv_type_long_long_int" = yes; then
19360   if test "$cross_compiling" = yes; then
19361   # Depending upon the size, compute the lo and hi bounds.
19362 cat >conftest.$ac_ext <<_ACEOF
19363 /* confdefs.h.  */
19364 _ACEOF
19365 cat confdefs.h >>conftest.$ac_ext
19366 cat >>conftest.$ac_ext <<_ACEOF
19367 /* end confdefs.h.  */
19368 $ac_includes_default
19369 struct { char filler; long long int field; } pgac_struct;
19370 int
19371 main ()
19372 {
19373 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19374 test_array [0] = 0
19375
19376   ;
19377   return 0;
19378 }
19379 _ACEOF
19380 rm -f conftest.$ac_objext
19381 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19382   (eval $ac_compile) 2>conftest.er1
19383   ac_status=$?
19384   grep -v '^ *+' conftest.er1 >conftest.err
19385   rm -f conftest.er1
19386   cat conftest.err >&5
19387   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19388   (exit $ac_status); } &&
19389          { ac_try='test -z "$ac_c_werror_flag"
19390                          || test ! -s conftest.err'
19391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19392   (eval $ac_try) 2>&5
19393   ac_status=$?
19394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19395   (exit $ac_status); }; } &&
19396          { ac_try='test -s conftest.$ac_objext'
19397   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19398   (eval $ac_try) 2>&5
19399   ac_status=$?
19400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19401   (exit $ac_status); }; }; then
19402   ac_lo=0 ac_mid=0
19403   while :; do
19404     cat >conftest.$ac_ext <<_ACEOF
19405 /* confdefs.h.  */
19406 _ACEOF
19407 cat confdefs.h >>conftest.$ac_ext
19408 cat >>conftest.$ac_ext <<_ACEOF
19409 /* end confdefs.h.  */
19410 $ac_includes_default
19411 struct { char filler; long long int field; } pgac_struct;
19412 int
19413 main ()
19414 {
19415 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19416 test_array [0] = 0
19417
19418   ;
19419   return 0;
19420 }
19421 _ACEOF
19422 rm -f conftest.$ac_objext
19423 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19424   (eval $ac_compile) 2>conftest.er1
19425   ac_status=$?
19426   grep -v '^ *+' conftest.er1 >conftest.err
19427   rm -f conftest.er1
19428   cat conftest.err >&5
19429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19430   (exit $ac_status); } &&
19431          { ac_try='test -z "$ac_c_werror_flag"
19432                          || test ! -s conftest.err'
19433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19434   (eval $ac_try) 2>&5
19435   ac_status=$?
19436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19437   (exit $ac_status); }; } &&
19438          { ac_try='test -s conftest.$ac_objext'
19439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19440   (eval $ac_try) 2>&5
19441   ac_status=$?
19442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19443   (exit $ac_status); }; }; then
19444   ac_hi=$ac_mid; break
19445 else
19446   echo "$as_me: failed program was:" >&5
19447 sed 's/^/| /' conftest.$ac_ext >&5
19448
19449 ac_lo=`expr $ac_mid + 1`
19450                     if test $ac_lo -le $ac_mid; then
19451                       ac_lo= ac_hi=
19452                       break
19453                     fi
19454                     ac_mid=`expr 2 '*' $ac_mid + 1`
19455 fi
19456 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19457   done
19458 else
19459   echo "$as_me: failed program was:" >&5
19460 sed 's/^/| /' conftest.$ac_ext >&5
19461
19462 cat >conftest.$ac_ext <<_ACEOF
19463 /* confdefs.h.  */
19464 _ACEOF
19465 cat confdefs.h >>conftest.$ac_ext
19466 cat >>conftest.$ac_ext <<_ACEOF
19467 /* end confdefs.h.  */
19468 $ac_includes_default
19469 struct { char filler; long long int field; } pgac_struct;
19470 int
19471 main ()
19472 {
19473 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19474 test_array [0] = 0
19475
19476   ;
19477   return 0;
19478 }
19479 _ACEOF
19480 rm -f conftest.$ac_objext
19481 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19482   (eval $ac_compile) 2>conftest.er1
19483   ac_status=$?
19484   grep -v '^ *+' conftest.er1 >conftest.err
19485   rm -f conftest.er1
19486   cat conftest.err >&5
19487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19488   (exit $ac_status); } &&
19489          { ac_try='test -z "$ac_c_werror_flag"
19490                          || test ! -s conftest.err'
19491   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19492   (eval $ac_try) 2>&5
19493   ac_status=$?
19494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19495   (exit $ac_status); }; } &&
19496          { ac_try='test -s conftest.$ac_objext'
19497   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19498   (eval $ac_try) 2>&5
19499   ac_status=$?
19500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19501   (exit $ac_status); }; }; then
19502   ac_hi=-1 ac_mid=-1
19503   while :; do
19504     cat >conftest.$ac_ext <<_ACEOF
19505 /* confdefs.h.  */
19506 _ACEOF
19507 cat confdefs.h >>conftest.$ac_ext
19508 cat >>conftest.$ac_ext <<_ACEOF
19509 /* end confdefs.h.  */
19510 $ac_includes_default
19511 struct { char filler; long long int field; } pgac_struct;
19512 int
19513 main ()
19514 {
19515 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19516 test_array [0] = 0
19517
19518   ;
19519   return 0;
19520 }
19521 _ACEOF
19522 rm -f conftest.$ac_objext
19523 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19524   (eval $ac_compile) 2>conftest.er1
19525   ac_status=$?
19526   grep -v '^ *+' conftest.er1 >conftest.err
19527   rm -f conftest.er1
19528   cat conftest.err >&5
19529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19530   (exit $ac_status); } &&
19531          { ac_try='test -z "$ac_c_werror_flag"
19532                          || test ! -s conftest.err'
19533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19534   (eval $ac_try) 2>&5
19535   ac_status=$?
19536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19537   (exit $ac_status); }; } &&
19538          { ac_try='test -s conftest.$ac_objext'
19539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19540   (eval $ac_try) 2>&5
19541   ac_status=$?
19542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19543   (exit $ac_status); }; }; then
19544   ac_lo=$ac_mid; break
19545 else
19546   echo "$as_me: failed program was:" >&5
19547 sed 's/^/| /' conftest.$ac_ext >&5
19548
19549 ac_hi=`expr '(' $ac_mid ')' - 1`
19550                        if test $ac_mid -le $ac_hi; then
19551                          ac_lo= ac_hi=
19552                          break
19553                        fi
19554                        ac_mid=`expr 2 '*' $ac_mid`
19555 fi
19556 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19557   done
19558 else
19559   echo "$as_me: failed program was:" >&5
19560 sed 's/^/| /' conftest.$ac_ext >&5
19561
19562 ac_lo= ac_hi=
19563 fi
19564 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19565 fi
19566 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19567 # Binary search between lo and hi bounds.
19568 while test "x$ac_lo" != "x$ac_hi"; do
19569   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19570   cat >conftest.$ac_ext <<_ACEOF
19571 /* confdefs.h.  */
19572 _ACEOF
19573 cat confdefs.h >>conftest.$ac_ext
19574 cat >>conftest.$ac_ext <<_ACEOF
19575 /* end confdefs.h.  */
19576 $ac_includes_default
19577 struct { char filler; long long int field; } pgac_struct;
19578 int
19579 main ()
19580 {
19581 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19582 test_array [0] = 0
19583
19584   ;
19585   return 0;
19586 }
19587 _ACEOF
19588 rm -f conftest.$ac_objext
19589 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19590   (eval $ac_compile) 2>conftest.er1
19591   ac_status=$?
19592   grep -v '^ *+' conftest.er1 >conftest.err
19593   rm -f conftest.er1
19594   cat conftest.err >&5
19595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19596   (exit $ac_status); } &&
19597          { ac_try='test -z "$ac_c_werror_flag"
19598                          || test ! -s conftest.err'
19599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19600   (eval $ac_try) 2>&5
19601   ac_status=$?
19602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19603   (exit $ac_status); }; } &&
19604          { ac_try='test -s conftest.$ac_objext'
19605   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19606   (eval $ac_try) 2>&5
19607   ac_status=$?
19608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19609   (exit $ac_status); }; }; then
19610   ac_hi=$ac_mid
19611 else
19612   echo "$as_me: failed program was:" >&5
19613 sed 's/^/| /' conftest.$ac_ext >&5
19614
19615 ac_lo=`expr '(' $ac_mid ')' + 1`
19616 fi
19617 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19618 done
19619 case $ac_lo in
19620 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
19621 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
19622 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
19623    { (exit 1); exit 1; }; } ;;
19624 esac
19625 else
19626   if test "$cross_compiling" = yes; then
19627   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19628 See \`config.log' for more details." >&5
19629 echo "$as_me: error: cannot run test program while cross compiling
19630 See \`config.log' for more details." >&2;}
19631    { (exit 1); exit 1; }; }
19632 else
19633   cat >conftest.$ac_ext <<_ACEOF
19634 /* confdefs.h.  */
19635 _ACEOF
19636 cat confdefs.h >>conftest.$ac_ext
19637 cat >>conftest.$ac_ext <<_ACEOF
19638 /* end confdefs.h.  */
19639 $ac_includes_default
19640 struct { char filler; long long int field; } pgac_struct;
19641 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19642 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19643 #include <stdio.h>
19644 #include <stdlib.h>
19645 int
19646 main ()
19647 {
19648
19649   FILE *f = fopen ("conftest.val", "w");
19650   if (! f)
19651     exit (1);
19652   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19653     {
19654       long i = longval ();
19655       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19656         exit (1);
19657       fprintf (f, "%ld\n", i);
19658     }
19659   else
19660     {
19661       unsigned long i = ulongval ();
19662       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19663         exit (1);
19664       fprintf (f, "%lu\n", i);
19665     }
19666   exit (ferror (f) || fclose (f) != 0);
19667
19668   ;
19669   return 0;
19670 }
19671 _ACEOF
19672 rm -f conftest$ac_exeext
19673 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19674   (eval $ac_link) 2>&5
19675   ac_status=$?
19676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19677   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19678   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19679   (eval $ac_try) 2>&5
19680   ac_status=$?
19681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19682   (exit $ac_status); }; }; then
19683   pgac_cv_alignof_long_long_int=`cat conftest.val`
19684 else
19685   echo "$as_me: program exited with status $ac_status" >&5
19686 echo "$as_me: failed program was:" >&5
19687 sed 's/^/| /' conftest.$ac_ext >&5
19688
19689 ( exit $ac_status )
19690 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
19691 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
19692    { (exit 1); exit 1; }; }
19693 fi
19694 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19695 fi
19696 fi
19697 rm -f conftest.val
19698 else
19699   pgac_cv_alignof_long_long_int=0
19700 fi
19701 fi
19702 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
19703 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
19704 cat >>confdefs.h <<_ACEOF
19705 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
19706 _ACEOF
19707
19708
19709 fi
19710 echo "$as_me:$LINENO: checking for double" >&5
19711 echo $ECHO_N "checking for double... $ECHO_C" >&6
19712 if test "${ac_cv_type_double+set}" = set; then
19713   echo $ECHO_N "(cached) $ECHO_C" >&6
19714 else
19715   cat >conftest.$ac_ext <<_ACEOF
19716 /* confdefs.h.  */
19717 _ACEOF
19718 cat confdefs.h >>conftest.$ac_ext
19719 cat >>conftest.$ac_ext <<_ACEOF
19720 /* end confdefs.h.  */
19721 $ac_includes_default
19722 int
19723 main ()
19724 {
19725 if ((double *) 0)
19726   return 0;
19727 if (sizeof (double))
19728   return 0;
19729   ;
19730   return 0;
19731 }
19732 _ACEOF
19733 rm -f conftest.$ac_objext
19734 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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          { ac_try='test -z "$ac_c_werror_flag"
19743                          || test ! -s conftest.err'
19744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19745   (eval $ac_try) 2>&5
19746   ac_status=$?
19747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19748   (exit $ac_status); }; } &&
19749          { ac_try='test -s conftest.$ac_objext'
19750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19751   (eval $ac_try) 2>&5
19752   ac_status=$?
19753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19754   (exit $ac_status); }; }; then
19755   ac_cv_type_double=yes
19756 else
19757   echo "$as_me: failed program was:" >&5
19758 sed 's/^/| /' conftest.$ac_ext >&5
19759
19760 ac_cv_type_double=no
19761 fi
19762 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19763 fi
19764 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
19765 echo "${ECHO_T}$ac_cv_type_double" >&6
19766
19767 echo "$as_me:$LINENO: checking alignment of double" >&5
19768 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
19769 if test "${pgac_cv_alignof_double+set}" = set; then
19770   echo $ECHO_N "(cached) $ECHO_C" >&6
19771 else
19772   if test "$ac_cv_type_double" = yes; then
19773   if test "$cross_compiling" = yes; then
19774   # Depending upon the size, compute the lo and hi bounds.
19775 cat >conftest.$ac_ext <<_ACEOF
19776 /* confdefs.h.  */
19777 _ACEOF
19778 cat confdefs.h >>conftest.$ac_ext
19779 cat >>conftest.$ac_ext <<_ACEOF
19780 /* end confdefs.h.  */
19781 $ac_includes_default
19782 struct { char filler; double field; } pgac_struct;
19783 int
19784 main ()
19785 {
19786 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19787 test_array [0] = 0
19788
19789   ;
19790   return 0;
19791 }
19792 _ACEOF
19793 rm -f conftest.$ac_objext
19794 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19795   (eval $ac_compile) 2>conftest.er1
19796   ac_status=$?
19797   grep -v '^ *+' conftest.er1 >conftest.err
19798   rm -f conftest.er1
19799   cat conftest.err >&5
19800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19801   (exit $ac_status); } &&
19802          { ac_try='test -z "$ac_c_werror_flag"
19803                          || test ! -s conftest.err'
19804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19805   (eval $ac_try) 2>&5
19806   ac_status=$?
19807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19808   (exit $ac_status); }; } &&
19809          { ac_try='test -s conftest.$ac_objext'
19810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19811   (eval $ac_try) 2>&5
19812   ac_status=$?
19813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19814   (exit $ac_status); }; }; then
19815   ac_lo=0 ac_mid=0
19816   while :; do
19817     cat >conftest.$ac_ext <<_ACEOF
19818 /* confdefs.h.  */
19819 _ACEOF
19820 cat confdefs.h >>conftest.$ac_ext
19821 cat >>conftest.$ac_ext <<_ACEOF
19822 /* end confdefs.h.  */
19823 $ac_includes_default
19824 struct { char filler; double field; } pgac_struct;
19825 int
19826 main ()
19827 {
19828 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19829 test_array [0] = 0
19830
19831   ;
19832   return 0;
19833 }
19834 _ACEOF
19835 rm -f conftest.$ac_objext
19836 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19837   (eval $ac_compile) 2>conftest.er1
19838   ac_status=$?
19839   grep -v '^ *+' conftest.er1 >conftest.err
19840   rm -f conftest.er1
19841   cat conftest.err >&5
19842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19843   (exit $ac_status); } &&
19844          { ac_try='test -z "$ac_c_werror_flag"
19845                          || test ! -s conftest.err'
19846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19847   (eval $ac_try) 2>&5
19848   ac_status=$?
19849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19850   (exit $ac_status); }; } &&
19851          { ac_try='test -s conftest.$ac_objext'
19852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19853   (eval $ac_try) 2>&5
19854   ac_status=$?
19855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19856   (exit $ac_status); }; }; then
19857   ac_hi=$ac_mid; break
19858 else
19859   echo "$as_me: failed program was:" >&5
19860 sed 's/^/| /' conftest.$ac_ext >&5
19861
19862 ac_lo=`expr $ac_mid + 1`
19863                     if test $ac_lo -le $ac_mid; then
19864                       ac_lo= ac_hi=
19865                       break
19866                     fi
19867                     ac_mid=`expr 2 '*' $ac_mid + 1`
19868 fi
19869 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19870   done
19871 else
19872   echo "$as_me: failed program was:" >&5
19873 sed 's/^/| /' conftest.$ac_ext >&5
19874
19875 cat >conftest.$ac_ext <<_ACEOF
19876 /* confdefs.h.  */
19877 _ACEOF
19878 cat confdefs.h >>conftest.$ac_ext
19879 cat >>conftest.$ac_ext <<_ACEOF
19880 /* end confdefs.h.  */
19881 $ac_includes_default
19882 struct { char filler; double field; } pgac_struct;
19883 int
19884 main ()
19885 {
19886 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19887 test_array [0] = 0
19888
19889   ;
19890   return 0;
19891 }
19892 _ACEOF
19893 rm -f conftest.$ac_objext
19894 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19895   (eval $ac_compile) 2>conftest.er1
19896   ac_status=$?
19897   grep -v '^ *+' conftest.er1 >conftest.err
19898   rm -f conftest.er1
19899   cat conftest.err >&5
19900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19901   (exit $ac_status); } &&
19902          { ac_try='test -z "$ac_c_werror_flag"
19903                          || test ! -s conftest.err'
19904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19905   (eval $ac_try) 2>&5
19906   ac_status=$?
19907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19908   (exit $ac_status); }; } &&
19909          { ac_try='test -s conftest.$ac_objext'
19910   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19911   (eval $ac_try) 2>&5
19912   ac_status=$?
19913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19914   (exit $ac_status); }; }; then
19915   ac_hi=-1 ac_mid=-1
19916   while :; do
19917     cat >conftest.$ac_ext <<_ACEOF
19918 /* confdefs.h.  */
19919 _ACEOF
19920 cat confdefs.h >>conftest.$ac_ext
19921 cat >>conftest.$ac_ext <<_ACEOF
19922 /* end confdefs.h.  */
19923 $ac_includes_default
19924 struct { char filler; double field; } pgac_struct;
19925 int
19926 main ()
19927 {
19928 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19929 test_array [0] = 0
19930
19931   ;
19932   return 0;
19933 }
19934 _ACEOF
19935 rm -f conftest.$ac_objext
19936 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19937   (eval $ac_compile) 2>conftest.er1
19938   ac_status=$?
19939   grep -v '^ *+' conftest.er1 >conftest.err
19940   rm -f conftest.er1
19941   cat conftest.err >&5
19942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19943   (exit $ac_status); } &&
19944          { ac_try='test -z "$ac_c_werror_flag"
19945                          || test ! -s conftest.err'
19946   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19947   (eval $ac_try) 2>&5
19948   ac_status=$?
19949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19950   (exit $ac_status); }; } &&
19951          { ac_try='test -s conftest.$ac_objext'
19952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19953   (eval $ac_try) 2>&5
19954   ac_status=$?
19955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19956   (exit $ac_status); }; }; then
19957   ac_lo=$ac_mid; break
19958 else
19959   echo "$as_me: failed program was:" >&5
19960 sed 's/^/| /' conftest.$ac_ext >&5
19961
19962 ac_hi=`expr '(' $ac_mid ')' - 1`
19963                        if test $ac_mid -le $ac_hi; then
19964                          ac_lo= ac_hi=
19965                          break
19966                        fi
19967                        ac_mid=`expr 2 '*' $ac_mid`
19968 fi
19969 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19970   done
19971 else
19972   echo "$as_me: failed program was:" >&5
19973 sed 's/^/| /' conftest.$ac_ext >&5
19974
19975 ac_lo= ac_hi=
19976 fi
19977 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19978 fi
19979 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19980 # Binary search between lo and hi bounds.
19981 while test "x$ac_lo" != "x$ac_hi"; do
19982   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19983   cat >conftest.$ac_ext <<_ACEOF
19984 /* confdefs.h.  */
19985 _ACEOF
19986 cat confdefs.h >>conftest.$ac_ext
19987 cat >>conftest.$ac_ext <<_ACEOF
19988 /* end confdefs.h.  */
19989 $ac_includes_default
19990 struct { char filler; double field; } pgac_struct;
19991 int
19992 main ()
19993 {
19994 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19995 test_array [0] = 0
19996
19997   ;
19998   return 0;
19999 }
20000 _ACEOF
20001 rm -f conftest.$ac_objext
20002 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20003   (eval $ac_compile) 2>conftest.er1
20004   ac_status=$?
20005   grep -v '^ *+' conftest.er1 >conftest.err
20006   rm -f conftest.er1
20007   cat conftest.err >&5
20008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20009   (exit $ac_status); } &&
20010          { ac_try='test -z "$ac_c_werror_flag"
20011                          || test ! -s conftest.err'
20012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20013   (eval $ac_try) 2>&5
20014   ac_status=$?
20015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20016   (exit $ac_status); }; } &&
20017          { ac_try='test -s conftest.$ac_objext'
20018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20019   (eval $ac_try) 2>&5
20020   ac_status=$?
20021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20022   (exit $ac_status); }; }; then
20023   ac_hi=$ac_mid
20024 else
20025   echo "$as_me: failed program was:" >&5
20026 sed 's/^/| /' conftest.$ac_ext >&5
20027
20028 ac_lo=`expr '(' $ac_mid ')' + 1`
20029 fi
20030 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20031 done
20032 case $ac_lo in
20033 ?*) pgac_cv_alignof_double=$ac_lo;;
20034 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20035 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20036    { (exit 1); exit 1; }; } ;;
20037 esac
20038 else
20039   if test "$cross_compiling" = yes; then
20040   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20041 See \`config.log' for more details." >&5
20042 echo "$as_me: error: cannot run test program while cross compiling
20043 See \`config.log' for more details." >&2;}
20044    { (exit 1); exit 1; }; }
20045 else
20046   cat >conftest.$ac_ext <<_ACEOF
20047 /* confdefs.h.  */
20048 _ACEOF
20049 cat confdefs.h >>conftest.$ac_ext
20050 cat >>conftest.$ac_ext <<_ACEOF
20051 /* end confdefs.h.  */
20052 $ac_includes_default
20053 struct { char filler; double field; } pgac_struct;
20054 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20055 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20056 #include <stdio.h>
20057 #include <stdlib.h>
20058 int
20059 main ()
20060 {
20061
20062   FILE *f = fopen ("conftest.val", "w");
20063   if (! f)
20064     exit (1);
20065   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20066     {
20067       long i = longval ();
20068       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20069         exit (1);
20070       fprintf (f, "%ld\n", i);
20071     }
20072   else
20073     {
20074       unsigned long i = ulongval ();
20075       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20076         exit (1);
20077       fprintf (f, "%lu\n", i);
20078     }
20079   exit (ferror (f) || fclose (f) != 0);
20080
20081   ;
20082   return 0;
20083 }
20084 _ACEOF
20085 rm -f conftest$ac_exeext
20086 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20087   (eval $ac_link) 2>&5
20088   ac_status=$?
20089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20090   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20092   (eval $ac_try) 2>&5
20093   ac_status=$?
20094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20095   (exit $ac_status); }; }; then
20096   pgac_cv_alignof_double=`cat conftest.val`
20097 else
20098   echo "$as_me: program exited with status $ac_status" >&5
20099 echo "$as_me: failed program was:" >&5
20100 sed 's/^/| /' conftest.$ac_ext >&5
20101
20102 ( exit $ac_status )
20103 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20104 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20105    { (exit 1); exit 1; }; }
20106 fi
20107 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20108 fi
20109 fi
20110 rm -f conftest.val
20111 else
20112   pgac_cv_alignof_double=0
20113 fi
20114 fi
20115 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
20116 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
20117 cat >>confdefs.h <<_ACEOF
20118 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
20119 _ACEOF
20120
20121
20122
20123 # Compute maximum alignment of any basic type.
20124 # We assume long's alignment is at least as strong as char, short, or int;
20125 # but we must check long long (if it exists) and double.
20126
20127 MAX_ALIGNOF=$pgac_cv_alignof_long
20128 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
20129   MAX_ALIGNOF=$pgac_cv_alignof_double
20130 fi
20131 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
20132   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
20133 fi
20134
20135 cat >>confdefs.h <<_ACEOF
20136 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
20137 _ACEOF
20138
20139
20140
20141 # Some platforms predefine the types int8, int16, etc.  Only check
20142 # a (hopefully) representative subset.
20143 echo "$as_me:$LINENO: checking for int8" >&5
20144 echo $ECHO_N "checking for int8... $ECHO_C" >&6
20145 if test "${ac_cv_type_int8+set}" = set; then
20146   echo $ECHO_N "(cached) $ECHO_C" >&6
20147 else
20148   cat >conftest.$ac_ext <<_ACEOF
20149 /* confdefs.h.  */
20150 _ACEOF
20151 cat confdefs.h >>conftest.$ac_ext
20152 cat >>conftest.$ac_ext <<_ACEOF
20153 /* end confdefs.h.  */
20154 #include <stdio.h>
20155 #ifdef HAVE_SUPPORTDEFS_H
20156 #include <SupportDefs.h>
20157 #endif
20158
20159 int
20160 main ()
20161 {
20162 if ((int8 *) 0)
20163   return 0;
20164 if (sizeof (int8))
20165   return 0;
20166   ;
20167   return 0;
20168 }
20169 _ACEOF
20170 rm -f conftest.$ac_objext
20171 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20172   (eval $ac_compile) 2>conftest.er1
20173   ac_status=$?
20174   grep -v '^ *+' conftest.er1 >conftest.err
20175   rm -f conftest.er1
20176   cat conftest.err >&5
20177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20178   (exit $ac_status); } &&
20179          { ac_try='test -z "$ac_c_werror_flag"
20180                          || test ! -s conftest.err'
20181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20182   (eval $ac_try) 2>&5
20183   ac_status=$?
20184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20185   (exit $ac_status); }; } &&
20186          { ac_try='test -s conftest.$ac_objext'
20187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20188   (eval $ac_try) 2>&5
20189   ac_status=$?
20190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20191   (exit $ac_status); }; }; then
20192   ac_cv_type_int8=yes
20193 else
20194   echo "$as_me: failed program was:" >&5
20195 sed 's/^/| /' conftest.$ac_ext >&5
20196
20197 ac_cv_type_int8=no
20198 fi
20199 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20200 fi
20201 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
20202 echo "${ECHO_T}$ac_cv_type_int8" >&6
20203 if test $ac_cv_type_int8 = yes; then
20204
20205 cat >>confdefs.h <<_ACEOF
20206 #define HAVE_INT8 1
20207 _ACEOF
20208
20209
20210 fi
20211 echo "$as_me:$LINENO: checking for uint8" >&5
20212 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
20213 if test "${ac_cv_type_uint8+set}" = set; then
20214   echo $ECHO_N "(cached) $ECHO_C" >&6
20215 else
20216   cat >conftest.$ac_ext <<_ACEOF
20217 /* confdefs.h.  */
20218 _ACEOF
20219 cat confdefs.h >>conftest.$ac_ext
20220 cat >>conftest.$ac_ext <<_ACEOF
20221 /* end confdefs.h.  */
20222 #include <stdio.h>
20223 #ifdef HAVE_SUPPORTDEFS_H
20224 #include <SupportDefs.h>
20225 #endif
20226
20227 int
20228 main ()
20229 {
20230 if ((uint8 *) 0)
20231   return 0;
20232 if (sizeof (uint8))
20233   return 0;
20234   ;
20235   return 0;
20236 }
20237 _ACEOF
20238 rm -f conftest.$ac_objext
20239 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20240   (eval $ac_compile) 2>conftest.er1
20241   ac_status=$?
20242   grep -v '^ *+' conftest.er1 >conftest.err
20243   rm -f conftest.er1
20244   cat conftest.err >&5
20245   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20246   (exit $ac_status); } &&
20247          { ac_try='test -z "$ac_c_werror_flag"
20248                          || test ! -s conftest.err'
20249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20250   (eval $ac_try) 2>&5
20251   ac_status=$?
20252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20253   (exit $ac_status); }; } &&
20254          { ac_try='test -s conftest.$ac_objext'
20255   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20256   (eval $ac_try) 2>&5
20257   ac_status=$?
20258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20259   (exit $ac_status); }; }; then
20260   ac_cv_type_uint8=yes
20261 else
20262   echo "$as_me: failed program was:" >&5
20263 sed 's/^/| /' conftest.$ac_ext >&5
20264
20265 ac_cv_type_uint8=no
20266 fi
20267 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20268 fi
20269 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
20270 echo "${ECHO_T}$ac_cv_type_uint8" >&6
20271 if test $ac_cv_type_uint8 = yes; then
20272
20273 cat >>confdefs.h <<_ACEOF
20274 #define HAVE_UINT8 1
20275 _ACEOF
20276
20277
20278 fi
20279 echo "$as_me:$LINENO: checking for int64" >&5
20280 echo $ECHO_N "checking for int64... $ECHO_C" >&6
20281 if test "${ac_cv_type_int64+set}" = set; then
20282   echo $ECHO_N "(cached) $ECHO_C" >&6
20283 else
20284   cat >conftest.$ac_ext <<_ACEOF
20285 /* confdefs.h.  */
20286 _ACEOF
20287 cat confdefs.h >>conftest.$ac_ext
20288 cat >>conftest.$ac_ext <<_ACEOF
20289 /* end confdefs.h.  */
20290 #include <stdio.h>
20291 #ifdef HAVE_SUPPORTDEFS_H
20292 #include <SupportDefs.h>
20293 #endif
20294
20295 int
20296 main ()
20297 {
20298 if ((int64 *) 0)
20299   return 0;
20300 if (sizeof (int64))
20301   return 0;
20302   ;
20303   return 0;
20304 }
20305 _ACEOF
20306 rm -f conftest.$ac_objext
20307 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20308   (eval $ac_compile) 2>conftest.er1
20309   ac_status=$?
20310   grep -v '^ *+' conftest.er1 >conftest.err
20311   rm -f conftest.er1
20312   cat conftest.err >&5
20313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20314   (exit $ac_status); } &&
20315          { ac_try='test -z "$ac_c_werror_flag"
20316                          || test ! -s conftest.err'
20317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20318   (eval $ac_try) 2>&5
20319   ac_status=$?
20320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20321   (exit $ac_status); }; } &&
20322          { ac_try='test -s conftest.$ac_objext'
20323   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20324   (eval $ac_try) 2>&5
20325   ac_status=$?
20326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20327   (exit $ac_status); }; }; then
20328   ac_cv_type_int64=yes
20329 else
20330   echo "$as_me: failed program was:" >&5
20331 sed 's/^/| /' conftest.$ac_ext >&5
20332
20333 ac_cv_type_int64=no
20334 fi
20335 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20336 fi
20337 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
20338 echo "${ECHO_T}$ac_cv_type_int64" >&6
20339 if test $ac_cv_type_int64 = yes; then
20340
20341 cat >>confdefs.h <<_ACEOF
20342 #define HAVE_INT64 1
20343 _ACEOF
20344
20345
20346 fi
20347 echo "$as_me:$LINENO: checking for uint64" >&5
20348 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
20349 if test "${ac_cv_type_uint64+set}" = set; then
20350   echo $ECHO_N "(cached) $ECHO_C" >&6
20351 else
20352   cat >conftest.$ac_ext <<_ACEOF
20353 /* confdefs.h.  */
20354 _ACEOF
20355 cat confdefs.h >>conftest.$ac_ext
20356 cat >>conftest.$ac_ext <<_ACEOF
20357 /* end confdefs.h.  */
20358 #include <stdio.h>
20359 #ifdef HAVE_SUPPORTDEFS_H
20360 #include <SupportDefs.h>
20361 #endif
20362
20363 int
20364 main ()
20365 {
20366 if ((uint64 *) 0)
20367   return 0;
20368 if (sizeof (uint64))
20369   return 0;
20370   ;
20371   return 0;
20372 }
20373 _ACEOF
20374 rm -f conftest.$ac_objext
20375 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20376   (eval $ac_compile) 2>conftest.er1
20377   ac_status=$?
20378   grep -v '^ *+' conftest.er1 >conftest.err
20379   rm -f conftest.er1
20380   cat conftest.err >&5
20381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20382   (exit $ac_status); } &&
20383          { ac_try='test -z "$ac_c_werror_flag"
20384                          || test ! -s conftest.err'
20385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20386   (eval $ac_try) 2>&5
20387   ac_status=$?
20388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20389   (exit $ac_status); }; } &&
20390          { ac_try='test -s conftest.$ac_objext'
20391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20392   (eval $ac_try) 2>&5
20393   ac_status=$?
20394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20395   (exit $ac_status); }; }; then
20396   ac_cv_type_uint64=yes
20397 else
20398   echo "$as_me: failed program was:" >&5
20399 sed 's/^/| /' conftest.$ac_ext >&5
20400
20401 ac_cv_type_uint64=no
20402 fi
20403 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20404 fi
20405 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
20406 echo "${ECHO_T}$ac_cv_type_uint64" >&6
20407 if test $ac_cv_type_uint64 = yes; then
20408
20409 cat >>confdefs.h <<_ACEOF
20410 #define HAVE_UINT64 1
20411 _ACEOF
20412
20413
20414 fi
20415
20416
20417 # We also check for sig_atomic_t, which *should* be defined per ANSI
20418 # C, but is missing on some old platforms.
20419 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
20420 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
20421 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
20422   echo $ECHO_N "(cached) $ECHO_C" >&6
20423 else
20424   cat >conftest.$ac_ext <<_ACEOF
20425 /* confdefs.h.  */
20426 _ACEOF
20427 cat confdefs.h >>conftest.$ac_ext
20428 cat >>conftest.$ac_ext <<_ACEOF
20429 /* end confdefs.h.  */
20430 #include <signal.h>
20431
20432 int
20433 main ()
20434 {
20435 if ((sig_atomic_t *) 0)
20436   return 0;
20437 if (sizeof (sig_atomic_t))
20438   return 0;
20439   ;
20440   return 0;
20441 }
20442 _ACEOF
20443 rm -f conftest.$ac_objext
20444 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20445   (eval $ac_compile) 2>conftest.er1
20446   ac_status=$?
20447   grep -v '^ *+' conftest.er1 >conftest.err
20448   rm -f conftest.er1
20449   cat conftest.err >&5
20450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20451   (exit $ac_status); } &&
20452          { ac_try='test -z "$ac_c_werror_flag"
20453                          || test ! -s conftest.err'
20454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20455   (eval $ac_try) 2>&5
20456   ac_status=$?
20457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20458   (exit $ac_status); }; } &&
20459          { ac_try='test -s conftest.$ac_objext'
20460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20461   (eval $ac_try) 2>&5
20462   ac_status=$?
20463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20464   (exit $ac_status); }; }; then
20465   ac_cv_type_sig_atomic_t=yes
20466 else
20467   echo "$as_me: failed program was:" >&5
20468 sed 's/^/| /' conftest.$ac_ext >&5
20469
20470 ac_cv_type_sig_atomic_t=no
20471 fi
20472 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20473 fi
20474 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
20475 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
20476 if test $ac_cv_type_sig_atomic_t = yes; then
20477
20478 cat >>confdefs.h <<_ACEOF
20479 #define HAVE_SIG_ATOMIC_T 1
20480 _ACEOF
20481
20482
20483 fi
20484
20485
20486
20487 if test x"$template" != x"win32"
20488 then
20489 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
20490 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
20491 if test "${pgac_cv_func_posix_signals+set}" = set; then
20492   echo $ECHO_N "(cached) $ECHO_C" >&6
20493 else
20494   cat >conftest.$ac_ext <<_ACEOF
20495 /* confdefs.h.  */
20496 _ACEOF
20497 cat confdefs.h >>conftest.$ac_ext
20498 cat >>conftest.$ac_ext <<_ACEOF
20499 /* end confdefs.h.  */
20500 #include <signal.h>
20501
20502 int
20503 main ()
20504 {
20505 struct sigaction act, oact;
20506 sigemptyset(&act.sa_mask);
20507 act.sa_flags = SA_RESTART;
20508 sigaction(0, &act, &oact);
20509   ;
20510   return 0;
20511 }
20512 _ACEOF
20513 rm -f conftest.$ac_objext conftest$ac_exeext
20514 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20515   (eval $ac_link) 2>conftest.er1
20516   ac_status=$?
20517   grep -v '^ *+' conftest.er1 >conftest.err
20518   rm -f conftest.er1
20519   cat conftest.err >&5
20520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20521   (exit $ac_status); } &&
20522          { ac_try='test -z "$ac_c_werror_flag"
20523                          || test ! -s conftest.err'
20524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20525   (eval $ac_try) 2>&5
20526   ac_status=$?
20527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20528   (exit $ac_status); }; } &&
20529          { ac_try='test -s conftest$ac_exeext'
20530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20531   (eval $ac_try) 2>&5
20532   ac_status=$?
20533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20534   (exit $ac_status); }; }; then
20535   pgac_cv_func_posix_signals=yes
20536 else
20537   echo "$as_me: failed program was:" >&5
20538 sed 's/^/| /' conftest.$ac_ext >&5
20539
20540 pgac_cv_func_posix_signals=no
20541 fi
20542 rm -f conftest.err conftest.$ac_objext \
20543       conftest$ac_exeext conftest.$ac_ext
20544 fi
20545 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
20546 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
20547 if test x"$pgac_cv_func_posix_signals" = xyes ; then
20548
20549 cat >>confdefs.h <<\_ACEOF
20550 #define HAVE_POSIX_SIGNALS
20551 _ACEOF
20552
20553 fi
20554 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
20555
20556 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
20557   { { echo "$as_me:$LINENO: error:
20558 *** Thread-safety requires POSIX signals, which are not supported by your
20559 *** operating system.
20560 " >&5
20561 echo "$as_me: error:
20562 *** Thread-safety requires POSIX signals, which are not supported by your
20563 *** operating system.
20564 " >&2;}
20565    { (exit 1); exit 1; }; }
20566 fi
20567 fi
20568
20569 if test $ac_cv_func_fseeko = yes; then
20570 # Check whether --enable-largefile or --disable-largefile was given.
20571 if test "${enable_largefile+set}" = set; then
20572   enableval="$enable_largefile"
20573
20574 fi;
20575 if test "$enable_largefile" != no; then
20576
20577   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
20578 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
20579 if test "${ac_cv_sys_largefile_CC+set}" = set; then
20580   echo $ECHO_N "(cached) $ECHO_C" >&6
20581 else
20582   ac_cv_sys_largefile_CC=no
20583      if test "$GCC" != yes; then
20584        ac_save_CC=$CC
20585        while :; do
20586          # IRIX 6.2 and later do not support large files by default,
20587          # so use the C compiler's -n32 option if that helps.
20588          cat >conftest.$ac_ext <<_ACEOF
20589 /* confdefs.h.  */
20590 _ACEOF
20591 cat confdefs.h >>conftest.$ac_ext
20592 cat >>conftest.$ac_ext <<_ACEOF
20593 /* end confdefs.h.  */
20594 #include <sys/types.h>
20595  /* Check that off_t can represent 2**63 - 1 correctly.
20596     We can't simply define LARGE_OFF_T to be 9223372036854775807,
20597     since some C++ compilers masquerading as C compilers
20598     incorrectly reject 9223372036854775807.  */
20599 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
20600   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
20601                        && LARGE_OFF_T % 2147483647 == 1)
20602                       ? 1 : -1];
20603 int
20604 main ()
20605 {
20606
20607   ;
20608   return 0;
20609 }
20610 _ACEOF
20611          rm -f conftest.$ac_objext
20612 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20613   (eval $ac_compile) 2>conftest.er1
20614   ac_status=$?
20615   grep -v '^ *+' conftest.er1 >conftest.err
20616   rm -f conftest.er1
20617   cat conftest.err >&5
20618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20619   (exit $ac_status); } &&
20620          { ac_try='test -z "$ac_c_werror_flag"
20621                          || test ! -s conftest.err'
20622   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20623   (eval $ac_try) 2>&5
20624   ac_status=$?
20625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20626   (exit $ac_status); }; } &&
20627          { ac_try='test -s conftest.$ac_objext'
20628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20629   (eval $ac_try) 2>&5
20630   ac_status=$?
20631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20632   (exit $ac_status); }; }; then
20633   break
20634 else
20635   echo "$as_me: failed program was:" >&5
20636 sed 's/^/| /' conftest.$ac_ext >&5
20637
20638 fi
20639 rm -f conftest.err conftest.$ac_objext
20640          CC="$CC -n32"
20641          rm -f conftest.$ac_objext
20642 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20643   (eval $ac_compile) 2>conftest.er1
20644   ac_status=$?
20645   grep -v '^ *+' conftest.er1 >conftest.err
20646   rm -f conftest.er1
20647   cat conftest.err >&5
20648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20649   (exit $ac_status); } &&
20650          { ac_try='test -z "$ac_c_werror_flag"
20651                          || test ! -s conftest.err'
20652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20653   (eval $ac_try) 2>&5
20654   ac_status=$?
20655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20656   (exit $ac_status); }; } &&
20657          { ac_try='test -s conftest.$ac_objext'
20658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20659   (eval $ac_try) 2>&5
20660   ac_status=$?
20661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20662   (exit $ac_status); }; }; then
20663   ac_cv_sys_largefile_CC=' -n32'; break
20664 else
20665   echo "$as_me: failed program was:" >&5
20666 sed 's/^/| /' conftest.$ac_ext >&5
20667
20668 fi
20669 rm -f conftest.err conftest.$ac_objext
20670          break
20671        done
20672        CC=$ac_save_CC
20673        rm -f conftest.$ac_ext
20674     fi
20675 fi
20676 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
20677 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
20678   if test "$ac_cv_sys_largefile_CC" != no; then
20679     CC=$CC$ac_cv_sys_largefile_CC
20680   fi
20681
20682   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
20683 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
20684 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
20685   echo $ECHO_N "(cached) $ECHO_C" >&6
20686 else
20687   while :; do
20688   ac_cv_sys_file_offset_bits=no
20689   cat >conftest.$ac_ext <<_ACEOF
20690 /* confdefs.h.  */
20691 _ACEOF
20692 cat confdefs.h >>conftest.$ac_ext
20693 cat >>conftest.$ac_ext <<_ACEOF
20694 /* end confdefs.h.  */
20695 #include <sys/types.h>
20696  /* Check that off_t can represent 2**63 - 1 correctly.
20697     We can't simply define LARGE_OFF_T to be 9223372036854775807,
20698     since some C++ compilers masquerading as C compilers
20699     incorrectly reject 9223372036854775807.  */
20700 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
20701   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
20702                        && LARGE_OFF_T % 2147483647 == 1)
20703                       ? 1 : -1];
20704 int
20705 main ()
20706 {
20707
20708   ;
20709   return 0;
20710 }
20711 _ACEOF
20712 rm -f conftest.$ac_objext
20713 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20714   (eval $ac_compile) 2>conftest.er1
20715   ac_status=$?
20716   grep -v '^ *+' conftest.er1 >conftest.err
20717   rm -f conftest.er1
20718   cat conftest.err >&5
20719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20720   (exit $ac_status); } &&
20721          { ac_try='test -z "$ac_c_werror_flag"
20722                          || test ! -s conftest.err'
20723   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20724   (eval $ac_try) 2>&5
20725   ac_status=$?
20726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20727   (exit $ac_status); }; } &&
20728          { ac_try='test -s conftest.$ac_objext'
20729   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20730   (eval $ac_try) 2>&5
20731   ac_status=$?
20732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20733   (exit $ac_status); }; }; then
20734   break
20735 else
20736   echo "$as_me: failed program was:" >&5
20737 sed 's/^/| /' conftest.$ac_ext >&5
20738
20739 fi
20740 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20741   cat >conftest.$ac_ext <<_ACEOF
20742 /* confdefs.h.  */
20743 _ACEOF
20744 cat confdefs.h >>conftest.$ac_ext
20745 cat >>conftest.$ac_ext <<_ACEOF
20746 /* end confdefs.h.  */
20747 #define _FILE_OFFSET_BITS 64
20748 #include <sys/types.h>
20749  /* Check that off_t can represent 2**63 - 1 correctly.
20750     We can't simply define LARGE_OFF_T to be 9223372036854775807,
20751     since some C++ compilers masquerading as C compilers
20752     incorrectly reject 9223372036854775807.  */
20753 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
20754   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
20755                        && LARGE_OFF_T % 2147483647 == 1)
20756                       ? 1 : -1];
20757 int
20758 main ()
20759 {
20760
20761   ;
20762   return 0;
20763 }
20764 _ACEOF
20765 rm -f conftest.$ac_objext
20766 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20767   (eval $ac_compile) 2>conftest.er1
20768   ac_status=$?
20769   grep -v '^ *+' conftest.er1 >conftest.err
20770   rm -f conftest.er1
20771   cat conftest.err >&5
20772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20773   (exit $ac_status); } &&
20774          { ac_try='test -z "$ac_c_werror_flag"
20775                          || test ! -s conftest.err'
20776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20777   (eval $ac_try) 2>&5
20778   ac_status=$?
20779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20780   (exit $ac_status); }; } &&
20781          { ac_try='test -s conftest.$ac_objext'
20782   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20783   (eval $ac_try) 2>&5
20784   ac_status=$?
20785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20786   (exit $ac_status); }; }; then
20787   ac_cv_sys_file_offset_bits=64; break
20788 else
20789   echo "$as_me: failed program was:" >&5
20790 sed 's/^/| /' conftest.$ac_ext >&5
20791
20792 fi
20793 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20794   break
20795 done
20796 fi
20797 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
20798 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
20799 if test "$ac_cv_sys_file_offset_bits" != no; then
20800
20801 cat >>confdefs.h <<_ACEOF
20802 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
20803 _ACEOF
20804
20805 fi
20806 rm -f conftest*
20807   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
20808 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
20809 if test "${ac_cv_sys_large_files+set}" = set; then
20810   echo $ECHO_N "(cached) $ECHO_C" >&6
20811 else
20812   while :; do
20813   ac_cv_sys_large_files=no
20814   cat >conftest.$ac_ext <<_ACEOF
20815 /* confdefs.h.  */
20816 _ACEOF
20817 cat confdefs.h >>conftest.$ac_ext
20818 cat >>conftest.$ac_ext <<_ACEOF
20819 /* end confdefs.h.  */
20820 #include <sys/types.h>
20821  /* Check that off_t can represent 2**63 - 1 correctly.
20822     We can't simply define LARGE_OFF_T to be 9223372036854775807,
20823     since some C++ compilers masquerading as C compilers
20824     incorrectly reject 9223372036854775807.  */
20825 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
20826   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
20827                        && LARGE_OFF_T % 2147483647 == 1)
20828                       ? 1 : -1];
20829 int
20830 main ()
20831 {
20832
20833   ;
20834   return 0;
20835 }
20836 _ACEOF
20837 rm -f conftest.$ac_objext
20838 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20839   (eval $ac_compile) 2>conftest.er1
20840   ac_status=$?
20841   grep -v '^ *+' conftest.er1 >conftest.err
20842   rm -f conftest.er1
20843   cat conftest.err >&5
20844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20845   (exit $ac_status); } &&
20846          { ac_try='test -z "$ac_c_werror_flag"
20847                          || test ! -s conftest.err'
20848   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20849   (eval $ac_try) 2>&5
20850   ac_status=$?
20851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20852   (exit $ac_status); }; } &&
20853          { ac_try='test -s conftest.$ac_objext'
20854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20855   (eval $ac_try) 2>&5
20856   ac_status=$?
20857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20858   (exit $ac_status); }; }; then
20859   break
20860 else
20861   echo "$as_me: failed program was:" >&5
20862 sed 's/^/| /' conftest.$ac_ext >&5
20863
20864 fi
20865 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20866   cat >conftest.$ac_ext <<_ACEOF
20867 /* confdefs.h.  */
20868 _ACEOF
20869 cat confdefs.h >>conftest.$ac_ext
20870 cat >>conftest.$ac_ext <<_ACEOF
20871 /* end confdefs.h.  */
20872 #define _LARGE_FILES 1
20873 #include <sys/types.h>
20874  /* Check that off_t can represent 2**63 - 1 correctly.
20875     We can't simply define LARGE_OFF_T to be 9223372036854775807,
20876     since some C++ compilers masquerading as C compilers
20877     incorrectly reject 9223372036854775807.  */
20878 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
20879   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
20880                        && LARGE_OFF_T % 2147483647 == 1)
20881                       ? 1 : -1];
20882 int
20883 main ()
20884 {
20885
20886   ;
20887   return 0;
20888 }
20889 _ACEOF
20890 rm -f conftest.$ac_objext
20891 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20892   (eval $ac_compile) 2>conftest.er1
20893   ac_status=$?
20894   grep -v '^ *+' conftest.er1 >conftest.err
20895   rm -f conftest.er1
20896   cat conftest.err >&5
20897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20898   (exit $ac_status); } &&
20899          { ac_try='test -z "$ac_c_werror_flag"
20900                          || test ! -s conftest.err'
20901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20902   (eval $ac_try) 2>&5
20903   ac_status=$?
20904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20905   (exit $ac_status); }; } &&
20906          { ac_try='test -s conftest.$ac_objext'
20907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20908   (eval $ac_try) 2>&5
20909   ac_status=$?
20910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20911   (exit $ac_status); }; }; then
20912   ac_cv_sys_large_files=1; break
20913 else
20914   echo "$as_me: failed program was:" >&5
20915 sed 's/^/| /' conftest.$ac_ext >&5
20916
20917 fi
20918 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20919   break
20920 done
20921 fi
20922 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
20923 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
20924 if test "$ac_cv_sys_large_files" != no; then
20925
20926 cat >>confdefs.h <<_ACEOF
20927 #define _LARGE_FILES $ac_cv_sys_large_files
20928 _ACEOF
20929
20930 fi
20931 rm -f conftest*
20932 fi
20933
20934 fi
20935
20936 # SunOS doesn't handle negative byte comparisons properly with +/- return
20937 echo "$as_me:$LINENO: checking for working memcmp" >&5
20938 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
20939 if test "${ac_cv_func_memcmp_working+set}" = set; then
20940   echo $ECHO_N "(cached) $ECHO_C" >&6
20941 else
20942   if test "$cross_compiling" = yes; then
20943   ac_cv_func_memcmp_working=no
20944 else
20945   cat >conftest.$ac_ext <<_ACEOF
20946 /* confdefs.h.  */
20947 _ACEOF
20948 cat confdefs.h >>conftest.$ac_ext
20949 cat >>conftest.$ac_ext <<_ACEOF
20950 /* end confdefs.h.  */
20951 $ac_includes_default
20952 int
20953 main ()
20954 {
20955
20956   /* Some versions of memcmp are not 8-bit clean.  */
20957   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
20958   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
20959     exit (1);
20960
20961   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
20962      or more and with at least one buffer not starting on a 4-byte boundary.
20963      William Lewis provided this test program.   */
20964   {
20965     char foo[21];
20966     char bar[21];
20967     int i;
20968     for (i = 0; i < 4; i++)
20969       {
20970         char *a = foo + i;
20971         char *b = bar + i;
20972         strcpy (a, "--------01111111");
20973         strcpy (b, "--------10000000");
20974         if (memcmp (a, b, 16) >= 0)
20975           exit (1);
20976       }
20977     exit (0);
20978   }
20979
20980   ;
20981   return 0;
20982 }
20983 _ACEOF
20984 rm -f conftest$ac_exeext
20985 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20986   (eval $ac_link) 2>&5
20987   ac_status=$?
20988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20989   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20991   (eval $ac_try) 2>&5
20992   ac_status=$?
20993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20994   (exit $ac_status); }; }; then
20995   ac_cv_func_memcmp_working=yes
20996 else
20997   echo "$as_me: program exited with status $ac_status" >&5
20998 echo "$as_me: failed program was:" >&5
20999 sed 's/^/| /' conftest.$ac_ext >&5
21000
21001 ( exit $ac_status )
21002 ac_cv_func_memcmp_working=no
21003 fi
21004 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21005 fi
21006 fi
21007 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21008 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21009 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21010     "memcmp.$ac_objext"   | \
21011   *" memcmp.$ac_objext"   | \
21012     "memcmp.$ac_objext "* | \
21013   *" memcmp.$ac_objext "* ) ;;
21014   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21015 esac
21016
21017
21018
21019
21020 # Select semaphore implementation type.
21021 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21022
21023 cat >>confdefs.h <<\_ACEOF
21024 #define USE_NAMED_POSIX_SEMAPHORES 1
21025 _ACEOF
21026
21027   SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21028 else
21029   if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21030
21031 cat >>confdefs.h <<\_ACEOF
21032 #define USE_UNNAMED_POSIX_SEMAPHORES 1
21033 _ACEOF
21034
21035     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21036   else
21037
21038 cat >>confdefs.h <<\_ACEOF
21039 #define USE_SYSV_SEMAPHORES 1
21040 _ACEOF
21041
21042     SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21043   fi
21044 fi
21045
21046
21047 # Select shared-memory implementation type.
21048
21049 cat >>confdefs.h <<\_ACEOF
21050 #define USE_SYSV_SHARED_MEMORY 1
21051 _ACEOF
21052
21053 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
21054
21055
21056 # If not set in template file, set bytes to use libc memset()
21057 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
21058   MEMSET_LOOP_LIMIT=1024
21059 fi
21060
21061 cat >>confdefs.h <<_ACEOF
21062 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
21063 _ACEOF
21064
21065
21066
21067 if test "$enable_nls" = yes ; then
21068
21069   echo "$as_me:$LINENO: checking for library containing gettext" >&5
21070 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
21071 if test "${ac_cv_search_gettext+set}" = set; then
21072   echo $ECHO_N "(cached) $ECHO_C" >&6
21073 else
21074   ac_func_search_save_LIBS=$LIBS
21075 ac_cv_search_gettext=no
21076 cat >conftest.$ac_ext <<_ACEOF
21077 /* confdefs.h.  */
21078 _ACEOF
21079 cat confdefs.h >>conftest.$ac_ext
21080 cat >>conftest.$ac_ext <<_ACEOF
21081 /* end confdefs.h.  */
21082
21083 /* Override any gcc2 internal prototype to avoid an error.  */
21084 #ifdef __cplusplus
21085 extern "C"
21086 #endif
21087 /* We use char because int might match the return type of a gcc2
21088    builtin and then its argument prototype would still apply.  */
21089 char gettext ();
21090 int
21091 main ()
21092 {
21093 gettext ();
21094   ;
21095   return 0;
21096 }
21097 _ACEOF
21098 rm -f conftest.$ac_objext conftest$ac_exeext
21099 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21100   (eval $ac_link) 2>conftest.er1
21101   ac_status=$?
21102   grep -v '^ *+' conftest.er1 >conftest.err
21103   rm -f conftest.er1
21104   cat conftest.err >&5
21105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21106   (exit $ac_status); } &&
21107          { ac_try='test -z "$ac_c_werror_flag"
21108                          || test ! -s conftest.err'
21109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21110   (eval $ac_try) 2>&5
21111   ac_status=$?
21112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21113   (exit $ac_status); }; } &&
21114          { ac_try='test -s conftest$ac_exeext'
21115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21116   (eval $ac_try) 2>&5
21117   ac_status=$?
21118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21119   (exit $ac_status); }; }; then
21120   ac_cv_search_gettext="none required"
21121 else
21122   echo "$as_me: failed program was:" >&5
21123 sed 's/^/| /' conftest.$ac_ext >&5
21124
21125 fi
21126 rm -f conftest.err conftest.$ac_objext \
21127       conftest$ac_exeext conftest.$ac_ext
21128 if test "$ac_cv_search_gettext" = no; then
21129   for ac_lib in intl; do
21130     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21131     cat >conftest.$ac_ext <<_ACEOF
21132 /* confdefs.h.  */
21133 _ACEOF
21134 cat confdefs.h >>conftest.$ac_ext
21135 cat >>conftest.$ac_ext <<_ACEOF
21136 /* end confdefs.h.  */
21137
21138 /* Override any gcc2 internal prototype to avoid an error.  */
21139 #ifdef __cplusplus
21140 extern "C"
21141 #endif
21142 /* We use char because int might match the return type of a gcc2
21143    builtin and then its argument prototype would still apply.  */
21144 char gettext ();
21145 int
21146 main ()
21147 {
21148 gettext ();
21149   ;
21150   return 0;
21151 }
21152 _ACEOF
21153 rm -f conftest.$ac_objext conftest$ac_exeext
21154 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21155   (eval $ac_link) 2>conftest.er1
21156   ac_status=$?
21157   grep -v '^ *+' conftest.er1 >conftest.err
21158   rm -f conftest.er1
21159   cat conftest.err >&5
21160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21161   (exit $ac_status); } &&
21162          { ac_try='test -z "$ac_c_werror_flag"
21163                          || test ! -s conftest.err'
21164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21165   (eval $ac_try) 2>&5
21166   ac_status=$?
21167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21168   (exit $ac_status); }; } &&
21169          { ac_try='test -s conftest$ac_exeext'
21170   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21171   (eval $ac_try) 2>&5
21172   ac_status=$?
21173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21174   (exit $ac_status); }; }; then
21175   ac_cv_search_gettext="-l$ac_lib"
21176 break
21177 else
21178   echo "$as_me: failed program was:" >&5
21179 sed 's/^/| /' conftest.$ac_ext >&5
21180
21181 fi
21182 rm -f conftest.err conftest.$ac_objext \
21183       conftest$ac_exeext conftest.$ac_ext
21184   done
21185 fi
21186 LIBS=$ac_func_search_save_LIBS
21187 fi
21188 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
21189 echo "${ECHO_T}$ac_cv_search_gettext" >&6
21190 if test "$ac_cv_search_gettext" != no; then
21191   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
21192
21193 else
21194   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
21195 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
21196    { (exit 1); exit 1; }; }
21197 fi
21198
21199   if test "${ac_cv_header_libintl_h+set}" = set; then
21200   echo "$as_me:$LINENO: checking for libintl.h" >&5
21201 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21202 if test "${ac_cv_header_libintl_h+set}" = set; then
21203   echo $ECHO_N "(cached) $ECHO_C" >&6
21204 fi
21205 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21206 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21207 else
21208   # Is the header compilable?
21209 echo "$as_me:$LINENO: checking libintl.h usability" >&5
21210 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
21211 cat >conftest.$ac_ext <<_ACEOF
21212 /* confdefs.h.  */
21213 _ACEOF
21214 cat confdefs.h >>conftest.$ac_ext
21215 cat >>conftest.$ac_ext <<_ACEOF
21216 /* end confdefs.h.  */
21217 $ac_includes_default
21218 #include <libintl.h>
21219 _ACEOF
21220 rm -f conftest.$ac_objext
21221 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21222   (eval $ac_compile) 2>conftest.er1
21223   ac_status=$?
21224   grep -v '^ *+' conftest.er1 >conftest.err
21225   rm -f conftest.er1
21226   cat conftest.err >&5
21227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21228   (exit $ac_status); } &&
21229          { ac_try='test -z "$ac_c_werror_flag"
21230                          || test ! -s conftest.err'
21231   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21232   (eval $ac_try) 2>&5
21233   ac_status=$?
21234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21235   (exit $ac_status); }; } &&
21236          { ac_try='test -s conftest.$ac_objext'
21237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21238   (eval $ac_try) 2>&5
21239   ac_status=$?
21240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21241   (exit $ac_status); }; }; then
21242   ac_header_compiler=yes
21243 else
21244   echo "$as_me: failed program was:" >&5
21245 sed 's/^/| /' conftest.$ac_ext >&5
21246
21247 ac_header_compiler=no
21248 fi
21249 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21250 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21251 echo "${ECHO_T}$ac_header_compiler" >&6
21252
21253 # Is the header present?
21254 echo "$as_me:$LINENO: checking libintl.h presence" >&5
21255 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
21256 cat >conftest.$ac_ext <<_ACEOF
21257 /* confdefs.h.  */
21258 _ACEOF
21259 cat confdefs.h >>conftest.$ac_ext
21260 cat >>conftest.$ac_ext <<_ACEOF
21261 /* end confdefs.h.  */
21262 #include <libintl.h>
21263 _ACEOF
21264 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21265   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21266   ac_status=$?
21267   grep -v '^ *+' conftest.er1 >conftest.err
21268   rm -f conftest.er1
21269   cat conftest.err >&5
21270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21271   (exit $ac_status); } >/dev/null; then
21272   if test -s conftest.err; then
21273     ac_cpp_err=$ac_c_preproc_warn_flag
21274     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21275   else
21276     ac_cpp_err=
21277   fi
21278 else
21279   ac_cpp_err=yes
21280 fi
21281 if test -z "$ac_cpp_err"; then
21282   ac_header_preproc=yes
21283 else
21284   echo "$as_me: failed program was:" >&5
21285 sed 's/^/| /' conftest.$ac_ext >&5
21286
21287   ac_header_preproc=no
21288 fi
21289 rm -f conftest.err conftest.$ac_ext
21290 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21291 echo "${ECHO_T}$ac_header_preproc" >&6
21292
21293 # So?  What about this header?
21294 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21295   yes:no: )
21296     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
21297 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21298     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
21299 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
21300     ac_header_preproc=yes
21301     ;;
21302   no:yes:* )
21303     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
21304 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
21305     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
21306 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
21307     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
21308 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
21309     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
21310 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
21311     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
21312 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
21313     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
21314 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
21315     (
21316       cat <<\_ASBOX
21317 ## ---------------------------------------- ##
21318 ## Report this to pgsql-bugs@postgresql.org ##
21319 ## ---------------------------------------- ##
21320 _ASBOX
21321     ) |
21322       sed "s/^/$as_me: WARNING:     /" >&2
21323     ;;
21324 esac
21325 echo "$as_me:$LINENO: checking for libintl.h" >&5
21326 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21327 if test "${ac_cv_header_libintl_h+set}" = set; then
21328   echo $ECHO_N "(cached) $ECHO_C" >&6
21329 else
21330   ac_cv_header_libintl_h=$ac_header_preproc
21331 fi
21332 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21333 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21334
21335 fi
21336 if test $ac_cv_header_libintl_h = yes; then
21337   :
21338 else
21339   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
21340 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
21341    { (exit 1); exit 1; }; }
21342 fi
21343
21344
21345   for ac_prog in msgfmt
21346 do
21347   # Extract the first word of "$ac_prog", so it can be a program name with args.
21348 set dummy $ac_prog; ac_word=$2
21349 echo "$as_me:$LINENO: checking for $ac_word" >&5
21350 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21351 if test "${ac_cv_prog_MSGFMT+set}" = set; then
21352   echo $ECHO_N "(cached) $ECHO_C" >&6
21353 else
21354   if test -n "$MSGFMT"; then
21355   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
21356 else
21357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21358 for as_dir in $PATH
21359 do
21360   IFS=$as_save_IFS
21361   test -z "$as_dir" && as_dir=.
21362   for ac_exec_ext in '' $ac_executable_extensions; do
21363   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21364     ac_cv_prog_MSGFMT="$ac_prog"
21365     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21366     break 2
21367   fi
21368 done
21369 done
21370
21371 fi
21372 fi
21373 MSGFMT=$ac_cv_prog_MSGFMT
21374 if test -n "$MSGFMT"; then
21375   echo "$as_me:$LINENO: result: $MSGFMT" >&5
21376 echo "${ECHO_T}$MSGFMT" >&6
21377 else
21378   echo "$as_me:$LINENO: result: no" >&5
21379 echo "${ECHO_T}no" >&6
21380 fi
21381
21382   test -n "$MSGFMT" && break
21383 done
21384
21385   if test -z "$MSGFMT"; then
21386     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
21387 echo "$as_me: error: msgfmt is required for NLS" >&2;}
21388    { (exit 1); exit 1; }; }
21389   fi
21390   for ac_prog in msgmerge
21391 do
21392   # Extract the first word of "$ac_prog", so it can be a program name with args.
21393 set dummy $ac_prog; ac_word=$2
21394 echo "$as_me:$LINENO: checking for $ac_word" >&5
21395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21396 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
21397   echo $ECHO_N "(cached) $ECHO_C" >&6
21398 else
21399   if test -n "$MSGMERGE"; then
21400   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
21401 else
21402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21403 for as_dir in $PATH
21404 do
21405   IFS=$as_save_IFS
21406   test -z "$as_dir" && as_dir=.
21407   for ac_exec_ext in '' $ac_executable_extensions; do
21408   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21409     ac_cv_prog_MSGMERGE="$ac_prog"
21410     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21411     break 2
21412   fi
21413 done
21414 done
21415
21416 fi
21417 fi
21418 MSGMERGE=$ac_cv_prog_MSGMERGE
21419 if test -n "$MSGMERGE"; then
21420   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
21421 echo "${ECHO_T}$MSGMERGE" >&6
21422 else
21423   echo "$as_me:$LINENO: result: no" >&5
21424 echo "${ECHO_T}no" >&6
21425 fi
21426
21427   test -n "$MSGMERGE" && break
21428 done
21429
21430   for ac_prog in xgettext
21431 do
21432   # Extract the first word of "$ac_prog", so it can be a program name with args.
21433 set dummy $ac_prog; ac_word=$2
21434 echo "$as_me:$LINENO: checking for $ac_word" >&5
21435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21436 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
21437   echo $ECHO_N "(cached) $ECHO_C" >&6
21438 else
21439   if test -n "$XGETTEXT"; then
21440   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
21441 else
21442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21443 for as_dir in $PATH
21444 do
21445   IFS=$as_save_IFS
21446   test -z "$as_dir" && as_dir=.
21447   for ac_exec_ext in '' $ac_executable_extensions; do
21448   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21449     ac_cv_prog_XGETTEXT="$ac_prog"
21450     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21451     break 2
21452   fi
21453 done
21454 done
21455
21456 fi
21457 fi
21458 XGETTEXT=$ac_cv_prog_XGETTEXT
21459 if test -n "$XGETTEXT"; then
21460   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
21461 echo "${ECHO_T}$XGETTEXT" >&6
21462 else
21463   echo "$as_me:$LINENO: result: no" >&5
21464 echo "${ECHO_T}no" >&6
21465 fi
21466
21467   test -n "$XGETTEXT" && break
21468 done
21469
21470
21471   # Note: share/locale is always the default, independent of $datadir
21472   localedir='${prefix}/share/locale'
21473   if test x"$prefix" = x"NONE"; then
21474     exp_localedir="$ac_default_prefix/share/locale"
21475   else
21476     exp_localedir="$prefix/share/locale"
21477   fi
21478
21479
21480
21481 cat >>confdefs.h <<_ACEOF
21482 #define LOCALEDIR "$exp_localedir"
21483 _ACEOF
21484
21485
21486 fi
21487
21488 # Check for Tcl configuration script tclConfig.sh
21489 if test "$with_tcl" = yes; then
21490     for ac_prog in tclsh tcl
21491 do
21492   # Extract the first word of "$ac_prog", so it can be a program name with args.
21493 set dummy $ac_prog; ac_word=$2
21494 echo "$as_me:$LINENO: checking for $ac_word" >&5
21495 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21496 if test "${ac_cv_path_TCLSH+set}" = set; then
21497   echo $ECHO_N "(cached) $ECHO_C" >&6
21498 else
21499   case $TCLSH in
21500   [\\/]* | ?:[\\/]*)
21501   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
21502   ;;
21503   *)
21504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21505 for as_dir in $PATH
21506 do
21507   IFS=$as_save_IFS
21508   test -z "$as_dir" && as_dir=.
21509   for ac_exec_ext in '' $ac_executable_extensions; do
21510   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21511     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
21512     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21513     break 2
21514   fi
21515 done
21516 done
21517
21518   ;;
21519 esac
21520 fi
21521 TCLSH=$ac_cv_path_TCLSH
21522
21523 if test -n "$TCLSH"; then
21524   echo "$as_me:$LINENO: result: $TCLSH" >&5
21525 echo "${ECHO_T}$TCLSH" >&6
21526 else
21527   echo "$as_me:$LINENO: result: no" >&5
21528 echo "${ECHO_T}no" >&6
21529 fi
21530
21531   test -n "$TCLSH" && break
21532 done
21533
21534 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
21535 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
21536 # Let user override test
21537 if test -z "$TCL_CONFIG_SH"; then
21538     pgac_test_dirs="$with_tclconfig"
21539
21540     set X $pgac_test_dirs; shift
21541     if test $# -eq 0; then
21542         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
21543 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
21544    { (exit 1); exit 1; }; }
21545         set X `echo 'puts $auto_path' | $TCLSH`; shift
21546     fi
21547
21548     for pgac_dir do
21549         if test -r "$pgac_dir/tclConfig.sh"; then
21550             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
21551             break
21552         fi
21553     done
21554 fi
21555
21556 if test -z "$TCL_CONFIG_SH"; then
21557     echo "$as_me:$LINENO: result: no" >&5
21558 echo "${ECHO_T}no" >&6
21559     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
21560 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
21561    { (exit 1); exit 1; }; }
21562 else
21563     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
21564 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
21565 fi
21566
21567
21568
21569     . "$TCL_CONFIG_SH"
21570 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
21571 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
21572 eval TCL_LIBS=\"$TCL_LIBS\"
21573 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
21574 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
21575
21576         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
21577     ac_save_CPPFLAGS=$CPPFLAGS
21578     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
21579     if test "${ac_cv_header_tcl_h+set}" = set; then
21580   echo "$as_me:$LINENO: checking for tcl.h" >&5
21581 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
21582 if test "${ac_cv_header_tcl_h+set}" = set; then
21583   echo $ECHO_N "(cached) $ECHO_C" >&6
21584 fi
21585 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
21586 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
21587 else
21588   # Is the header compilable?
21589 echo "$as_me:$LINENO: checking tcl.h usability" >&5
21590 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
21591 cat >conftest.$ac_ext <<_ACEOF
21592 /* confdefs.h.  */
21593 _ACEOF
21594 cat confdefs.h >>conftest.$ac_ext
21595 cat >>conftest.$ac_ext <<_ACEOF
21596 /* end confdefs.h.  */
21597 $ac_includes_default
21598 #include <tcl.h>
21599 _ACEOF
21600 rm -f conftest.$ac_objext
21601 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21602   (eval $ac_compile) 2>conftest.er1
21603   ac_status=$?
21604   grep -v '^ *+' conftest.er1 >conftest.err
21605   rm -f conftest.er1
21606   cat conftest.err >&5
21607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21608   (exit $ac_status); } &&
21609          { ac_try='test -z "$ac_c_werror_flag"
21610                          || test ! -s conftest.err'
21611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21612   (eval $ac_try) 2>&5
21613   ac_status=$?
21614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21615   (exit $ac_status); }; } &&
21616          { ac_try='test -s conftest.$ac_objext'
21617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21618   (eval $ac_try) 2>&5
21619   ac_status=$?
21620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21621   (exit $ac_status); }; }; then
21622   ac_header_compiler=yes
21623 else
21624   echo "$as_me: failed program was:" >&5
21625 sed 's/^/| /' conftest.$ac_ext >&5
21626
21627 ac_header_compiler=no
21628 fi
21629 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21630 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21631 echo "${ECHO_T}$ac_header_compiler" >&6
21632
21633 # Is the header present?
21634 echo "$as_me:$LINENO: checking tcl.h presence" >&5
21635 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
21636 cat >conftest.$ac_ext <<_ACEOF
21637 /* confdefs.h.  */
21638 _ACEOF
21639 cat confdefs.h >>conftest.$ac_ext
21640 cat >>conftest.$ac_ext <<_ACEOF
21641 /* end confdefs.h.  */
21642 #include <tcl.h>
21643 _ACEOF
21644 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21645   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21646   ac_status=$?
21647   grep -v '^ *+' conftest.er1 >conftest.err
21648   rm -f conftest.er1
21649   cat conftest.err >&5
21650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21651   (exit $ac_status); } >/dev/null; then
21652   if test -s conftest.err; then
21653     ac_cpp_err=$ac_c_preproc_warn_flag
21654     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21655   else
21656     ac_cpp_err=
21657   fi
21658 else
21659   ac_cpp_err=yes
21660 fi
21661 if test -z "$ac_cpp_err"; then
21662   ac_header_preproc=yes
21663 else
21664   echo "$as_me: failed program was:" >&5
21665 sed 's/^/| /' conftest.$ac_ext >&5
21666
21667   ac_header_preproc=no
21668 fi
21669 rm -f conftest.err conftest.$ac_ext
21670 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21671 echo "${ECHO_T}$ac_header_preproc" >&6
21672
21673 # So?  What about this header?
21674 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21675   yes:no: )
21676     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
21677 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21678     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
21679 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
21680     ac_header_preproc=yes
21681     ;;
21682   no:yes:* )
21683     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
21684 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
21685     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
21686 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
21687     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
21688 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
21689     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
21690 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
21691     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
21692 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
21693     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
21694 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
21695     (
21696       cat <<\_ASBOX
21697 ## ---------------------------------------- ##
21698 ## Report this to pgsql-bugs@postgresql.org ##
21699 ## ---------------------------------------- ##
21700 _ASBOX
21701     ) |
21702       sed "s/^/$as_me: WARNING:     /" >&2
21703     ;;
21704 esac
21705 echo "$as_me:$LINENO: checking for tcl.h" >&5
21706 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
21707 if test "${ac_cv_header_tcl_h+set}" = set; then
21708   echo $ECHO_N "(cached) $ECHO_C" >&6
21709 else
21710   ac_cv_header_tcl_h=$ac_header_preproc
21711 fi
21712 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
21713 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
21714
21715 fi
21716 if test $ac_cv_header_tcl_h = yes; then
21717   :
21718 else
21719   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
21720 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
21721    { (exit 1); exit 1; }; }
21722 fi
21723
21724
21725     CPPFLAGS=$ac_save_CPPFLAGS
21726 fi
21727
21728 #
21729 # Check for DocBook and tools
21730 #
21731 for ac_prog in onsgmls nsgmls
21732 do
21733   # Extract the first word of "$ac_prog", so it can be a program name with args.
21734 set dummy $ac_prog; ac_word=$2
21735 echo "$as_me:$LINENO: checking for $ac_word" >&5
21736 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21737 if test "${ac_cv_prog_NSGMLS+set}" = set; then
21738   echo $ECHO_N "(cached) $ECHO_C" >&6
21739 else
21740   if test -n "$NSGMLS"; then
21741   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
21742 else
21743 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21744 for as_dir in $PATH
21745 do
21746   IFS=$as_save_IFS
21747   test -z "$as_dir" && as_dir=.
21748   for ac_exec_ext in '' $ac_executable_extensions; do
21749   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21750     ac_cv_prog_NSGMLS="$ac_prog"
21751     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21752     break 2
21753   fi
21754 done
21755 done
21756
21757 fi
21758 fi
21759 NSGMLS=$ac_cv_prog_NSGMLS
21760 if test -n "$NSGMLS"; then
21761   echo "$as_me:$LINENO: result: $NSGMLS" >&5
21762 echo "${ECHO_T}$NSGMLS" >&6
21763 else
21764   echo "$as_me:$LINENO: result: no" >&5
21765 echo "${ECHO_T}no" >&6
21766 fi
21767
21768   test -n "$NSGMLS" && break
21769 done
21770
21771 for ac_prog in openjade jade
21772 do
21773   # Extract the first word of "$ac_prog", so it can be a program name with args.
21774 set dummy $ac_prog; ac_word=$2
21775 echo "$as_me:$LINENO: checking for $ac_word" >&5
21776 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21777 if test "${ac_cv_prog_JADE+set}" = set; then
21778   echo $ECHO_N "(cached) $ECHO_C" >&6
21779 else
21780   if test -n "$JADE"; then
21781   ac_cv_prog_JADE="$JADE" # Let the user override the test.
21782 else
21783 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21784 for as_dir in $PATH
21785 do
21786   IFS=$as_save_IFS
21787   test -z "$as_dir" && as_dir=.
21788   for ac_exec_ext in '' $ac_executable_extensions; do
21789   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21790     ac_cv_prog_JADE="$ac_prog"
21791     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21792     break 2
21793   fi
21794 done
21795 done
21796
21797 fi
21798 fi
21799 JADE=$ac_cv_prog_JADE
21800 if test -n "$JADE"; then
21801   echo "$as_me:$LINENO: result: $JADE" >&5
21802 echo "${ECHO_T}$JADE" >&6
21803 else
21804   echo "$as_me:$LINENO: result: no" >&5
21805 echo "${ECHO_T}no" >&6
21806 fi
21807
21808   test -n "$JADE" && break
21809 done
21810
21811
21812 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
21813 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
21814 if test "${pgac_cv_check_docbook+set}" = set; then
21815   echo $ECHO_N "(cached) $ECHO_C" >&6
21816 else
21817   cat >conftest.sgml <<EOF
21818 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
21819 <book>
21820  <title>test</title>
21821  <chapter>
21822   <title>random</title>
21823    <sect1>
21824     <title>testsect</title>
21825     <para>text</para>
21826   </sect1>
21827  </chapter>
21828 </book>
21829 EOF
21830
21831 pgac_cv_check_docbook=no
21832
21833 if test -n "$NSGMLS"; then
21834   $NSGMLS -s conftest.sgml 1>&5 2>&1
21835   if test $? -eq 0; then
21836     pgac_cv_check_docbook=yes
21837   fi
21838 fi
21839 rm -f conftest.sgml
21840 fi
21841 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
21842 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
21843
21844 have_docbook=$pgac_cv_check_docbook
21845
21846
21847 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
21848 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
21849 if test "${pgac_cv_path_stylesheets+set}" = set; then
21850   echo $ECHO_N "(cached) $ECHO_C" >&6
21851 else
21852   if test -n "$DOCBOOKSTYLE"; then
21853   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
21854 else
21855   for pgac_prefix in /usr /usr/local /opt; do
21856     for pgac_infix in share lib; do
21857       for pgac_postfix in \
21858         sgml/stylesheets/nwalsh-modular \
21859         sgml/stylesheets/docbook \
21860                 sgml/docbook-dsssl \
21861         sgml/docbook/dsssl/modular \
21862         sgml/docbook/stylesheet/dsssl/modular \
21863         sgml/docbook/dsssl-stylesheets
21864       do
21865         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
21866         if test -r "$pgac_candidate/html/docbook.dsl" \
21867            && test -r "$pgac_candidate/print/docbook.dsl"
21868         then
21869           pgac_cv_path_stylesheets=$pgac_candidate
21870           break 3
21871         fi
21872       done
21873     done
21874   done
21875 fi
21876 fi
21877
21878 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
21879
21880 if test -n "$DOCBOOKSTYLE"; then
21881   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
21882 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
21883 else
21884   echo "$as_me:$LINENO: result: no" >&5
21885 echo "${ECHO_T}no" >&6
21886 fi
21887 if test -n "$DOCBOOKSTYLE"; then
21888   for ac_prog in collateindex.pl
21889 do
21890   # Extract the first word of "$ac_prog", so it can be a program name with args.
21891 set dummy $ac_prog; ac_word=$2
21892 echo "$as_me:$LINENO: checking for $ac_word" >&5
21893 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21894 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
21895   echo $ECHO_N "(cached) $ECHO_C" >&6
21896 else
21897   case $COLLATEINDEX in
21898   [\\/]* | ?:[\\/]*)
21899   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
21900   ;;
21901   *)
21902   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21903 for as_dir in $DOCBOOKSTYLE/bin $PATH
21904 do
21905   IFS=$as_save_IFS
21906   test -z "$as_dir" && as_dir=.
21907   for ac_exec_ext in '' $ac_executable_extensions; do
21908   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21909     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
21910     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21911     break 2
21912   fi
21913 done
21914 done
21915
21916   ;;
21917 esac
21918 fi
21919 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
21920
21921 if test -n "$COLLATEINDEX"; then
21922   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
21923 echo "${ECHO_T}$COLLATEINDEX" >&6
21924 else
21925   echo "$as_me:$LINENO: result: no" >&5
21926 echo "${ECHO_T}no" >&6
21927 fi
21928
21929   test -n "$COLLATEINDEX" && break
21930 done
21931
21932 else
21933   for ac_prog in collateindex.pl
21934 do
21935   # Extract the first word of "$ac_prog", so it can be a program name with args.
21936 set dummy $ac_prog; ac_word=$2
21937 echo "$as_me:$LINENO: checking for $ac_word" >&5
21938 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21939 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
21940   echo $ECHO_N "(cached) $ECHO_C" >&6
21941 else
21942   case $COLLATEINDEX in
21943   [\\/]* | ?:[\\/]*)
21944   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
21945   ;;
21946   *)
21947   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21948 for as_dir in $PATH
21949 do
21950   IFS=$as_save_IFS
21951   test -z "$as_dir" && as_dir=.
21952   for ac_exec_ext in '' $ac_executable_extensions; do
21953   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21954     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
21955     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21956     break 2
21957   fi
21958 done
21959 done
21960
21961   ;;
21962 esac
21963 fi
21964 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
21965
21966 if test -n "$COLLATEINDEX"; then
21967   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
21968 echo "${ECHO_T}$COLLATEINDEX" >&6
21969 else
21970   echo "$as_me:$LINENO: result: no" >&5
21971 echo "${ECHO_T}no" >&6
21972 fi
21973
21974   test -n "$COLLATEINDEX" && break
21975 done
21976
21977 fi
21978 for ac_prog in sgmlspl
21979 do
21980   # Extract the first word of "$ac_prog", so it can be a program name with args.
21981 set dummy $ac_prog; ac_word=$2
21982 echo "$as_me:$LINENO: checking for $ac_word" >&5
21983 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21984 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
21985   echo $ECHO_N "(cached) $ECHO_C" >&6
21986 else
21987   if test -n "$SGMLSPL"; then
21988   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
21989 else
21990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21991 for as_dir in $PATH
21992 do
21993   IFS=$as_save_IFS
21994   test -z "$as_dir" && as_dir=.
21995   for ac_exec_ext in '' $ac_executable_extensions; do
21996   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21997     ac_cv_prog_SGMLSPL="$ac_prog"
21998     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21999     break 2
22000   fi
22001 done
22002 done
22003
22004 fi
22005 fi
22006 SGMLSPL=$ac_cv_prog_SGMLSPL
22007 if test -n "$SGMLSPL"; then
22008   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22009 echo "${ECHO_T}$SGMLSPL" >&6
22010 else
22011   echo "$as_me:$LINENO: result: no" >&5
22012 echo "${ECHO_T}no" >&6
22013 fi
22014
22015   test -n "$SGMLSPL" && break
22016 done
22017
22018
22019 # Thread testing
22020
22021 # We have to run the thread test near the end so we have all our symbols
22022 # defined.  Cross compiling throws a warning.
22023 #
22024 if test "$enable_thread_safety_force" = yes; then
22025 if test x"$template" != x"win32"
22026 then
22027   { echo "$as_me:$LINENO: WARNING:
22028 *** Skipping thread test program.  --enable-thread-safety-force was used.
22029 *** Run the program in src/test/thread on the your machine and add
22030 proper locking function calls to your applications to guarantee thread
22031 safety.
22032 " >&5
22033 echo "$as_me: WARNING:
22034 *** Skipping thread test program.  --enable-thread-safety-force was used.
22035 *** Run the program in src/test/thread on the your machine and add
22036 proper locking function calls to your applications to guarantee thread
22037 safety.
22038 " >&2;}
22039 else
22040 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22041 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22042 fi
22043 elif test "$enable_thread_safety" = yes; then
22044 if test x"$template" != x"win32"
22045 then
22046 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
22047 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
22048
22049 _CFLAGS="$CFLAGS"
22050 _LIBS="$LIBS"
22051 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
22052 LIBS="$LIBS $PTHREAD_LIBS"
22053 if test "$cross_compiling" = yes; then
22054   echo "$as_me:$LINENO: result: maybe" >&5
22055 echo "${ECHO_T}maybe" >&6
22056   { echo "$as_me:$LINENO: WARNING:
22057 *** Skipping thread test program because of cross-compile build.
22058 *** Run the program in src/test/thread on the target machine.
22059 " >&5
22060 echo "$as_me: WARNING:
22061 *** Skipping thread test program because of cross-compile build.
22062 *** Run the program in src/test/thread on the target machine.
22063 " >&2;}
22064 else
22065   cat >conftest.$ac_ext <<_ACEOF
22066 /* confdefs.h.  */
22067 _ACEOF
22068 cat confdefs.h >>conftest.$ac_ext
22069 cat >>conftest.$ac_ext <<_ACEOF
22070 /* end confdefs.h.  */
22071 #include "$srcdir/src/test/thread/thread_test.c"
22072 _ACEOF
22073 rm -f conftest$ac_exeext
22074 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22075   (eval $ac_link) 2>&5
22076   ac_status=$?
22077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22078   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22080   (eval $ac_try) 2>&5
22081   ac_status=$?
22082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22083   (exit $ac_status); }; }; then
22084   echo "$as_me:$LINENO: result: yes" >&5
22085 echo "${ECHO_T}yes" >&6
22086 else
22087   echo "$as_me: program exited with status $ac_status" >&5
22088 echo "$as_me: failed program was:" >&5
22089 sed 's/^/| /' conftest.$ac_ext >&5
22090
22091 ( exit $ac_status )
22092 echo "$as_me:$LINENO: result: no" >&5
22093 echo "${ECHO_T}no" >&6
22094   { { echo "$as_me:$LINENO: error:
22095 *** Thread test program failed.  Your platform is not thread-safe.
22096 *** Check the file 'config.log'for the exact reason.
22097 ***
22098 *** You can use the configure option --enable-thread-safety-force
22099 *** to force threads to be enabled.  However, you must then run
22100 *** the program in src/test/thread and add locking function calls
22101 *** to your applications to guarantee thread safety.
22102 " >&5
22103 echo "$as_me: error:
22104 *** Thread test program failed.  Your platform is not thread-safe.
22105 *** Check the file 'config.log'for the exact reason.
22106 ***
22107 *** You can use the configure option --enable-thread-safety-force
22108 *** to force threads to be enabled.  However, you must then run
22109 *** the program in src/test/thread and add locking function calls
22110 *** to your applications to guarantee thread safety.
22111 " >&2;}
22112    { (exit 1); exit 1; }; }
22113 fi
22114 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22115 fi
22116 CFLAGS="$_CFLAGS"
22117 LIBS="$_LIBS"
22118 else
22119 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22120 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22121 fi
22122 fi
22123
22124 # prepare build tree if outside source tree
22125 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
22126 # Note 2: /bin/pwd might be better than shell's built-in at getting
22127 #         a symlink-free name.
22128 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
22129   vpath_build=no
22130 else
22131   vpath_build=yes
22132   if test "$no_create" != yes; then
22133     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
22134     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
22135     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
22136       || { { echo "$as_me:$LINENO: error: failed" >&5
22137 echo "$as_me: error: failed" >&2;}
22138    { (exit 1); exit 1; }; }
22139     echo "$as_me:$LINENO: result: done" >&5
22140 echo "${ECHO_T}done" >&6
22141   fi
22142 fi
22143
22144
22145
22146                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
22147
22148
22149                                                             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}"
22150
22151
22152 if test "$PORTNAME" = "win32"; then
22153           ac_config_commands="$ac_config_commands check_win32_symlinks"
22154
22155 fi
22156
22157           ac_config_headers="$ac_config_headers src/include/pg_config.h"
22158
22159
22160 cat >confcache <<\_ACEOF
22161 # This file is a shell script that caches the results of configure
22162 # tests run on this system so they can be shared between configure
22163 # scripts and configure runs, see configure's option --config-cache.
22164 # It is not useful on other systems.  If it contains results you don't
22165 # want to keep, you may remove or edit it.
22166 #
22167 # config.status only pays attention to the cache file if you give it
22168 # the --recheck option to rerun configure.
22169 #
22170 # `ac_cv_env_foo' variables (set or unset) will be overridden when
22171 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22172 # following values.
22173
22174 _ACEOF
22175
22176 # The following way of writing the cache mishandles newlines in values,
22177 # but we know of no workaround that is simple, portable, and efficient.
22178 # So, don't put newlines in cache variables' values.
22179 # Ultrix sh set writes to stderr and can't be redirected directly,
22180 # and sets the high bit in the cache file unless we assign to the vars.
22181 {
22182   (set) 2>&1 |
22183     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22184     *ac_space=\ *)
22185       # `set' does not quote correctly, so add quotes (double-quote
22186       # substitution turns \\\\ into \\, and sed turns \\ into \).
22187       sed -n \
22188         "s/'/'\\\\''/g;
22189           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22190       ;;
22191     *)
22192       # `set' quotes correctly as required by POSIX, so do not add quotes.
22193       sed -n \
22194         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22195       ;;
22196     esac;
22197 } |
22198   sed '
22199      t clear
22200      : clear
22201      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22202      t end
22203      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22204      : end' >>confcache
22205 if diff $cache_file confcache >/dev/null 2>&1; then :; else
22206   if test -w $cache_file; then
22207     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22208     cat confcache >$cache_file
22209   else
22210     echo "not updating unwritable cache $cache_file"
22211   fi
22212 fi
22213 rm -f confcache
22214
22215 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22216 # Let make expand exec_prefix.
22217 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22218
22219 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22220 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22221 # trailing colons and then remove the whole line if VPATH becomes empty
22222 # (actually we leave an empty line to preserve line numbers).
22223 if test "x$srcdir" = x.; then
22224   ac_vpsub='/^[  ]*VPATH[        ]*=/{
22225 s/:*\$(srcdir):*/:/;
22226 s/:*\${srcdir}:*/:/;
22227 s/:*@srcdir@:*/:/;
22228 s/^\([^=]*=[     ]*\):*/\1/;
22229 s/:*$//;
22230 s/^[^=]*=[       ]*$//;
22231 }'
22232 fi
22233
22234 DEFS=-DHAVE_CONFIG_H
22235
22236 ac_libobjs=
22237 ac_ltlibobjs=
22238 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22239   # 1. Remove the extension, and $U if already installed.
22240   ac_i=`echo "$ac_i" |
22241          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
22242   # 2. Add them.
22243   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22244   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22245 done
22246 LIBOBJS=$ac_libobjs
22247
22248 LTLIBOBJS=$ac_ltlibobjs
22249
22250
22251
22252 : ${CONFIG_STATUS=./config.status}
22253 ac_clean_files_save=$ac_clean_files
22254 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22255 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22256 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22257 cat >$CONFIG_STATUS <<_ACEOF
22258 #! $SHELL
22259 # Generated by $as_me.
22260 # Run this file to recreate the current configuration.
22261 # Compiler output produced by configure, useful for debugging
22262 # configure, is in config.log if it exists.
22263
22264 debug=false
22265 ac_cs_recheck=false
22266 ac_cs_silent=false
22267 SHELL=\${CONFIG_SHELL-$SHELL}
22268 _ACEOF
22269
22270 cat >>$CONFIG_STATUS <<\_ACEOF
22271 ## --------------------- ##
22272 ## M4sh Initialization.  ##
22273 ## --------------------- ##
22274
22275 # Be Bourne compatible
22276 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22277   emulate sh
22278   NULLCMD=:
22279   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22280   # is contrary to our usage.  Disable this feature.
22281   alias -g '${1+"$@"}'='"$@"'
22282 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22283   set -o posix
22284 fi
22285 DUALCASE=1; export DUALCASE # for MKS sh
22286
22287 # Support unset when possible.
22288 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
22289   as_unset=unset
22290 else
22291   as_unset=false
22292 fi
22293
22294
22295 # Work around bugs in pre-3.0 UWIN ksh.
22296 $as_unset ENV MAIL MAILPATH
22297 PS1='$ '
22298 PS2='> '
22299 PS4='+ '
22300
22301 # NLS nuisances.
22302 for as_var in \
22303   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22304   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22305   LC_TELEPHONE LC_TIME
22306 do
22307   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
22308     eval $as_var=C; export $as_var
22309   else
22310     $as_unset $as_var
22311   fi
22312 done
22313
22314 # Required to use basename.
22315 if expr a : '\(a\)' >/dev/null 2>&1; then
22316   as_expr=expr
22317 else
22318   as_expr=false
22319 fi
22320
22321 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22322   as_basename=basename
22323 else
22324   as_basename=false
22325 fi
22326
22327
22328 # Name of the executable.
22329 as_me=`$as_basename "$0" ||
22330 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22331          X"$0" : 'X\(//\)$' \| \
22332          X"$0" : 'X\(/\)$' \| \
22333          .     : '\(.\)' 2>/dev/null ||
22334 echo X/"$0" |
22335     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22336           /^X\/\(\/\/\)$/{ s//\1/; q; }
22337           /^X\/\(\/\).*/{ s//\1/; q; }
22338           s/.*/./; q'`
22339
22340
22341 # PATH needs CR, and LINENO needs CR and PATH.
22342 # Avoid depending upon Character Ranges.
22343 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22344 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22345 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22346 as_cr_digits='0123456789'
22347 as_cr_alnum=$as_cr_Letters$as_cr_digits
22348
22349 # The user is always right.
22350 if test "${PATH_SEPARATOR+set}" != set; then
22351   echo "#! /bin/sh" >conf$$.sh
22352   echo  "exit 0"   >>conf$$.sh
22353   chmod +x conf$$.sh
22354   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22355     PATH_SEPARATOR=';'
22356   else
22357     PATH_SEPARATOR=:
22358   fi
22359   rm -f conf$$.sh
22360 fi
22361
22362
22363   as_lineno_1=$LINENO
22364   as_lineno_2=$LINENO
22365   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22366   test "x$as_lineno_1" != "x$as_lineno_2" &&
22367   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
22368   # Find who we are.  Look in the path if we contain no path at all
22369   # relative or not.
22370   case $0 in
22371     *[\\/]* ) as_myself=$0 ;;
22372     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22373 for as_dir in $PATH
22374 do
22375   IFS=$as_save_IFS
22376   test -z "$as_dir" && as_dir=.
22377   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22378 done
22379
22380        ;;
22381   esac
22382   # We did not find ourselves, most probably we were run as `sh COMMAND'
22383   # in which case we are not to be found in the path.
22384   if test "x$as_myself" = x; then
22385     as_myself=$0
22386   fi
22387   if test ! -f "$as_myself"; then
22388     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22389 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22390    { (exit 1); exit 1; }; }
22391   fi
22392   case $CONFIG_SHELL in
22393   '')
22394     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22395 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22396 do
22397   IFS=$as_save_IFS
22398   test -z "$as_dir" && as_dir=.
22399   for as_base in sh bash ksh sh5; do
22400          case $as_dir in
22401          /*)
22402            if ("$as_dir/$as_base" -c '
22403   as_lineno_1=$LINENO
22404   as_lineno_2=$LINENO
22405   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22406   test "x$as_lineno_1" != "x$as_lineno_2" &&
22407   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
22408              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22409              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
22410              CONFIG_SHELL=$as_dir/$as_base
22411              export CONFIG_SHELL
22412              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22413            fi;;
22414          esac
22415        done
22416 done
22417 ;;
22418   esac
22419
22420   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22421   # uniformly replaced by the line number.  The first 'sed' inserts a
22422   # line-number line before each line; the second 'sed' does the real
22423   # work.  The second script uses 'N' to pair each line-number line
22424   # with the numbered line, and appends trailing '-' during
22425   # substitution so that $LINENO is not a special case at line end.
22426   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22427   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
22428   sed '=' <$as_myself |
22429     sed '
22430       N
22431       s,$,-,
22432       : loop
22433       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22434       t loop
22435       s,-$,,
22436       s,^['$as_cr_digits']*\n,,
22437     ' >$as_me.lineno &&
22438   chmod +x $as_me.lineno ||
22439     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22440 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22441    { (exit 1); exit 1; }; }
22442
22443   # Don't try to exec as it changes $[0], causing all sort of problems
22444   # (the dirname of $[0] is not the place where we might find the
22445   # original and so on.  Autoconf is especially sensible to this).
22446   . ./$as_me.lineno
22447   # Exit status is that of the last command.
22448   exit
22449 }
22450
22451
22452 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22453   *c*,-n*) ECHO_N= ECHO_C='
22454 ' ECHO_T='      ' ;;
22455   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22456   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
22457 esac
22458
22459 if expr a : '\(a\)' >/dev/null 2>&1; then
22460   as_expr=expr
22461 else
22462   as_expr=false
22463 fi
22464
22465 rm -f conf$$ conf$$.exe conf$$.file
22466 echo >conf$$.file
22467 if ln -s conf$$.file conf$$ 2>/dev/null; then
22468   # We could just check for DJGPP; but this test a) works b) is more generic
22469   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22470   if test -f conf$$.exe; then
22471     # Don't use ln at all; we don't have any links
22472     as_ln_s='cp -p'
22473   else
22474     as_ln_s='ln -s'
22475   fi
22476 elif ln conf$$.file conf$$ 2>/dev/null; then
22477   as_ln_s=ln
22478 else
22479   as_ln_s='cp -p'
22480 fi
22481 rm -f conf$$ conf$$.exe conf$$.file
22482
22483 if mkdir -p . 2>/dev/null; then
22484   as_mkdir_p=:
22485 else
22486   test -d ./-p && rmdir ./-p
22487   as_mkdir_p=false
22488 fi
22489
22490 as_executable_p="test -f"
22491
22492 # Sed expression to map a string onto a valid CPP name.
22493 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22494
22495 # Sed expression to map a string onto a valid variable name.
22496 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22497
22498
22499 # IFS
22500 # We need space, tab and new line, in precisely that order.
22501 as_nl='
22502 '
22503 IFS="   $as_nl"
22504
22505 # CDPATH.
22506 $as_unset CDPATH
22507
22508 exec 6>&1
22509
22510 # Open the log real soon, to keep \$[0] and so on meaningful, and to
22511 # report actual input values of CONFIG_FILES etc. instead of their
22512 # values after options handling.  Logging --version etc. is OK.
22513 exec 5>>config.log
22514 {
22515   echo
22516   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22517 ## Running $as_me. ##
22518 _ASBOX
22519 } >&5
22520 cat >&5 <<_CSEOF
22521
22522 This file was extended by PostgreSQL $as_me 8.2devel, which was
22523 generated by GNU Autoconf 2.59.  Invocation command line was
22524
22525   CONFIG_FILES    = $CONFIG_FILES
22526   CONFIG_HEADERS  = $CONFIG_HEADERS
22527   CONFIG_LINKS    = $CONFIG_LINKS
22528   CONFIG_COMMANDS = $CONFIG_COMMANDS
22529   $ $0 $@
22530
22531 _CSEOF
22532 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22533 echo >&5
22534 _ACEOF
22535
22536 # Files that config.status was made for.
22537 if test -n "$ac_config_files"; then
22538   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22539 fi
22540
22541 if test -n "$ac_config_headers"; then
22542   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22543 fi
22544
22545 if test -n "$ac_config_links"; then
22546   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22547 fi
22548
22549 if test -n "$ac_config_commands"; then
22550   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22551 fi
22552
22553 cat >>$CONFIG_STATUS <<\_ACEOF
22554
22555 ac_cs_usage="\
22556 \`$as_me' instantiates files from templates according to the
22557 current configuration.
22558
22559 Usage: $0 [OPTIONS] [FILE]...
22560
22561   -h, --help       print this help, then exit
22562   -V, --version    print version number, then exit
22563   -q, --quiet      do not print progress messages
22564   -d, --debug      don't remove temporary files
22565       --recheck    update $as_me by reconfiguring in the same conditions
22566   --file=FILE[:TEMPLATE]
22567                    instantiate the configuration file FILE
22568   --header=FILE[:TEMPLATE]
22569                    instantiate the configuration header FILE
22570
22571 Configuration files:
22572 $config_files
22573
22574 Configuration headers:
22575 $config_headers
22576
22577 Configuration links:
22578 $config_links
22579
22580 Configuration commands:
22581 $config_commands
22582
22583 Report bugs to <bug-autoconf@gnu.org>."
22584 _ACEOF
22585
22586 cat >>$CONFIG_STATUS <<_ACEOF
22587 ac_cs_version="\\
22588 PostgreSQL config.status 8.2devel
22589 configured by $0, generated by GNU Autoconf 2.59,
22590   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22591
22592 Copyright (C) 2003 Free Software Foundation, Inc.
22593 This config.status script is free software; the Free Software Foundation
22594 gives unlimited permission to copy, distribute and modify it."
22595 srcdir=$srcdir
22596 _ACEOF
22597
22598 cat >>$CONFIG_STATUS <<\_ACEOF
22599 # If no file are specified by the user, then we need to provide default
22600 # value.  By we need to know if files were specified by the user.
22601 ac_need_defaults=:
22602 while test $# != 0
22603 do
22604   case $1 in
22605   --*=*)
22606     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22607     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22608     ac_shift=:
22609     ;;
22610   -*)
22611     ac_option=$1
22612     ac_optarg=$2
22613     ac_shift=shift
22614     ;;
22615   *) # This is not an option, so the user has probably given explicit
22616      # arguments.
22617      ac_option=$1
22618      ac_need_defaults=false;;
22619   esac
22620
22621   case $ac_option in
22622   # Handling of the options.
22623 _ACEOF
22624 cat >>$CONFIG_STATUS <<\_ACEOF
22625   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22626     ac_cs_recheck=: ;;
22627   --version | --vers* | -V )
22628     echo "$ac_cs_version"; exit 0 ;;
22629   --he | --h)
22630     # Conflict between --help and --header
22631     { { echo "$as_me:$LINENO: error: ambiguous option: $1
22632 Try \`$0 --help' for more information." >&5
22633 echo "$as_me: error: ambiguous option: $1
22634 Try \`$0 --help' for more information." >&2;}
22635    { (exit 1); exit 1; }; };;
22636   --help | --hel | -h )
22637     echo "$ac_cs_usage"; exit 0 ;;
22638   --debug | --d* | -d )
22639     debug=: ;;
22640   --file | --fil | --fi | --f )
22641     $ac_shift
22642     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
22643     ac_need_defaults=false;;
22644   --header | --heade | --head | --hea )
22645     $ac_shift
22646     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
22647     ac_need_defaults=false;;
22648   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22649   | -silent | --silent | --silen | --sile | --sil | --si | --s)
22650     ac_cs_silent=: ;;
22651
22652   # This is an error.
22653   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
22654 Try \`$0 --help' for more information." >&5
22655 echo "$as_me: error: unrecognized option: $1
22656 Try \`$0 --help' for more information." >&2;}
22657    { (exit 1); exit 1; }; } ;;
22658
22659   *) ac_config_targets="$ac_config_targets $1" ;;
22660
22661   esac
22662   shift
22663 done
22664
22665 ac_configure_extra_args=
22666
22667 if $ac_cs_silent; then
22668   exec 6>/dev/null
22669   ac_configure_extra_args="$ac_configure_extra_args --silent"
22670 fi
22671
22672 _ACEOF
22673 cat >>$CONFIG_STATUS <<_ACEOF
22674 if \$ac_cs_recheck; then
22675   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
22676   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22677 fi
22678
22679 _ACEOF
22680
22681
22682
22683
22684
22685 cat >>$CONFIG_STATUS <<\_ACEOF
22686 for ac_config_target in $ac_config_targets
22687 do
22688   case "$ac_config_target" in
22689   # Handling of arguments.
22690   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
22691   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
22692   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
22693   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
22694   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
22695   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
22696   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
22697   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
22698   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
22699   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
22700   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
22701   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
22702 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22703    { (exit 1); exit 1; }; };;
22704   esac
22705 done
22706
22707 # If the user did not use the arguments to specify the items to instantiate,
22708 # then the envvar interface is used.  Set only those that are not.
22709 # We use the long form for the default assignment because of an extremely
22710 # bizarre bug on SunOS 4.1.3.
22711 if $ac_need_defaults; then
22712   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22713   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22714   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
22715   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22716 fi
22717
22718 # Have a temporary directory for convenience.  Make it in the build tree
22719 # simply because there is no reason to put it here, and in addition,
22720 # creating and moving files from /tmp can sometimes cause problems.
22721 # Create a temporary directory, and hook for its removal unless debugging.
22722 $debug ||
22723 {
22724   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22725   trap '{ (exit 1); exit 1; }' 1 2 13 15
22726 }
22727
22728 # Create a (secure) tmp directory for tmp files.
22729
22730 {
22731   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
22732   test -n "$tmp" && test -d "$tmp"
22733 }  ||
22734 {
22735   tmp=./confstat$$-$RANDOM
22736   (umask 077 && mkdir $tmp)
22737 } ||
22738 {
22739    echo "$me: cannot create a temporary directory in ." >&2
22740    { (exit 1); exit 1; }
22741 }
22742
22743 _ACEOF
22744
22745 cat >>$CONFIG_STATUS <<_ACEOF
22746
22747 #
22748 # CONFIG_FILES section.
22749 #
22750
22751 # No need to generate the scripts if there are no CONFIG_FILES.
22752 # This happens for instance when ./config.status config.h
22753 if test -n "\$CONFIG_FILES"; then
22754   # Protect against being on the right side of a sed subst in config.status.
22755   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22756    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22757 s,@SHELL@,$SHELL,;t t
22758 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22759 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22760 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22761 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22762 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22763 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22764 s,@exec_prefix@,$exec_prefix,;t t
22765 s,@prefix@,$prefix,;t t
22766 s,@program_transform_name@,$program_transform_name,;t t
22767 s,@bindir@,$bindir,;t t
22768 s,@sbindir@,$sbindir,;t t
22769 s,@libexecdir@,$libexecdir,;t t
22770 s,@datadir@,$datadir,;t t
22771 s,@sysconfdir@,$sysconfdir,;t t
22772 s,@sharedstatedir@,$sharedstatedir,;t t
22773 s,@localstatedir@,$localstatedir,;t t
22774 s,@libdir@,$libdir,;t t
22775 s,@includedir@,$includedir,;t t
22776 s,@oldincludedir@,$oldincludedir,;t t
22777 s,@infodir@,$infodir,;t t
22778 s,@mandir@,$mandir,;t t
22779 s,@build_alias@,$build_alias,;t t
22780 s,@host_alias@,$host_alias,;t t
22781 s,@target_alias@,$target_alias,;t t
22782 s,@DEFS@,$DEFS,;t t
22783 s,@ECHO_C@,$ECHO_C,;t t
22784 s,@ECHO_N@,$ECHO_N,;t t
22785 s,@ECHO_T@,$ECHO_T,;t t
22786 s,@LIBS@,$LIBS,;t t
22787 s,@configure_args@,$configure_args,;t t
22788 s,@build@,$build,;t t
22789 s,@build_cpu@,$build_cpu,;t t
22790 s,@build_vendor@,$build_vendor,;t t
22791 s,@build_os@,$build_os,;t t
22792 s,@host@,$host,;t t
22793 s,@host_cpu@,$host_cpu,;t t
22794 s,@host_vendor@,$host_vendor,;t t
22795 s,@host_os@,$host_os,;t t
22796 s,@PORTNAME@,$PORTNAME,;t t
22797 s,@docdir@,$docdir,;t t
22798 s,@enable_nls@,$enable_nls,;t t
22799 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
22800 s,@default_port@,$default_port,;t t
22801 s,@enable_shared@,$enable_shared,;t t
22802 s,@enable_rpath@,$enable_rpath,;t t
22803 s,@enable_debug@,$enable_debug,;t t
22804 s,@CC@,$CC,;t t
22805 s,@CFLAGS@,$CFLAGS,;t t
22806 s,@LDFLAGS@,$LDFLAGS,;t t
22807 s,@CPPFLAGS@,$CPPFLAGS,;t t
22808 s,@ac_ct_CC@,$ac_ct_CC,;t t
22809 s,@EXEEXT@,$EXEEXT,;t t
22810 s,@OBJEXT@,$OBJEXT,;t t
22811 s,@CPP@,$CPP,;t t
22812 s,@GCC@,$GCC,;t t
22813 s,@TAS@,$TAS,;t t
22814 s,@autodepend@,$autodepend,;t t
22815 s,@INCLUDES@,$INCLUDES,;t t
22816 s,@enable_thread_safety@,$enable_thread_safety,;t t
22817 s,@with_tcl@,$with_tcl,;t t
22818 s,@with_perl@,$with_perl,;t t
22819 s,@with_python@,$with_python,;t t
22820 s,@with_krb5@,$with_krb5,;t t
22821 s,@krb_srvtab@,$krb_srvtab,;t t
22822 s,@with_pam@,$with_pam,;t t
22823 s,@with_bonjour@,$with_bonjour,;t t
22824 s,@with_openssl@,$with_openssl,;t t
22825 s,@with_zlib@,$with_zlib,;t t
22826 s,@EGREP@,$EGREP,;t t
22827 s,@ELF_SYS@,$ELF_SYS,;t t
22828 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
22829 s,@AWK@,$AWK,;t t
22830 s,@FLEX@,$FLEX,;t t
22831 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
22832 s,@LN_S@,$LN_S,;t t
22833 s,@LD@,$LD,;t t
22834 s,@with_gnu_ld@,$with_gnu_ld,;t t
22835 s,@ld_R_works@,$ld_R_works,;t t
22836 s,@RANLIB@,$RANLIB,;t t
22837 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22838 s,@LORDER@,$LORDER,;t t
22839 s,@TAR@,$TAR,;t t
22840 s,@STRIP@,$STRIP,;t t
22841 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
22842 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
22843 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
22844 s,@YACC@,$YACC,;t t
22845 s,@YFLAGS@,$YFLAGS,;t t
22846 s,@PERL@,$PERL,;t t
22847 s,@perl_archlibexp@,$perl_archlibexp,;t t
22848 s,@perl_privlibexp@,$perl_privlibexp,;t t
22849 s,@perl_useshrplib@,$perl_useshrplib,;t t
22850 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
22851 s,@PYTHON@,$PYTHON,;t t
22852 s,@python_version@,$python_version,;t t
22853 s,@python_configdir@,$python_configdir,;t t
22854 s,@python_includespec@,$python_includespec,;t t
22855 s,@python_libdir@,$python_libdir,;t t
22856 s,@python_libspec@,$python_libspec,;t t
22857 s,@python_additional_libs@,$python_additional_libs,;t t
22858 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
22859 s,@LIBOBJS@,$LIBOBJS,;t t
22860 s,@acx_pthread_config@,$acx_pthread_config,;t t
22861 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
22862 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
22863 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
22864 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
22865 s,@MSGFMT@,$MSGFMT,;t t
22866 s,@MSGMERGE@,$MSGMERGE,;t t
22867 s,@XGETTEXT@,$XGETTEXT,;t t
22868 s,@localedir@,$localedir,;t t
22869 s,@TCLSH@,$TCLSH,;t t
22870 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
22871 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
22872 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
22873 s,@TCL_LIBS@,$TCL_LIBS,;t t
22874 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
22875 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
22876 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
22877 s,@NSGMLS@,$NSGMLS,;t t
22878 s,@JADE@,$JADE,;t t
22879 s,@have_docbook@,$have_docbook,;t t
22880 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
22881 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
22882 s,@SGMLSPL@,$SGMLSPL,;t t
22883 s,@vpath_build@,$vpath_build,;t t
22884 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
22885 CEOF
22886
22887 _ACEOF
22888
22889   cat >>$CONFIG_STATUS <<\_ACEOF
22890   # Split the substitutions into bite-sized pieces for seds with
22891   # small command number limits, like on Digital OSF/1 and HP-UX.
22892   ac_max_sed_lines=48
22893   ac_sed_frag=1 # Number of current file.
22894   ac_beg=1 # First line for current file.
22895   ac_end=$ac_max_sed_lines # Line after last line for current file.
22896   ac_more_lines=:
22897   ac_sed_cmds=
22898   while $ac_more_lines; do
22899     if test $ac_beg -gt 1; then
22900       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22901     else
22902       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22903     fi
22904     if test ! -s $tmp/subs.frag; then
22905       ac_more_lines=false
22906     else
22907       # The purpose of the label and of the branching condition is to
22908       # speed up the sed processing (if there are no `@' at all, there
22909       # is no need to browse any of the substitutions).
22910       # These are the two extra sed commands mentioned above.
22911       (echo ':t
22912   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22913       if test -z "$ac_sed_cmds"; then
22914         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22915       else
22916         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22917       fi
22918       ac_sed_frag=`expr $ac_sed_frag + 1`
22919       ac_beg=$ac_end
22920       ac_end=`expr $ac_end + $ac_max_sed_lines`
22921     fi
22922   done
22923   if test -z "$ac_sed_cmds"; then
22924     ac_sed_cmds=cat
22925   fi
22926 fi # test -n "$CONFIG_FILES"
22927
22928 _ACEOF
22929 cat >>$CONFIG_STATUS <<\_ACEOF
22930 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22931   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22932   case $ac_file in
22933   - | *:- | *:-:* ) # input from stdin
22934         cat >$tmp/stdin
22935         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22936         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22937   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22938         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22939   * )   ac_file_in=$ac_file.in ;;
22940   esac
22941
22942   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22943   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22944 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22945          X"$ac_file" : 'X\(//\)[^/]' \| \
22946          X"$ac_file" : 'X\(//\)$' \| \
22947          X"$ac_file" : 'X\(/\)' \| \
22948          .     : '\(.\)' 2>/dev/null ||
22949 echo X"$ac_file" |
22950     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22951           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22952           /^X\(\/\/\)$/{ s//\1/; q; }
22953           /^X\(\/\).*/{ s//\1/; q; }
22954           s/.*/./; q'`
22955   { if $as_mkdir_p; then
22956     mkdir -p "$ac_dir"
22957   else
22958     as_dir="$ac_dir"
22959     as_dirs=
22960     while test ! -d "$as_dir"; do
22961       as_dirs="$as_dir $as_dirs"
22962       as_dir=`(dirname "$as_dir") 2>/dev/null ||
22963 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22964          X"$as_dir" : 'X\(//\)[^/]' \| \
22965          X"$as_dir" : 'X\(//\)$' \| \
22966          X"$as_dir" : 'X\(/\)' \| \
22967          .     : '\(.\)' 2>/dev/null ||
22968 echo X"$as_dir" |
22969     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22970           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22971           /^X\(\/\/\)$/{ s//\1/; q; }
22972           /^X\(\/\).*/{ s//\1/; q; }
22973           s/.*/./; q'`
22974     done
22975     test ! -n "$as_dirs" || mkdir $as_dirs
22976   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22977 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22978    { (exit 1); exit 1; }; }; }
22979
22980   ac_builddir=.
22981
22982 if test "$ac_dir" != .; then
22983   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22984   # A "../" for each directory in $ac_dir_suffix.
22985   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22986 else
22987   ac_dir_suffix= ac_top_builddir=
22988 fi
22989
22990 case $srcdir in
22991   .)  # No --srcdir option.  We are building in place.
22992     ac_srcdir=.
22993     if test -z "$ac_top_builddir"; then
22994        ac_top_srcdir=.
22995     else
22996        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22997     fi ;;
22998   [\\/]* | ?:[\\/]* )  # Absolute path.
22999     ac_srcdir=$srcdir$ac_dir_suffix;
23000     ac_top_srcdir=$srcdir ;;
23001   *) # Relative path.
23002     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23003     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23004 esac
23005
23006 # Do not use `cd foo && pwd` to compute absolute paths, because
23007 # the directories may not exist.
23008 case `pwd` in
23009 .) ac_abs_builddir="$ac_dir";;
23010 *)
23011   case "$ac_dir" in
23012   .) ac_abs_builddir=`pwd`;;
23013   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23014   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23015   esac;;
23016 esac
23017 case $ac_abs_builddir in
23018 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23019 *)
23020   case ${ac_top_builddir}. in
23021   .) ac_abs_top_builddir=$ac_abs_builddir;;
23022   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23023   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23024   esac;;
23025 esac
23026 case $ac_abs_builddir in
23027 .) ac_abs_srcdir=$ac_srcdir;;
23028 *)
23029   case $ac_srcdir in
23030   .) ac_abs_srcdir=$ac_abs_builddir;;
23031   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23032   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23033   esac;;
23034 esac
23035 case $ac_abs_builddir in
23036 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23037 *)
23038   case $ac_top_srcdir in
23039   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23040   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23041   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23042   esac;;
23043 esac
23044
23045
23046
23047   if test x"$ac_file" != x-; then
23048     { echo "$as_me:$LINENO: creating $ac_file" >&5
23049 echo "$as_me: creating $ac_file" >&6;}
23050     rm -f "$ac_file"
23051   fi
23052   # Let's still pretend it is `configure' which instantiates (i.e., don't
23053   # use $as_me), people would be surprised to read:
23054   #    /* config.h.  Generated by config.status.  */
23055   if test x"$ac_file" = x-; then
23056     configure_input=
23057   else
23058     configure_input="$ac_file.  "
23059   fi
23060   configure_input=$configure_input"Generated from `echo $ac_file_in |
23061                                      sed 's,.*/,,'` by configure."
23062
23063   # First look for the input files in the build tree, otherwise in the
23064   # src tree.
23065   ac_file_inputs=`IFS=:
23066     for f in $ac_file_in; do
23067       case $f in
23068       -) echo $tmp/stdin ;;
23069       [\\/$]*)
23070          # Absolute (can't be DOS-style, as IFS=:)
23071          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23072 echo "$as_me: error: cannot find input file: $f" >&2;}
23073    { (exit 1); exit 1; }; }
23074          echo "$f";;
23075       *) # Relative
23076          if test -f "$f"; then
23077            # Build tree
23078            echo "$f"
23079          elif test -f "$srcdir/$f"; then
23080            # Source tree
23081            echo "$srcdir/$f"
23082          else
23083            # /dev/null tree
23084            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23085 echo "$as_me: error: cannot find input file: $f" >&2;}
23086    { (exit 1); exit 1; }; }
23087          fi;;
23088       esac
23089     done` || { (exit 1); exit 1; }
23090 _ACEOF
23091 cat >>$CONFIG_STATUS <<_ACEOF
23092   sed "$ac_vpsub
23093 $extrasub
23094 _ACEOF
23095 cat >>$CONFIG_STATUS <<\_ACEOF
23096 :t
23097 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23098 s,@configure_input@,$configure_input,;t t
23099 s,@srcdir@,$ac_srcdir,;t t
23100 s,@abs_srcdir@,$ac_abs_srcdir,;t t
23101 s,@top_srcdir@,$ac_top_srcdir,;t t
23102 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23103 s,@builddir@,$ac_builddir,;t t
23104 s,@abs_builddir@,$ac_abs_builddir,;t t
23105 s,@top_builddir@,$ac_top_builddir,;t t
23106 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23107 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23108   rm -f $tmp/stdin
23109   if test x"$ac_file" != x-; then
23110     mv $tmp/out $ac_file
23111   else
23112     cat $tmp/out
23113     rm -f $tmp/out
23114   fi
23115
23116 done
23117 _ACEOF
23118 cat >>$CONFIG_STATUS <<\_ACEOF
23119
23120 #
23121 # CONFIG_HEADER section.
23122 #
23123
23124 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23125 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23126 #
23127 # ac_d sets the value in "#define NAME VALUE" lines.
23128 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
23129 ac_dB='[         ].*$,\1#\2'
23130 ac_dC=' '
23131 ac_dD=',;t'
23132 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23133 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23134 ac_uB='$,\1#\2define\3'
23135 ac_uC=' '
23136 ac_uD=',;t'
23137
23138 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23139   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23140   case $ac_file in
23141   - | *:- | *:-:* ) # input from stdin
23142         cat >$tmp/stdin
23143         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23144         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23145   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23146         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23147   * )   ac_file_in=$ac_file.in ;;
23148   esac
23149
23150   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23151 echo "$as_me: creating $ac_file" >&6;}
23152
23153   # First look for the input files in the build tree, otherwise in the
23154   # src tree.
23155   ac_file_inputs=`IFS=:
23156     for f in $ac_file_in; do
23157       case $f in
23158       -) echo $tmp/stdin ;;
23159       [\\/$]*)
23160          # Absolute (can't be DOS-style, as IFS=:)
23161          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23162 echo "$as_me: error: cannot find input file: $f" >&2;}
23163    { (exit 1); exit 1; }; }
23164          # Do quote $f, to prevent DOS paths from being IFS'd.
23165          echo "$f";;
23166       *) # Relative
23167          if test -f "$f"; then
23168            # Build tree
23169            echo "$f"
23170          elif test -f "$srcdir/$f"; then
23171            # Source tree
23172            echo "$srcdir/$f"
23173          else
23174            # /dev/null tree
23175            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23176 echo "$as_me: error: cannot find input file: $f" >&2;}
23177    { (exit 1); exit 1; }; }
23178          fi;;
23179       esac
23180     done` || { (exit 1); exit 1; }
23181   # Remove the trailing spaces.
23182   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
23183
23184 _ACEOF
23185
23186 # Transform confdefs.h into two sed scripts, `conftest.defines' and
23187 # `conftest.undefs', that substitutes the proper values into
23188 # config.h.in to produce config.h.  The first handles `#define'
23189 # templates, and the second `#undef' templates.
23190 # And first: Protect against being on the right side of a sed subst in
23191 # config.status.  Protect against being in an unquoted here document
23192 # in config.status.
23193 rm -f conftest.defines conftest.undefs
23194 # Using a here document instead of a string reduces the quoting nightmare.
23195 # Putting comments in sed scripts is not portable.
23196 #
23197 # `end' is used to avoid that the second main sed command (meant for
23198 # 0-ary CPP macros) applies to n-ary macro definitions.
23199 # See the Autoconf documentation for `clear'.
23200 cat >confdef2sed.sed <<\_ACEOF
23201 s/[\\&,]/\\&/g
23202 s,[\\$`],\\&,g
23203 t clear
23204 : clear
23205 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
23206 t end
23207 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
23208 : end
23209 _ACEOF
23210 # If some macros were called several times there might be several times
23211 # the same #defines, which is useless.  Nevertheless, we may not want to
23212 # sort them, since we want the *last* AC-DEFINE to be honored.
23213 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23214 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23215 rm -f confdef2sed.sed
23216
23217 # This sed command replaces #undef with comments.  This is necessary, for
23218 # example, in the case of _POSIX_SOURCE, which is predefined and required
23219 # on some systems where configure will not decide to define it.
23220 cat >>conftest.undefs <<\_ACEOF
23221 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
23222 _ACEOF
23223
23224 # Break up conftest.defines because some shells have a limit on the size
23225 # of here documents, and old seds have small limits too (100 cmds).
23226 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
23227 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
23228 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23229 echo '  :' >>$CONFIG_STATUS
23230 rm -f conftest.tail
23231 while grep . conftest.defines >/dev/null
23232 do
23233   # Write a limited-size here document to $tmp/defines.sed.
23234   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23235   # Speed up: don't consider the non `#define' lines.
23236   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
23237   # Work around the forget-to-reset-the-flag bug.
23238   echo 't clr' >>$CONFIG_STATUS
23239   echo ': clr' >>$CONFIG_STATUS
23240   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23241   echo 'CEOF
23242   sed -f $tmp/defines.sed $tmp/in >$tmp/out
23243   rm -f $tmp/in
23244   mv $tmp/out $tmp/in
23245 ' >>$CONFIG_STATUS
23246   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23247   rm -f conftest.defines
23248   mv conftest.tail conftest.defines
23249 done
23250 rm -f conftest.defines
23251 echo '  fi # grep' >>$CONFIG_STATUS
23252 echo >>$CONFIG_STATUS
23253
23254 # Break up conftest.undefs because some shells have a limit on the size
23255 # of here documents, and old seds have small limits too (100 cmds).
23256 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
23257 rm -f conftest.tail
23258 while grep . conftest.undefs >/dev/null
23259 do
23260   # Write a limited-size here document to $tmp/undefs.sed.
23261   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23262   # Speed up: don't consider the non `#undef'
23263   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
23264   # Work around the forget-to-reset-the-flag bug.
23265   echo 't clr' >>$CONFIG_STATUS
23266   echo ': clr' >>$CONFIG_STATUS
23267   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
23268   echo 'CEOF
23269   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23270   rm -f $tmp/in
23271   mv $tmp/out $tmp/in
23272 ' >>$CONFIG_STATUS
23273   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23274   rm -f conftest.undefs
23275   mv conftest.tail conftest.undefs
23276 done
23277 rm -f conftest.undefs
23278
23279 cat >>$CONFIG_STATUS <<\_ACEOF
23280   # Let's still pretend it is `configure' which instantiates (i.e., don't
23281   # use $as_me), people would be surprised to read:
23282   #    /* config.h.  Generated by config.status.  */
23283   if test x"$ac_file" = x-; then
23284     echo "/* Generated by configure.  */" >$tmp/config.h
23285   else
23286     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
23287   fi
23288   cat $tmp/in >>$tmp/config.h
23289   rm -f $tmp/in
23290   if test x"$ac_file" != x-; then
23291     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
23292       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
23293 echo "$as_me: $ac_file is unchanged" >&6;}
23294     else
23295       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23296 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23297          X"$ac_file" : 'X\(//\)[^/]' \| \
23298          X"$ac_file" : 'X\(//\)$' \| \
23299          X"$ac_file" : 'X\(/\)' \| \
23300          .     : '\(.\)' 2>/dev/null ||
23301 echo X"$ac_file" |
23302     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23303           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23304           /^X\(\/\/\)$/{ s//\1/; q; }
23305           /^X\(\/\).*/{ s//\1/; q; }
23306           s/.*/./; q'`
23307       { if $as_mkdir_p; then
23308     mkdir -p "$ac_dir"
23309   else
23310     as_dir="$ac_dir"
23311     as_dirs=
23312     while test ! -d "$as_dir"; do
23313       as_dirs="$as_dir $as_dirs"
23314       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23315 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23316          X"$as_dir" : 'X\(//\)[^/]' \| \
23317          X"$as_dir" : 'X\(//\)$' \| \
23318          X"$as_dir" : 'X\(/\)' \| \
23319          .     : '\(.\)' 2>/dev/null ||
23320 echo X"$as_dir" |
23321     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23322           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23323           /^X\(\/\/\)$/{ s//\1/; q; }
23324           /^X\(\/\).*/{ s//\1/; q; }
23325           s/.*/./; q'`
23326     done
23327     test ! -n "$as_dirs" || mkdir $as_dirs
23328   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23329 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23330    { (exit 1); exit 1; }; }; }
23331
23332       rm -f $ac_file
23333       mv $tmp/config.h $ac_file
23334     fi
23335   else
23336     cat $tmp/config.h
23337     rm -f $tmp/config.h
23338   fi
23339   # Run the commands associated with the file.
23340   case $ac_file in
23341     src/include/pg_config.h )
23342 # Update timestamp for pg_config.h (see Makefile.global)
23343 echo >src/include/stamp-h
23344  ;;
23345   esac
23346 done
23347 _ACEOF
23348 cat >>$CONFIG_STATUS <<\_ACEOF
23349
23350 #
23351 # CONFIG_LINKS section.
23352 #
23353
23354 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
23355   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23356   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23357
23358   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
23359 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
23360
23361   if test ! -r $srcdir/$ac_source; then
23362     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
23363 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
23364    { (exit 1); exit 1; }; }
23365   fi
23366   rm -f $ac_dest
23367
23368   # Make relative symlinks.
23369   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
23370 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23371          X"$ac_dest" : 'X\(//\)[^/]' \| \
23372          X"$ac_dest" : 'X\(//\)$' \| \
23373          X"$ac_dest" : 'X\(/\)' \| \
23374          .     : '\(.\)' 2>/dev/null ||
23375 echo X"$ac_dest" |
23376     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23377           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23378           /^X\(\/\/\)$/{ s//\1/; q; }
23379           /^X\(\/\).*/{ s//\1/; q; }
23380           s/.*/./; q'`
23381   { if $as_mkdir_p; then
23382     mkdir -p "$ac_dest_dir"
23383   else
23384     as_dir="$ac_dest_dir"
23385     as_dirs=
23386     while test ! -d "$as_dir"; do
23387       as_dirs="$as_dir $as_dirs"
23388       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23389 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23390          X"$as_dir" : 'X\(//\)[^/]' \| \
23391          X"$as_dir" : 'X\(//\)$' \| \
23392          X"$as_dir" : 'X\(/\)' \| \
23393          .     : '\(.\)' 2>/dev/null ||
23394 echo X"$as_dir" |
23395     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23396           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23397           /^X\(\/\/\)$/{ s//\1/; q; }
23398           /^X\(\/\).*/{ s//\1/; q; }
23399           s/.*/./; q'`
23400     done
23401     test ! -n "$as_dirs" || mkdir $as_dirs
23402   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
23403 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
23404    { (exit 1); exit 1; }; }; }
23405
23406   ac_builddir=.
23407
23408 if test "$ac_dest_dir" != .; then
23409   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
23410   # A "../" for each directory in $ac_dir_suffix.
23411   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23412 else
23413   ac_dir_suffix= ac_top_builddir=
23414 fi
23415
23416 case $srcdir in
23417   .)  # No --srcdir option.  We are building in place.
23418     ac_srcdir=.
23419     if test -z "$ac_top_builddir"; then
23420        ac_top_srcdir=.
23421     else
23422        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23423     fi ;;
23424   [\\/]* | ?:[\\/]* )  # Absolute path.
23425     ac_srcdir=$srcdir$ac_dir_suffix;
23426     ac_top_srcdir=$srcdir ;;
23427   *) # Relative path.
23428     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23429     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23430 esac
23431
23432 # Do not use `cd foo && pwd` to compute absolute paths, because
23433 # the directories may not exist.
23434 case `pwd` in
23435 .) ac_abs_builddir="$ac_dest_dir";;
23436 *)
23437   case "$ac_dest_dir" in
23438   .) ac_abs_builddir=`pwd`;;
23439   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
23440   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
23441   esac;;
23442 esac
23443 case $ac_abs_builddir in
23444 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23445 *)
23446   case ${ac_top_builddir}. in
23447   .) ac_abs_top_builddir=$ac_abs_builddir;;
23448   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23449   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23450   esac;;
23451 esac
23452 case $ac_abs_builddir in
23453 .) ac_abs_srcdir=$ac_srcdir;;
23454 *)
23455   case $ac_srcdir in
23456   .) ac_abs_srcdir=$ac_abs_builddir;;
23457   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23458   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23459   esac;;
23460 esac
23461 case $ac_abs_builddir in
23462 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23463 *)
23464   case $ac_top_srcdir in
23465   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23466   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23467   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23468   esac;;
23469 esac
23470
23471
23472   case $srcdir in
23473   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
23474       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
23475   esac
23476
23477   # Try a symlink, then a hard link, then a copy.
23478   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
23479     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
23480     cp -p $srcdir/$ac_source $ac_dest ||
23481     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
23482 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
23483    { (exit 1); exit 1; }; }
23484 done
23485 _ACEOF
23486 cat >>$CONFIG_STATUS <<\_ACEOF
23487
23488 #
23489 # CONFIG_COMMANDS section.
23490 #
23491 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23492   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23493   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23494   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
23495 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23496          X"$ac_dest" : 'X\(//\)[^/]' \| \
23497          X"$ac_dest" : 'X\(//\)$' \| \
23498          X"$ac_dest" : 'X\(/\)' \| \
23499          .     : '\(.\)' 2>/dev/null ||
23500 echo X"$ac_dest" |
23501     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23502           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23503           /^X\(\/\/\)$/{ s//\1/; q; }
23504           /^X\(\/\).*/{ s//\1/; q; }
23505           s/.*/./; q'`
23506   { if $as_mkdir_p; then
23507     mkdir -p "$ac_dir"
23508   else
23509     as_dir="$ac_dir"
23510     as_dirs=
23511     while test ! -d "$as_dir"; do
23512       as_dirs="$as_dir $as_dirs"
23513       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23514 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23515          X"$as_dir" : 'X\(//\)[^/]' \| \
23516          X"$as_dir" : 'X\(//\)$' \| \
23517          X"$as_dir" : 'X\(/\)' \| \
23518          .     : '\(.\)' 2>/dev/null ||
23519 echo X"$as_dir" |
23520     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23521           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23522           /^X\(\/\/\)$/{ s//\1/; q; }
23523           /^X\(\/\).*/{ s//\1/; q; }
23524           s/.*/./; q'`
23525     done
23526     test ! -n "$as_dirs" || mkdir $as_dirs
23527   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23528 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23529    { (exit 1); exit 1; }; }; }
23530
23531   ac_builddir=.
23532
23533 if test "$ac_dir" != .; then
23534   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23535   # A "../" for each directory in $ac_dir_suffix.
23536   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23537 else
23538   ac_dir_suffix= ac_top_builddir=
23539 fi
23540
23541 case $srcdir in
23542   .)  # No --srcdir option.  We are building in place.
23543     ac_srcdir=.
23544     if test -z "$ac_top_builddir"; then
23545        ac_top_srcdir=.
23546     else
23547        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23548     fi ;;
23549   [\\/]* | ?:[\\/]* )  # Absolute path.
23550     ac_srcdir=$srcdir$ac_dir_suffix;
23551     ac_top_srcdir=$srcdir ;;
23552   *) # Relative path.
23553     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23554     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23555 esac
23556
23557 # Do not use `cd foo && pwd` to compute absolute paths, because
23558 # the directories may not exist.
23559 case `pwd` in
23560 .) ac_abs_builddir="$ac_dir";;
23561 *)
23562   case "$ac_dir" in
23563   .) ac_abs_builddir=`pwd`;;
23564   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23565   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23566   esac;;
23567 esac
23568 case $ac_abs_builddir in
23569 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23570 *)
23571   case ${ac_top_builddir}. in
23572   .) ac_abs_top_builddir=$ac_abs_builddir;;
23573   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23574   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23575   esac;;
23576 esac
23577 case $ac_abs_builddir in
23578 .) ac_abs_srcdir=$ac_srcdir;;
23579 *)
23580   case $ac_srcdir in
23581   .) ac_abs_srcdir=$ac_abs_builddir;;
23582   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23583   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23584   esac;;
23585 esac
23586 case $ac_abs_builddir in
23587 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23588 *)
23589   case $ac_top_srcdir in
23590   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23591   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23592   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23593   esac;;
23594 esac
23595
23596
23597   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
23598 echo "$as_me: executing $ac_dest commands" >&6;}
23599   case $ac_dest in
23600     check_win32_symlinks )
23601 # Links sometimes fail undetected on Mingw -
23602 # so here we detect it and warn the user
23603 for FILE in $CONFIG_LINKS
23604  do
23605         # test -e works for symlinks in the MinGW console
23606         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
23607 echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
23608  done
23609  ;;
23610   esac
23611 done
23612 _ACEOF
23613
23614 cat >>$CONFIG_STATUS <<\_ACEOF
23615
23616 { (exit 0); exit 0; }
23617 _ACEOF
23618 chmod +x $CONFIG_STATUS
23619 ac_clean_files=$ac_clean_files_save
23620
23621
23622 # configure is writing to config.log, and then calls config.status.
23623 # config.status does its own redirection, appending to config.log.
23624 # Unfortunately, on DOS this fails, as config.log is still kept open
23625 # by configure, so config.status won't be able to write to it; its
23626 # output is simply discarded.  So we exec the FD to /dev/null,
23627 # effectively closing config.log, so it can be properly (re)opened and
23628 # appended to by config.status.  When coming back to configure, we
23629 # need to make the FD available again.
23630 if test "$no_create" != yes; then
23631   ac_cs_success=:
23632   ac_config_status_args=
23633   test "$silent" = yes &&
23634     ac_config_status_args="$ac_config_status_args --quiet"
23635   exec 5>/dev/null
23636   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23637   exec 5>>config.log
23638   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23639   # would make configure fail if this is the last instruction.
23640   $ac_cs_success || { (exit 1); exit 1; }
23641 fi
23642
23643