OSDN Git Service

Add strlcpy() to the set of functions supported by src/port/ when not
[pg-rex/syncrep.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59 for PostgreSQL 8.2beta1.
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-2006, 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.2beta1'
275 PACKAGE_STRING='PostgreSQL 8.2beta1'
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 DTRACE DTRACEFLAGS enable_dtrace 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_ldap 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 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 LDAP_LIBS_FE LDAP_LIBS_BE 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.2beta1 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.2beta1:";;
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-dtrace         build with DTrace support
869   --enable-depend         turn on automatic dependency tracking
870   --enable-cassert        enable assertion checks (for debugging)
871   --enable-thread-safety  make client libraries thread-safe
872   --enable-thread-safety-force  force thread-safety in spite of thread test failure
873   --disable-largefile     omit support for large files
874
875 Optional Packages:
876   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
877   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
878
879   --with-docdir=DIR       install the documentation in DIR [PREFIX/doc]
880   --without-docdir        do not install the documentation
881   --with-includes=DIRS    look for additional header files in DIRS
882   --with-libraries=DIRS   look for additional libraries in DIRS
883   --with-libs=DIRS        alternative spelling of --with-libraries
884   --with-pgport=PORTNUM   change default port number [5432]
885   --with-tcl              build Tcl modules (PL/Tcl)
886   --with-tclconfig=DIR    tclConfig.sh is in DIR
887   --with-perl             build Perl modules (PL/Perl)
888   --with-python           build Python modules (PL/Python)
889   --with-krb5             build with Kerberos 5 support
890   --with-krb-srvnam=NAME  name of the default service principal in Kerberos [postgres]
891   --with-pam              build with PAM support
892   --with-ldap             build with LDAP support
893   --with-bonjour          build with Bonjour support
894   --with-openssl          build with OpenSSL support
895   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
896   --without-readline      do not use GNU Readline / BSD Libedit line editing
897   --without-zlib          do not use Zlib
898   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
899
900 Some influential environment variables:
901   CC          C compiler command
902   CFLAGS      C compiler flags
903   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
904               nonstandard directory <lib dir>
905   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
906               headers in a nonstandard directory <include dir>
907   CPP         C preprocessor
908   LDFLAGS_SL
909   DOCBOOKSTYLE
910               location of DocBook stylesheets
911
912 Use these variables to override the choices made by `configure' or to help
913 it to find libraries and programs with nonstandard names/locations.
914
915 Report bugs to <pgsql-bugs@postgresql.org>.
916 _ACEOF
917 fi
918
919 if test "$ac_init_help" = "recursive"; then
920   # If there are subdirs, report their specific --help.
921   ac_popdir=`pwd`
922   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
923     test -d $ac_dir || continue
924     ac_builddir=.
925
926 if test "$ac_dir" != .; then
927   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
928   # A "../" for each directory in $ac_dir_suffix.
929   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
930 else
931   ac_dir_suffix= ac_top_builddir=
932 fi
933
934 case $srcdir in
935   .)  # No --srcdir option.  We are building in place.
936     ac_srcdir=.
937     if test -z "$ac_top_builddir"; then
938        ac_top_srcdir=.
939     else
940        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
941     fi ;;
942   [\\/]* | ?:[\\/]* )  # Absolute path.
943     ac_srcdir=$srcdir$ac_dir_suffix;
944     ac_top_srcdir=$srcdir ;;
945   *) # Relative path.
946     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
947     ac_top_srcdir=$ac_top_builddir$srcdir ;;
948 esac
949
950 # Do not use `cd foo && pwd` to compute absolute paths, because
951 # the directories may not exist.
952 case `pwd` in
953 .) ac_abs_builddir="$ac_dir";;
954 *)
955   case "$ac_dir" in
956   .) ac_abs_builddir=`pwd`;;
957   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
958   *) ac_abs_builddir=`pwd`/"$ac_dir";;
959   esac;;
960 esac
961 case $ac_abs_builddir in
962 .) ac_abs_top_builddir=${ac_top_builddir}.;;
963 *)
964   case ${ac_top_builddir}. in
965   .) ac_abs_top_builddir=$ac_abs_builddir;;
966   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
967   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
968   esac;;
969 esac
970 case $ac_abs_builddir in
971 .) ac_abs_srcdir=$ac_srcdir;;
972 *)
973   case $ac_srcdir in
974   .) ac_abs_srcdir=$ac_abs_builddir;;
975   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
976   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
977   esac;;
978 esac
979 case $ac_abs_builddir in
980 .) ac_abs_top_srcdir=$ac_top_srcdir;;
981 *)
982   case $ac_top_srcdir in
983   .) ac_abs_top_srcdir=$ac_abs_builddir;;
984   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
985   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
986   esac;;
987 esac
988
989     cd $ac_dir
990     # Check for guested configure; otherwise get Cygnus style configure.
991     if test -f $ac_srcdir/configure.gnu; then
992       echo
993       $SHELL $ac_srcdir/configure.gnu  --help=recursive
994     elif test -f $ac_srcdir/configure; then
995       echo
996       $SHELL $ac_srcdir/configure  --help=recursive
997     elif test -f $ac_srcdir/configure.ac ||
998            test -f $ac_srcdir/configure.in; then
999       echo
1000       $ac_configure --help
1001     else
1002       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1003     fi
1004     cd $ac_popdir
1005   done
1006 fi
1007
1008 test -n "$ac_init_help" && exit 0
1009 if $ac_init_version; then
1010   cat <<\_ACEOF
1011 PostgreSQL configure 8.2beta1
1012 generated by GNU Autoconf 2.59
1013
1014 Copyright (C) 2003 Free Software Foundation, Inc.
1015 This configure script is free software; the Free Software Foundation
1016 gives unlimited permission to copy, distribute and modify it.
1017
1018 Copyright (c) 1996-2006, PostgreSQL Global Development Group
1019 _ACEOF
1020   exit 0
1021 fi
1022 exec 5>config.log
1023 cat >&5 <<_ACEOF
1024 This file contains any messages produced by compilers while
1025 running configure, to aid debugging if configure makes a mistake.
1026
1027 It was created by PostgreSQL $as_me 8.2beta1, which was
1028 generated by GNU Autoconf 2.59.  Invocation command line was
1029
1030   $ $0 $@
1031
1032 _ACEOF
1033 {
1034 cat <<_ASUNAME
1035 ## --------- ##
1036 ## Platform. ##
1037 ## --------- ##
1038
1039 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1040 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1041 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1042 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1043 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1044
1045 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1046 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1047
1048 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1049 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1050 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1051 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1052 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1053 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1054 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1055
1056 _ASUNAME
1057
1058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1059 for as_dir in $PATH
1060 do
1061   IFS=$as_save_IFS
1062   test -z "$as_dir" && as_dir=.
1063   echo "PATH: $as_dir"
1064 done
1065
1066 } >&5
1067
1068 cat >&5 <<_ACEOF
1069
1070
1071 ## ----------- ##
1072 ## Core tests. ##
1073 ## ----------- ##
1074
1075 _ACEOF
1076
1077
1078 # Keep a trace of the command line.
1079 # Strip out --no-create and --no-recursion so they do not pile up.
1080 # Strip out --silent because we don't want to record it for future runs.
1081 # Also quote any args containing shell meta-characters.
1082 # Make two passes to allow for proper duplicate-argument suppression.
1083 ac_configure_args=
1084 ac_configure_args0=
1085 ac_configure_args1=
1086 ac_sep=
1087 ac_must_keep_next=false
1088 for ac_pass in 1 2
1089 do
1090   for ac_arg
1091   do
1092     case $ac_arg in
1093     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1094     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1095     | -silent | --silent | --silen | --sile | --sil)
1096       continue ;;
1097     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1098       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1099     esac
1100     case $ac_pass in
1101     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1102     2)
1103       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1104       if test $ac_must_keep_next = true; then
1105         ac_must_keep_next=false # Got value, back to normal.
1106       else
1107         case $ac_arg in
1108           *=* | --config-cache | -C | -disable-* | --disable-* \
1109           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1110           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1111           | -with-* | --with-* | -without-* | --without-* | --x)
1112             case "$ac_configure_args0 " in
1113               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1114             esac
1115             ;;
1116           -* ) ac_must_keep_next=true ;;
1117         esac
1118       fi
1119       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1120       # Get rid of the leading space.
1121       ac_sep=" "
1122       ;;
1123     esac
1124   done
1125 done
1126 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1127 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1128
1129 # When interrupted or exit'd, cleanup temporary files, and complete
1130 # config.log.  We remove comments because anyway the quotes in there
1131 # would cause problems or look ugly.
1132 # WARNING: Be sure not to use single quotes in there, as some shells,
1133 # such as our DU 5.0 friend, will then `close' the trap.
1134 trap 'exit_status=$?
1135   # Save into config.log some information that might help in debugging.
1136   {
1137     echo
1138
1139     cat <<\_ASBOX
1140 ## ---------------- ##
1141 ## Cache variables. ##
1142 ## ---------------- ##
1143 _ASBOX
1144     echo
1145     # The following way of writing the cache mishandles newlines in values,
1146 {
1147   (set) 2>&1 |
1148     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1149     *ac_space=\ *)
1150       sed -n \
1151         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1152           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1153       ;;
1154     *)
1155       sed -n \
1156         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1157       ;;
1158     esac;
1159 }
1160     echo
1161
1162     cat <<\_ASBOX
1163 ## ----------------- ##
1164 ## Output variables. ##
1165 ## ----------------- ##
1166 _ASBOX
1167     echo
1168     for ac_var in $ac_subst_vars
1169     do
1170       eval ac_val=$`echo $ac_var`
1171       echo "$ac_var='"'"'$ac_val'"'"'"
1172     done | sort
1173     echo
1174
1175     if test -n "$ac_subst_files"; then
1176       cat <<\_ASBOX
1177 ## ------------- ##
1178 ## Output files. ##
1179 ## ------------- ##
1180 _ASBOX
1181       echo
1182       for ac_var in $ac_subst_files
1183       do
1184         eval ac_val=$`echo $ac_var`
1185         echo "$ac_var='"'"'$ac_val'"'"'"
1186       done | sort
1187       echo
1188     fi
1189
1190     if test -s confdefs.h; then
1191       cat <<\_ASBOX
1192 ## ----------- ##
1193 ## confdefs.h. ##
1194 ## ----------- ##
1195 _ASBOX
1196       echo
1197       sed "/^$/d" confdefs.h | sort
1198       echo
1199     fi
1200     test "$ac_signal" != 0 &&
1201       echo "$as_me: caught signal $ac_signal"
1202     echo "$as_me: exit $exit_status"
1203   } >&5
1204   rm -f core *.core &&
1205   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1206     exit $exit_status
1207      ' 0
1208 for ac_signal in 1 2 13 15; do
1209   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1210 done
1211 ac_signal=0
1212
1213 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1214 rm -rf conftest* confdefs.h
1215 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1216 echo >confdefs.h
1217
1218 # Predefined preprocessor variables.
1219
1220 cat >>confdefs.h <<_ACEOF
1221 #define PACKAGE_NAME "$PACKAGE_NAME"
1222 _ACEOF
1223
1224
1225 cat >>confdefs.h <<_ACEOF
1226 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1227 _ACEOF
1228
1229
1230 cat >>confdefs.h <<_ACEOF
1231 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1232 _ACEOF
1233
1234
1235 cat >>confdefs.h <<_ACEOF
1236 #define PACKAGE_STRING "$PACKAGE_STRING"
1237 _ACEOF
1238
1239
1240 cat >>confdefs.h <<_ACEOF
1241 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1242 _ACEOF
1243
1244
1245 # Let the site file select an alternate cache file if it wants to.
1246 # Prefer explicitly selected file to automatically selected ones.
1247 if test -z "$CONFIG_SITE"; then
1248   if test "x$prefix" != xNONE; then
1249     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1250   else
1251     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1252   fi
1253 fi
1254 for ac_site_file in $CONFIG_SITE; do
1255   if test -r "$ac_site_file"; then
1256     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1257 echo "$as_me: loading site script $ac_site_file" >&6;}
1258     sed 's/^/| /' "$ac_site_file" >&5
1259     . "$ac_site_file"
1260   fi
1261 done
1262
1263 if test -r "$cache_file"; then
1264   # Some versions of bash will fail to source /dev/null (special
1265   # files actually), so we avoid doing that.
1266   if test -f "$cache_file"; then
1267     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1268 echo "$as_me: loading cache $cache_file" >&6;}
1269     case $cache_file in
1270       [\\/]* | ?:[\\/]* ) . $cache_file;;
1271       *)                      . ./$cache_file;;
1272     esac
1273   fi
1274 else
1275   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1276 echo "$as_me: creating cache $cache_file" >&6;}
1277   >$cache_file
1278 fi
1279
1280 # Check that the precious variables saved in the cache have kept the same
1281 # value.
1282 ac_cache_corrupted=false
1283 for ac_var in `(set) 2>&1 |
1284                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1285   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1286   eval ac_new_set=\$ac_env_${ac_var}_set
1287   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1288   eval ac_new_val="\$ac_env_${ac_var}_value"
1289   case $ac_old_set,$ac_new_set in
1290     set,)
1291       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1292 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1293       ac_cache_corrupted=: ;;
1294     ,set)
1295       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1296 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1297       ac_cache_corrupted=: ;;
1298     ,);;
1299     *)
1300       if test "x$ac_old_val" != "x$ac_new_val"; then
1301         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1302 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1303         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1304 echo "$as_me:   former value:  $ac_old_val" >&2;}
1305         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1306 echo "$as_me:   current value: $ac_new_val" >&2;}
1307         ac_cache_corrupted=:
1308       fi;;
1309   esac
1310   # Pass precious variables to config.status.
1311   if test "$ac_new_set" = set; then
1312     case $ac_new_val in
1313     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1314       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1315     *) ac_arg=$ac_var=$ac_new_val ;;
1316     esac
1317     case " $ac_configure_args " in
1318       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1319       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1320     esac
1321   fi
1322 done
1323 if $ac_cache_corrupted; then
1324   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1325 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1326   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1327 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1328    { (exit 1); exit 1; }; }
1329 fi
1330
1331 ac_ext=c
1332 ac_cpp='$CPP $CPPFLAGS'
1333 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1334 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1335 ac_compiler_gnu=$ac_cv_c_compiler_gnu
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
1366
1367 ac_aux_dir=
1368 for ac_dir in config $srcdir/config; do
1369   if test -f $ac_dir/install-sh; then
1370     ac_aux_dir=$ac_dir
1371     ac_install_sh="$ac_aux_dir/install-sh -c"
1372     break
1373   elif test -f $ac_dir/install.sh; then
1374     ac_aux_dir=$ac_dir
1375     ac_install_sh="$ac_aux_dir/install.sh -c"
1376     break
1377   elif test -f $ac_dir/shtool; then
1378     ac_aux_dir=$ac_dir
1379     ac_install_sh="$ac_aux_dir/shtool install -c"
1380     break
1381   fi
1382 done
1383 if test -z "$ac_aux_dir"; then
1384   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1385 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1386    { (exit 1); exit 1; }; }
1387 fi
1388 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1389 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1390 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1391
1392
1393 configure_args=$ac_configure_args
1394
1395
1396
1397 cat >>confdefs.h <<_ACEOF
1398 #define PG_VERSION "$PACKAGE_VERSION"
1399 _ACEOF
1400
1401
1402 # Make sure we can run config.sub.
1403 $ac_config_sub sun4 >/dev/null 2>&1 ||
1404   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1405 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1406    { (exit 1); exit 1; }; }
1407
1408 echo "$as_me:$LINENO: checking build system type" >&5
1409 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1410 if test "${ac_cv_build+set}" = set; then
1411   echo $ECHO_N "(cached) $ECHO_C" >&6
1412 else
1413   ac_cv_build_alias=$build_alias
1414 test -z "$ac_cv_build_alias" &&
1415   ac_cv_build_alias=`$ac_config_guess`
1416 test -z "$ac_cv_build_alias" &&
1417   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1418 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1419    { (exit 1); exit 1; }; }
1420 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1421   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1422 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1423    { (exit 1); exit 1; }; }
1424
1425 fi
1426 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1427 echo "${ECHO_T}$ac_cv_build" >&6
1428 build=$ac_cv_build
1429 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1430 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1431 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1432
1433
1434 echo "$as_me:$LINENO: checking host system type" >&5
1435 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1436 if test "${ac_cv_host+set}" = set; then
1437   echo $ECHO_N "(cached) $ECHO_C" >&6
1438 else
1439   ac_cv_host_alias=$host_alias
1440 test -z "$ac_cv_host_alias" &&
1441   ac_cv_host_alias=$ac_cv_build_alias
1442 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1443   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1444 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1445    { (exit 1); exit 1; }; }
1446
1447 fi
1448 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1449 echo "${ECHO_T}$ac_cv_host" >&6
1450 host=$ac_cv_host
1451 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1452 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1453 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1454
1455
1456
1457 template=
1458 echo "$as_me:$LINENO: checking which template to use" >&5
1459 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1460
1461
1462
1463
1464
1465 # Check whether --with-template or --without-template was given.
1466 if test "${with_template+set}" = set; then
1467   withval="$with_template"
1468
1469   case $withval in
1470     yes)
1471       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1472 echo "$as_me: error: argument required for --with-template option" >&2;}
1473    { (exit 1); exit 1; }; }
1474       ;;
1475     no)
1476       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1477 echo "$as_me: error: argument required for --with-template option" >&2;}
1478    { (exit 1); exit 1; }; }
1479       ;;
1480     *)
1481
1482   case $withval in
1483     list)   echo; ls "$srcdir/src/template"; exit;;
1484     *)      if test -f "$srcdir/src/template/$with_template" ; then
1485               template=$withval
1486             else
1487               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1488 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1489    { (exit 1); exit 1; }; }
1490             fi;;
1491   esac
1492
1493       ;;
1494   esac
1495
1496 else
1497
1498 # --with-template not given
1499
1500 case $host_os in
1501      aix*) template=aix ;;
1502     bsdi*) template=bsdi ;;
1503   cygwin*) template=cygwin ;;
1504   darwin*) template=darwin ;;
1505     dgux*) template=dgux ;;
1506  freebsd*) template=freebsd ;;
1507     hpux*) template=hpux ;;
1508     irix*) template=irix ;;
1509  linux*|gnu*|k*bsd*-gnu)
1510            template=linux ;;
1511    mingw*) template=win32 ;;
1512   netbsd*) template=netbsd ;;
1513 nextstep*) template=nextstep ;;
1514  openbsd*) template=openbsd ;;
1515      osf*) template=osf ;;
1516      sco*) template=sco ;;
1517  solaris*) template=solaris ;;
1518    sunos*) template=sunos4 ;;
1519  sysv4.2*)
1520         case $host_vendor in
1521           univel) template=univel ;;
1522         esac ;;
1523    sysv4*) template=svr4 ;;
1524    sysv5*) template=unixware ;;
1525   ultrix*) template=ultrix4 ;;
1526 esac
1527
1528   if test x"$template" = x"" ; then
1529     { { echo "$as_me:$LINENO: error:
1530 *******************************************************************
1531 PostgreSQL has apparently not been ported to your platform yet.
1532 To try a manual configuration, look into the src/template directory
1533 for a similar platform and use the '--with-template=' option.
1534
1535 Please also contact <pgsql-ports@postgresql.org> to see about
1536 rectifying this.  Include the above 'checking host system type...'
1537 line.
1538 *******************************************************************
1539 " >&5
1540 echo "$as_me: error:
1541 *******************************************************************
1542 PostgreSQL has apparently not been ported to your platform yet.
1543 To try a manual configuration, look into the src/template directory
1544 for a similar platform and use the '--with-template=' option.
1545
1546 Please also contact <pgsql-ports@postgresql.org> to see about
1547 rectifying this.  Include the above 'checking host system type...'
1548 line.
1549 *******************************************************************
1550 " >&2;}
1551    { (exit 1); exit 1; }; }
1552   fi
1553
1554
1555 fi;
1556
1557
1558 echo "$as_me:$LINENO: result: $template" >&5
1559 echo "${ECHO_T}$template" >&6
1560
1561 PORTNAME=$template
1562
1563
1564 # Initialize default assumption that we do not need separate assembly code
1565 # for TAS (test-and-set).  This can be overridden by the template file
1566 # when it's executed.
1567 need_tas=no
1568 tas_file=dummy.s
1569
1570
1571
1572 ##
1573 ## Command line options
1574 ##
1575
1576 #
1577 # Installation directory for documentation
1578 #
1579
1580
1581
1582
1583 # Check whether --with-docdir or --without-docdir was given.
1584 if test "${with_docdir+set}" = set; then
1585   withval="$with_docdir"
1586
1587   case $withval in
1588     yes)
1589       { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1590 echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1591    { (exit 1); exit 1; }; }
1592       ;;
1593     no)
1594       docdir=
1595       ;;
1596     *)
1597       docdir=$withval
1598       ;;
1599   esac
1600
1601 else
1602   docdir='${prefix}/doc'
1603 fi;
1604
1605
1606
1607
1608 #
1609 # Add non-standard directories to the include path
1610 #
1611
1612
1613
1614
1615 # Check whether --with-includes or --without-includes was given.
1616 if test "${with_includes+set}" = set; then
1617   withval="$with_includes"
1618
1619   case $withval in
1620     yes)
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     no)
1626       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1627 echo "$as_me: error: argument required for --with-includes option" >&2;}
1628    { (exit 1); exit 1; }; }
1629       ;;
1630     *)
1631
1632       ;;
1633   esac
1634
1635 fi;
1636
1637
1638
1639 #
1640 # Add non-standard directories to the library search path
1641 #
1642
1643
1644
1645
1646 # Check whether --with-libraries or --without-libraries was given.
1647 if test "${with_libraries+set}" = set; then
1648   withval="$with_libraries"
1649
1650   case $withval in
1651     yes)
1652       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1653 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1654    { (exit 1); exit 1; }; }
1655       ;;
1656     no)
1657       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1658 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1659    { (exit 1); exit 1; }; }
1660       ;;
1661     *)
1662       LIBRARY_DIRS=$withval
1663       ;;
1664   esac
1665
1666 fi;
1667
1668
1669
1670
1671
1672
1673 # Check whether --with-libs or --without-libs was given.
1674 if test "${with_libs+set}" = set; then
1675   withval="$with_libs"
1676
1677   case $withval in
1678     yes)
1679       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1680 echo "$as_me: error: argument required for --with-libs option" >&2;}
1681    { (exit 1); exit 1; }; }
1682       ;;
1683     no)
1684       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1685 echo "$as_me: error: argument required for --with-libs option" >&2;}
1686    { (exit 1); exit 1; }; }
1687       ;;
1688     *)
1689       LIBRARY_DIRS=$withval
1690       ;;
1691   esac
1692
1693 fi;
1694
1695
1696
1697 #
1698 # 64-bit integer date/time storage (--enable-integer-datetimes)
1699 #
1700 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1701 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1702
1703
1704
1705 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1706 if test "${enable_integer_datetimes+set}" = set; then
1707   enableval="$enable_integer_datetimes"
1708
1709   case $enableval in
1710     yes)
1711
1712 cat >>confdefs.h <<\_ACEOF
1713 #define USE_INTEGER_DATETIMES 1
1714 _ACEOF
1715
1716       ;;
1717     no)
1718       :
1719       ;;
1720     *)
1721       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1722 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1723    { (exit 1); exit 1; }; }
1724       ;;
1725   esac
1726
1727 else
1728   enable_integer_datetimes=no
1729
1730 fi;
1731
1732 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1733 echo "${ECHO_T}$enable_integer_datetimes" >&6
1734
1735
1736 #
1737 # NLS
1738 #
1739 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1740 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1741
1742
1743
1744 # Check whether --enable-nls or --disable-nls was given.
1745 if test "${enable_nls+set}" = set; then
1746   enableval="$enable_nls"
1747
1748   case $enableval in
1749     yes)
1750       :
1751       ;;
1752     no)
1753       :
1754       ;;
1755     *)
1756       enable_nls=yes
1757 WANTED_LANGUAGES=$enableval
1758       ;;
1759   esac
1760
1761 else
1762   enable_nls=no
1763 fi;
1764
1765
1766 if test "$enable_nls" = yes; then
1767
1768 cat >>confdefs.h <<\_ACEOF
1769 #define ENABLE_NLS 1
1770 _ACEOF
1771
1772 fi
1773
1774 echo "$as_me:$LINENO: result: $enable_nls" >&5
1775 echo "${ECHO_T}$enable_nls" >&6
1776
1777
1778
1779 #
1780 # Default port number (--with-pgport), default 5432
1781 #
1782 echo "$as_me:$LINENO: checking for default port number" >&5
1783 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1784
1785
1786
1787
1788 # Check whether --with-pgport or --without-pgport was given.
1789 if test "${with_pgport+set}" = set; then
1790   withval="$with_pgport"
1791
1792   case $withval in
1793     yes)
1794       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1795 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1796    { (exit 1); exit 1; }; }
1797       ;;
1798     no)
1799       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1800 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1801    { (exit 1); exit 1; }; }
1802       ;;
1803     *)
1804       default_port=$withval
1805       ;;
1806   esac
1807
1808 else
1809   default_port=5432
1810 fi;
1811
1812 echo "$as_me:$LINENO: result: $default_port" >&5
1813 echo "${ECHO_T}$default_port" >&6
1814 # Need both of these because some places want an integer and some a string
1815
1816 cat >>confdefs.h <<_ACEOF
1817 #define DEF_PGPORT ${default_port}
1818 _ACEOF
1819
1820
1821 cat >>confdefs.h <<_ACEOF
1822 #define DEF_PGPORT_STR "${default_port}"
1823 _ACEOF
1824
1825
1826
1827 #
1828 # Option to disable shared libraries
1829 #
1830
1831
1832
1833 # Check whether --enable-shared or --disable-shared was given.
1834 if test "${enable_shared+set}" = set; then
1835   enableval="$enable_shared"
1836
1837   case $enableval in
1838     yes)
1839       :
1840       ;;
1841     no)
1842       :
1843       ;;
1844     *)
1845       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1846 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1847    { (exit 1); exit 1; }; }
1848       ;;
1849   esac
1850
1851 else
1852   enable_shared=yes
1853
1854 fi;
1855
1856
1857
1858 #
1859 # '-rpath'-like feature can be disabled
1860 #
1861
1862
1863
1864 # Check whether --enable-rpath or --disable-rpath was given.
1865 if test "${enable_rpath+set}" = set; then
1866   enableval="$enable_rpath"
1867
1868   case $enableval in
1869     yes)
1870       :
1871       ;;
1872     no)
1873       :
1874       ;;
1875     *)
1876       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1877 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1878    { (exit 1); exit 1; }; }
1879       ;;
1880   esac
1881
1882 else
1883   enable_rpath=yes
1884
1885 fi;
1886
1887
1888
1889 #
1890 # Spinlocks
1891 #
1892
1893
1894
1895 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1896 if test "${enable_spinlocks+set}" = set; then
1897   enableval="$enable_spinlocks"
1898
1899   case $enableval in
1900     yes)
1901       :
1902       ;;
1903     no)
1904       :
1905       ;;
1906     *)
1907       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1908 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1909    { (exit 1); exit 1; }; }
1910       ;;
1911   esac
1912
1913 else
1914   enable_spinlocks=yes
1915
1916 fi;
1917
1918
1919 #
1920 # --enable-debug adds -g to compiler flags
1921 #
1922
1923
1924
1925 # Check whether --enable-debug or --disable-debug was given.
1926 if test "${enable_debug+set}" = set; then
1927   enableval="$enable_debug"
1928
1929   case $enableval in
1930     yes)
1931       :
1932       ;;
1933     no)
1934       :
1935       ;;
1936     *)
1937       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1938 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1939    { (exit 1); exit 1; }; }
1940       ;;
1941   esac
1942
1943 else
1944   enable_debug=no
1945
1946 fi;
1947
1948
1949
1950 #
1951 # DTrace
1952 #
1953
1954
1955
1956 # Check whether --enable-dtrace or --disable-dtrace was given.
1957 if test "${enable_dtrace+set}" = set; then
1958   enableval="$enable_dtrace"
1959
1960   case $enableval in
1961     yes)
1962
1963 cat >>confdefs.h <<\_ACEOF
1964 #define ENABLE_DTRACE 1
1965 _ACEOF
1966
1967 for ac_prog in dtrace
1968 do
1969   # Extract the first word of "$ac_prog", so it can be a program name with args.
1970 set dummy $ac_prog; ac_word=$2
1971 echo "$as_me:$LINENO: checking for $ac_word" >&5
1972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1973 if test "${ac_cv_prog_DTRACE+set}" = set; then
1974   echo $ECHO_N "(cached) $ECHO_C" >&6
1975 else
1976   if test -n "$DTRACE"; then
1977   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
1978 else
1979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1980 for as_dir in $PATH
1981 do
1982   IFS=$as_save_IFS
1983   test -z "$as_dir" && as_dir=.
1984   for ac_exec_ext in '' $ac_executable_extensions; do
1985   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1986     ac_cv_prog_DTRACE="$ac_prog"
1987     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1988     break 2
1989   fi
1990 done
1991 done
1992
1993 fi
1994 fi
1995 DTRACE=$ac_cv_prog_DTRACE
1996 if test -n "$DTRACE"; then
1997   echo "$as_me:$LINENO: result: $DTRACE" >&5
1998 echo "${ECHO_T}$DTRACE" >&6
1999 else
2000   echo "$as_me:$LINENO: result: no" >&5
2001 echo "${ECHO_T}no" >&6
2002 fi
2003
2004   test -n "$DTRACE" && break
2005 done
2006
2007 if test -z "$DTRACE"; then
2008   { { echo "$as_me:$LINENO: error: dtrace not found" >&5
2009 echo "$as_me: error: dtrace not found" >&2;}
2010    { (exit 1); exit 1; }; }
2011 fi
2012
2013       ;;
2014     no)
2015       :
2016       ;;
2017     *)
2018       { { echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2019 echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2020    { (exit 1); exit 1; }; }
2021       ;;
2022   esac
2023
2024 else
2025   enable_dtrace=no
2026
2027 fi;
2028
2029
2030
2031 #
2032 # C compiler
2033 #
2034
2035 # For historical reasons you can also use --with-CC to specify the C compiler
2036 # to use, although the standard way to do this is to set the CC environment
2037 # variable.
2038
2039
2040
2041
2042 # Check whether --with-CC or --without-CC was given.
2043 if test "${with_CC+set}" = set; then
2044   withval="$with_CC"
2045
2046   case $withval in
2047     yes)
2048       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2049 echo "$as_me: error: argument required for --with-CC option" >&2;}
2050    { (exit 1); exit 1; }; }
2051       ;;
2052     no)
2053       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2054 echo "$as_me: error: argument required for --with-CC option" >&2;}
2055    { (exit 1); exit 1; }; }
2056       ;;
2057     *)
2058       CC=$with_CC
2059       ;;
2060   esac
2061
2062 fi;
2063
2064
2065 case $template in
2066   aix) pgac_cc_list="gcc xlc";;
2067  irix) pgac_cc_list="cc";; # no gcc
2068     *) pgac_cc_list="gcc cc";;
2069 esac
2070
2071 ac_ext=c
2072 ac_cpp='$CPP $CPPFLAGS'
2073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2076 if test -n "$ac_tool_prefix"; then
2077   for ac_prog in $pgac_cc_list
2078   do
2079     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2080 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2081 echo "$as_me:$LINENO: checking for $ac_word" >&5
2082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2083 if test "${ac_cv_prog_CC+set}" = set; then
2084   echo $ECHO_N "(cached) $ECHO_C" >&6
2085 else
2086   if test -n "$CC"; then
2087   ac_cv_prog_CC="$CC" # Let the user override the test.
2088 else
2089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2090 for as_dir in $PATH
2091 do
2092   IFS=$as_save_IFS
2093   test -z "$as_dir" && as_dir=.
2094   for ac_exec_ext in '' $ac_executable_extensions; do
2095   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2096     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2097     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2098     break 2
2099   fi
2100 done
2101 done
2102
2103 fi
2104 fi
2105 CC=$ac_cv_prog_CC
2106 if test -n "$CC"; then
2107   echo "$as_me:$LINENO: result: $CC" >&5
2108 echo "${ECHO_T}$CC" >&6
2109 else
2110   echo "$as_me:$LINENO: result: no" >&5
2111 echo "${ECHO_T}no" >&6
2112 fi
2113
2114     test -n "$CC" && break
2115   done
2116 fi
2117 if test -z "$CC"; then
2118   ac_ct_CC=$CC
2119   for ac_prog in $pgac_cc_list
2120 do
2121   # Extract the first word of "$ac_prog", so it can be a program name with args.
2122 set dummy $ac_prog; ac_word=$2
2123 echo "$as_me:$LINENO: checking for $ac_word" >&5
2124 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2125 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2126   echo $ECHO_N "(cached) $ECHO_C" >&6
2127 else
2128   if test -n "$ac_ct_CC"; then
2129   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2130 else
2131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2132 for as_dir in $PATH
2133 do
2134   IFS=$as_save_IFS
2135   test -z "$as_dir" && as_dir=.
2136   for ac_exec_ext in '' $ac_executable_extensions; do
2137   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2138     ac_cv_prog_ac_ct_CC="$ac_prog"
2139     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2140     break 2
2141   fi
2142 done
2143 done
2144
2145 fi
2146 fi
2147 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2148 if test -n "$ac_ct_CC"; then
2149   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2150 echo "${ECHO_T}$ac_ct_CC" >&6
2151 else
2152   echo "$as_me:$LINENO: result: no" >&5
2153 echo "${ECHO_T}no" >&6
2154 fi
2155
2156   test -n "$ac_ct_CC" && break
2157 done
2158
2159   CC=$ac_ct_CC
2160 fi
2161
2162
2163 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2164 See \`config.log' for more details." >&5
2165 echo "$as_me: error: no acceptable C compiler found in \$PATH
2166 See \`config.log' for more details." >&2;}
2167    { (exit 1); exit 1; }; }
2168
2169 # Provide some information about the compiler.
2170 echo "$as_me:$LINENO:" \
2171      "checking for C compiler version" >&5
2172 ac_compiler=`set X $ac_compile; echo $2`
2173 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2174   (eval $ac_compiler --version </dev/null >&5) 2>&5
2175   ac_status=$?
2176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2177   (exit $ac_status); }
2178 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2179   (eval $ac_compiler -v </dev/null >&5) 2>&5
2180   ac_status=$?
2181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182   (exit $ac_status); }
2183 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2184   (eval $ac_compiler -V </dev/null >&5) 2>&5
2185   ac_status=$?
2186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2187   (exit $ac_status); }
2188
2189 cat >conftest.$ac_ext <<_ACEOF
2190 /* confdefs.h.  */
2191 _ACEOF
2192 cat confdefs.h >>conftest.$ac_ext
2193 cat >>conftest.$ac_ext <<_ACEOF
2194 /* end confdefs.h.  */
2195
2196 int
2197 main ()
2198 {
2199
2200   ;
2201   return 0;
2202 }
2203 _ACEOF
2204 ac_clean_files_save=$ac_clean_files
2205 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2206 # Try to create an executable without -o first, disregard a.out.
2207 # It will help us diagnose broken compilers, and finding out an intuition
2208 # of exeext.
2209 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2210 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2211 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2212 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2213   (eval $ac_link_default) 2>&5
2214   ac_status=$?
2215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2216   (exit $ac_status); }; then
2217   # Find the output, starting from the most likely.  This scheme is
2218 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2219 # resort.
2220
2221 # Be careful to initialize this variable, since it used to be cached.
2222 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2223 ac_cv_exeext=
2224 # b.out is created by i960 compilers.
2225 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2226 do
2227   test -f "$ac_file" || continue
2228   case $ac_file in
2229     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2230         ;;
2231     conftest.$ac_ext )
2232         # This is the source file.
2233         ;;
2234     [ab].out )
2235         # We found the default executable, but exeext='' is most
2236         # certainly right.
2237         break;;
2238     *.* )
2239         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2240         # FIXME: I believe we export ac_cv_exeext for Libtool,
2241         # but it would be cool to find out if it's true.  Does anybody
2242         # maintain Libtool? --akim.
2243         export ac_cv_exeext
2244         break;;
2245     * )
2246         break;;
2247   esac
2248 done
2249 else
2250   echo "$as_me: failed program was:" >&5
2251 sed 's/^/| /' conftest.$ac_ext >&5
2252
2253 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2254 See \`config.log' for more details." >&5
2255 echo "$as_me: error: C compiler cannot create executables
2256 See \`config.log' for more details." >&2;}
2257    { (exit 77); exit 77; }; }
2258 fi
2259
2260 ac_exeext=$ac_cv_exeext
2261 echo "$as_me:$LINENO: result: $ac_file" >&5
2262 echo "${ECHO_T}$ac_file" >&6
2263
2264 # Check the compiler produces executables we can run.  If not, either
2265 # the compiler is broken, or we cross compile.
2266 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2267 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2268 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2269 # If not cross compiling, check that we can run a simple program.
2270 if test "$cross_compiling" != yes; then
2271   if { ac_try='./$ac_file'
2272   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2273   (eval $ac_try) 2>&5
2274   ac_status=$?
2275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2276   (exit $ac_status); }; }; then
2277     cross_compiling=no
2278   else
2279     if test "$cross_compiling" = maybe; then
2280         cross_compiling=yes
2281     else
2282         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2283 If you meant to cross compile, use \`--host'.
2284 See \`config.log' for more details." >&5
2285 echo "$as_me: error: cannot run C compiled programs.
2286 If you meant to cross compile, use \`--host'.
2287 See \`config.log' for more details." >&2;}
2288    { (exit 1); exit 1; }; }
2289     fi
2290   fi
2291 fi
2292 echo "$as_me:$LINENO: result: yes" >&5
2293 echo "${ECHO_T}yes" >&6
2294
2295 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2296 ac_clean_files=$ac_clean_files_save
2297 # Check the compiler produces executables we can run.  If not, either
2298 # the compiler is broken, or we cross compile.
2299 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2300 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2301 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2302 echo "${ECHO_T}$cross_compiling" >&6
2303
2304 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2305 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2306 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2307   (eval $ac_link) 2>&5
2308   ac_status=$?
2309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2310   (exit $ac_status); }; then
2311   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2312 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2313 # work properly (i.e., refer to `conftest.exe'), while it won't with
2314 # `rm'.
2315 for ac_file in conftest.exe conftest conftest.*; do
2316   test -f "$ac_file" || continue
2317   case $ac_file in
2318     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2319     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2320           export ac_cv_exeext
2321           break;;
2322     * ) break;;
2323   esac
2324 done
2325 else
2326   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2327 See \`config.log' for more details." >&5
2328 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2329 See \`config.log' for more details." >&2;}
2330    { (exit 1); exit 1; }; }
2331 fi
2332
2333 rm -f conftest$ac_cv_exeext
2334 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2335 echo "${ECHO_T}$ac_cv_exeext" >&6
2336
2337 rm -f conftest.$ac_ext
2338 EXEEXT=$ac_cv_exeext
2339 ac_exeext=$EXEEXT
2340 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2341 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2342 if test "${ac_cv_objext+set}" = set; then
2343   echo $ECHO_N "(cached) $ECHO_C" >&6
2344 else
2345   cat >conftest.$ac_ext <<_ACEOF
2346 /* confdefs.h.  */
2347 _ACEOF
2348 cat confdefs.h >>conftest.$ac_ext
2349 cat >>conftest.$ac_ext <<_ACEOF
2350 /* end confdefs.h.  */
2351
2352 int
2353 main ()
2354 {
2355
2356   ;
2357   return 0;
2358 }
2359 _ACEOF
2360 rm -f conftest.o conftest.obj
2361 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2362   (eval $ac_compile) 2>&5
2363   ac_status=$?
2364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2365   (exit $ac_status); }; then
2366   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2367   case $ac_file in
2368     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2369     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2370        break;;
2371   esac
2372 done
2373 else
2374   echo "$as_me: failed program was:" >&5
2375 sed 's/^/| /' conftest.$ac_ext >&5
2376
2377 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2378 See \`config.log' for more details." >&5
2379 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2380 See \`config.log' for more details." >&2;}
2381    { (exit 1); exit 1; }; }
2382 fi
2383
2384 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2385 fi
2386 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2387 echo "${ECHO_T}$ac_cv_objext" >&6
2388 OBJEXT=$ac_cv_objext
2389 ac_objext=$OBJEXT
2390 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2391 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2392 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2393   echo $ECHO_N "(cached) $ECHO_C" >&6
2394 else
2395   cat >conftest.$ac_ext <<_ACEOF
2396 /* confdefs.h.  */
2397 _ACEOF
2398 cat confdefs.h >>conftest.$ac_ext
2399 cat >>conftest.$ac_ext <<_ACEOF
2400 /* end confdefs.h.  */
2401
2402 int
2403 main ()
2404 {
2405 #ifndef __GNUC__
2406        choke me
2407 #endif
2408
2409   ;
2410   return 0;
2411 }
2412 _ACEOF
2413 rm -f conftest.$ac_objext
2414 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2415   (eval $ac_compile) 2>conftest.er1
2416   ac_status=$?
2417   grep -v '^ *+' conftest.er1 >conftest.err
2418   rm -f conftest.er1
2419   cat conftest.err >&5
2420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2421   (exit $ac_status); } &&
2422          { ac_try='test -z "$ac_c_werror_flag"
2423                          || test ! -s conftest.err'
2424   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2425   (eval $ac_try) 2>&5
2426   ac_status=$?
2427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2428   (exit $ac_status); }; } &&
2429          { ac_try='test -s conftest.$ac_objext'
2430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2431   (eval $ac_try) 2>&5
2432   ac_status=$?
2433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2434   (exit $ac_status); }; }; then
2435   ac_compiler_gnu=yes
2436 else
2437   echo "$as_me: failed program was:" >&5
2438 sed 's/^/| /' conftest.$ac_ext >&5
2439
2440 ac_compiler_gnu=no
2441 fi
2442 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2443 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2444
2445 fi
2446 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2447 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2448 GCC=`test $ac_compiler_gnu = yes && echo yes`
2449 ac_test_CFLAGS=${CFLAGS+set}
2450 ac_save_CFLAGS=$CFLAGS
2451 CFLAGS="-g"
2452 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2453 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2454 if test "${ac_cv_prog_cc_g+set}" = set; then
2455   echo $ECHO_N "(cached) $ECHO_C" >&6
2456 else
2457   cat >conftest.$ac_ext <<_ACEOF
2458 /* confdefs.h.  */
2459 _ACEOF
2460 cat confdefs.h >>conftest.$ac_ext
2461 cat >>conftest.$ac_ext <<_ACEOF
2462 /* end confdefs.h.  */
2463
2464 int
2465 main ()
2466 {
2467
2468   ;
2469   return 0;
2470 }
2471 _ACEOF
2472 rm -f conftest.$ac_objext
2473 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2474   (eval $ac_compile) 2>conftest.er1
2475   ac_status=$?
2476   grep -v '^ *+' conftest.er1 >conftest.err
2477   rm -f conftest.er1
2478   cat conftest.err >&5
2479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2480   (exit $ac_status); } &&
2481          { ac_try='test -z "$ac_c_werror_flag"
2482                          || test ! -s conftest.err'
2483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2484   (eval $ac_try) 2>&5
2485   ac_status=$?
2486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2487   (exit $ac_status); }; } &&
2488          { ac_try='test -s conftest.$ac_objext'
2489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2490   (eval $ac_try) 2>&5
2491   ac_status=$?
2492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2493   (exit $ac_status); }; }; then
2494   ac_cv_prog_cc_g=yes
2495 else
2496   echo "$as_me: failed program was:" >&5
2497 sed 's/^/| /' conftest.$ac_ext >&5
2498
2499 ac_cv_prog_cc_g=no
2500 fi
2501 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2502 fi
2503 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2504 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2505 if test "$ac_test_CFLAGS" = set; then
2506   CFLAGS=$ac_save_CFLAGS
2507 elif test $ac_cv_prog_cc_g = yes; then
2508   if test "$GCC" = yes; then
2509     CFLAGS="-g -O2"
2510   else
2511     CFLAGS="-g"
2512   fi
2513 else
2514   if test "$GCC" = yes; then
2515     CFLAGS="-O2"
2516   else
2517     CFLAGS=
2518   fi
2519 fi
2520 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2521 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2522 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2523   echo $ECHO_N "(cached) $ECHO_C" >&6
2524 else
2525   ac_cv_prog_cc_stdc=no
2526 ac_save_CC=$CC
2527 cat >conftest.$ac_ext <<_ACEOF
2528 /* confdefs.h.  */
2529 _ACEOF
2530 cat confdefs.h >>conftest.$ac_ext
2531 cat >>conftest.$ac_ext <<_ACEOF
2532 /* end confdefs.h.  */
2533 #include <stdarg.h>
2534 #include <stdio.h>
2535 #include <sys/types.h>
2536 #include <sys/stat.h>
2537 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2538 struct buf { int x; };
2539 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2540 static char *e (p, i)
2541      char **p;
2542      int i;
2543 {
2544   return p[i];
2545 }
2546 static char *f (char * (*g) (char **, int), char **p, ...)
2547 {
2548   char *s;
2549   va_list v;
2550   va_start (v,p);
2551   s = g (p, va_arg (v,int));
2552   va_end (v);
2553   return s;
2554 }
2555
2556 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2557    function prototypes and stuff, but not '\xHH' hex character constants.
2558    These don't provoke an error unfortunately, instead are silently treated
2559    as 'x'.  The following induces an error, until -std1 is added to get
2560    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2561    array size at least.  It's necessary to write '\x00'==0 to get something
2562    that's true only with -std1.  */
2563 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2564
2565 int test (int i, double x);
2566 struct s1 {int (*f) (int a);};
2567 struct s2 {int (*f) (double a);};
2568 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2569 int argc;
2570 char **argv;
2571 int
2572 main ()
2573 {
2574 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2575   ;
2576   return 0;
2577 }
2578 _ACEOF
2579 # Don't try gcc -ansi; that turns off useful extensions and
2580 # breaks some systems' header files.
2581 # AIX                   -qlanglvl=ansi
2582 # Ultrix and OSF/1      -std1
2583 # HP-UX 10.20 and later -Ae
2584 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2585 # SVR4                  -Xc -D__EXTENSIONS__
2586 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2587 do
2588   CC="$ac_save_CC $ac_arg"
2589   rm -f conftest.$ac_objext
2590 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2591   (eval $ac_compile) 2>conftest.er1
2592   ac_status=$?
2593   grep -v '^ *+' conftest.er1 >conftest.err
2594   rm -f conftest.er1
2595   cat conftest.err >&5
2596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2597   (exit $ac_status); } &&
2598          { ac_try='test -z "$ac_c_werror_flag"
2599                          || test ! -s conftest.err'
2600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2601   (eval $ac_try) 2>&5
2602   ac_status=$?
2603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2604   (exit $ac_status); }; } &&
2605          { ac_try='test -s conftest.$ac_objext'
2606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2607   (eval $ac_try) 2>&5
2608   ac_status=$?
2609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2610   (exit $ac_status); }; }; then
2611   ac_cv_prog_cc_stdc=$ac_arg
2612 break
2613 else
2614   echo "$as_me: failed program was:" >&5
2615 sed 's/^/| /' conftest.$ac_ext >&5
2616
2617 fi
2618 rm -f conftest.err conftest.$ac_objext
2619 done
2620 rm -f conftest.$ac_ext conftest.$ac_objext
2621 CC=$ac_save_CC
2622
2623 fi
2624
2625 case "x$ac_cv_prog_cc_stdc" in
2626   x|xno)
2627     echo "$as_me:$LINENO: result: none needed" >&5
2628 echo "${ECHO_T}none needed" >&6 ;;
2629   *)
2630     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2631 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2632     CC="$CC $ac_cv_prog_cc_stdc" ;;
2633 esac
2634
2635 # Some people use a C++ compiler to compile C.  Since we use `exit',
2636 # in C++ we need to declare it.  In case someone uses the same compiler
2637 # for both compiling C and C++ we need to have the C++ compiler decide
2638 # the declaration of exit, since it's the most demanding environment.
2639 cat >conftest.$ac_ext <<_ACEOF
2640 #ifndef __cplusplus
2641   choke me
2642 #endif
2643 _ACEOF
2644 rm -f conftest.$ac_objext
2645 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2646   (eval $ac_compile) 2>conftest.er1
2647   ac_status=$?
2648   grep -v '^ *+' conftest.er1 >conftest.err
2649   rm -f conftest.er1
2650   cat conftest.err >&5
2651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2652   (exit $ac_status); } &&
2653          { ac_try='test -z "$ac_c_werror_flag"
2654                          || test ! -s conftest.err'
2655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2656   (eval $ac_try) 2>&5
2657   ac_status=$?
2658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2659   (exit $ac_status); }; } &&
2660          { ac_try='test -s conftest.$ac_objext'
2661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2662   (eval $ac_try) 2>&5
2663   ac_status=$?
2664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2665   (exit $ac_status); }; }; then
2666   for ac_declaration in \
2667    '' \
2668    'extern "C" void std::exit (int) throw (); using std::exit;' \
2669    'extern "C" void std::exit (int); using std::exit;' \
2670    'extern "C" void exit (int) throw ();' \
2671    'extern "C" void exit (int);' \
2672    'void exit (int);'
2673 do
2674   cat >conftest.$ac_ext <<_ACEOF
2675 /* confdefs.h.  */
2676 _ACEOF
2677 cat confdefs.h >>conftest.$ac_ext
2678 cat >>conftest.$ac_ext <<_ACEOF
2679 /* end confdefs.h.  */
2680 $ac_declaration
2681 #include <stdlib.h>
2682 int
2683 main ()
2684 {
2685 exit (42);
2686   ;
2687   return 0;
2688 }
2689 _ACEOF
2690 rm -f conftest.$ac_objext
2691 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2692   (eval $ac_compile) 2>conftest.er1
2693   ac_status=$?
2694   grep -v '^ *+' conftest.er1 >conftest.err
2695   rm -f conftest.er1
2696   cat conftest.err >&5
2697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2698   (exit $ac_status); } &&
2699          { ac_try='test -z "$ac_c_werror_flag"
2700                          || test ! -s conftest.err'
2701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2702   (eval $ac_try) 2>&5
2703   ac_status=$?
2704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2705   (exit $ac_status); }; } &&
2706          { ac_try='test -s conftest.$ac_objext'
2707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2708   (eval $ac_try) 2>&5
2709   ac_status=$?
2710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2711   (exit $ac_status); }; }; then
2712   :
2713 else
2714   echo "$as_me: failed program was:" >&5
2715 sed 's/^/| /' conftest.$ac_ext >&5
2716
2717 continue
2718 fi
2719 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2720   cat >conftest.$ac_ext <<_ACEOF
2721 /* confdefs.h.  */
2722 _ACEOF
2723 cat confdefs.h >>conftest.$ac_ext
2724 cat >>conftest.$ac_ext <<_ACEOF
2725 /* end confdefs.h.  */
2726 $ac_declaration
2727 int
2728 main ()
2729 {
2730 exit (42);
2731   ;
2732   return 0;
2733 }
2734 _ACEOF
2735 rm -f conftest.$ac_objext
2736 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2737   (eval $ac_compile) 2>conftest.er1
2738   ac_status=$?
2739   grep -v '^ *+' conftest.er1 >conftest.err
2740   rm -f conftest.er1
2741   cat conftest.err >&5
2742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2743   (exit $ac_status); } &&
2744          { ac_try='test -z "$ac_c_werror_flag"
2745                          || test ! -s conftest.err'
2746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2747   (eval $ac_try) 2>&5
2748   ac_status=$?
2749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2750   (exit $ac_status); }; } &&
2751          { ac_try='test -s conftest.$ac_objext'
2752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2753   (eval $ac_try) 2>&5
2754   ac_status=$?
2755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2756   (exit $ac_status); }; }; then
2757   break
2758 else
2759   echo "$as_me: failed program was:" >&5
2760 sed 's/^/| /' conftest.$ac_ext >&5
2761
2762 fi
2763 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2764 done
2765 rm -f conftest*
2766 if test -n "$ac_declaration"; then
2767   echo '#ifdef __cplusplus' >>confdefs.h
2768   echo $ac_declaration      >>confdefs.h
2769   echo '#endif'             >>confdefs.h
2770 fi
2771
2772 else
2773   echo "$as_me: failed program was:" >&5
2774 sed 's/^/| /' conftest.$ac_ext >&5
2775
2776 fi
2777 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2778 ac_ext=c
2779 ac_cpp='$CPP $CPPFLAGS'
2780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2783
2784
2785 unset CFLAGS
2786
2787 #
2788 # Read the template
2789 #
2790 . "$srcdir/src/template/$template" || exit
2791
2792 # CFLAGS are selected so:
2793 # If the user specifies something in the environment, that is used.
2794 # else:  If the template file set something, that is used.
2795 # else:  If the compiler is GCC, then we use -O2.
2796 # else:  If the compiler is something else, then we use -0.
2797
2798 if test "$ac_env_CFLAGS_set" = set; then
2799   CFLAGS=$ac_env_CFLAGS_value
2800 elif test "${CFLAGS+set}" = set; then
2801   : # (keep what template set)
2802 elif test "$GCC" = yes; then
2803   CFLAGS="-O2"
2804 else
2805   # if the user selected debug mode, don't use -O
2806   if test "$enable_debug" != yes; then
2807     CFLAGS="-O"
2808   fi
2809 fi
2810
2811 # Some versions of GCC support some additional useful warning flags.
2812 # Check whether they are supported, and add them to CFLAGS if so.
2813
2814 if test "$GCC" = yes; then
2815
2816 # ICC pretends to be GCC but it's lying; it doesn't support these options.
2817 # So we have to check if "GCC" is really ICC.
2818
2819 cat >conftest.$ac_ext <<_ACEOF
2820 /* confdefs.h.  */
2821 _ACEOF
2822 cat confdefs.h >>conftest.$ac_ext
2823 cat >>conftest.$ac_ext <<_ACEOF
2824 /* end confdefs.h.  */
2825
2826 int
2827 main ()
2828 {
2829 #ifndef __INTEL_COMPILER
2830 choke me
2831 #endif
2832   ;
2833   return 0;
2834 }
2835 _ACEOF
2836 rm -f conftest.$ac_objext
2837 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2838   (eval $ac_compile) 2>conftest.er1
2839   ac_status=$?
2840   grep -v '^ *+' conftest.er1 >conftest.err
2841   rm -f conftest.er1
2842   cat conftest.err >&5
2843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2844   (exit $ac_status); } &&
2845          { ac_try='test -z "$ac_c_werror_flag"
2846                          || test ! -s conftest.err'
2847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2848   (eval $ac_try) 2>&5
2849   ac_status=$?
2850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2851   (exit $ac_status); }; } &&
2852          { ac_try='test -s conftest.$ac_objext'
2853   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2854   (eval $ac_try) 2>&5
2855   ac_status=$?
2856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2857   (exit $ac_status); }; }; then
2858   ICC=yes
2859 else
2860   echo "$as_me: failed program was:" >&5
2861 sed 's/^/| /' conftest.$ac_ext >&5
2862
2863 ICC=no
2864 fi
2865 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2866
2867   if test "$ICC" = no; then
2868     CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
2869
2870     echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2871 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2872 pgac_save_CFLAGS=$CFLAGS
2873 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2874 cat >conftest.$ac_ext <<_ACEOF
2875 /* confdefs.h.  */
2876 _ACEOF
2877 cat confdefs.h >>conftest.$ac_ext
2878 cat >>conftest.$ac_ext <<_ACEOF
2879 /* end confdefs.h.  */
2880
2881 int
2882 main ()
2883 {
2884
2885   ;
2886   return 0;
2887 }
2888 _ACEOF
2889 rm -f conftest.$ac_objext
2890 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2891   (eval $ac_compile) 2>conftest.er1
2892   ac_status=$?
2893   grep -v '^ *+' conftest.er1 >conftest.err
2894   rm -f conftest.er1
2895   cat conftest.err >&5
2896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2897   (exit $ac_status); } &&
2898          { ac_try='test -z "$ac_c_werror_flag"
2899                          || test ! -s conftest.err'
2900   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2901   (eval $ac_try) 2>&5
2902   ac_status=$?
2903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2904   (exit $ac_status); }; } &&
2905          { ac_try='test -s conftest.$ac_objext'
2906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2907   (eval $ac_try) 2>&5
2908   ac_status=$?
2909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2910   (exit $ac_status); }; }; then
2911   echo "$as_me:$LINENO: result: yes" >&5
2912 echo "${ECHO_T}yes" >&6
2913 else
2914   echo "$as_me: failed program was:" >&5
2915 sed 's/^/| /' conftest.$ac_ext >&5
2916
2917 CFLAGS="$pgac_save_CFLAGS"
2918                     echo "$as_me:$LINENO: result: no" >&5
2919 echo "${ECHO_T}no" >&6
2920 fi
2921 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2922
2923     echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2924 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2925 pgac_save_CFLAGS=$CFLAGS
2926 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2927 cat >conftest.$ac_ext <<_ACEOF
2928 /* confdefs.h.  */
2929 _ACEOF
2930 cat confdefs.h >>conftest.$ac_ext
2931 cat >>conftest.$ac_ext <<_ACEOF
2932 /* end confdefs.h.  */
2933
2934 int
2935 main ()
2936 {
2937
2938   ;
2939   return 0;
2940 }
2941 _ACEOF
2942 rm -f conftest.$ac_objext
2943 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2944   (eval $ac_compile) 2>conftest.er1
2945   ac_status=$?
2946   grep -v '^ *+' conftest.er1 >conftest.err
2947   rm -f conftest.er1
2948   cat conftest.err >&5
2949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2950   (exit $ac_status); } &&
2951          { ac_try='test -z "$ac_c_werror_flag"
2952                          || test ! -s conftest.err'
2953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2954   (eval $ac_try) 2>&5
2955   ac_status=$?
2956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2957   (exit $ac_status); }; } &&
2958          { ac_try='test -s conftest.$ac_objext'
2959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2960   (eval $ac_try) 2>&5
2961   ac_status=$?
2962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2963   (exit $ac_status); }; }; then
2964   echo "$as_me:$LINENO: result: yes" >&5
2965 echo "${ECHO_T}yes" >&6
2966 else
2967   echo "$as_me: failed program was:" >&5
2968 sed 's/^/| /' conftest.$ac_ext >&5
2969
2970 CFLAGS="$pgac_save_CFLAGS"
2971                     echo "$as_me:$LINENO: result: no" >&5
2972 echo "${ECHO_T}no" >&6
2973 fi
2974 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2975
2976   else
2977     # Intel compiler has a bug/misoptimization in checking for
2978     # division by NAN (NaN == 0), -mp1 fixes it, so add it to the
2979     # CFLAGS.
2980     echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5
2981 echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6
2982 pgac_save_CFLAGS=$CFLAGS
2983 CFLAGS="$pgac_save_CFLAGS -mp1"
2984 cat >conftest.$ac_ext <<_ACEOF
2985 /* confdefs.h.  */
2986 _ACEOF
2987 cat confdefs.h >>conftest.$ac_ext
2988 cat >>conftest.$ac_ext <<_ACEOF
2989 /* end confdefs.h.  */
2990
2991 int
2992 main ()
2993 {
2994
2995   ;
2996   return 0;
2997 }
2998 _ACEOF
2999 rm -f conftest.$ac_objext
3000 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3001   (eval $ac_compile) 2>conftest.er1
3002   ac_status=$?
3003   grep -v '^ *+' conftest.er1 >conftest.err
3004   rm -f conftest.er1
3005   cat conftest.err >&5
3006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3007   (exit $ac_status); } &&
3008          { ac_try='test -z "$ac_c_werror_flag"
3009                          || test ! -s conftest.err'
3010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3011   (eval $ac_try) 2>&5
3012   ac_status=$?
3013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3014   (exit $ac_status); }; } &&
3015          { ac_try='test -s conftest.$ac_objext'
3016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3017   (eval $ac_try) 2>&5
3018   ac_status=$?
3019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3020   (exit $ac_status); }; }; then
3021   echo "$as_me:$LINENO: result: yes" >&5
3022 echo "${ECHO_T}yes" >&6
3023 else
3024   echo "$as_me: failed program was:" >&5
3025 sed 's/^/| /' conftest.$ac_ext >&5
3026
3027 CFLAGS="$pgac_save_CFLAGS"
3028                     echo "$as_me:$LINENO: result: no" >&5
3029 echo "${ECHO_T}no" >&6
3030 fi
3031 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3032
3033   fi
3034
3035   # Disable strict-aliasing rules; needed for gcc 3.3+
3036   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
3037 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
3038 pgac_save_CFLAGS=$CFLAGS
3039 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
3040 cat >conftest.$ac_ext <<_ACEOF
3041 /* confdefs.h.  */
3042 _ACEOF
3043 cat confdefs.h >>conftest.$ac_ext
3044 cat >>conftest.$ac_ext <<_ACEOF
3045 /* end confdefs.h.  */
3046
3047 int
3048 main ()
3049 {
3050
3051   ;
3052   return 0;
3053 }
3054 _ACEOF
3055 rm -f conftest.$ac_objext
3056 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3057   (eval $ac_compile) 2>conftest.er1
3058   ac_status=$?
3059   grep -v '^ *+' conftest.er1 >conftest.err
3060   rm -f conftest.er1
3061   cat conftest.err >&5
3062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3063   (exit $ac_status); } &&
3064          { ac_try='test -z "$ac_c_werror_flag"
3065                          || test ! -s conftest.err'
3066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3067   (eval $ac_try) 2>&5
3068   ac_status=$?
3069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3070   (exit $ac_status); }; } &&
3071          { ac_try='test -s conftest.$ac_objext'
3072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3073   (eval $ac_try) 2>&5
3074   ac_status=$?
3075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3076   (exit $ac_status); }; }; then
3077   echo "$as_me:$LINENO: result: yes" >&5
3078 echo "${ECHO_T}yes" >&6
3079 else
3080   echo "$as_me: failed program was:" >&5
3081 sed 's/^/| /' conftest.$ac_ext >&5
3082
3083 CFLAGS="$pgac_save_CFLAGS"
3084                     echo "$as_me:$LINENO: result: no" >&5
3085 echo "${ECHO_T}no" >&6
3086 fi
3087 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3088
3089 elif test x"${CC}" = x"xlc"; then
3090   # AIX xlc has to have strict aliasing turned off too
3091   echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
3092 echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6
3093 pgac_save_CFLAGS=$CFLAGS
3094 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
3095 cat >conftest.$ac_ext <<_ACEOF
3096 /* confdefs.h.  */
3097 _ACEOF
3098 cat confdefs.h >>conftest.$ac_ext
3099 cat >>conftest.$ac_ext <<_ACEOF
3100 /* end confdefs.h.  */
3101
3102 int
3103 main ()
3104 {
3105
3106   ;
3107   return 0;
3108 }
3109 _ACEOF
3110 rm -f conftest.$ac_objext
3111 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3112   (eval $ac_compile) 2>conftest.er1
3113   ac_status=$?
3114   grep -v '^ *+' conftest.er1 >conftest.err
3115   rm -f conftest.er1
3116   cat conftest.err >&5
3117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3118   (exit $ac_status); } &&
3119          { ac_try='test -z "$ac_c_werror_flag"
3120                          || test ! -s conftest.err'
3121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3122   (eval $ac_try) 2>&5
3123   ac_status=$?
3124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3125   (exit $ac_status); }; } &&
3126          { ac_try='test -s conftest.$ac_objext'
3127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3128   (eval $ac_try) 2>&5
3129   ac_status=$?
3130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3131   (exit $ac_status); }; }; then
3132   echo "$as_me:$LINENO: result: yes" >&5
3133 echo "${ECHO_T}yes" >&6
3134 else
3135   echo "$as_me: failed program was:" >&5
3136 sed 's/^/| /' conftest.$ac_ext >&5
3137
3138 CFLAGS="$pgac_save_CFLAGS"
3139                     echo "$as_me:$LINENO: result: no" >&5
3140 echo "${ECHO_T}no" >&6
3141 fi
3142 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3143
3144 fi
3145
3146 # supply -g if --enable-debug
3147 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
3148   CFLAGS="$CFLAGS -g"
3149 fi
3150
3151 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
3152 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
3153
3154 # We already have this in Makefile.win32, but configure needs it too
3155 if test "$PORTNAME" = "win32"; then
3156   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
3157 fi
3158
3159 # Check if the compiler still works with the template settings
3160 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
3161 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
3162 cat >conftest.$ac_ext <<_ACEOF
3163 /* confdefs.h.  */
3164 _ACEOF
3165 cat confdefs.h >>conftest.$ac_ext
3166 cat >>conftest.$ac_ext <<_ACEOF
3167 /* end confdefs.h.  */
3168
3169 int
3170 main ()
3171 {
3172 return 0;
3173   ;
3174   return 0;
3175 }
3176 _ACEOF
3177 rm -f conftest.$ac_objext conftest$ac_exeext
3178 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3179   (eval $ac_link) 2>conftest.er1
3180   ac_status=$?
3181   grep -v '^ *+' conftest.er1 >conftest.err
3182   rm -f conftest.er1
3183   cat conftest.err >&5
3184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3185   (exit $ac_status); } &&
3186          { ac_try='test -z "$ac_c_werror_flag"
3187                          || test ! -s conftest.err'
3188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3189   (eval $ac_try) 2>&5
3190   ac_status=$?
3191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3192   (exit $ac_status); }; } &&
3193          { ac_try='test -s conftest$ac_exeext'
3194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3195   (eval $ac_try) 2>&5
3196   ac_status=$?
3197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3198   (exit $ac_status); }; }; then
3199   echo "$as_me:$LINENO: result: yes" >&5
3200 echo "${ECHO_T}yes" >&6
3201 else
3202   echo "$as_me: failed program was:" >&5
3203 sed 's/^/| /' conftest.$ac_ext >&5
3204
3205 echo "$as_me:$LINENO: result: no" >&5
3206 echo "${ECHO_T}no" >&6
3207    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
3208 echo "$as_me: error: cannot proceed" >&2;}
3209    { (exit 1); exit 1; }; }
3210 fi
3211 rm -f conftest.err conftest.$ac_objext \
3212       conftest$ac_exeext conftest.$ac_ext
3213
3214 # Defend against gcc -ffast-math
3215 if test "$GCC" = yes; then
3216 cat >conftest.$ac_ext <<_ACEOF
3217 /* confdefs.h.  */
3218 _ACEOF
3219 cat confdefs.h >>conftest.$ac_ext
3220 cat >>conftest.$ac_ext <<_ACEOF
3221 /* end confdefs.h.  */
3222
3223 int
3224 main ()
3225 {
3226 #ifdef __FAST_MATH__
3227 choke me
3228 #endif
3229   ;
3230   return 0;
3231 }
3232 _ACEOF
3233 rm -f conftest.$ac_objext
3234 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3235   (eval $ac_compile) 2>conftest.er1
3236   ac_status=$?
3237   grep -v '^ *+' conftest.er1 >conftest.err
3238   rm -f conftest.er1
3239   cat conftest.err >&5
3240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3241   (exit $ac_status); } &&
3242          { ac_try='test -z "$ac_c_werror_flag"
3243                          || test ! -s conftest.err'
3244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3245   (eval $ac_try) 2>&5
3246   ac_status=$?
3247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3248   (exit $ac_status); }; } &&
3249          { ac_try='test -s conftest.$ac_objext'
3250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3251   (eval $ac_try) 2>&5
3252   ac_status=$?
3253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3254   (exit $ac_status); }; }; then
3255   :
3256 else
3257   echo "$as_me: failed program was:" >&5
3258 sed 's/^/| /' conftest.$ac_ext >&5
3259
3260 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3261 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3262    { (exit 1); exit 1; }; }
3263 fi
3264 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3265 fi
3266
3267 ac_ext=c
3268 ac_cpp='$CPP $CPPFLAGS'
3269 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3270 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3271 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3272 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3273 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3274 # On Suns, sometimes $CPP names a directory.
3275 if test -n "$CPP" && test -d "$CPP"; then
3276   CPP=
3277 fi
3278 if test -z "$CPP"; then
3279   if test "${ac_cv_prog_CPP+set}" = set; then
3280   echo $ECHO_N "(cached) $ECHO_C" >&6
3281 else
3282       # Double quotes because CPP needs to be expanded
3283     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3284     do
3285       ac_preproc_ok=false
3286 for ac_c_preproc_warn_flag in '' yes
3287 do
3288   # Use a header file that comes with gcc, so configuring glibc
3289   # with a fresh cross-compiler works.
3290   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3291   # <limits.h> exists even on freestanding compilers.
3292   # On the NeXT, cc -E runs the code through the compiler's parser,
3293   # not just through cpp. "Syntax error" is here to catch this case.
3294   cat >conftest.$ac_ext <<_ACEOF
3295 /* confdefs.h.  */
3296 _ACEOF
3297 cat confdefs.h >>conftest.$ac_ext
3298 cat >>conftest.$ac_ext <<_ACEOF
3299 /* end confdefs.h.  */
3300 #ifdef __STDC__
3301 # include <limits.h>
3302 #else
3303 # include <assert.h>
3304 #endif
3305                      Syntax error
3306 _ACEOF
3307 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3308   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3309   ac_status=$?
3310   grep -v '^ *+' conftest.er1 >conftest.err
3311   rm -f conftest.er1
3312   cat conftest.err >&5
3313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3314   (exit $ac_status); } >/dev/null; then
3315   if test -s conftest.err; then
3316     ac_cpp_err=$ac_c_preproc_warn_flag
3317     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3318   else
3319     ac_cpp_err=
3320   fi
3321 else
3322   ac_cpp_err=yes
3323 fi
3324 if test -z "$ac_cpp_err"; then
3325   :
3326 else
3327   echo "$as_me: failed program was:" >&5
3328 sed 's/^/| /' conftest.$ac_ext >&5
3329
3330   # Broken: fails on valid input.
3331 continue
3332 fi
3333 rm -f conftest.err conftest.$ac_ext
3334
3335   # OK, works on sane cases.  Now check whether non-existent headers
3336   # can be detected and how.
3337   cat >conftest.$ac_ext <<_ACEOF
3338 /* confdefs.h.  */
3339 _ACEOF
3340 cat confdefs.h >>conftest.$ac_ext
3341 cat >>conftest.$ac_ext <<_ACEOF
3342 /* end confdefs.h.  */
3343 #include <ac_nonexistent.h>
3344 _ACEOF
3345 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3346   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3347   ac_status=$?
3348   grep -v '^ *+' conftest.er1 >conftest.err
3349   rm -f conftest.er1
3350   cat conftest.err >&5
3351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3352   (exit $ac_status); } >/dev/null; then
3353   if test -s conftest.err; then
3354     ac_cpp_err=$ac_c_preproc_warn_flag
3355     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3356   else
3357     ac_cpp_err=
3358   fi
3359 else
3360   ac_cpp_err=yes
3361 fi
3362 if test -z "$ac_cpp_err"; then
3363   # Broken: success on invalid input.
3364 continue
3365 else
3366   echo "$as_me: failed program was:" >&5
3367 sed 's/^/| /' conftest.$ac_ext >&5
3368
3369   # Passes both tests.
3370 ac_preproc_ok=:
3371 break
3372 fi
3373 rm -f conftest.err conftest.$ac_ext
3374
3375 done
3376 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3377 rm -f conftest.err conftest.$ac_ext
3378 if $ac_preproc_ok; then
3379   break
3380 fi
3381
3382     done
3383     ac_cv_prog_CPP=$CPP
3384
3385 fi
3386   CPP=$ac_cv_prog_CPP
3387 else
3388   ac_cv_prog_CPP=$CPP
3389 fi
3390 echo "$as_me:$LINENO: result: $CPP" >&5
3391 echo "${ECHO_T}$CPP" >&6
3392 ac_preproc_ok=false
3393 for ac_c_preproc_warn_flag in '' yes
3394 do
3395   # Use a header file that comes with gcc, so configuring glibc
3396   # with a fresh cross-compiler works.
3397   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3398   # <limits.h> exists even on freestanding compilers.
3399   # On the NeXT, cc -E runs the code through the compiler's parser,
3400   # not just through cpp. "Syntax error" is here to catch this case.
3401   cat >conftest.$ac_ext <<_ACEOF
3402 /* confdefs.h.  */
3403 _ACEOF
3404 cat confdefs.h >>conftest.$ac_ext
3405 cat >>conftest.$ac_ext <<_ACEOF
3406 /* end confdefs.h.  */
3407 #ifdef __STDC__
3408 # include <limits.h>
3409 #else
3410 # include <assert.h>
3411 #endif
3412                      Syntax error
3413 _ACEOF
3414 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3415   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3416   ac_status=$?
3417   grep -v '^ *+' conftest.er1 >conftest.err
3418   rm -f conftest.er1
3419   cat conftest.err >&5
3420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3421   (exit $ac_status); } >/dev/null; then
3422   if test -s conftest.err; then
3423     ac_cpp_err=$ac_c_preproc_warn_flag
3424     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3425   else
3426     ac_cpp_err=
3427   fi
3428 else
3429   ac_cpp_err=yes
3430 fi
3431 if test -z "$ac_cpp_err"; then
3432   :
3433 else
3434   echo "$as_me: failed program was:" >&5
3435 sed 's/^/| /' conftest.$ac_ext >&5
3436
3437   # Broken: fails on valid input.
3438 continue
3439 fi
3440 rm -f conftest.err conftest.$ac_ext
3441
3442   # OK, works on sane cases.  Now check whether non-existent headers
3443   # can be detected and how.
3444   cat >conftest.$ac_ext <<_ACEOF
3445 /* confdefs.h.  */
3446 _ACEOF
3447 cat confdefs.h >>conftest.$ac_ext
3448 cat >>conftest.$ac_ext <<_ACEOF
3449 /* end confdefs.h.  */
3450 #include <ac_nonexistent.h>
3451 _ACEOF
3452 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3453   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3454   ac_status=$?
3455   grep -v '^ *+' conftest.er1 >conftest.err
3456   rm -f conftest.er1
3457   cat conftest.err >&5
3458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3459   (exit $ac_status); } >/dev/null; then
3460   if test -s conftest.err; then
3461     ac_cpp_err=$ac_c_preproc_warn_flag
3462     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3463   else
3464     ac_cpp_err=
3465   fi
3466 else
3467   ac_cpp_err=yes
3468 fi
3469 if test -z "$ac_cpp_err"; then
3470   # Broken: success on invalid input.
3471 continue
3472 else
3473   echo "$as_me: failed program was:" >&5
3474 sed 's/^/| /' conftest.$ac_ext >&5
3475
3476   # Passes both tests.
3477 ac_preproc_ok=:
3478 break
3479 fi
3480 rm -f conftest.err conftest.$ac_ext
3481
3482 done
3483 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3484 rm -f conftest.err conftest.$ac_ext
3485 if $ac_preproc_ok; then
3486   :
3487 else
3488   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3489 See \`config.log' for more details." >&5
3490 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3491 See \`config.log' for more details." >&2;}
3492    { (exit 1); exit 1; }; }
3493 fi
3494
3495 ac_ext=c
3496 ac_cpp='$CPP $CPPFLAGS'
3497 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3498 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3499 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3500
3501
3502
3503 # Create compiler version string
3504 if test x"$GCC" = x"yes" ; then
3505   cc_string="GCC `${CC} --version | sed q`"
3506 else
3507   cc_string=$CC
3508 fi
3509
3510 cat >>confdefs.h <<_ACEOF
3511 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3512 _ACEOF
3513
3514
3515
3516 #
3517 # Set up TAS assembly code if needed; the template file has now had its
3518 # chance to request this.
3519 #
3520           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3521
3522
3523 if test "$need_tas" = yes ; then
3524   TAS=tas.o
3525 else
3526   TAS=""
3527 fi
3528
3529
3530
3531 #
3532 # Automatic dependency tracking
3533 #
3534
3535
3536
3537 # Check whether --enable-depend or --disable-depend was given.
3538 if test "${enable_depend+set}" = set; then
3539   enableval="$enable_depend"
3540
3541   case $enableval in
3542     yes)
3543       autodepend=yes
3544       ;;
3545     no)
3546       :
3547       ;;
3548     *)
3549       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3550 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3551    { (exit 1); exit 1; }; }
3552       ;;
3553   esac
3554
3555 else
3556   enable_depend=no
3557
3558 fi;
3559
3560
3561
3562
3563 #
3564 # Enable assert checks
3565 #
3566
3567
3568
3569 # Check whether --enable-cassert or --disable-cassert was given.
3570 if test "${enable_cassert+set}" = set; then
3571   enableval="$enable_cassert"
3572
3573   case $enableval in
3574     yes)
3575
3576 cat >>confdefs.h <<\_ACEOF
3577 #define USE_ASSERT_CHECKING 1
3578 _ACEOF
3579
3580       ;;
3581     no)
3582       :
3583       ;;
3584     *)
3585       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3586 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3587    { (exit 1); exit 1; }; }
3588       ;;
3589   esac
3590
3591 else
3592   enable_cassert=no
3593
3594 fi;
3595
3596
3597
3598 #
3599 # Include directories
3600 #
3601 ac_save_IFS=$IFS
3602 IFS="${IFS}${PATH_SEPARATOR}"
3603 # SRCH_INC comes from the template file
3604 for dir in $with_includes $SRCH_INC; do
3605   if test -d "$dir"; then
3606     INCLUDES="$INCLUDES -I$dir"
3607   else
3608     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3609 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3610   fi
3611 done
3612 IFS=$ac_save_IFS
3613
3614
3615
3616 #
3617 # Library directories
3618 #
3619 ac_save_IFS=$IFS
3620 IFS="${IFS}${PATH_SEPARATOR}"
3621 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3622 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3623   if test -d "$dir"; then
3624     LIBDIRS="$LIBDIRS -L$dir"
3625   else
3626     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3627 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3628   fi
3629 done
3630 IFS=$ac_save_IFS
3631
3632 #
3633 # Enable thread-safe client libraries
3634 #
3635 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3636 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3637
3638
3639
3640 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3641 if test "${enable_thread_safety+set}" = set; then
3642   enableval="$enable_thread_safety"
3643
3644   case $enableval in
3645     yes)
3646       :
3647       ;;
3648     no)
3649       :
3650       ;;
3651     *)
3652       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3653 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3654    { (exit 1); exit 1; }; }
3655       ;;
3656   esac
3657
3658 else
3659   enable_thread_safety=no
3660
3661 fi;
3662
3663
3664
3665
3666 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3667 if test "${enable_thread_safety_force+set}" = set; then
3668   enableval="$enable_thread_safety_force"
3669
3670   case $enableval in
3671     yes)
3672       :
3673       ;;
3674     no)
3675       :
3676       ;;
3677     *)
3678       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3679 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3680    { (exit 1); exit 1; }; }
3681       ;;
3682   esac
3683
3684 else
3685   enable_thread_safety_force=no
3686
3687 fi;
3688
3689 if test "$enable_thread_safety" = yes -o \
3690         "$enable_thread_safety_force" = yes; then
3691   enable_thread_safety="yes"    # for 'force'
3692
3693 cat >>confdefs.h <<\_ACEOF
3694 #define ENABLE_THREAD_SAFETY 1
3695 _ACEOF
3696
3697 fi
3698 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3699 echo "${ECHO_T}$enable_thread_safety" >&6
3700
3701
3702 #
3703 # Optionally build Tcl modules (PL/Tcl)
3704 #
3705 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3706 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3707
3708
3709
3710
3711 # Check whether --with-tcl or --without-tcl was given.
3712 if test "${with_tcl+set}" = set; then
3713   withval="$with_tcl"
3714
3715   case $withval in
3716     yes)
3717       :
3718       ;;
3719     no)
3720       :
3721       ;;
3722     *)
3723       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3724 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3725    { (exit 1); exit 1; }; }
3726       ;;
3727   esac
3728
3729 else
3730   with_tcl=no
3731
3732 fi;
3733
3734 echo "$as_me:$LINENO: result: $with_tcl" >&5
3735 echo "${ECHO_T}$with_tcl" >&6
3736
3737
3738 # We see if the path to the Tcl/Tk configuration scripts is specified.
3739 # This will override the use of tclsh to find the paths to search.
3740
3741
3742
3743
3744
3745 # Check whether --with-tclconfig or --without-tclconfig was given.
3746 if test "${with_tclconfig+set}" = set; then
3747   withval="$with_tclconfig"
3748
3749   case $withval in
3750     yes)
3751       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3752 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3753    { (exit 1); exit 1; }; }
3754       ;;
3755     no)
3756       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3757 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3758    { (exit 1); exit 1; }; }
3759       ;;
3760     *)
3761
3762       ;;
3763   esac
3764
3765 fi;
3766
3767
3768 #
3769 # Optionally build Perl modules (PL/Perl)
3770 #
3771 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3772 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3773
3774
3775
3776
3777 # Check whether --with-perl or --without-perl was given.
3778 if test "${with_perl+set}" = set; then
3779   withval="$with_perl"
3780
3781   case $withval in
3782     yes)
3783       :
3784       ;;
3785     no)
3786       :
3787       ;;
3788     *)
3789       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3790 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3791    { (exit 1); exit 1; }; }
3792       ;;
3793   esac
3794
3795 else
3796   with_perl=no
3797
3798 fi;
3799
3800 echo "$as_me:$LINENO: result: $with_perl" >&5
3801 echo "${ECHO_T}$with_perl" >&6
3802
3803
3804 #
3805 # Optionally build Python modules (PL/Python)
3806 #
3807 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3808 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3809
3810
3811
3812
3813 # Check whether --with-python or --without-python was given.
3814 if test "${with_python+set}" = set; then
3815   withval="$with_python"
3816
3817   case $withval in
3818     yes)
3819       :
3820       ;;
3821     no)
3822       :
3823       ;;
3824     *)
3825       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3826 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3827    { (exit 1); exit 1; }; }
3828       ;;
3829   esac
3830
3831 else
3832   with_python=no
3833
3834 fi;
3835
3836 echo "$as_me:$LINENO: result: $with_python" >&5
3837 echo "${ECHO_T}$with_python" >&6
3838
3839
3840 #
3841 # Kerberos 5
3842 #
3843 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3844 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3845
3846
3847
3848
3849 # Check whether --with-krb5 or --without-krb5 was given.
3850 if test "${with_krb5+set}" = set; then
3851   withval="$with_krb5"
3852
3853   case $withval in
3854     yes)
3855
3856
3857 cat >>confdefs.h <<\_ACEOF
3858 #define KRB5 1
3859 _ACEOF
3860
3861   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3862
3863       ;;
3864     no)
3865       :
3866       ;;
3867     *)
3868       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3869 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3870    { (exit 1); exit 1; }; }
3871       ;;
3872   esac
3873
3874 else
3875   with_krb5=no
3876
3877 fi;
3878
3879 echo "$as_me:$LINENO: result: $with_krb5" >&5
3880 echo "${ECHO_T}$with_krb5" >&6
3881
3882
3883
3884
3885
3886
3887 #
3888 # Kerberos configuration parameters
3889 #
3890
3891
3892
3893
3894 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3895 if test "${with_krb_srvnam+set}" = set; then
3896   withval="$with_krb_srvnam"
3897
3898   case $withval in
3899     yes)
3900       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3901 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3902    { (exit 1); exit 1; }; }
3903       ;;
3904     no)
3905       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3906 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3907    { (exit 1); exit 1; }; }
3908       ;;
3909     *)
3910
3911       ;;
3912   esac
3913
3914 else
3915   with_krb_srvnam="postgres"
3916 fi;
3917
3918
3919 cat >>confdefs.h <<_ACEOF
3920 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3921 _ACEOF
3922
3923
3924
3925 #
3926 # PAM
3927 #
3928 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3929 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3930
3931
3932
3933
3934 # Check whether --with-pam or --without-pam was given.
3935 if test "${with_pam+set}" = set; then
3936   withval="$with_pam"
3937
3938   case $withval in
3939     yes)
3940
3941 cat >>confdefs.h <<\_ACEOF
3942 #define USE_PAM 1
3943 _ACEOF
3944
3945       ;;
3946     no)
3947       :
3948       ;;
3949     *)
3950       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3951 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3952    { (exit 1); exit 1; }; }
3953       ;;
3954   esac
3955
3956 else
3957   with_pam=no
3958
3959 fi;
3960
3961 echo "$as_me:$LINENO: result: $with_pam" >&5
3962 echo "${ECHO_T}$with_pam" >&6
3963
3964
3965
3966 #
3967 # LDAP
3968 #
3969 echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
3970 echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6
3971
3972
3973
3974
3975 # Check whether --with-ldap or --without-ldap was given.
3976 if test "${with_ldap+set}" = set; then
3977   withval="$with_ldap"
3978
3979   case $withval in
3980     yes)
3981
3982 cat >>confdefs.h <<\_ACEOF
3983 #define USE_LDAP 1
3984 _ACEOF
3985
3986       ;;
3987     no)
3988       :
3989       ;;
3990     *)
3991       { { echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
3992 echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
3993    { (exit 1); exit 1; }; }
3994       ;;
3995   esac
3996
3997 else
3998   with_ldap=no
3999
4000 fi;
4001
4002 echo "$as_me:$LINENO: result: $with_ldap" >&5
4003 echo "${ECHO_T}$with_ldap" >&6
4004
4005
4006
4007 #
4008 # Bonjour
4009 #
4010 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
4011 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
4012
4013
4014
4015
4016 # Check whether --with-bonjour or --without-bonjour was given.
4017 if test "${with_bonjour+set}" = set; then
4018   withval="$with_bonjour"
4019
4020   case $withval in
4021     yes)
4022
4023 cat >>confdefs.h <<\_ACEOF
4024 #define USE_BONJOUR 1
4025 _ACEOF
4026
4027       ;;
4028     no)
4029       :
4030       ;;
4031     *)
4032       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
4033 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
4034    { (exit 1); exit 1; }; }
4035       ;;
4036   esac
4037
4038 else
4039   with_bonjour=no
4040
4041 fi;
4042
4043 echo "$as_me:$LINENO: result: $with_bonjour" >&5
4044 echo "${ECHO_T}$with_bonjour" >&6
4045
4046
4047
4048 #
4049 # OpenSSL
4050 #
4051 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
4052 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
4053
4054
4055
4056
4057 # Check whether --with-openssl or --without-openssl was given.
4058 if test "${with_openssl+set}" = set; then
4059   withval="$with_openssl"
4060
4061   case $withval in
4062     yes)
4063
4064 cat >>confdefs.h <<\_ACEOF
4065 #define USE_SSL 1
4066 _ACEOF
4067
4068       ;;
4069     no)
4070       :
4071       ;;
4072     *)
4073       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
4074 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
4075    { (exit 1); exit 1; }; }
4076       ;;
4077   esac
4078
4079 else
4080   with_openssl=no
4081
4082 fi;
4083
4084 echo "$as_me:$LINENO: result: $with_openssl" >&5
4085 echo "${ECHO_T}$with_openssl" >&6
4086
4087
4088
4089 #
4090 # Prefer libedit
4091 #
4092
4093
4094
4095
4096 # Check whether --with-libedit-preferred or --without-libedit-preferred was given.
4097 if test "${with_libedit_preferred+set}" = set; then
4098   withval="$with_libedit_preferred"
4099
4100   case $withval in
4101     yes)
4102       :
4103       ;;
4104     no)
4105       :
4106       ;;
4107     *)
4108       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
4109 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
4110    { (exit 1); exit 1; }; }
4111       ;;
4112   esac
4113
4114 else
4115   with_libedit_preferred=no
4116
4117 fi;
4118
4119
4120
4121 #
4122 # Readline
4123 #
4124
4125
4126
4127
4128 # Check whether --with-readline or --without-readline was given.
4129 if test "${with_readline+set}" = set; then
4130   withval="$with_readline"
4131
4132   case $withval in
4133     yes)
4134       :
4135       ;;
4136     no)
4137       :
4138       ;;
4139     *)
4140       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
4141 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
4142    { (exit 1); exit 1; }; }
4143       ;;
4144   esac
4145
4146 else
4147   with_readline=yes
4148
4149 fi;
4150
4151 # readline on MinGW has problems with backslashes in psql and other bugs.
4152 # This is particularly a problem with non-US code pages.
4153 # Therefore disable its use until we understand the cause. 2004-07-20
4154 if test "$PORTNAME" = "win32"; then
4155   if test "$with_readline" = yes; then
4156     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
4157 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
4158     with_readline=no
4159   fi
4160 fi
4161
4162
4163 #
4164 # Zlib
4165 #
4166
4167
4168
4169
4170 # Check whether --with-zlib or --without-zlib was given.
4171 if test "${with_zlib+set}" = set; then
4172   withval="$with_zlib"
4173
4174   case $withval in
4175     yes)
4176       :
4177       ;;
4178     no)
4179       :
4180       ;;
4181     *)
4182       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
4183 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
4184    { (exit 1); exit 1; }; }
4185       ;;
4186   esac
4187
4188 else
4189   with_zlib=yes
4190
4191 fi;
4192
4193
4194
4195 #
4196 # Elf
4197 #
4198
4199 # Assume system is ELF if it predefines __ELF__ as 1,
4200 # otherwise believe host_os based default.
4201 case $host_os in
4202     freebsd1*|freebsd2*) elf=no;;
4203     freebsd3*|freebsd4*) elf=yes;;
4204 esac
4205
4206
4207 echo "$as_me:$LINENO: checking for egrep" >&5
4208 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4209 if test "${ac_cv_prog_egrep+set}" = set; then
4210   echo $ECHO_N "(cached) $ECHO_C" >&6
4211 else
4212   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4213     then ac_cv_prog_egrep='grep -E'
4214     else ac_cv_prog_egrep='egrep'
4215     fi
4216 fi
4217 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4218 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4219  EGREP=$ac_cv_prog_egrep
4220
4221
4222 cat >conftest.$ac_ext <<_ACEOF
4223 /* confdefs.h.  */
4224 _ACEOF
4225 cat confdefs.h >>conftest.$ac_ext
4226 cat >>conftest.$ac_ext <<_ACEOF
4227 /* end confdefs.h.  */
4228 #if __ELF__
4229   yes
4230 #endif
4231
4232 _ACEOF
4233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4234   $EGREP "yes" >/dev/null 2>&1; then
4235   ELF_SYS=true
4236 else
4237   if test "X$elf" = "Xyes" ; then
4238   ELF_SYS=true
4239 else
4240   ELF_SYS=
4241 fi
4242 fi
4243 rm -f conftest*
4244
4245
4246
4247 #
4248 # Assignments
4249 #
4250
4251 CPPFLAGS="$CPPFLAGS $INCLUDES"
4252 LDFLAGS="$LDFLAGS $LIBDIRS"
4253
4254 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
4255 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
4256 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
4257 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
4258
4259
4260
4261 for ac_prog in gawk mawk nawk awk
4262 do
4263   # Extract the first word of "$ac_prog", so it can be a program name with args.
4264 set dummy $ac_prog; ac_word=$2
4265 echo "$as_me:$LINENO: checking for $ac_word" >&5
4266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4267 if test "${ac_cv_prog_AWK+set}" = set; then
4268   echo $ECHO_N "(cached) $ECHO_C" >&6
4269 else
4270   if test -n "$AWK"; then
4271   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4272 else
4273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4274 for as_dir in $PATH
4275 do
4276   IFS=$as_save_IFS
4277   test -z "$as_dir" && as_dir=.
4278   for ac_exec_ext in '' $ac_executable_extensions; do
4279   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4280     ac_cv_prog_AWK="$ac_prog"
4281     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4282     break 2
4283   fi
4284 done
4285 done
4286
4287 fi
4288 fi
4289 AWK=$ac_cv_prog_AWK
4290 if test -n "$AWK"; then
4291   echo "$as_me:$LINENO: result: $AWK" >&5
4292 echo "${ECHO_T}$AWK" >&6
4293 else
4294   echo "$as_me:$LINENO: result: no" >&5
4295 echo "${ECHO_T}no" >&6
4296 fi
4297
4298   test -n "$AWK" && break
4299 done
4300
4301 echo "$as_me:$LINENO: checking for flex" >&5
4302 echo $ECHO_N "checking for flex... $ECHO_C" >&6
4303 if test "${pgac_cv_path_flex+set}" = set; then
4304   echo $ECHO_N "(cached) $ECHO_C" >&6
4305 else
4306   # Let the user override the test
4307 if test -n "$FLEX"; then
4308   pgac_cv_path_flex=$FLEX
4309 else
4310   pgac_save_IFS=$IFS
4311   IFS=$PATH_SEPARATOR
4312   for pgac_dir in $PATH; do
4313     IFS=$pgac_save_IFS
4314     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
4315       pgac_dir=`pwd`
4316     fi
4317     for pgac_prog in flex lex; do
4318       pgac_candidate="$pgac_dir/$pgac_prog"
4319       if test -f "$pgac_candidate" \
4320         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4321       then
4322         echo '%%'  > conftest.l
4323         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4324           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4325             pgac_broken_flex=$pgac_candidate
4326             continue
4327           fi
4328
4329           pgac_cv_path_flex=$pgac_candidate
4330           break 2
4331         fi
4332       fi
4333     done
4334   done
4335   rm -f conftest.l lex.yy.c
4336   : ${pgac_cv_path_flex=no}
4337 fi
4338
4339 fi
4340 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4341 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4342 if test x"$pgac_cv_path_flex" = x"no"; then
4343   if test -n "$pgac_broken_flex"; then
4344     { echo "$as_me:$LINENO: WARNING:
4345 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4346 *** should get version 2.5.4 or later." >&5
4347 echo "$as_me: WARNING:
4348 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4349 *** should get version 2.5.4 or later." >&2;}
4350   fi
4351
4352   { echo "$as_me:$LINENO: WARNING:
4353 *** Without Flex you will not be able to build PostgreSQL from CVS or
4354 *** change any of the scanner definition files.  You can obtain Flex from
4355 *** a GNU mirror site.  (If you are using the official distribution of
4356 *** PostgreSQL then you do not need to worry about this because the Flex
4357 *** output is pre-generated.)" >&5
4358 echo "$as_me: WARNING:
4359 *** Without Flex you will not be able to build PostgreSQL from CVS or
4360 *** change any of the scanner definition files.  You can obtain Flex from
4361 *** a GNU mirror site.  (If you are using the official distribution of
4362 *** PostgreSQL then you do not need to worry about this because the Flex
4363 *** output is pre-generated.)" >&2;}
4364 fi
4365
4366 if test x"$pgac_cv_path_flex" = x"no"; then
4367   FLEX=
4368 else
4369   FLEX=$pgac_cv_path_flex
4370 fi
4371
4372
4373
4374
4375 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4376 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4377 LN_S=$as_ln_s
4378 if test "$LN_S" = "ln -s"; then
4379   echo "$as_me:$LINENO: result: yes" >&5
4380 echo "${ECHO_T}yes" >&6
4381 else
4382   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4383 echo "${ECHO_T}no, using $LN_S" >&6
4384 fi
4385
4386
4387 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4388 if test "${with_gnu_ld+set}" = set; then
4389   withval="$with_gnu_ld"
4390   test "$withval" = no || with_gnu_ld=yes
4391 else
4392   with_gnu_ld=no
4393 fi;
4394 ac_prog=ld
4395 if test "$GCC" = yes; then
4396   # Check if gcc -print-prog-name=ld gives a path.
4397   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4398 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4399   case $host in
4400   *-*-mingw*)
4401     # gcc leaves a trailing carriage return which upsets mingw
4402     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4403   *)
4404     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4405   esac
4406   case "$ac_prog" in
4407     # Accept absolute paths.
4408     [\\/]* | [A-Za-z]:[\\/]*)
4409       re_direlt='/[^/][^/]*/\.\./'
4410       # Canonicalize the path of ld
4411       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4412       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4413         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4414       done
4415       test -z "$LD" && LD="$ac_prog"
4416       ;;
4417   "")
4418     # If it fails, then pretend we aren't using GCC.
4419     ac_prog=ld
4420     ;;
4421   *)
4422     # If it is relative, then search for the first ld in PATH.
4423     with_gnu_ld=unknown
4424     ;;
4425   esac
4426 elif test "$with_gnu_ld" = yes; then
4427   echo "$as_me:$LINENO: checking for GNU ld" >&5
4428 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4429 else
4430   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4431 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4432 fi
4433 if test "${ac_cv_path_LD+set}" = set; then
4434   echo $ECHO_N "(cached) $ECHO_C" >&6
4435 else
4436   if test -z "$LD"; then
4437   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4438   for ac_dir in $PATH; do
4439     test -z "$ac_dir" && ac_dir=.
4440     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4441       ac_cv_path_LD="$ac_dir/$ac_prog"
4442       # Check to see if the program is GNU ld.  I'd rather use --version,
4443       # but apparently some GNU ld's only accept -v.
4444       # Break only if it was the GNU/non-GNU ld that we prefer.
4445       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4446         test "$with_gnu_ld" != no && break
4447       else
4448         test "$with_gnu_ld" != yes && break
4449       fi
4450     fi
4451   done
4452   IFS="$ac_save_ifs"
4453 else
4454   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4455 fi
4456 fi
4457
4458 LD="$ac_cv_path_LD"
4459 if test -n "$LD"; then
4460   echo "$as_me:$LINENO: result: $LD" >&5
4461 echo "${ECHO_T}$LD" >&6
4462 else
4463   echo "$as_me:$LINENO: result: no" >&5
4464 echo "${ECHO_T}no" >&6
4465 fi
4466 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4467 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4468    { (exit 1); exit 1; }; }
4469 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4470 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4471 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4472   echo $ECHO_N "(cached) $ECHO_C" >&6
4473 else
4474   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4475 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4476   ac_cv_prog_gnu_ld=yes
4477 else
4478   ac_cv_prog_gnu_ld=no
4479 fi
4480 fi
4481 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4482 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4483 with_gnu_ld=$ac_cv_prog_gnu_ld
4484
4485
4486
4487
4488 case $host_os in sysv5*)
4489   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4490 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4491 if test "${pgac_cv_prog_ld_R+set}" = set; then
4492   echo $ECHO_N "(cached) $ECHO_C" >&6
4493 else
4494
4495     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4496     cat >conftest.$ac_ext <<_ACEOF
4497 /* confdefs.h.  */
4498 _ACEOF
4499 cat confdefs.h >>conftest.$ac_ext
4500 cat >>conftest.$ac_ext <<_ACEOF
4501 /* end confdefs.h.  */
4502
4503 int
4504 main ()
4505 {
4506
4507   ;
4508   return 0;
4509 }
4510 _ACEOF
4511 rm -f conftest.$ac_objext conftest$ac_exeext
4512 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4513   (eval $ac_link) 2>conftest.er1
4514   ac_status=$?
4515   grep -v '^ *+' conftest.er1 >conftest.err
4516   rm -f conftest.er1
4517   cat conftest.err >&5
4518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4519   (exit $ac_status); } &&
4520          { ac_try='test -z "$ac_c_werror_flag"
4521                          || test ! -s conftest.err'
4522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4523   (eval $ac_try) 2>&5
4524   ac_status=$?
4525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4526   (exit $ac_status); }; } &&
4527          { ac_try='test -s conftest$ac_exeext'
4528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4529   (eval $ac_try) 2>&5
4530   ac_status=$?
4531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4532   (exit $ac_status); }; }; then
4533   pgac_cv_prog_ld_R=yes
4534 else
4535   echo "$as_me: failed program was:" >&5
4536 sed 's/^/| /' conftest.$ac_ext >&5
4537
4538 pgac_cv_prog_ld_R=no
4539 fi
4540 rm -f conftest.err conftest.$ac_objext \
4541       conftest$ac_exeext conftest.$ac_ext
4542     LDFLAGS=$pgac_save_LDFLAGS
4543
4544 fi
4545 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4546 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4547   ld_R_works=$pgac_cv_prog_ld_R
4548
4549 esac
4550 if test -n "$ac_tool_prefix"; then
4551   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4552 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4553 echo "$as_me:$LINENO: checking for $ac_word" >&5
4554 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4555 if test "${ac_cv_prog_RANLIB+set}" = set; then
4556   echo $ECHO_N "(cached) $ECHO_C" >&6
4557 else
4558   if test -n "$RANLIB"; then
4559   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4560 else
4561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4562 for as_dir in $PATH
4563 do
4564   IFS=$as_save_IFS
4565   test -z "$as_dir" && as_dir=.
4566   for ac_exec_ext in '' $ac_executable_extensions; do
4567   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4568     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4569     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4570     break 2
4571   fi
4572 done
4573 done
4574
4575 fi
4576 fi
4577 RANLIB=$ac_cv_prog_RANLIB
4578 if test -n "$RANLIB"; then
4579   echo "$as_me:$LINENO: result: $RANLIB" >&5
4580 echo "${ECHO_T}$RANLIB" >&6
4581 else
4582   echo "$as_me:$LINENO: result: no" >&5
4583 echo "${ECHO_T}no" >&6
4584 fi
4585
4586 fi
4587 if test -z "$ac_cv_prog_RANLIB"; then
4588   ac_ct_RANLIB=$RANLIB
4589   # Extract the first word of "ranlib", so it can be a program name with args.
4590 set dummy ranlib; ac_word=$2
4591 echo "$as_me:$LINENO: checking for $ac_word" >&5
4592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4593 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4594   echo $ECHO_N "(cached) $ECHO_C" >&6
4595 else
4596   if test -n "$ac_ct_RANLIB"; then
4597   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4598 else
4599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4600 for as_dir in $PATH
4601 do
4602   IFS=$as_save_IFS
4603   test -z "$as_dir" && as_dir=.
4604   for ac_exec_ext in '' $ac_executable_extensions; do
4605   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4606     ac_cv_prog_ac_ct_RANLIB="ranlib"
4607     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4608     break 2
4609   fi
4610 done
4611 done
4612
4613   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4614 fi
4615 fi
4616 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4617 if test -n "$ac_ct_RANLIB"; then
4618   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4619 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4620 else
4621   echo "$as_me:$LINENO: result: no" >&5
4622 echo "${ECHO_T}no" >&6
4623 fi
4624
4625   RANLIB=$ac_ct_RANLIB
4626 else
4627   RANLIB="$ac_cv_prog_RANLIB"
4628 fi
4629
4630 # Extract the first word of "tar", so it can be a program name with args.
4631 set dummy tar; ac_word=$2
4632 echo "$as_me:$LINENO: checking for $ac_word" >&5
4633 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4634 if test "${ac_cv_path_TAR+set}" = set; then
4635   echo $ECHO_N "(cached) $ECHO_C" >&6
4636 else
4637   case $TAR in
4638   [\\/]* | ?:[\\/]*)
4639   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4640   ;;
4641   *)
4642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4643 for as_dir in $PATH
4644 do
4645   IFS=$as_save_IFS
4646   test -z "$as_dir" && as_dir=.
4647   for ac_exec_ext in '' $ac_executable_extensions; do
4648   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4649     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4650     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4651     break 2
4652   fi
4653 done
4654 done
4655
4656   ;;
4657 esac
4658 fi
4659 TAR=$ac_cv_path_TAR
4660
4661 if test -n "$TAR"; then
4662   echo "$as_me:$LINENO: result: $TAR" >&5
4663 echo "${ECHO_T}$TAR" >&6
4664 else
4665   echo "$as_me:$LINENO: result: no" >&5
4666 echo "${ECHO_T}no" >&6
4667 fi
4668
4669
4670   if test -n "$ac_tool_prefix"; then
4671   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4672 set dummy ${ac_tool_prefix}strip; ac_word=$2
4673 echo "$as_me:$LINENO: checking for $ac_word" >&5
4674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4675 if test "${ac_cv_prog_STRIP+set}" = set; then
4676   echo $ECHO_N "(cached) $ECHO_C" >&6
4677 else
4678   if test -n "$STRIP"; then
4679   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4680 else
4681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4682 for as_dir in $PATH
4683 do
4684   IFS=$as_save_IFS
4685   test -z "$as_dir" && as_dir=.
4686   for ac_exec_ext in '' $ac_executable_extensions; do
4687   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4688     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4689     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4690     break 2
4691   fi
4692 done
4693 done
4694
4695 fi
4696 fi
4697 STRIP=$ac_cv_prog_STRIP
4698 if test -n "$STRIP"; then
4699   echo "$as_me:$LINENO: result: $STRIP" >&5
4700 echo "${ECHO_T}$STRIP" >&6
4701 else
4702   echo "$as_me:$LINENO: result: no" >&5
4703 echo "${ECHO_T}no" >&6
4704 fi
4705
4706 fi
4707 if test -z "$ac_cv_prog_STRIP"; then
4708   ac_ct_STRIP=$STRIP
4709   # Extract the first word of "strip", so it can be a program name with args.
4710 set dummy strip; ac_word=$2
4711 echo "$as_me:$LINENO: checking for $ac_word" >&5
4712 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4713 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4714   echo $ECHO_N "(cached) $ECHO_C" >&6
4715 else
4716   if test -n "$ac_ct_STRIP"; then
4717   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4718 else
4719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4720 for as_dir in $PATH
4721 do
4722   IFS=$as_save_IFS
4723   test -z "$as_dir" && as_dir=.
4724   for ac_exec_ext in '' $ac_executable_extensions; do
4725   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4726     ac_cv_prog_ac_ct_STRIP="strip"
4727     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4728     break 2
4729   fi
4730 done
4731 done
4732
4733   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4734 fi
4735 fi
4736 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4737 if test -n "$ac_ct_STRIP"; then
4738   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4739 echo "${ECHO_T}$ac_ct_STRIP" >&6
4740 else
4741   echo "$as_me:$LINENO: result: no" >&5
4742 echo "${ECHO_T}no" >&6
4743 fi
4744
4745   STRIP=$ac_ct_STRIP
4746 else
4747   STRIP="$ac_cv_prog_STRIP"
4748 fi
4749
4750
4751   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4752 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4753   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4754     STRIP_STATIC_LIB="$STRIP -x"
4755     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4756     echo "$as_me:$LINENO: result: yes" >&5
4757 echo "${ECHO_T}yes" >&6
4758   else
4759     STRIP_STATIC_LIB=:
4760     STRIP_SHARED_LIB=:
4761     echo "$as_me:$LINENO: result: no" >&5
4762 echo "${ECHO_T}no" >&6
4763   fi
4764
4765
4766
4767
4768 for ac_prog in 'bison -y'
4769 do
4770   # Extract the first word of "$ac_prog", so it can be a program name with args.
4771 set dummy $ac_prog; ac_word=$2
4772 echo "$as_me:$LINENO: checking for $ac_word" >&5
4773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4774 if test "${ac_cv_prog_YACC+set}" = set; then
4775   echo $ECHO_N "(cached) $ECHO_C" >&6
4776 else
4777   if test -n "$YACC"; then
4778   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4779 else
4780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4781 for as_dir in $PATH
4782 do
4783   IFS=$as_save_IFS
4784   test -z "$as_dir" && as_dir=.
4785   for ac_exec_ext in '' $ac_executable_extensions; do
4786   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4787     ac_cv_prog_YACC="$ac_prog"
4788     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4789     break 2
4790   fi
4791 done
4792 done
4793
4794 fi
4795 fi
4796 YACC=$ac_cv_prog_YACC
4797 if test -n "$YACC"; then
4798   echo "$as_me:$LINENO: result: $YACC" >&5
4799 echo "${ECHO_T}$YACC" >&6
4800 else
4801   echo "$as_me:$LINENO: result: no" >&5
4802 echo "${ECHO_T}no" >&6
4803 fi
4804
4805   test -n "$YACC" && break
4806 done
4807
4808
4809 if test "$YACC"; then
4810   if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4811     { echo "$as_me:$LINENO: WARNING:
4812 *** If you are going to modify the grammar files or build from CVS, the installed
4813 *** version of Bison is too old.  Bison version 1.875 or later is required." >&5
4814 echo "$as_me: WARNING:
4815 *** If you are going to modify the grammar files or build from CVS, the installed
4816 *** version of Bison is too old.  Bison version 1.875 or later is required." >&2;}
4817   fi
4818 fi
4819
4820 if test -z "$YACC"; then
4821   { echo "$as_me:$LINENO: WARNING:
4822 *** Without Bison you will not be able to build PostgreSQL from CVS or
4823 *** change any of the parser definition files.  You can obtain Bison from
4824 *** a GNU mirror site.  (If you are using the official distribution of
4825 *** PostgreSQL then you do not need to worry about this because the Bison
4826 *** output is pre-generated.)  To use a different yacc program (possible,
4827 *** but not recommended), set the environment variable YACC before running
4828 *** 'configure'." >&5
4829 echo "$as_me: WARNING:
4830 *** Without Bison you will not be able to build PostgreSQL from CVS or
4831 *** change any of the parser definition files.  You can obtain Bison from
4832 *** a GNU mirror site.  (If you are using the official distribution of
4833 *** PostgreSQL then you do not need to worry about this because the Bison
4834 *** output is pre-generated.)  To use a different yacc program (possible,
4835 *** but not recommended), set the environment variable YACC before running
4836 *** 'configure'." >&2;}
4837 fi
4838
4839
4840 # Extract the first word of "perl", so it can be a program name with args.
4841 set dummy perl; ac_word=$2
4842 echo "$as_me:$LINENO: checking for $ac_word" >&5
4843 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4844 if test "${ac_cv_path_PERL+set}" = set; then
4845   echo $ECHO_N "(cached) $ECHO_C" >&6
4846 else
4847   case $PERL in
4848   [\\/]* | ?:[\\/]*)
4849   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4850   ;;
4851   *)
4852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4853 for as_dir in $PATH
4854 do
4855   IFS=$as_save_IFS
4856   test -z "$as_dir" && as_dir=.
4857   for ac_exec_ext in '' $ac_executable_extensions; do
4858   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4859     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4860     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4861     break 2
4862   fi
4863 done
4864 done
4865
4866   ;;
4867 esac
4868 fi
4869 PERL=$ac_cv_path_PERL
4870
4871 if test -n "$PERL"; then
4872   echo "$as_me:$LINENO: result: $PERL" >&5
4873 echo "${ECHO_T}$PERL" >&6
4874 else
4875   echo "$as_me:$LINENO: result: no" >&5
4876 echo "${ECHO_T}no" >&6
4877 fi
4878
4879 if test "$with_perl" = yes; then
4880
4881 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4882 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4883 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4884 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4885 echo "${ECHO_T}$perl_archlibexp" >&6
4886 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4887 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4888 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4889 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4890 echo "${ECHO_T}$perl_privlibexp" >&6
4891 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4892 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4893 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4894 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4895 echo "${ECHO_T}$perl_useshrplib" >&6
4896
4897 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4898 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4899 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4900 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4901 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4902 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4903 echo "${ECHO_T}$perl_embed_ldflags" >&6
4904 fi
4905
4906 if test "$with_python" = yes; then
4907   # Extract the first word of "python", so it can be a program name with args.
4908 set dummy python; ac_word=$2
4909 echo "$as_me:$LINENO: checking for $ac_word" >&5
4910 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4911 if test "${ac_cv_path_PYTHON+set}" = set; then
4912   echo $ECHO_N "(cached) $ECHO_C" >&6
4913 else
4914   case $PYTHON in
4915   [\\/]* | ?:[\\/]*)
4916   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4917   ;;
4918   *)
4919   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4920 for as_dir in $PATH
4921 do
4922   IFS=$as_save_IFS
4923   test -z "$as_dir" && as_dir=.
4924   for ac_exec_ext in '' $ac_executable_extensions; do
4925   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4926     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4927     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4928     break 2
4929   fi
4930 done
4931 done
4932
4933   ;;
4934 esac
4935 fi
4936 PYTHON=$ac_cv_path_PYTHON
4937
4938 if test -n "$PYTHON"; then
4939   echo "$as_me:$LINENO: result: $PYTHON" >&5
4940 echo "${ECHO_T}$PYTHON" >&6
4941 else
4942   echo "$as_me:$LINENO: result: no" >&5
4943 echo "${ECHO_T}no" >&6
4944 fi
4945
4946 if test x"$PYTHON" = x""; then
4947   { { echo "$as_me:$LINENO: error: Python not found" >&5
4948 echo "$as_me: error: Python not found" >&2;}
4949    { (exit 1); exit 1; }; }
4950 fi
4951
4952
4953 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4954 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4955 if "${PYTHON}" 2>&- -c 'import distutils'
4956 then
4957     echo "$as_me:$LINENO: result: yes" >&5
4958 echo "${ECHO_T}yes" >&6
4959 else
4960     echo "$as_me:$LINENO: result: no" >&5
4961 echo "${ECHO_T}no" >&6
4962     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4963 echo "$as_me: error: distutils module not found" >&2;}
4964    { (exit 1); exit 1; }; }
4965 fi
4966 echo "$as_me:$LINENO: checking Python configuration directory" >&5
4967 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
4968 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4969 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')"`
4970 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
4971
4972 # This should be enough of a message.
4973 echo "$as_me:$LINENO: result: $python_configdir" >&5
4974 echo "${ECHO_T}$python_configdir" >&6
4975
4976
4977 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4978 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4979
4980 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
4981 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
4982 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
4983 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
4984
4985 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
4986 then
4987         # New way: use the official shared library
4988         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
4989         python_libspec="-L${python_libdir} -l${ldlibrary}"
4990 else
4991         # Old way: use libpython from python_configdir
4992         python_libdir="${python_configdir}"
4993         python_libspec="-L${python_libdir} -lpython${python_version}"
4994 fi
4995
4996 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
4997
4998 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
4999 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
5000
5001
5002 # threaded python is not supported on bsd's
5003 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
5004 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
5005 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
5006 if test "$pythreads" = "1"; then
5007   echo "$as_me:$LINENO: result: yes" >&5
5008 echo "${ECHO_T}yes" >&6
5009   case $host_os in
5010   openbsd*|freebsd4*)
5011     { { echo "$as_me:$LINENO: error: *** Threaded Python not supported on this platform ***" >&5
5012 echo "$as_me: error: *** Threaded Python not supported on this platform ***" >&2;}
5013    { (exit 1); exit 1; }; }
5014     ;;
5015   esac
5016 else
5017   echo "$as_me:$LINENO: result: no" >&5
5018 echo "${ECHO_T}no" >&6
5019 fi
5020
5021
5022 fi
5023
5024 # Supply a numeric version string for use by 3rd party add-ons
5025 # awk -F is a regex on some platforms, and not on others, so make "." a tab
5026 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/A-Za-z.*$//' |
5027 tr '.' '        ' |
5028 $AWK '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
5029
5030 cat >>confdefs.h <<_ACEOF
5031 #define PG_VERSION_NUM $PG_VERSION_NUM
5032 _ACEOF
5033
5034
5035 ##
5036 ## Libraries
5037 ##
5038
5039 echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
5040 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6
5041 if test "${ac_cv_search_setproctitle+set}" = set; then
5042   echo $ECHO_N "(cached) $ECHO_C" >&6
5043 else
5044   ac_func_search_save_LIBS=$LIBS
5045 ac_cv_search_setproctitle=no
5046 cat >conftest.$ac_ext <<_ACEOF
5047 /* confdefs.h.  */
5048 _ACEOF
5049 cat confdefs.h >>conftest.$ac_ext
5050 cat >>conftest.$ac_ext <<_ACEOF
5051 /* end confdefs.h.  */
5052
5053 /* Override any gcc2 internal prototype to avoid an error.  */
5054 #ifdef __cplusplus
5055 extern "C"
5056 #endif
5057 /* We use char because int might match the return type of a gcc2
5058    builtin and then its argument prototype would still apply.  */
5059 char setproctitle ();
5060 int
5061 main ()
5062 {
5063 setproctitle ();
5064   ;
5065   return 0;
5066 }
5067 _ACEOF
5068 rm -f conftest.$ac_objext conftest$ac_exeext
5069 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5070   (eval $ac_link) 2>conftest.er1
5071   ac_status=$?
5072   grep -v '^ *+' conftest.er1 >conftest.err
5073   rm -f conftest.er1
5074   cat conftest.err >&5
5075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5076   (exit $ac_status); } &&
5077          { ac_try='test -z "$ac_c_werror_flag"
5078                          || test ! -s conftest.err'
5079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5080   (eval $ac_try) 2>&5
5081   ac_status=$?
5082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5083   (exit $ac_status); }; } &&
5084          { ac_try='test -s conftest$ac_exeext'
5085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5086   (eval $ac_try) 2>&5
5087   ac_status=$?
5088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5089   (exit $ac_status); }; }; then
5090   ac_cv_search_setproctitle="none required"
5091 else
5092   echo "$as_me: failed program was:" >&5
5093 sed 's/^/| /' conftest.$ac_ext >&5
5094
5095 fi
5096 rm -f conftest.err conftest.$ac_objext \
5097       conftest$ac_exeext conftest.$ac_ext
5098 if test "$ac_cv_search_setproctitle" = no; then
5099   for ac_lib in util; do
5100     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5101     cat >conftest.$ac_ext <<_ACEOF
5102 /* confdefs.h.  */
5103 _ACEOF
5104 cat confdefs.h >>conftest.$ac_ext
5105 cat >>conftest.$ac_ext <<_ACEOF
5106 /* end confdefs.h.  */
5107
5108 /* Override any gcc2 internal prototype to avoid an error.  */
5109 #ifdef __cplusplus
5110 extern "C"
5111 #endif
5112 /* We use char because int might match the return type of a gcc2
5113    builtin and then its argument prototype would still apply.  */
5114 char setproctitle ();
5115 int
5116 main ()
5117 {
5118 setproctitle ();
5119   ;
5120   return 0;
5121 }
5122 _ACEOF
5123 rm -f conftest.$ac_objext conftest$ac_exeext
5124 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5125   (eval $ac_link) 2>conftest.er1
5126   ac_status=$?
5127   grep -v '^ *+' conftest.er1 >conftest.err
5128   rm -f conftest.er1
5129   cat conftest.err >&5
5130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5131   (exit $ac_status); } &&
5132          { ac_try='test -z "$ac_c_werror_flag"
5133                          || test ! -s conftest.err'
5134   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5135   (eval $ac_try) 2>&5
5136   ac_status=$?
5137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5138   (exit $ac_status); }; } &&
5139          { ac_try='test -s conftest$ac_exeext'
5140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5141   (eval $ac_try) 2>&5
5142   ac_status=$?
5143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5144   (exit $ac_status); }; }; then
5145   ac_cv_search_setproctitle="-l$ac_lib"
5146 break
5147 else
5148   echo "$as_me: failed program was:" >&5
5149 sed 's/^/| /' conftest.$ac_ext >&5
5150
5151 fi
5152 rm -f conftest.err conftest.$ac_objext \
5153       conftest$ac_exeext conftest.$ac_ext
5154   done
5155 fi
5156 LIBS=$ac_func_search_save_LIBS
5157 fi
5158 echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
5159 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6
5160 if test "$ac_cv_search_setproctitle" != no; then
5161   test "$ac_cv_search_setproctitle" = "none required" || LIBS="$ac_cv_search_setproctitle $LIBS"
5162
5163 fi
5164
5165 echo "$as_me:$LINENO: checking for library containing pow" >&5
5166 echo $ECHO_N "checking for library containing pow... $ECHO_C" >&6
5167 if test "${ac_cv_search_pow+set}" = set; then
5168   echo $ECHO_N "(cached) $ECHO_C" >&6
5169 else
5170   ac_func_search_save_LIBS=$LIBS
5171 ac_cv_search_pow=no
5172 cat >conftest.$ac_ext <<_ACEOF
5173 /* confdefs.h.  */
5174 _ACEOF
5175 cat confdefs.h >>conftest.$ac_ext
5176 cat >>conftest.$ac_ext <<_ACEOF
5177 /* end confdefs.h.  */
5178
5179 /* Override any gcc2 internal prototype to avoid an error.  */
5180 #ifdef __cplusplus
5181 extern "C"
5182 #endif
5183 /* We use char because int might match the return type of a gcc2
5184    builtin and then its argument prototype would still apply.  */
5185 char pow ();
5186 int
5187 main ()
5188 {
5189 pow ();
5190   ;
5191   return 0;
5192 }
5193 _ACEOF
5194 rm -f conftest.$ac_objext conftest$ac_exeext
5195 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5196   (eval $ac_link) 2>conftest.er1
5197   ac_status=$?
5198   grep -v '^ *+' conftest.er1 >conftest.err
5199   rm -f conftest.er1
5200   cat conftest.err >&5
5201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5202   (exit $ac_status); } &&
5203          { ac_try='test -z "$ac_c_werror_flag"
5204                          || test ! -s conftest.err'
5205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5206   (eval $ac_try) 2>&5
5207   ac_status=$?
5208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5209   (exit $ac_status); }; } &&
5210          { ac_try='test -s conftest$ac_exeext'
5211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5212   (eval $ac_try) 2>&5
5213   ac_status=$?
5214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5215   (exit $ac_status); }; }; then
5216   ac_cv_search_pow="none required"
5217 else
5218   echo "$as_me: failed program was:" >&5
5219 sed 's/^/| /' conftest.$ac_ext >&5
5220
5221 fi
5222 rm -f conftest.err conftest.$ac_objext \
5223       conftest$ac_exeext conftest.$ac_ext
5224 if test "$ac_cv_search_pow" = no; then
5225   for ac_lib in m; do
5226     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5227     cat >conftest.$ac_ext <<_ACEOF
5228 /* confdefs.h.  */
5229 _ACEOF
5230 cat confdefs.h >>conftest.$ac_ext
5231 cat >>conftest.$ac_ext <<_ACEOF
5232 /* end confdefs.h.  */
5233
5234 /* Override any gcc2 internal prototype to avoid an error.  */
5235 #ifdef __cplusplus
5236 extern "C"
5237 #endif
5238 /* We use char because int might match the return type of a gcc2
5239    builtin and then its argument prototype would still apply.  */
5240 char pow ();
5241 int
5242 main ()
5243 {
5244 pow ();
5245   ;
5246   return 0;
5247 }
5248 _ACEOF
5249 rm -f conftest.$ac_objext conftest$ac_exeext
5250 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5251   (eval $ac_link) 2>conftest.er1
5252   ac_status=$?
5253   grep -v '^ *+' conftest.er1 >conftest.err
5254   rm -f conftest.er1
5255   cat conftest.err >&5
5256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5257   (exit $ac_status); } &&
5258          { ac_try='test -z "$ac_c_werror_flag"
5259                          || test ! -s conftest.err'
5260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5261   (eval $ac_try) 2>&5
5262   ac_status=$?
5263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5264   (exit $ac_status); }; } &&
5265          { ac_try='test -s conftest$ac_exeext'
5266   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5267   (eval $ac_try) 2>&5
5268   ac_status=$?
5269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5270   (exit $ac_status); }; }; then
5271   ac_cv_search_pow="-l$ac_lib"
5272 break
5273 else
5274   echo "$as_me: failed program was:" >&5
5275 sed 's/^/| /' conftest.$ac_ext >&5
5276
5277 fi
5278 rm -f conftest.err conftest.$ac_objext \
5279       conftest$ac_exeext conftest.$ac_ext
5280   done
5281 fi
5282 LIBS=$ac_func_search_save_LIBS
5283 fi
5284 echo "$as_me:$LINENO: result: $ac_cv_search_pow" >&5
5285 echo "${ECHO_T}$ac_cv_search_pow" >&6
5286 if test "$ac_cv_search_pow" != no; then
5287   test "$ac_cv_search_pow" = "none required" || LIBS="$ac_cv_search_pow $LIBS"
5288
5289 fi
5290
5291 echo "$as_me:$LINENO: checking for library containing dlopen" >&5
5292 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6
5293 if test "${ac_cv_search_dlopen+set}" = set; then
5294   echo $ECHO_N "(cached) $ECHO_C" >&6
5295 else
5296   ac_func_search_save_LIBS=$LIBS
5297 ac_cv_search_dlopen=no
5298 cat >conftest.$ac_ext <<_ACEOF
5299 /* confdefs.h.  */
5300 _ACEOF
5301 cat confdefs.h >>conftest.$ac_ext
5302 cat >>conftest.$ac_ext <<_ACEOF
5303 /* end confdefs.h.  */
5304
5305 /* Override any gcc2 internal prototype to avoid an error.  */
5306 #ifdef __cplusplus
5307 extern "C"
5308 #endif
5309 /* We use char because int might match the return type of a gcc2
5310    builtin and then its argument prototype would still apply.  */
5311 char dlopen ();
5312 int
5313 main ()
5314 {
5315 dlopen ();
5316   ;
5317   return 0;
5318 }
5319 _ACEOF
5320 rm -f conftest.$ac_objext conftest$ac_exeext
5321 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5322   (eval $ac_link) 2>conftest.er1
5323   ac_status=$?
5324   grep -v '^ *+' conftest.er1 >conftest.err
5325   rm -f conftest.er1
5326   cat conftest.err >&5
5327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5328   (exit $ac_status); } &&
5329          { ac_try='test -z "$ac_c_werror_flag"
5330                          || test ! -s conftest.err'
5331   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5332   (eval $ac_try) 2>&5
5333   ac_status=$?
5334   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5335   (exit $ac_status); }; } &&
5336          { ac_try='test -s conftest$ac_exeext'
5337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5338   (eval $ac_try) 2>&5
5339   ac_status=$?
5340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5341   (exit $ac_status); }; }; then
5342   ac_cv_search_dlopen="none required"
5343 else
5344   echo "$as_me: failed program was:" >&5
5345 sed 's/^/| /' conftest.$ac_ext >&5
5346
5347 fi
5348 rm -f conftest.err conftest.$ac_objext \
5349       conftest$ac_exeext conftest.$ac_ext
5350 if test "$ac_cv_search_dlopen" = no; then
5351   for ac_lib in dl; do
5352     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5353     cat >conftest.$ac_ext <<_ACEOF
5354 /* confdefs.h.  */
5355 _ACEOF
5356 cat confdefs.h >>conftest.$ac_ext
5357 cat >>conftest.$ac_ext <<_ACEOF
5358 /* end confdefs.h.  */
5359
5360 /* Override any gcc2 internal prototype to avoid an error.  */
5361 #ifdef __cplusplus
5362 extern "C"
5363 #endif
5364 /* We use char because int might match the return type of a gcc2
5365    builtin and then its argument prototype would still apply.  */
5366 char dlopen ();
5367 int
5368 main ()
5369 {
5370 dlopen ();
5371   ;
5372   return 0;
5373 }
5374 _ACEOF
5375 rm -f conftest.$ac_objext conftest$ac_exeext
5376 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5377   (eval $ac_link) 2>conftest.er1
5378   ac_status=$?
5379   grep -v '^ *+' conftest.er1 >conftest.err
5380   rm -f conftest.er1
5381   cat conftest.err >&5
5382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5383   (exit $ac_status); } &&
5384          { ac_try='test -z "$ac_c_werror_flag"
5385                          || test ! -s conftest.err'
5386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5387   (eval $ac_try) 2>&5
5388   ac_status=$?
5389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5390   (exit $ac_status); }; } &&
5391          { ac_try='test -s conftest$ac_exeext'
5392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5393   (eval $ac_try) 2>&5
5394   ac_status=$?
5395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5396   (exit $ac_status); }; }; then
5397   ac_cv_search_dlopen="-l$ac_lib"
5398 break
5399 else
5400   echo "$as_me: failed program was:" >&5
5401 sed 's/^/| /' conftest.$ac_ext >&5
5402
5403 fi
5404 rm -f conftest.err conftest.$ac_objext \
5405       conftest$ac_exeext conftest.$ac_ext
5406   done
5407 fi
5408 LIBS=$ac_func_search_save_LIBS
5409 fi
5410 echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
5411 echo "${ECHO_T}$ac_cv_search_dlopen" >&6
5412 if test "$ac_cv_search_dlopen" != no; then
5413   test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
5414
5415 fi
5416
5417 echo "$as_me:$LINENO: checking for library containing socket" >&5
5418 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
5419 if test "${ac_cv_search_socket+set}" = set; then
5420   echo $ECHO_N "(cached) $ECHO_C" >&6
5421 else
5422   ac_func_search_save_LIBS=$LIBS
5423 ac_cv_search_socket=no
5424 cat >conftest.$ac_ext <<_ACEOF
5425 /* confdefs.h.  */
5426 _ACEOF
5427 cat confdefs.h >>conftest.$ac_ext
5428 cat >>conftest.$ac_ext <<_ACEOF
5429 /* end confdefs.h.  */
5430
5431 /* Override any gcc2 internal prototype to avoid an error.  */
5432 #ifdef __cplusplus
5433 extern "C"
5434 #endif
5435 /* We use char because int might match the return type of a gcc2
5436    builtin and then its argument prototype would still apply.  */
5437 char socket ();
5438 int
5439 main ()
5440 {
5441 socket ();
5442   ;
5443   return 0;
5444 }
5445 _ACEOF
5446 rm -f conftest.$ac_objext conftest$ac_exeext
5447 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5448   (eval $ac_link) 2>conftest.er1
5449   ac_status=$?
5450   grep -v '^ *+' conftest.er1 >conftest.err
5451   rm -f conftest.er1
5452   cat conftest.err >&5
5453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5454   (exit $ac_status); } &&
5455          { ac_try='test -z "$ac_c_werror_flag"
5456                          || test ! -s conftest.err'
5457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5458   (eval $ac_try) 2>&5
5459   ac_status=$?
5460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5461   (exit $ac_status); }; } &&
5462          { ac_try='test -s conftest$ac_exeext'
5463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5464   (eval $ac_try) 2>&5
5465   ac_status=$?
5466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5467   (exit $ac_status); }; }; then
5468   ac_cv_search_socket="none required"
5469 else
5470   echo "$as_me: failed program was:" >&5
5471 sed 's/^/| /' conftest.$ac_ext >&5
5472
5473 fi
5474 rm -f conftest.err conftest.$ac_objext \
5475       conftest$ac_exeext conftest.$ac_ext
5476 if test "$ac_cv_search_socket" = no; then
5477   for ac_lib in socket wsock32; do
5478     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5479     cat >conftest.$ac_ext <<_ACEOF
5480 /* confdefs.h.  */
5481 _ACEOF
5482 cat confdefs.h >>conftest.$ac_ext
5483 cat >>conftest.$ac_ext <<_ACEOF
5484 /* end confdefs.h.  */
5485
5486 /* Override any gcc2 internal prototype to avoid an error.  */
5487 #ifdef __cplusplus
5488 extern "C"
5489 #endif
5490 /* We use char because int might match the return type of a gcc2
5491    builtin and then its argument prototype would still apply.  */
5492 char socket ();
5493 int
5494 main ()
5495 {
5496 socket ();
5497   ;
5498   return 0;
5499 }
5500 _ACEOF
5501 rm -f conftest.$ac_objext conftest$ac_exeext
5502 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5503   (eval $ac_link) 2>conftest.er1
5504   ac_status=$?
5505   grep -v '^ *+' conftest.er1 >conftest.err
5506   rm -f conftest.er1
5507   cat conftest.err >&5
5508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5509   (exit $ac_status); } &&
5510          { ac_try='test -z "$ac_c_werror_flag"
5511                          || test ! -s conftest.err'
5512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5513   (eval $ac_try) 2>&5
5514   ac_status=$?
5515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5516   (exit $ac_status); }; } &&
5517          { ac_try='test -s conftest$ac_exeext'
5518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5519   (eval $ac_try) 2>&5
5520   ac_status=$?
5521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5522   (exit $ac_status); }; }; then
5523   ac_cv_search_socket="-l$ac_lib"
5524 break
5525 else
5526   echo "$as_me: failed program was:" >&5
5527 sed 's/^/| /' conftest.$ac_ext >&5
5528
5529 fi
5530 rm -f conftest.err conftest.$ac_objext \
5531       conftest$ac_exeext conftest.$ac_ext
5532   done
5533 fi
5534 LIBS=$ac_func_search_save_LIBS
5535 fi
5536 echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
5537 echo "${ECHO_T}$ac_cv_search_socket" >&6
5538 if test "$ac_cv_search_socket" != no; then
5539   test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
5540
5541 fi
5542
5543 echo "$as_me:$LINENO: checking for library containing shl_load" >&5
5544 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6
5545 if test "${ac_cv_search_shl_load+set}" = set; then
5546   echo $ECHO_N "(cached) $ECHO_C" >&6
5547 else
5548   ac_func_search_save_LIBS=$LIBS
5549 ac_cv_search_shl_load=no
5550 cat >conftest.$ac_ext <<_ACEOF
5551 /* confdefs.h.  */
5552 _ACEOF
5553 cat confdefs.h >>conftest.$ac_ext
5554 cat >>conftest.$ac_ext <<_ACEOF
5555 /* end confdefs.h.  */
5556
5557 /* Override any gcc2 internal prototype to avoid an error.  */
5558 #ifdef __cplusplus
5559 extern "C"
5560 #endif
5561 /* We use char because int might match the return type of a gcc2
5562    builtin and then its argument prototype would still apply.  */
5563 char shl_load ();
5564 int
5565 main ()
5566 {
5567 shl_load ();
5568   ;
5569   return 0;
5570 }
5571 _ACEOF
5572 rm -f conftest.$ac_objext conftest$ac_exeext
5573 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5574   (eval $ac_link) 2>conftest.er1
5575   ac_status=$?
5576   grep -v '^ *+' conftest.er1 >conftest.err
5577   rm -f conftest.er1
5578   cat conftest.err >&5
5579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5580   (exit $ac_status); } &&
5581          { ac_try='test -z "$ac_c_werror_flag"
5582                          || test ! -s conftest.err'
5583   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5584   (eval $ac_try) 2>&5
5585   ac_status=$?
5586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5587   (exit $ac_status); }; } &&
5588          { ac_try='test -s conftest$ac_exeext'
5589   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5590   (eval $ac_try) 2>&5
5591   ac_status=$?
5592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5593   (exit $ac_status); }; }; then
5594   ac_cv_search_shl_load="none required"
5595 else
5596   echo "$as_me: failed program was:" >&5
5597 sed 's/^/| /' conftest.$ac_ext >&5
5598
5599 fi
5600 rm -f conftest.err conftest.$ac_objext \
5601       conftest$ac_exeext conftest.$ac_ext
5602 if test "$ac_cv_search_shl_load" = no; then
5603   for ac_lib in dld; do
5604     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5605     cat >conftest.$ac_ext <<_ACEOF
5606 /* confdefs.h.  */
5607 _ACEOF
5608 cat confdefs.h >>conftest.$ac_ext
5609 cat >>conftest.$ac_ext <<_ACEOF
5610 /* end confdefs.h.  */
5611
5612 /* Override any gcc2 internal prototype to avoid an error.  */
5613 #ifdef __cplusplus
5614 extern "C"
5615 #endif
5616 /* We use char because int might match the return type of a gcc2
5617    builtin and then its argument prototype would still apply.  */
5618 char shl_load ();
5619 int
5620 main ()
5621 {
5622 shl_load ();
5623   ;
5624   return 0;
5625 }
5626 _ACEOF
5627 rm -f conftest.$ac_objext conftest$ac_exeext
5628 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5629   (eval $ac_link) 2>conftest.er1
5630   ac_status=$?
5631   grep -v '^ *+' conftest.er1 >conftest.err
5632   rm -f conftest.er1
5633   cat conftest.err >&5
5634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5635   (exit $ac_status); } &&
5636          { ac_try='test -z "$ac_c_werror_flag"
5637                          || test ! -s conftest.err'
5638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5639   (eval $ac_try) 2>&5
5640   ac_status=$?
5641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5642   (exit $ac_status); }; } &&
5643          { ac_try='test -s conftest$ac_exeext'
5644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5645   (eval $ac_try) 2>&5
5646   ac_status=$?
5647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5648   (exit $ac_status); }; }; then
5649   ac_cv_search_shl_load="-l$ac_lib"
5650 break
5651 else
5652   echo "$as_me: failed program was:" >&5
5653 sed 's/^/| /' conftest.$ac_ext >&5
5654
5655 fi
5656 rm -f conftest.err conftest.$ac_objext \
5657       conftest$ac_exeext conftest.$ac_ext
5658   done
5659 fi
5660 LIBS=$ac_func_search_save_LIBS
5661 fi
5662 echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
5663 echo "${ECHO_T}$ac_cv_search_shl_load" >&6
5664 if test "$ac_cv_search_shl_load" != no; then
5665   test "$ac_cv_search_shl_load" = "none required" || LIBS="$ac_cv_search_shl_load $LIBS"
5666
5667 fi
5668
5669 # We only use libld in port/dynloader/aix.c
5670 case $host_os in
5671      aix*)
5672         echo "$as_me:$LINENO: checking for library containing ldopen" >&5
5673 echo $ECHO_N "checking for library containing ldopen... $ECHO_C" >&6
5674 if test "${ac_cv_search_ldopen+set}" = set; then
5675   echo $ECHO_N "(cached) $ECHO_C" >&6
5676 else
5677   ac_func_search_save_LIBS=$LIBS
5678 ac_cv_search_ldopen=no
5679 cat >conftest.$ac_ext <<_ACEOF
5680 /* confdefs.h.  */
5681 _ACEOF
5682 cat confdefs.h >>conftest.$ac_ext
5683 cat >>conftest.$ac_ext <<_ACEOF
5684 /* end confdefs.h.  */
5685
5686 /* Override any gcc2 internal prototype to avoid an error.  */
5687 #ifdef __cplusplus
5688 extern "C"
5689 #endif
5690 /* We use char because int might match the return type of a gcc2
5691    builtin and then its argument prototype would still apply.  */
5692 char ldopen ();
5693 int
5694 main ()
5695 {
5696 ldopen ();
5697   ;
5698   return 0;
5699 }
5700 _ACEOF
5701 rm -f conftest.$ac_objext conftest$ac_exeext
5702 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5703   (eval $ac_link) 2>conftest.er1
5704   ac_status=$?
5705   grep -v '^ *+' conftest.er1 >conftest.err
5706   rm -f conftest.er1
5707   cat conftest.err >&5
5708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5709   (exit $ac_status); } &&
5710          { ac_try='test -z "$ac_c_werror_flag"
5711                          || test ! -s conftest.err'
5712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5713   (eval $ac_try) 2>&5
5714   ac_status=$?
5715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5716   (exit $ac_status); }; } &&
5717          { ac_try='test -s conftest$ac_exeext'
5718   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5719   (eval $ac_try) 2>&5
5720   ac_status=$?
5721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5722   (exit $ac_status); }; }; then
5723   ac_cv_search_ldopen="none required"
5724 else
5725   echo "$as_me: failed program was:" >&5
5726 sed 's/^/| /' conftest.$ac_ext >&5
5727
5728 fi
5729 rm -f conftest.err conftest.$ac_objext \
5730       conftest$ac_exeext conftest.$ac_ext
5731 if test "$ac_cv_search_ldopen" = no; then
5732   for ac_lib in ld; do
5733     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5734     cat >conftest.$ac_ext <<_ACEOF
5735 /* confdefs.h.  */
5736 _ACEOF
5737 cat confdefs.h >>conftest.$ac_ext
5738 cat >>conftest.$ac_ext <<_ACEOF
5739 /* end confdefs.h.  */
5740
5741 /* Override any gcc2 internal prototype to avoid an error.  */
5742 #ifdef __cplusplus
5743 extern "C"
5744 #endif
5745 /* We use char because int might match the return type of a gcc2
5746    builtin and then its argument prototype would still apply.  */
5747 char ldopen ();
5748 int
5749 main ()
5750 {
5751 ldopen ();
5752   ;
5753   return 0;
5754 }
5755 _ACEOF
5756 rm -f conftest.$ac_objext conftest$ac_exeext
5757 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5758   (eval $ac_link) 2>conftest.er1
5759   ac_status=$?
5760   grep -v '^ *+' conftest.er1 >conftest.err
5761   rm -f conftest.er1
5762   cat conftest.err >&5
5763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5764   (exit $ac_status); } &&
5765          { ac_try='test -z "$ac_c_werror_flag"
5766                          || test ! -s conftest.err'
5767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5768   (eval $ac_try) 2>&5
5769   ac_status=$?
5770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5771   (exit $ac_status); }; } &&
5772          { ac_try='test -s conftest$ac_exeext'
5773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5774   (eval $ac_try) 2>&5
5775   ac_status=$?
5776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5777   (exit $ac_status); }; }; then
5778   ac_cv_search_ldopen="-l$ac_lib"
5779 break
5780 else
5781   echo "$as_me: failed program was:" >&5
5782 sed 's/^/| /' conftest.$ac_ext >&5
5783
5784 fi
5785 rm -f conftest.err conftest.$ac_objext \
5786       conftest$ac_exeext conftest.$ac_ext
5787   done
5788 fi
5789 LIBS=$ac_func_search_save_LIBS
5790 fi
5791 echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
5792 echo "${ECHO_T}$ac_cv_search_ldopen" >&6
5793 if test "$ac_cv_search_ldopen" != no; then
5794   test "$ac_cv_search_ldopen" = "none required" || LIBS="$ac_cv_search_ldopen $LIBS"
5795
5796 fi
5797
5798         ;;
5799 esac
5800 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5801 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5802 if test "${ac_cv_search_getopt_long+set}" = set; then
5803   echo $ECHO_N "(cached) $ECHO_C" >&6
5804 else
5805   ac_func_search_save_LIBS=$LIBS
5806 ac_cv_search_getopt_long=no
5807 cat >conftest.$ac_ext <<_ACEOF
5808 /* confdefs.h.  */
5809 _ACEOF
5810 cat confdefs.h >>conftest.$ac_ext
5811 cat >>conftest.$ac_ext <<_ACEOF
5812 /* end confdefs.h.  */
5813
5814 /* Override any gcc2 internal prototype to avoid an error.  */
5815 #ifdef __cplusplus
5816 extern "C"
5817 #endif
5818 /* We use char because int might match the return type of a gcc2
5819    builtin and then its argument prototype would still apply.  */
5820 char getopt_long ();
5821 int
5822 main ()
5823 {
5824 getopt_long ();
5825   ;
5826   return 0;
5827 }
5828 _ACEOF
5829 rm -f conftest.$ac_objext conftest$ac_exeext
5830 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5831   (eval $ac_link) 2>conftest.er1
5832   ac_status=$?
5833   grep -v '^ *+' conftest.er1 >conftest.err
5834   rm -f conftest.er1
5835   cat conftest.err >&5
5836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5837   (exit $ac_status); } &&
5838          { ac_try='test -z "$ac_c_werror_flag"
5839                          || test ! -s conftest.err'
5840   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5841   (eval $ac_try) 2>&5
5842   ac_status=$?
5843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5844   (exit $ac_status); }; } &&
5845          { ac_try='test -s conftest$ac_exeext'
5846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5847   (eval $ac_try) 2>&5
5848   ac_status=$?
5849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5850   (exit $ac_status); }; }; then
5851   ac_cv_search_getopt_long="none required"
5852 else
5853   echo "$as_me: failed program was:" >&5
5854 sed 's/^/| /' conftest.$ac_ext >&5
5855
5856 fi
5857 rm -f conftest.err conftest.$ac_objext \
5858       conftest$ac_exeext conftest.$ac_ext
5859 if test "$ac_cv_search_getopt_long" = no; then
5860   for ac_lib in getopt gnugetopt; do
5861     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5862     cat >conftest.$ac_ext <<_ACEOF
5863 /* confdefs.h.  */
5864 _ACEOF
5865 cat confdefs.h >>conftest.$ac_ext
5866 cat >>conftest.$ac_ext <<_ACEOF
5867 /* end confdefs.h.  */
5868
5869 /* Override any gcc2 internal prototype to avoid an error.  */
5870 #ifdef __cplusplus
5871 extern "C"
5872 #endif
5873 /* We use char because int might match the return type of a gcc2
5874    builtin and then its argument prototype would still apply.  */
5875 char getopt_long ();
5876 int
5877 main ()
5878 {
5879 getopt_long ();
5880   ;
5881   return 0;
5882 }
5883 _ACEOF
5884 rm -f conftest.$ac_objext conftest$ac_exeext
5885 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5886   (eval $ac_link) 2>conftest.er1
5887   ac_status=$?
5888   grep -v '^ *+' conftest.er1 >conftest.err
5889   rm -f conftest.er1
5890   cat conftest.err >&5
5891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5892   (exit $ac_status); } &&
5893          { ac_try='test -z "$ac_c_werror_flag"
5894                          || test ! -s conftest.err'
5895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5896   (eval $ac_try) 2>&5
5897   ac_status=$?
5898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5899   (exit $ac_status); }; } &&
5900          { ac_try='test -s conftest$ac_exeext'
5901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5902   (eval $ac_try) 2>&5
5903   ac_status=$?
5904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5905   (exit $ac_status); }; }; then
5906   ac_cv_search_getopt_long="-l$ac_lib"
5907 break
5908 else
5909   echo "$as_me: failed program was:" >&5
5910 sed 's/^/| /' conftest.$ac_ext >&5
5911
5912 fi
5913 rm -f conftest.err conftest.$ac_objext \
5914       conftest$ac_exeext conftest.$ac_ext
5915   done
5916 fi
5917 LIBS=$ac_func_search_save_LIBS
5918 fi
5919 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5920 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5921 if test "$ac_cv_search_getopt_long" != no; then
5922   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5923
5924 fi
5925
5926 echo "$as_me:$LINENO: checking for library containing crypt" >&5
5927 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
5928 if test "${ac_cv_search_crypt+set}" = set; then
5929   echo $ECHO_N "(cached) $ECHO_C" >&6
5930 else
5931   ac_func_search_save_LIBS=$LIBS
5932 ac_cv_search_crypt=no
5933 cat >conftest.$ac_ext <<_ACEOF
5934 /* confdefs.h.  */
5935 _ACEOF
5936 cat confdefs.h >>conftest.$ac_ext
5937 cat >>conftest.$ac_ext <<_ACEOF
5938 /* end confdefs.h.  */
5939
5940 /* Override any gcc2 internal prototype to avoid an error.  */
5941 #ifdef __cplusplus
5942 extern "C"
5943 #endif
5944 /* We use char because int might match the return type of a gcc2
5945    builtin and then its argument prototype would still apply.  */
5946 char crypt ();
5947 int
5948 main ()
5949 {
5950 crypt ();
5951   ;
5952   return 0;
5953 }
5954 _ACEOF
5955 rm -f conftest.$ac_objext conftest$ac_exeext
5956 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5957   (eval $ac_link) 2>conftest.er1
5958   ac_status=$?
5959   grep -v '^ *+' conftest.er1 >conftest.err
5960   rm -f conftest.er1
5961   cat conftest.err >&5
5962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5963   (exit $ac_status); } &&
5964          { ac_try='test -z "$ac_c_werror_flag"
5965                          || test ! -s conftest.err'
5966   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5967   (eval $ac_try) 2>&5
5968   ac_status=$?
5969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5970   (exit $ac_status); }; } &&
5971          { ac_try='test -s conftest$ac_exeext'
5972   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5973   (eval $ac_try) 2>&5
5974   ac_status=$?
5975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5976   (exit $ac_status); }; }; then
5977   ac_cv_search_crypt="none required"
5978 else
5979   echo "$as_me: failed program was:" >&5
5980 sed 's/^/| /' conftest.$ac_ext >&5
5981
5982 fi
5983 rm -f conftest.err conftest.$ac_objext \
5984       conftest$ac_exeext conftest.$ac_ext
5985 if test "$ac_cv_search_crypt" = no; then
5986   for ac_lib in crypt; do
5987     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5988     cat >conftest.$ac_ext <<_ACEOF
5989 /* confdefs.h.  */
5990 _ACEOF
5991 cat confdefs.h >>conftest.$ac_ext
5992 cat >>conftest.$ac_ext <<_ACEOF
5993 /* end confdefs.h.  */
5994
5995 /* Override any gcc2 internal prototype to avoid an error.  */
5996 #ifdef __cplusplus
5997 extern "C"
5998 #endif
5999 /* We use char because int might match the return type of a gcc2
6000    builtin and then its argument prototype would still apply.  */
6001 char crypt ();
6002 int
6003 main ()
6004 {
6005 crypt ();
6006   ;
6007   return 0;
6008 }
6009 _ACEOF
6010 rm -f conftest.$ac_objext conftest$ac_exeext
6011 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6012   (eval $ac_link) 2>conftest.er1
6013   ac_status=$?
6014   grep -v '^ *+' conftest.er1 >conftest.err
6015   rm -f conftest.er1
6016   cat conftest.err >&5
6017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6018   (exit $ac_status); } &&
6019          { ac_try='test -z "$ac_c_werror_flag"
6020                          || test ! -s conftest.err'
6021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6022   (eval $ac_try) 2>&5
6023   ac_status=$?
6024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6025   (exit $ac_status); }; } &&
6026          { ac_try='test -s conftest$ac_exeext'
6027   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6028   (eval $ac_try) 2>&5
6029   ac_status=$?
6030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6031   (exit $ac_status); }; }; then
6032   ac_cv_search_crypt="-l$ac_lib"
6033 break
6034 else
6035   echo "$as_me: failed program was:" >&5
6036 sed 's/^/| /' conftest.$ac_ext >&5
6037
6038 fi
6039 rm -f conftest.err conftest.$ac_objext \
6040       conftest$ac_exeext conftest.$ac_ext
6041   done
6042 fi
6043 LIBS=$ac_func_search_save_LIBS
6044 fi
6045 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6046 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6047 if test "$ac_cv_search_crypt" != no; then
6048   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6049
6050 fi
6051
6052 # Solaris:
6053 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6054 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6055 if test "${ac_cv_search_fdatasync+set}" = set; then
6056   echo $ECHO_N "(cached) $ECHO_C" >&6
6057 else
6058   ac_func_search_save_LIBS=$LIBS
6059 ac_cv_search_fdatasync=no
6060 cat >conftest.$ac_ext <<_ACEOF
6061 /* confdefs.h.  */
6062 _ACEOF
6063 cat confdefs.h >>conftest.$ac_ext
6064 cat >>conftest.$ac_ext <<_ACEOF
6065 /* end confdefs.h.  */
6066
6067 /* Override any gcc2 internal prototype to avoid an error.  */
6068 #ifdef __cplusplus
6069 extern "C"
6070 #endif
6071 /* We use char because int might match the return type of a gcc2
6072    builtin and then its argument prototype would still apply.  */
6073 char fdatasync ();
6074 int
6075 main ()
6076 {
6077 fdatasync ();
6078   ;
6079   return 0;
6080 }
6081 _ACEOF
6082 rm -f conftest.$ac_objext conftest$ac_exeext
6083 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6084   (eval $ac_link) 2>conftest.er1
6085   ac_status=$?
6086   grep -v '^ *+' conftest.er1 >conftest.err
6087   rm -f conftest.er1
6088   cat conftest.err >&5
6089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6090   (exit $ac_status); } &&
6091          { ac_try='test -z "$ac_c_werror_flag"
6092                          || test ! -s conftest.err'
6093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6094   (eval $ac_try) 2>&5
6095   ac_status=$?
6096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6097   (exit $ac_status); }; } &&
6098          { ac_try='test -s conftest$ac_exeext'
6099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6100   (eval $ac_try) 2>&5
6101   ac_status=$?
6102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6103   (exit $ac_status); }; }; then
6104   ac_cv_search_fdatasync="none required"
6105 else
6106   echo "$as_me: failed program was:" >&5
6107 sed 's/^/| /' conftest.$ac_ext >&5
6108
6109 fi
6110 rm -f conftest.err conftest.$ac_objext \
6111       conftest$ac_exeext conftest.$ac_ext
6112 if test "$ac_cv_search_fdatasync" = no; then
6113   for ac_lib in rt posix4; do
6114     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6115     cat >conftest.$ac_ext <<_ACEOF
6116 /* confdefs.h.  */
6117 _ACEOF
6118 cat confdefs.h >>conftest.$ac_ext
6119 cat >>conftest.$ac_ext <<_ACEOF
6120 /* end confdefs.h.  */
6121
6122 /* Override any gcc2 internal prototype to avoid an error.  */
6123 #ifdef __cplusplus
6124 extern "C"
6125 #endif
6126 /* We use char because int might match the return type of a gcc2
6127    builtin and then its argument prototype would still apply.  */
6128 char fdatasync ();
6129 int
6130 main ()
6131 {
6132 fdatasync ();
6133   ;
6134   return 0;
6135 }
6136 _ACEOF
6137 rm -f conftest.$ac_objext conftest$ac_exeext
6138 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6139   (eval $ac_link) 2>conftest.er1
6140   ac_status=$?
6141   grep -v '^ *+' conftest.er1 >conftest.err
6142   rm -f conftest.er1
6143   cat conftest.err >&5
6144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6145   (exit $ac_status); } &&
6146          { ac_try='test -z "$ac_c_werror_flag"
6147                          || test ! -s conftest.err'
6148   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6149   (eval $ac_try) 2>&5
6150   ac_status=$?
6151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6152   (exit $ac_status); }; } &&
6153          { ac_try='test -s conftest$ac_exeext'
6154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6155   (eval $ac_try) 2>&5
6156   ac_status=$?
6157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6158   (exit $ac_status); }; }; then
6159   ac_cv_search_fdatasync="-l$ac_lib"
6160 break
6161 else
6162   echo "$as_me: failed program was:" >&5
6163 sed 's/^/| /' conftest.$ac_ext >&5
6164
6165 fi
6166 rm -f conftest.err conftest.$ac_objext \
6167       conftest$ac_exeext conftest.$ac_ext
6168   done
6169 fi
6170 LIBS=$ac_func_search_save_LIBS
6171 fi
6172 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6173 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6174 if test "$ac_cv_search_fdatasync" != no; then
6175   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6176
6177 fi
6178
6179 # Cygwin:
6180 echo "$as_me:$LINENO: checking for library containing shmget" >&5
6181 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6
6182 if test "${ac_cv_search_shmget+set}" = set; then
6183   echo $ECHO_N "(cached) $ECHO_C" >&6
6184 else
6185   ac_func_search_save_LIBS=$LIBS
6186 ac_cv_search_shmget=no
6187 cat >conftest.$ac_ext <<_ACEOF
6188 /* confdefs.h.  */
6189 _ACEOF
6190 cat confdefs.h >>conftest.$ac_ext
6191 cat >>conftest.$ac_ext <<_ACEOF
6192 /* end confdefs.h.  */
6193
6194 /* Override any gcc2 internal prototype to avoid an error.  */
6195 #ifdef __cplusplus
6196 extern "C"
6197 #endif
6198 /* We use char because int might match the return type of a gcc2
6199    builtin and then its argument prototype would still apply.  */
6200 char shmget ();
6201 int
6202 main ()
6203 {
6204 shmget ();
6205   ;
6206   return 0;
6207 }
6208 _ACEOF
6209 rm -f conftest.$ac_objext conftest$ac_exeext
6210 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6211   (eval $ac_link) 2>conftest.er1
6212   ac_status=$?
6213   grep -v '^ *+' conftest.er1 >conftest.err
6214   rm -f conftest.er1
6215   cat conftest.err >&5
6216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6217   (exit $ac_status); } &&
6218          { ac_try='test -z "$ac_c_werror_flag"
6219                          || test ! -s conftest.err'
6220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6221   (eval $ac_try) 2>&5
6222   ac_status=$?
6223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6224   (exit $ac_status); }; } &&
6225          { ac_try='test -s conftest$ac_exeext'
6226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6227   (eval $ac_try) 2>&5
6228   ac_status=$?
6229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6230   (exit $ac_status); }; }; then
6231   ac_cv_search_shmget="none required"
6232 else
6233   echo "$as_me: failed program was:" >&5
6234 sed 's/^/| /' conftest.$ac_ext >&5
6235
6236 fi
6237 rm -f conftest.err conftest.$ac_objext \
6238       conftest$ac_exeext conftest.$ac_ext
6239 if test "$ac_cv_search_shmget" = no; then
6240   for ac_lib in cygipc; do
6241     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6242     cat >conftest.$ac_ext <<_ACEOF
6243 /* confdefs.h.  */
6244 _ACEOF
6245 cat confdefs.h >>conftest.$ac_ext
6246 cat >>conftest.$ac_ext <<_ACEOF
6247 /* end confdefs.h.  */
6248
6249 /* Override any gcc2 internal prototype to avoid an error.  */
6250 #ifdef __cplusplus
6251 extern "C"
6252 #endif
6253 /* We use char because int might match the return type of a gcc2
6254    builtin and then its argument prototype would still apply.  */
6255 char shmget ();
6256 int
6257 main ()
6258 {
6259 shmget ();
6260   ;
6261   return 0;
6262 }
6263 _ACEOF
6264 rm -f conftest.$ac_objext conftest$ac_exeext
6265 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6266   (eval $ac_link) 2>conftest.er1
6267   ac_status=$?
6268   grep -v '^ *+' conftest.er1 >conftest.err
6269   rm -f conftest.er1
6270   cat conftest.err >&5
6271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6272   (exit $ac_status); } &&
6273          { ac_try='test -z "$ac_c_werror_flag"
6274                          || test ! -s conftest.err'
6275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6276   (eval $ac_try) 2>&5
6277   ac_status=$?
6278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6279   (exit $ac_status); }; } &&
6280          { ac_try='test -s conftest$ac_exeext'
6281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6282   (eval $ac_try) 2>&5
6283   ac_status=$?
6284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6285   (exit $ac_status); }; }; then
6286   ac_cv_search_shmget="-l$ac_lib"
6287 break
6288 else
6289   echo "$as_me: failed program was:" >&5
6290 sed 's/^/| /' conftest.$ac_ext >&5
6291
6292 fi
6293 rm -f conftest.err conftest.$ac_objext \
6294       conftest$ac_exeext conftest.$ac_ext
6295   done
6296 fi
6297 LIBS=$ac_func_search_save_LIBS
6298 fi
6299 echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
6300 echo "${ECHO_T}$ac_cv_search_shmget" >&6
6301 if test "$ac_cv_search_shmget" != no; then
6302   test "$ac_cv_search_shmget" = "none required" || LIBS="$ac_cv_search_shmget $LIBS"
6303
6304 fi
6305
6306
6307 if test "$with_readline" = yes; then
6308
6309
6310 if test "${pgac_cv_check_readline+set}" = set; then
6311   echo $ECHO_N "(cached) $ECHO_C" >&6
6312 else
6313   pgac_cv_check_readline=no
6314 pgac_save_LIBS=$LIBS
6315 if test x"$with_libedit_preferred" != x"yes"
6316 then    READLINE_ORDER="-lreadline -ledit"
6317 else    READLINE_ORDER="-ledit -lreadline"
6318 fi
6319 for pgac_rllib in $READLINE_ORDER ; do
6320   echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6321 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6
6322   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6323     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6324     cat >conftest.$ac_ext <<_ACEOF
6325 /* confdefs.h.  */
6326 _ACEOF
6327 cat confdefs.h >>conftest.$ac_ext
6328 cat >>conftest.$ac_ext <<_ACEOF
6329 /* end confdefs.h.  */
6330
6331 /* Override any gcc2 internal prototype to avoid an error.  */
6332 #ifdef __cplusplus
6333 extern "C"
6334 #endif
6335 /* We use char because int might match the return type of a gcc2
6336    builtin and then its argument prototype would still apply.  */
6337 char readline ();
6338 int
6339 main ()
6340 {
6341 readline ();
6342   ;
6343   return 0;
6344 }
6345 _ACEOF
6346 rm -f conftest.$ac_objext conftest$ac_exeext
6347 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6348   (eval $ac_link) 2>conftest.er1
6349   ac_status=$?
6350   grep -v '^ *+' conftest.er1 >conftest.err
6351   rm -f conftest.er1
6352   cat conftest.err >&5
6353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354   (exit $ac_status); } &&
6355          { ac_try='test -z "$ac_c_werror_flag"
6356                          || test ! -s conftest.err'
6357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6358   (eval $ac_try) 2>&5
6359   ac_status=$?
6360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6361   (exit $ac_status); }; } &&
6362          { ac_try='test -s conftest$ac_exeext'
6363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6364   (eval $ac_try) 2>&5
6365   ac_status=$?
6366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6367   (exit $ac_status); }; }; then
6368
6369       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6370       # recognize dependent libraries; assume curses is needed if we didn't
6371       # find any dependency.
6372       case $host_os in
6373         netbsd* | openbsd* | irix*)
6374           if test x"$pgac_lib" = x"" ; then
6375             pgac_lib=" -lcurses"
6376           fi ;;
6377       esac
6378
6379       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6380       break
6381
6382 else
6383   echo "$as_me: failed program was:" >&5
6384 sed 's/^/| /' conftest.$ac_ext >&5
6385
6386 fi
6387 rm -f conftest.err conftest.$ac_objext \
6388       conftest$ac_exeext conftest.$ac_ext
6389   done
6390   if test "$pgac_cv_check_readline" != no ; then
6391     echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6392 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6393     break
6394   else
6395     echo "$as_me:$LINENO: result: no" >&5
6396 echo "${ECHO_T}no" >&6
6397   fi
6398 done
6399 LIBS=$pgac_save_LIBS
6400
6401 fi
6402
6403 if test "$pgac_cv_check_readline" != no ; then
6404   LIBS="$pgac_cv_check_readline $LIBS"
6405
6406 cat >>confdefs.h <<\_ACEOF
6407 #define HAVE_LIBREADLINE 1
6408 _ACEOF
6409
6410 fi
6411
6412
6413   if test x"$pgac_cv_check_readline" = x"no"; then
6414     { { echo "$as_me:$LINENO: error: readline library not found
6415 If you have readline already installed, see config.log for details on the
6416 failure.  It is possible the compiler isn't looking in the proper directory.
6417 Use --without-readline to disable readline support." >&5
6418 echo "$as_me: error: readline library not found
6419 If you have readline already installed, see config.log for details on the
6420 failure.  It is possible the compiler isn't looking in the proper directory.
6421 Use --without-readline to disable readline support." >&2;}
6422    { (exit 1); exit 1; }; }
6423   fi
6424 fi
6425
6426 if test "$with_zlib" = yes; then
6427
6428 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6429 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6430 if test "${ac_cv_lib_z_inflate+set}" = set; then
6431   echo $ECHO_N "(cached) $ECHO_C" >&6
6432 else
6433   ac_check_lib_save_LIBS=$LIBS
6434 LIBS="-lz  $LIBS"
6435 cat >conftest.$ac_ext <<_ACEOF
6436 /* confdefs.h.  */
6437 _ACEOF
6438 cat confdefs.h >>conftest.$ac_ext
6439 cat >>conftest.$ac_ext <<_ACEOF
6440 /* end confdefs.h.  */
6441
6442 /* Override any gcc2 internal prototype to avoid an error.  */
6443 #ifdef __cplusplus
6444 extern "C"
6445 #endif
6446 /* We use char because int might match the return type of a gcc2
6447    builtin and then its argument prototype would still apply.  */
6448 char inflate ();
6449 int
6450 main ()
6451 {
6452 inflate ();
6453   ;
6454   return 0;
6455 }
6456 _ACEOF
6457 rm -f conftest.$ac_objext conftest$ac_exeext
6458 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6459   (eval $ac_link) 2>conftest.er1
6460   ac_status=$?
6461   grep -v '^ *+' conftest.er1 >conftest.err
6462   rm -f conftest.er1
6463   cat conftest.err >&5
6464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6465   (exit $ac_status); } &&
6466          { ac_try='test -z "$ac_c_werror_flag"
6467                          || test ! -s conftest.err'
6468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6469   (eval $ac_try) 2>&5
6470   ac_status=$?
6471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6472   (exit $ac_status); }; } &&
6473          { ac_try='test -s conftest$ac_exeext'
6474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6475   (eval $ac_try) 2>&5
6476   ac_status=$?
6477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6478   (exit $ac_status); }; }; then
6479   ac_cv_lib_z_inflate=yes
6480 else
6481   echo "$as_me: failed program was:" >&5
6482 sed 's/^/| /' conftest.$ac_ext >&5
6483
6484 ac_cv_lib_z_inflate=no
6485 fi
6486 rm -f conftest.err conftest.$ac_objext \
6487       conftest$ac_exeext conftest.$ac_ext
6488 LIBS=$ac_check_lib_save_LIBS
6489 fi
6490 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6491 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6492 if test $ac_cv_lib_z_inflate = yes; then
6493   cat >>confdefs.h <<_ACEOF
6494 #define HAVE_LIBZ 1
6495 _ACEOF
6496
6497   LIBS="-lz $LIBS"
6498
6499 else
6500   { { echo "$as_me:$LINENO: error: zlib library not found
6501 If you have zlib already installed, see config.log for details on the
6502 failure.  It is possible the compiler isn't looking in the proper directory.
6503 Use --without-zlib to disable zlib support." >&5
6504 echo "$as_me: error: zlib library not found
6505 If you have zlib already installed, see config.log for details on the
6506 failure.  It is possible the compiler isn't looking in the proper directory.
6507 Use --without-zlib to disable zlib support." >&2;}
6508    { (exit 1); exit 1; }; }
6509 fi
6510
6511 fi
6512
6513 if test "$enable_spinlocks" = yes; then
6514
6515 cat >>confdefs.h <<\_ACEOF
6516 #define HAVE_SPINLOCKS 1
6517 _ACEOF
6518
6519 else
6520   { echo "$as_me:$LINENO: WARNING:
6521 *** Not using spinlocks will cause poor performance." >&5
6522 echo "$as_me: WARNING:
6523 *** Not using spinlocks will cause poor performance." >&2;}
6524 fi
6525
6526 if test "$with_krb5" = yes ; then
6527   if test "$PORTNAME" != "win32"; then
6528      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6529 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6530 if test "${ac_cv_search_com_err+set}" = set; then
6531   echo $ECHO_N "(cached) $ECHO_C" >&6
6532 else
6533   ac_func_search_save_LIBS=$LIBS
6534 ac_cv_search_com_err=no
6535 cat >conftest.$ac_ext <<_ACEOF
6536 /* confdefs.h.  */
6537 _ACEOF
6538 cat confdefs.h >>conftest.$ac_ext
6539 cat >>conftest.$ac_ext <<_ACEOF
6540 /* end confdefs.h.  */
6541
6542 /* Override any gcc2 internal prototype to avoid an error.  */
6543 #ifdef __cplusplus
6544 extern "C"
6545 #endif
6546 /* We use char because int might match the return type of a gcc2
6547    builtin and then its argument prototype would still apply.  */
6548 char com_err ();
6549 int
6550 main ()
6551 {
6552 com_err ();
6553   ;
6554   return 0;
6555 }
6556 _ACEOF
6557 rm -f conftest.$ac_objext conftest$ac_exeext
6558 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6559   (eval $ac_link) 2>conftest.er1
6560   ac_status=$?
6561   grep -v '^ *+' conftest.er1 >conftest.err
6562   rm -f conftest.er1
6563   cat conftest.err >&5
6564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6565   (exit $ac_status); } &&
6566          { ac_try='test -z "$ac_c_werror_flag"
6567                          || test ! -s conftest.err'
6568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6569   (eval $ac_try) 2>&5
6570   ac_status=$?
6571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6572   (exit $ac_status); }; } &&
6573          { ac_try='test -s conftest$ac_exeext'
6574   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6575   (eval $ac_try) 2>&5
6576   ac_status=$?
6577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6578   (exit $ac_status); }; }; then
6579   ac_cv_search_com_err="none required"
6580 else
6581   echo "$as_me: failed program was:" >&5
6582 sed 's/^/| /' conftest.$ac_ext >&5
6583
6584 fi
6585 rm -f conftest.err conftest.$ac_objext \
6586       conftest$ac_exeext conftest.$ac_ext
6587 if test "$ac_cv_search_com_err" = no; then
6588   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6589     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6590     cat >conftest.$ac_ext <<_ACEOF
6591 /* confdefs.h.  */
6592 _ACEOF
6593 cat confdefs.h >>conftest.$ac_ext
6594 cat >>conftest.$ac_ext <<_ACEOF
6595 /* end confdefs.h.  */
6596
6597 /* Override any gcc2 internal prototype to avoid an error.  */
6598 #ifdef __cplusplus
6599 extern "C"
6600 #endif
6601 /* We use char because int might match the return type of a gcc2
6602    builtin and then its argument prototype would still apply.  */
6603 char com_err ();
6604 int
6605 main ()
6606 {
6607 com_err ();
6608   ;
6609   return 0;
6610 }
6611 _ACEOF
6612 rm -f conftest.$ac_objext conftest$ac_exeext
6613 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6614   (eval $ac_link) 2>conftest.er1
6615   ac_status=$?
6616   grep -v '^ *+' conftest.er1 >conftest.err
6617   rm -f conftest.er1
6618   cat conftest.err >&5
6619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6620   (exit $ac_status); } &&
6621          { ac_try='test -z "$ac_c_werror_flag"
6622                          || test ! -s conftest.err'
6623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6624   (eval $ac_try) 2>&5
6625   ac_status=$?
6626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6627   (exit $ac_status); }; } &&
6628          { ac_try='test -s conftest$ac_exeext'
6629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6630   (eval $ac_try) 2>&5
6631   ac_status=$?
6632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6633   (exit $ac_status); }; }; then
6634   ac_cv_search_com_err="-l$ac_lib"
6635 break
6636 else
6637   echo "$as_me: failed program was:" >&5
6638 sed 's/^/| /' conftest.$ac_ext >&5
6639
6640 fi
6641 rm -f conftest.err conftest.$ac_objext \
6642       conftest$ac_exeext conftest.$ac_ext
6643   done
6644 fi
6645 LIBS=$ac_func_search_save_LIBS
6646 fi
6647 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6648 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6649 if test "$ac_cv_search_com_err" != no; then
6650   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6651
6652 else
6653   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6654 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6655    { (exit 1); exit 1; }; }
6656 fi
6657
6658      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6659 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6660 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6661   echo $ECHO_N "(cached) $ECHO_C" >&6
6662 else
6663   ac_func_search_save_LIBS=$LIBS
6664 ac_cv_search_krb5_sendauth=no
6665 cat >conftest.$ac_ext <<_ACEOF
6666 /* confdefs.h.  */
6667 _ACEOF
6668 cat confdefs.h >>conftest.$ac_ext
6669 cat >>conftest.$ac_ext <<_ACEOF
6670 /* end confdefs.h.  */
6671
6672 /* Override any gcc2 internal prototype to avoid an error.  */
6673 #ifdef __cplusplus
6674 extern "C"
6675 #endif
6676 /* We use char because int might match the return type of a gcc2
6677    builtin and then its argument prototype would still apply.  */
6678 char krb5_sendauth ();
6679 int
6680 main ()
6681 {
6682 krb5_sendauth ();
6683   ;
6684   return 0;
6685 }
6686 _ACEOF
6687 rm -f conftest.$ac_objext conftest$ac_exeext
6688 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6689   (eval $ac_link) 2>conftest.er1
6690   ac_status=$?
6691   grep -v '^ *+' conftest.er1 >conftest.err
6692   rm -f conftest.er1
6693   cat conftest.err >&5
6694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6695   (exit $ac_status); } &&
6696          { ac_try='test -z "$ac_c_werror_flag"
6697                          || test ! -s conftest.err'
6698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6699   (eval $ac_try) 2>&5
6700   ac_status=$?
6701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6702   (exit $ac_status); }; } &&
6703          { ac_try='test -s conftest$ac_exeext'
6704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6705   (eval $ac_try) 2>&5
6706   ac_status=$?
6707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6708   (exit $ac_status); }; }; then
6709   ac_cv_search_krb5_sendauth="none required"
6710 else
6711   echo "$as_me: failed program was:" >&5
6712 sed 's/^/| /' conftest.$ac_ext >&5
6713
6714 fi
6715 rm -f conftest.err conftest.$ac_objext \
6716       conftest$ac_exeext conftest.$ac_ext
6717 if test "$ac_cv_search_krb5_sendauth" = no; then
6718   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
6719     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6720     cat >conftest.$ac_ext <<_ACEOF
6721 /* confdefs.h.  */
6722 _ACEOF
6723 cat confdefs.h >>conftest.$ac_ext
6724 cat >>conftest.$ac_ext <<_ACEOF
6725 /* end confdefs.h.  */
6726
6727 /* Override any gcc2 internal prototype to avoid an error.  */
6728 #ifdef __cplusplus
6729 extern "C"
6730 #endif
6731 /* We use char because int might match the return type of a gcc2
6732    builtin and then its argument prototype would still apply.  */
6733 char krb5_sendauth ();
6734 int
6735 main ()
6736 {
6737 krb5_sendauth ();
6738   ;
6739   return 0;
6740 }
6741 _ACEOF
6742 rm -f conftest.$ac_objext conftest$ac_exeext
6743 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6744   (eval $ac_link) 2>conftest.er1
6745   ac_status=$?
6746   grep -v '^ *+' conftest.er1 >conftest.err
6747   rm -f conftest.er1
6748   cat conftest.err >&5
6749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6750   (exit $ac_status); } &&
6751          { ac_try='test -z "$ac_c_werror_flag"
6752                          || test ! -s conftest.err'
6753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6754   (eval $ac_try) 2>&5
6755   ac_status=$?
6756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6757   (exit $ac_status); }; } &&
6758          { ac_try='test -s conftest$ac_exeext'
6759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6760   (eval $ac_try) 2>&5
6761   ac_status=$?
6762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6763   (exit $ac_status); }; }; then
6764   ac_cv_search_krb5_sendauth="-l$ac_lib"
6765 break
6766 else
6767   echo "$as_me: failed program was:" >&5
6768 sed 's/^/| /' conftest.$ac_ext >&5
6769
6770 fi
6771 rm -f conftest.err conftest.$ac_objext \
6772       conftest$ac_exeext conftest.$ac_ext
6773   done
6774 fi
6775 LIBS=$ac_func_search_save_LIBS
6776 fi
6777 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
6778 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
6779 if test "$ac_cv_search_krb5_sendauth" != no; then
6780   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
6781
6782 else
6783   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
6784 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
6785    { (exit 1); exit 1; }; }
6786 fi
6787
6788   else
6789      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6790 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6791 if test "${ac_cv_search_com_err+set}" = set; then
6792   echo $ECHO_N "(cached) $ECHO_C" >&6
6793 else
6794   ac_func_search_save_LIBS=$LIBS
6795 ac_cv_search_com_err=no
6796 cat >conftest.$ac_ext <<_ACEOF
6797 /* confdefs.h.  */
6798 _ACEOF
6799 cat confdefs.h >>conftest.$ac_ext
6800 cat >>conftest.$ac_ext <<_ACEOF
6801 /* end confdefs.h.  */
6802
6803 /* Override any gcc2 internal prototype to avoid an error.  */
6804 #ifdef __cplusplus
6805 extern "C"
6806 #endif
6807 /* We use char because int might match the return type of a gcc2
6808    builtin and then its argument prototype would still apply.  */
6809 char com_err ();
6810 int
6811 main ()
6812 {
6813 com_err ();
6814   ;
6815   return 0;
6816 }
6817 _ACEOF
6818 rm -f conftest.$ac_objext conftest$ac_exeext
6819 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6820   (eval $ac_link) 2>conftest.er1
6821   ac_status=$?
6822   grep -v '^ *+' conftest.er1 >conftest.err
6823   rm -f conftest.er1
6824   cat conftest.err >&5
6825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6826   (exit $ac_status); } &&
6827          { ac_try='test -z "$ac_c_werror_flag"
6828                          || test ! -s conftest.err'
6829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6830   (eval $ac_try) 2>&5
6831   ac_status=$?
6832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6833   (exit $ac_status); }; } &&
6834          { ac_try='test -s conftest$ac_exeext'
6835   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6836   (eval $ac_try) 2>&5
6837   ac_status=$?
6838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6839   (exit $ac_status); }; }; then
6840   ac_cv_search_com_err="none required"
6841 else
6842   echo "$as_me: failed program was:" >&5
6843 sed 's/^/| /' conftest.$ac_ext >&5
6844
6845 fi
6846 rm -f conftest.err conftest.$ac_objext \
6847       conftest$ac_exeext conftest.$ac_ext
6848 if test "$ac_cv_search_com_err" = no; then
6849   for ac_lib in 'comerr32 -lkrb5_32'; do
6850     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6851     cat >conftest.$ac_ext <<_ACEOF
6852 /* confdefs.h.  */
6853 _ACEOF
6854 cat confdefs.h >>conftest.$ac_ext
6855 cat >>conftest.$ac_ext <<_ACEOF
6856 /* end confdefs.h.  */
6857
6858 /* Override any gcc2 internal prototype to avoid an error.  */
6859 #ifdef __cplusplus
6860 extern "C"
6861 #endif
6862 /* We use char because int might match the return type of a gcc2
6863    builtin and then its argument prototype would still apply.  */
6864 char com_err ();
6865 int
6866 main ()
6867 {
6868 com_err ();
6869   ;
6870   return 0;
6871 }
6872 _ACEOF
6873 rm -f conftest.$ac_objext conftest$ac_exeext
6874 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6875   (eval $ac_link) 2>conftest.er1
6876   ac_status=$?
6877   grep -v '^ *+' conftest.er1 >conftest.err
6878   rm -f conftest.er1
6879   cat conftest.err >&5
6880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6881   (exit $ac_status); } &&
6882          { ac_try='test -z "$ac_c_werror_flag"
6883                          || test ! -s conftest.err'
6884   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6885   (eval $ac_try) 2>&5
6886   ac_status=$?
6887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6888   (exit $ac_status); }; } &&
6889          { ac_try='test -s conftest$ac_exeext'
6890   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6891   (eval $ac_try) 2>&5
6892   ac_status=$?
6893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6894   (exit $ac_status); }; }; then
6895   ac_cv_search_com_err="-l$ac_lib"
6896 break
6897 else
6898   echo "$as_me: failed program was:" >&5
6899 sed 's/^/| /' conftest.$ac_ext >&5
6900
6901 fi
6902 rm -f conftest.err conftest.$ac_objext \
6903       conftest$ac_exeext conftest.$ac_ext
6904   done
6905 fi
6906 LIBS=$ac_func_search_save_LIBS
6907 fi
6908 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6909 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6910 if test "$ac_cv_search_com_err" != no; then
6911   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6912
6913 else
6914   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6915 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6916    { (exit 1); exit 1; }; }
6917 fi
6918
6919   fi
6920 fi
6921
6922 if test "$with_openssl" = yes ; then
6923     if test "$PORTNAME" != "win32"; then
6924
6925 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
6926 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
6927 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
6928   echo $ECHO_N "(cached) $ECHO_C" >&6
6929 else
6930   ac_check_lib_save_LIBS=$LIBS
6931 LIBS="-lcrypto  $LIBS"
6932 cat >conftest.$ac_ext <<_ACEOF
6933 /* confdefs.h.  */
6934 _ACEOF
6935 cat confdefs.h >>conftest.$ac_ext
6936 cat >>conftest.$ac_ext <<_ACEOF
6937 /* end confdefs.h.  */
6938
6939 /* Override any gcc2 internal prototype to avoid an error.  */
6940 #ifdef __cplusplus
6941 extern "C"
6942 #endif
6943 /* We use char because int might match the return type of a gcc2
6944    builtin and then its argument prototype would still apply.  */
6945 char CRYPTO_new_ex_data ();
6946 int
6947 main ()
6948 {
6949 CRYPTO_new_ex_data ();
6950   ;
6951   return 0;
6952 }
6953 _ACEOF
6954 rm -f conftest.$ac_objext conftest$ac_exeext
6955 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6956   (eval $ac_link) 2>conftest.er1
6957   ac_status=$?
6958   grep -v '^ *+' conftest.er1 >conftest.err
6959   rm -f conftest.er1
6960   cat conftest.err >&5
6961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6962   (exit $ac_status); } &&
6963          { ac_try='test -z "$ac_c_werror_flag"
6964                          || test ! -s conftest.err'
6965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6966   (eval $ac_try) 2>&5
6967   ac_status=$?
6968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6969   (exit $ac_status); }; } &&
6970          { ac_try='test -s conftest$ac_exeext'
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); }; }; then
6976   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
6977 else
6978   echo "$as_me: failed program was:" >&5
6979 sed 's/^/| /' conftest.$ac_ext >&5
6980
6981 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
6982 fi
6983 rm -f conftest.err conftest.$ac_objext \
6984       conftest$ac_exeext conftest.$ac_ext
6985 LIBS=$ac_check_lib_save_LIBS
6986 fi
6987 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
6988 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
6989 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
6990   cat >>confdefs.h <<_ACEOF
6991 #define HAVE_LIBCRYPTO 1
6992 _ACEOF
6993
6994   LIBS="-lcrypto $LIBS"
6995
6996 else
6997   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
6998 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
6999    { (exit 1); exit 1; }; }
7000 fi
7001
7002
7003 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7004 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
7005 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7006   echo $ECHO_N "(cached) $ECHO_C" >&6
7007 else
7008   ac_check_lib_save_LIBS=$LIBS
7009 LIBS="-lssl  $LIBS"
7010 cat >conftest.$ac_ext <<_ACEOF
7011 /* confdefs.h.  */
7012 _ACEOF
7013 cat confdefs.h >>conftest.$ac_ext
7014 cat >>conftest.$ac_ext <<_ACEOF
7015 /* end confdefs.h.  */
7016
7017 /* Override any gcc2 internal prototype to avoid an error.  */
7018 #ifdef __cplusplus
7019 extern "C"
7020 #endif
7021 /* We use char because int might match the return type of a gcc2
7022    builtin and then its argument prototype would still apply.  */
7023 char SSL_library_init ();
7024 int
7025 main ()
7026 {
7027 SSL_library_init ();
7028   ;
7029   return 0;
7030 }
7031 _ACEOF
7032 rm -f conftest.$ac_objext conftest$ac_exeext
7033 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7034   (eval $ac_link) 2>conftest.er1
7035   ac_status=$?
7036   grep -v '^ *+' conftest.er1 >conftest.err
7037   rm -f conftest.er1
7038   cat conftest.err >&5
7039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7040   (exit $ac_status); } &&
7041          { ac_try='test -z "$ac_c_werror_flag"
7042                          || test ! -s conftest.err'
7043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7044   (eval $ac_try) 2>&5
7045   ac_status=$?
7046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7047   (exit $ac_status); }; } &&
7048          { ac_try='test -s conftest$ac_exeext'
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); }; }; then
7054   ac_cv_lib_ssl_SSL_library_init=yes
7055 else
7056   echo "$as_me: failed program was:" >&5
7057 sed 's/^/| /' conftest.$ac_ext >&5
7058
7059 ac_cv_lib_ssl_SSL_library_init=no
7060 fi
7061 rm -f conftest.err conftest.$ac_objext \
7062       conftest$ac_exeext conftest.$ac_ext
7063 LIBS=$ac_check_lib_save_LIBS
7064 fi
7065 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7066 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7067 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7068   cat >>confdefs.h <<_ACEOF
7069 #define HAVE_LIBSSL 1
7070 _ACEOF
7071
7072   LIBS="-lssl $LIBS"
7073
7074 else
7075   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7076 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7077    { (exit 1); exit 1; }; }
7078 fi
7079
7080   else
7081
7082 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7083 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7084 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7085   echo $ECHO_N "(cached) $ECHO_C" >&6
7086 else
7087   ac_check_lib_save_LIBS=$LIBS
7088 LIBS="-leay32  $LIBS"
7089 cat >conftest.$ac_ext <<_ACEOF
7090 /* confdefs.h.  */
7091 _ACEOF
7092 cat confdefs.h >>conftest.$ac_ext
7093 cat >>conftest.$ac_ext <<_ACEOF
7094 /* end confdefs.h.  */
7095
7096 /* Override any gcc2 internal prototype to avoid an error.  */
7097 #ifdef __cplusplus
7098 extern "C"
7099 #endif
7100 /* We use char because int might match the return type of a gcc2
7101    builtin and then its argument prototype would still apply.  */
7102 char CRYPTO_new_ex_data ();
7103 int
7104 main ()
7105 {
7106 CRYPTO_new_ex_data ();
7107   ;
7108   return 0;
7109 }
7110 _ACEOF
7111 rm -f conftest.$ac_objext conftest$ac_exeext
7112 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7113   (eval $ac_link) 2>conftest.er1
7114   ac_status=$?
7115   grep -v '^ *+' conftest.er1 >conftest.err
7116   rm -f conftest.er1
7117   cat conftest.err >&5
7118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7119   (exit $ac_status); } &&
7120          { ac_try='test -z "$ac_c_werror_flag"
7121                          || test ! -s conftest.err'
7122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7123   (eval $ac_try) 2>&5
7124   ac_status=$?
7125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7126   (exit $ac_status); }; } &&
7127          { ac_try='test -s conftest$ac_exeext'
7128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7129   (eval $ac_try) 2>&5
7130   ac_status=$?
7131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7132   (exit $ac_status); }; }; then
7133   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7134 else
7135   echo "$as_me: failed program was:" >&5
7136 sed 's/^/| /' conftest.$ac_ext >&5
7137
7138 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7139 fi
7140 rm -f conftest.err conftest.$ac_objext \
7141       conftest$ac_exeext conftest.$ac_ext
7142 LIBS=$ac_check_lib_save_LIBS
7143 fi
7144 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7145 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7146 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7147   cat >>confdefs.h <<_ACEOF
7148 #define HAVE_LIBEAY32 1
7149 _ACEOF
7150
7151   LIBS="-leay32 $LIBS"
7152
7153 else
7154   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7155 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7156    { (exit 1); exit 1; }; }
7157 fi
7158
7159
7160 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7161 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7162 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7163   echo $ECHO_N "(cached) $ECHO_C" >&6
7164 else
7165   ac_check_lib_save_LIBS=$LIBS
7166 LIBS="-lssleay32  $LIBS"
7167 cat >conftest.$ac_ext <<_ACEOF
7168 /* confdefs.h.  */
7169 _ACEOF
7170 cat confdefs.h >>conftest.$ac_ext
7171 cat >>conftest.$ac_ext <<_ACEOF
7172 /* end confdefs.h.  */
7173
7174 /* Override any gcc2 internal prototype to avoid an error.  */
7175 #ifdef __cplusplus
7176 extern "C"
7177 #endif
7178 /* We use char because int might match the return type of a gcc2
7179    builtin and then its argument prototype would still apply.  */
7180 char SSL_library_init ();
7181 int
7182 main ()
7183 {
7184 SSL_library_init ();
7185   ;
7186   return 0;
7187 }
7188 _ACEOF
7189 rm -f conftest.$ac_objext conftest$ac_exeext
7190 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7191   (eval $ac_link) 2>conftest.er1
7192   ac_status=$?
7193   grep -v '^ *+' conftest.er1 >conftest.err
7194   rm -f conftest.er1
7195   cat conftest.err >&5
7196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7197   (exit $ac_status); } &&
7198          { ac_try='test -z "$ac_c_werror_flag"
7199                          || test ! -s conftest.err'
7200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7201   (eval $ac_try) 2>&5
7202   ac_status=$?
7203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7204   (exit $ac_status); }; } &&
7205          { ac_try='test -s conftest$ac_exeext'
7206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7207   (eval $ac_try) 2>&5
7208   ac_status=$?
7209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7210   (exit $ac_status); }; }; then
7211   ac_cv_lib_ssleay32_SSL_library_init=yes
7212 else
7213   echo "$as_me: failed program was:" >&5
7214 sed 's/^/| /' conftest.$ac_ext >&5
7215
7216 ac_cv_lib_ssleay32_SSL_library_init=no
7217 fi
7218 rm -f conftest.err conftest.$ac_objext \
7219       conftest$ac_exeext conftest.$ac_ext
7220 LIBS=$ac_check_lib_save_LIBS
7221 fi
7222 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7223 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7224 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7225   cat >>confdefs.h <<_ACEOF
7226 #define HAVE_LIBSSLEAY32 1
7227 _ACEOF
7228
7229   LIBS="-lssleay32 $LIBS"
7230
7231 else
7232   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7233 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7234    { (exit 1); exit 1; }; }
7235 fi
7236
7237   fi
7238 fi
7239
7240 if test "$with_pam" = yes ; then
7241
7242 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7243 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7244 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7245   echo $ECHO_N "(cached) $ECHO_C" >&6
7246 else
7247   ac_check_lib_save_LIBS=$LIBS
7248 LIBS="-lpam  $LIBS"
7249 cat >conftest.$ac_ext <<_ACEOF
7250 /* confdefs.h.  */
7251 _ACEOF
7252 cat confdefs.h >>conftest.$ac_ext
7253 cat >>conftest.$ac_ext <<_ACEOF
7254 /* end confdefs.h.  */
7255
7256 /* Override any gcc2 internal prototype to avoid an error.  */
7257 #ifdef __cplusplus
7258 extern "C"
7259 #endif
7260 /* We use char because int might match the return type of a gcc2
7261    builtin and then its argument prototype would still apply.  */
7262 char pam_start ();
7263 int
7264 main ()
7265 {
7266 pam_start ();
7267   ;
7268   return 0;
7269 }
7270 _ACEOF
7271 rm -f conftest.$ac_objext conftest$ac_exeext
7272 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7273   (eval $ac_link) 2>conftest.er1
7274   ac_status=$?
7275   grep -v '^ *+' conftest.er1 >conftest.err
7276   rm -f conftest.er1
7277   cat conftest.err >&5
7278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7279   (exit $ac_status); } &&
7280          { ac_try='test -z "$ac_c_werror_flag"
7281                          || test ! -s conftest.err'
7282   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7283   (eval $ac_try) 2>&5
7284   ac_status=$?
7285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7286   (exit $ac_status); }; } &&
7287          { ac_try='test -s conftest$ac_exeext'
7288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7289   (eval $ac_try) 2>&5
7290   ac_status=$?
7291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7292   (exit $ac_status); }; }; then
7293   ac_cv_lib_pam_pam_start=yes
7294 else
7295   echo "$as_me: failed program was:" >&5
7296 sed 's/^/| /' conftest.$ac_ext >&5
7297
7298 ac_cv_lib_pam_pam_start=no
7299 fi
7300 rm -f conftest.err conftest.$ac_objext \
7301       conftest$ac_exeext conftest.$ac_ext
7302 LIBS=$ac_check_lib_save_LIBS
7303 fi
7304 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7305 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7306 if test $ac_cv_lib_pam_pam_start = yes; then
7307   cat >>confdefs.h <<_ACEOF
7308 #define HAVE_LIBPAM 1
7309 _ACEOF
7310
7311   LIBS="-lpam $LIBS"
7312
7313 else
7314   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7315 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7316    { (exit 1); exit 1; }; }
7317 fi
7318
7319 fi
7320
7321
7322 ##
7323 ## Header files
7324 ##
7325
7326 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7327 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7328 if test "${ac_cv_header_stdc+set}" = set; then
7329   echo $ECHO_N "(cached) $ECHO_C" >&6
7330 else
7331   cat >conftest.$ac_ext <<_ACEOF
7332 /* confdefs.h.  */
7333 _ACEOF
7334 cat confdefs.h >>conftest.$ac_ext
7335 cat >>conftest.$ac_ext <<_ACEOF
7336 /* end confdefs.h.  */
7337 #include <stdlib.h>
7338 #include <stdarg.h>
7339 #include <string.h>
7340 #include <float.h>
7341
7342 int
7343 main ()
7344 {
7345
7346   ;
7347   return 0;
7348 }
7349 _ACEOF
7350 rm -f conftest.$ac_objext
7351 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7352   (eval $ac_compile) 2>conftest.er1
7353   ac_status=$?
7354   grep -v '^ *+' conftest.er1 >conftest.err
7355   rm -f conftest.er1
7356   cat conftest.err >&5
7357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7358   (exit $ac_status); } &&
7359          { ac_try='test -z "$ac_c_werror_flag"
7360                          || test ! -s conftest.err'
7361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7362   (eval $ac_try) 2>&5
7363   ac_status=$?
7364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7365   (exit $ac_status); }; } &&
7366          { ac_try='test -s conftest.$ac_objext'
7367   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7368   (eval $ac_try) 2>&5
7369   ac_status=$?
7370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7371   (exit $ac_status); }; }; then
7372   ac_cv_header_stdc=yes
7373 else
7374   echo "$as_me: failed program was:" >&5
7375 sed 's/^/| /' conftest.$ac_ext >&5
7376
7377 ac_cv_header_stdc=no
7378 fi
7379 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7380
7381 if test $ac_cv_header_stdc = yes; then
7382   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7383   cat >conftest.$ac_ext <<_ACEOF
7384 /* confdefs.h.  */
7385 _ACEOF
7386 cat confdefs.h >>conftest.$ac_ext
7387 cat >>conftest.$ac_ext <<_ACEOF
7388 /* end confdefs.h.  */
7389 #include <string.h>
7390
7391 _ACEOF
7392 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7393   $EGREP "memchr" >/dev/null 2>&1; then
7394   :
7395 else
7396   ac_cv_header_stdc=no
7397 fi
7398 rm -f conftest*
7399
7400 fi
7401
7402 if test $ac_cv_header_stdc = yes; then
7403   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7404   cat >conftest.$ac_ext <<_ACEOF
7405 /* confdefs.h.  */
7406 _ACEOF
7407 cat confdefs.h >>conftest.$ac_ext
7408 cat >>conftest.$ac_ext <<_ACEOF
7409 /* end confdefs.h.  */
7410 #include <stdlib.h>
7411
7412 _ACEOF
7413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7414   $EGREP "free" >/dev/null 2>&1; then
7415   :
7416 else
7417   ac_cv_header_stdc=no
7418 fi
7419 rm -f conftest*
7420
7421 fi
7422
7423 if test $ac_cv_header_stdc = yes; then
7424   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7425   if test "$cross_compiling" = yes; then
7426   :
7427 else
7428   cat >conftest.$ac_ext <<_ACEOF
7429 /* confdefs.h.  */
7430 _ACEOF
7431 cat confdefs.h >>conftest.$ac_ext
7432 cat >>conftest.$ac_ext <<_ACEOF
7433 /* end confdefs.h.  */
7434 #include <ctype.h>
7435 #if ((' ' & 0x0FF) == 0x020)
7436 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7437 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7438 #else
7439 # define ISLOWER(c) \
7440                    (('a' <= (c) && (c) <= 'i') \
7441                      || ('j' <= (c) && (c) <= 'r') \
7442                      || ('s' <= (c) && (c) <= 'z'))
7443 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7444 #endif
7445
7446 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7447 int
7448 main ()
7449 {
7450   int i;
7451   for (i = 0; i < 256; i++)
7452     if (XOR (islower (i), ISLOWER (i))
7453         || toupper (i) != TOUPPER (i))
7454       exit(2);
7455   exit (0);
7456 }
7457 _ACEOF
7458 rm -f conftest$ac_exeext
7459 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7460   (eval $ac_link) 2>&5
7461   ac_status=$?
7462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7463   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7464   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7465   (eval $ac_try) 2>&5
7466   ac_status=$?
7467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7468   (exit $ac_status); }; }; then
7469   :
7470 else
7471   echo "$as_me: program exited with status $ac_status" >&5
7472 echo "$as_me: failed program was:" >&5
7473 sed 's/^/| /' conftest.$ac_ext >&5
7474
7475 ( exit $ac_status )
7476 ac_cv_header_stdc=no
7477 fi
7478 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7479 fi
7480 fi
7481 fi
7482 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7483 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7484 if test $ac_cv_header_stdc = yes; then
7485
7486 cat >>confdefs.h <<\_ACEOF
7487 #define STDC_HEADERS 1
7488 _ACEOF
7489
7490 fi
7491
7492 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7503                   inttypes.h stdint.h unistd.h
7504 do
7505 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7506 echo "$as_me:$LINENO: checking for $ac_header" >&5
7507 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7508 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7509   echo $ECHO_N "(cached) $ECHO_C" >&6
7510 else
7511   cat >conftest.$ac_ext <<_ACEOF
7512 /* confdefs.h.  */
7513 _ACEOF
7514 cat confdefs.h >>conftest.$ac_ext
7515 cat >>conftest.$ac_ext <<_ACEOF
7516 /* end confdefs.h.  */
7517 $ac_includes_default
7518
7519 #include <$ac_header>
7520 _ACEOF
7521 rm -f conftest.$ac_objext
7522 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7523   (eval $ac_compile) 2>conftest.er1
7524   ac_status=$?
7525   grep -v '^ *+' conftest.er1 >conftest.err
7526   rm -f conftest.er1
7527   cat conftest.err >&5
7528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7529   (exit $ac_status); } &&
7530          { ac_try='test -z "$ac_c_werror_flag"
7531                          || test ! -s conftest.err'
7532   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7533   (eval $ac_try) 2>&5
7534   ac_status=$?
7535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7536   (exit $ac_status); }; } &&
7537          { ac_try='test -s conftest.$ac_objext'
7538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7539   (eval $ac_try) 2>&5
7540   ac_status=$?
7541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7542   (exit $ac_status); }; }; then
7543   eval "$as_ac_Header=yes"
7544 else
7545   echo "$as_me: failed program was:" >&5
7546 sed 's/^/| /' conftest.$ac_ext >&5
7547
7548 eval "$as_ac_Header=no"
7549 fi
7550 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7551 fi
7552 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7553 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7554 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7555   cat >>confdefs.h <<_ACEOF
7556 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7557 _ACEOF
7558
7559 fi
7560
7561 done
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589 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
7590 do
7591 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7592 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7593   echo "$as_me:$LINENO: checking for $ac_header" >&5
7594 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7595 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7596   echo $ECHO_N "(cached) $ECHO_C" >&6
7597 fi
7598 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7599 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7600 else
7601   # Is the header compilable?
7602 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7603 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7604 cat >conftest.$ac_ext <<_ACEOF
7605 /* confdefs.h.  */
7606 _ACEOF
7607 cat confdefs.h >>conftest.$ac_ext
7608 cat >>conftest.$ac_ext <<_ACEOF
7609 /* end confdefs.h.  */
7610 $ac_includes_default
7611 #include <$ac_header>
7612 _ACEOF
7613 rm -f conftest.$ac_objext
7614 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7615   (eval $ac_compile) 2>conftest.er1
7616   ac_status=$?
7617   grep -v '^ *+' conftest.er1 >conftest.err
7618   rm -f conftest.er1
7619   cat conftest.err >&5
7620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7621   (exit $ac_status); } &&
7622          { ac_try='test -z "$ac_c_werror_flag"
7623                          || test ! -s conftest.err'
7624   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7625   (eval $ac_try) 2>&5
7626   ac_status=$?
7627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7628   (exit $ac_status); }; } &&
7629          { ac_try='test -s conftest.$ac_objext'
7630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7631   (eval $ac_try) 2>&5
7632   ac_status=$?
7633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7634   (exit $ac_status); }; }; then
7635   ac_header_compiler=yes
7636 else
7637   echo "$as_me: failed program was:" >&5
7638 sed 's/^/| /' conftest.$ac_ext >&5
7639
7640 ac_header_compiler=no
7641 fi
7642 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7643 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7644 echo "${ECHO_T}$ac_header_compiler" >&6
7645
7646 # Is the header present?
7647 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7648 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7649 cat >conftest.$ac_ext <<_ACEOF
7650 /* confdefs.h.  */
7651 _ACEOF
7652 cat confdefs.h >>conftest.$ac_ext
7653 cat >>conftest.$ac_ext <<_ACEOF
7654 /* end confdefs.h.  */
7655 #include <$ac_header>
7656 _ACEOF
7657 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7658   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7659   ac_status=$?
7660   grep -v '^ *+' conftest.er1 >conftest.err
7661   rm -f conftest.er1
7662   cat conftest.err >&5
7663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7664   (exit $ac_status); } >/dev/null; then
7665   if test -s conftest.err; then
7666     ac_cpp_err=$ac_c_preproc_warn_flag
7667     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7668   else
7669     ac_cpp_err=
7670   fi
7671 else
7672   ac_cpp_err=yes
7673 fi
7674 if test -z "$ac_cpp_err"; then
7675   ac_header_preproc=yes
7676 else
7677   echo "$as_me: failed program was:" >&5
7678 sed 's/^/| /' conftest.$ac_ext >&5
7679
7680   ac_header_preproc=no
7681 fi
7682 rm -f conftest.err conftest.$ac_ext
7683 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7684 echo "${ECHO_T}$ac_header_preproc" >&6
7685
7686 # So?  What about this header?
7687 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7688   yes:no: )
7689     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7690 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7691     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7692 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7693     ac_header_preproc=yes
7694     ;;
7695   no:yes:* )
7696     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7697 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7698     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7699 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7700     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7701 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7702     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7703 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7704     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7705 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7706     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7707 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7708     (
7709       cat <<\_ASBOX
7710 ## ---------------------------------------- ##
7711 ## Report this to pgsql-bugs@postgresql.org ##
7712 ## ---------------------------------------- ##
7713 _ASBOX
7714     ) |
7715       sed "s/^/$as_me: WARNING:     /" >&2
7716     ;;
7717 esac
7718 echo "$as_me:$LINENO: checking for $ac_header" >&5
7719 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7720 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7721   echo $ECHO_N "(cached) $ECHO_C" >&6
7722 else
7723   eval "$as_ac_Header=\$ac_header_preproc"
7724 fi
7725 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7726 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7727
7728 fi
7729 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7730   cat >>confdefs.h <<_ACEOF
7731 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7732 _ACEOF
7733
7734 fi
7735
7736 done
7737
7738
7739 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
7740 # netinet/in.h is included first.
7741
7742 for ac_header in netinet/in.h
7743 do
7744 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7745 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7746   echo "$as_me:$LINENO: checking for $ac_header" >&5
7747 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7748 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7749   echo $ECHO_N "(cached) $ECHO_C" >&6
7750 fi
7751 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7752 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7753 else
7754   # Is the header compilable?
7755 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7756 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7757 cat >conftest.$ac_ext <<_ACEOF
7758 /* confdefs.h.  */
7759 _ACEOF
7760 cat confdefs.h >>conftest.$ac_ext
7761 cat >>conftest.$ac_ext <<_ACEOF
7762 /* end confdefs.h.  */
7763 $ac_includes_default
7764 #include <$ac_header>
7765 _ACEOF
7766 rm -f conftest.$ac_objext
7767 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7768   (eval $ac_compile) 2>conftest.er1
7769   ac_status=$?
7770   grep -v '^ *+' conftest.er1 >conftest.err
7771   rm -f conftest.er1
7772   cat conftest.err >&5
7773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7774   (exit $ac_status); } &&
7775          { ac_try='test -z "$ac_c_werror_flag"
7776                          || test ! -s conftest.err'
7777   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7778   (eval $ac_try) 2>&5
7779   ac_status=$?
7780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7781   (exit $ac_status); }; } &&
7782          { ac_try='test -s conftest.$ac_objext'
7783   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7784   (eval $ac_try) 2>&5
7785   ac_status=$?
7786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7787   (exit $ac_status); }; }; then
7788   ac_header_compiler=yes
7789 else
7790   echo "$as_me: failed program was:" >&5
7791 sed 's/^/| /' conftest.$ac_ext >&5
7792
7793 ac_header_compiler=no
7794 fi
7795 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7796 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7797 echo "${ECHO_T}$ac_header_compiler" >&6
7798
7799 # Is the header present?
7800 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7801 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7802 cat >conftest.$ac_ext <<_ACEOF
7803 /* confdefs.h.  */
7804 _ACEOF
7805 cat confdefs.h >>conftest.$ac_ext
7806 cat >>conftest.$ac_ext <<_ACEOF
7807 /* end confdefs.h.  */
7808 #include <$ac_header>
7809 _ACEOF
7810 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7811   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7812   ac_status=$?
7813   grep -v '^ *+' conftest.er1 >conftest.err
7814   rm -f conftest.er1
7815   cat conftest.err >&5
7816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7817   (exit $ac_status); } >/dev/null; then
7818   if test -s conftest.err; then
7819     ac_cpp_err=$ac_c_preproc_warn_flag
7820     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7821   else
7822     ac_cpp_err=
7823   fi
7824 else
7825   ac_cpp_err=yes
7826 fi
7827 if test -z "$ac_cpp_err"; then
7828   ac_header_preproc=yes
7829 else
7830   echo "$as_me: failed program was:" >&5
7831 sed 's/^/| /' conftest.$ac_ext >&5
7832
7833   ac_header_preproc=no
7834 fi
7835 rm -f conftest.err conftest.$ac_ext
7836 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7837 echo "${ECHO_T}$ac_header_preproc" >&6
7838
7839 # So?  What about this header?
7840 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7841   yes:no: )
7842     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7843 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7844     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7845 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7846     ac_header_preproc=yes
7847     ;;
7848   no:yes:* )
7849     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7850 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7851     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7852 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7853     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7854 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7855     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7856 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7857     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7858 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7859     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7860 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7861     (
7862       cat <<\_ASBOX
7863 ## ---------------------------------------- ##
7864 ## Report this to pgsql-bugs@postgresql.org ##
7865 ## ---------------------------------------- ##
7866 _ASBOX
7867     ) |
7868       sed "s/^/$as_me: WARNING:     /" >&2
7869     ;;
7870 esac
7871 echo "$as_me:$LINENO: checking for $ac_header" >&5
7872 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7873 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7874   echo $ECHO_N "(cached) $ECHO_C" >&6
7875 else
7876   eval "$as_ac_Header=\$ac_header_preproc"
7877 fi
7878 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7879 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7880
7881 fi
7882 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7883   cat >>confdefs.h <<_ACEOF
7884 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7885 _ACEOF
7886
7887 fi
7888
7889 done
7890
7891
7892 for ac_header in netinet/tcp.h
7893 do
7894 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7895 echo "$as_me:$LINENO: checking for $ac_header" >&5
7896 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7897 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7898   echo $ECHO_N "(cached) $ECHO_C" >&6
7899 else
7900   cat >conftest.$ac_ext <<_ACEOF
7901 /* confdefs.h.  */
7902 _ACEOF
7903 cat confdefs.h >>conftest.$ac_ext
7904 cat >>conftest.$ac_ext <<_ACEOF
7905 /* end confdefs.h.  */
7906 $ac_includes_default
7907 #ifdef HAVE_NETINET_IN_H
7908 #include <netinet/in.h>
7909 #endif
7910
7911
7912 #include <$ac_header>
7913 _ACEOF
7914 rm -f conftest.$ac_objext
7915 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7916   (eval $ac_compile) 2>conftest.er1
7917   ac_status=$?
7918   grep -v '^ *+' conftest.er1 >conftest.err
7919   rm -f conftest.er1
7920   cat conftest.err >&5
7921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7922   (exit $ac_status); } &&
7923          { ac_try='test -z "$ac_c_werror_flag"
7924                          || test ! -s conftest.err'
7925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7926   (eval $ac_try) 2>&5
7927   ac_status=$?
7928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7929   (exit $ac_status); }; } &&
7930          { ac_try='test -s conftest.$ac_objext'
7931   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7932   (eval $ac_try) 2>&5
7933   ac_status=$?
7934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7935   (exit $ac_status); }; }; then
7936   eval "$as_ac_Header=yes"
7937 else
7938   echo "$as_me: failed program was:" >&5
7939 sed 's/^/| /' conftest.$ac_ext >&5
7940
7941 eval "$as_ac_Header=no"
7942 fi
7943 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7944 fi
7945 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7946 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7947 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7948   cat >>confdefs.h <<_ACEOF
7949 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7950 _ACEOF
7951
7952 fi
7953
7954 done
7955
7956
7957 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
7958
7959 for ac_header in readline/readline.h
7960 do
7961 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7962 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7963   echo "$as_me:$LINENO: checking for $ac_header" >&5
7964 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7965 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7966   echo $ECHO_N "(cached) $ECHO_C" >&6
7967 fi
7968 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7969 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7970 else
7971   # Is the header compilable?
7972 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7973 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7974 cat >conftest.$ac_ext <<_ACEOF
7975 /* confdefs.h.  */
7976 _ACEOF
7977 cat confdefs.h >>conftest.$ac_ext
7978 cat >>conftest.$ac_ext <<_ACEOF
7979 /* end confdefs.h.  */
7980 $ac_includes_default
7981 #include <$ac_header>
7982 _ACEOF
7983 rm -f conftest.$ac_objext
7984 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7985   (eval $ac_compile) 2>conftest.er1
7986   ac_status=$?
7987   grep -v '^ *+' conftest.er1 >conftest.err
7988   rm -f conftest.er1
7989   cat conftest.err >&5
7990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7991   (exit $ac_status); } &&
7992          { ac_try='test -z "$ac_c_werror_flag"
7993                          || test ! -s conftest.err'
7994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7995   (eval $ac_try) 2>&5
7996   ac_status=$?
7997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7998   (exit $ac_status); }; } &&
7999          { ac_try='test -s conftest.$ac_objext'
8000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8001   (eval $ac_try) 2>&5
8002   ac_status=$?
8003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8004   (exit $ac_status); }; }; then
8005   ac_header_compiler=yes
8006 else
8007   echo "$as_me: failed program was:" >&5
8008 sed 's/^/| /' conftest.$ac_ext >&5
8009
8010 ac_header_compiler=no
8011 fi
8012 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8013 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8014 echo "${ECHO_T}$ac_header_compiler" >&6
8015
8016 # Is the header present?
8017 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8018 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8019 cat >conftest.$ac_ext <<_ACEOF
8020 /* confdefs.h.  */
8021 _ACEOF
8022 cat confdefs.h >>conftest.$ac_ext
8023 cat >>conftest.$ac_ext <<_ACEOF
8024 /* end confdefs.h.  */
8025 #include <$ac_header>
8026 _ACEOF
8027 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8028   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8029   ac_status=$?
8030   grep -v '^ *+' conftest.er1 >conftest.err
8031   rm -f conftest.er1
8032   cat conftest.err >&5
8033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8034   (exit $ac_status); } >/dev/null; then
8035   if test -s conftest.err; then
8036     ac_cpp_err=$ac_c_preproc_warn_flag
8037     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8038   else
8039     ac_cpp_err=
8040   fi
8041 else
8042   ac_cpp_err=yes
8043 fi
8044 if test -z "$ac_cpp_err"; then
8045   ac_header_preproc=yes
8046 else
8047   echo "$as_me: failed program was:" >&5
8048 sed 's/^/| /' conftest.$ac_ext >&5
8049
8050   ac_header_preproc=no
8051 fi
8052 rm -f conftest.err conftest.$ac_ext
8053 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8054 echo "${ECHO_T}$ac_header_preproc" >&6
8055
8056 # So?  What about this header?
8057 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8058   yes:no: )
8059     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8060 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8061     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8062 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8063     ac_header_preproc=yes
8064     ;;
8065   no:yes:* )
8066     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8067 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8068     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8069 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8070     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8071 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8072     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8073 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8074     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8075 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8076     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8077 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8078     (
8079       cat <<\_ASBOX
8080 ## ---------------------------------------- ##
8081 ## Report this to pgsql-bugs@postgresql.org ##
8082 ## ---------------------------------------- ##
8083 _ASBOX
8084     ) |
8085       sed "s/^/$as_me: WARNING:     /" >&2
8086     ;;
8087 esac
8088 echo "$as_me:$LINENO: checking for $ac_header" >&5
8089 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8090 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8091   echo $ECHO_N "(cached) $ECHO_C" >&6
8092 else
8093   eval "$as_ac_Header=\$ac_header_preproc"
8094 fi
8095 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8096 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8097
8098 fi
8099 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8100   cat >>confdefs.h <<_ACEOF
8101 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8102 _ACEOF
8103
8104 else
8105
8106 for ac_header in readline.h
8107 do
8108 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8109 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8110   echo "$as_me:$LINENO: checking for $ac_header" >&5
8111 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8112 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8113   echo $ECHO_N "(cached) $ECHO_C" >&6
8114 fi
8115 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8116 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8117 else
8118   # Is the header compilable?
8119 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8120 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8121 cat >conftest.$ac_ext <<_ACEOF
8122 /* confdefs.h.  */
8123 _ACEOF
8124 cat confdefs.h >>conftest.$ac_ext
8125 cat >>conftest.$ac_ext <<_ACEOF
8126 /* end confdefs.h.  */
8127 $ac_includes_default
8128 #include <$ac_header>
8129 _ACEOF
8130 rm -f conftest.$ac_objext
8131 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8132   (eval $ac_compile) 2>conftest.er1
8133   ac_status=$?
8134   grep -v '^ *+' conftest.er1 >conftest.err
8135   rm -f conftest.er1
8136   cat conftest.err >&5
8137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8138   (exit $ac_status); } &&
8139          { ac_try='test -z "$ac_c_werror_flag"
8140                          || test ! -s conftest.err'
8141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8142   (eval $ac_try) 2>&5
8143   ac_status=$?
8144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8145   (exit $ac_status); }; } &&
8146          { ac_try='test -s conftest.$ac_objext'
8147   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8148   (eval $ac_try) 2>&5
8149   ac_status=$?
8150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8151   (exit $ac_status); }; }; then
8152   ac_header_compiler=yes
8153 else
8154   echo "$as_me: failed program was:" >&5
8155 sed 's/^/| /' conftest.$ac_ext >&5
8156
8157 ac_header_compiler=no
8158 fi
8159 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8160 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8161 echo "${ECHO_T}$ac_header_compiler" >&6
8162
8163 # Is the header present?
8164 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8165 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8166 cat >conftest.$ac_ext <<_ACEOF
8167 /* confdefs.h.  */
8168 _ACEOF
8169 cat confdefs.h >>conftest.$ac_ext
8170 cat >>conftest.$ac_ext <<_ACEOF
8171 /* end confdefs.h.  */
8172 #include <$ac_header>
8173 _ACEOF
8174 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8175   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8176   ac_status=$?
8177   grep -v '^ *+' conftest.er1 >conftest.err
8178   rm -f conftest.er1
8179   cat conftest.err >&5
8180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8181   (exit $ac_status); } >/dev/null; then
8182   if test -s conftest.err; then
8183     ac_cpp_err=$ac_c_preproc_warn_flag
8184     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8185   else
8186     ac_cpp_err=
8187   fi
8188 else
8189   ac_cpp_err=yes
8190 fi
8191 if test -z "$ac_cpp_err"; then
8192   ac_header_preproc=yes
8193 else
8194   echo "$as_me: failed program was:" >&5
8195 sed 's/^/| /' conftest.$ac_ext >&5
8196
8197   ac_header_preproc=no
8198 fi
8199 rm -f conftest.err conftest.$ac_ext
8200 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8201 echo "${ECHO_T}$ac_header_preproc" >&6
8202
8203 # So?  What about this header?
8204 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8205   yes:no: )
8206     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8207 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8208     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8209 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8210     ac_header_preproc=yes
8211     ;;
8212   no:yes:* )
8213     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8214 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8215     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8216 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8217     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8218 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8219     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8220 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8221     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8222 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8223     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8224 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8225     (
8226       cat <<\_ASBOX
8227 ## ---------------------------------------- ##
8228 ## Report this to pgsql-bugs@postgresql.org ##
8229 ## ---------------------------------------- ##
8230 _ASBOX
8231     ) |
8232       sed "s/^/$as_me: WARNING:     /" >&2
8233     ;;
8234 esac
8235 echo "$as_me:$LINENO: checking for $ac_header" >&5
8236 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8237 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8238   echo $ECHO_N "(cached) $ECHO_C" >&6
8239 else
8240   eval "$as_ac_Header=\$ac_header_preproc"
8241 fi
8242 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8243 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8244
8245 fi
8246 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8247   cat >>confdefs.h <<_ACEOF
8248 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8249 _ACEOF
8250
8251 else
8252   { { echo "$as_me:$LINENO: error: readline header not found
8253 If you have readline already installed, see config.log for details on the
8254 failure.  It is possible the compiler isn't looking in the proper directory.
8255 Use --without-readline to disable readline support." >&5
8256 echo "$as_me: error: readline header not found
8257 If you have readline already installed, see config.log for details on the
8258 failure.  It is possible the compiler isn't looking in the proper directory.
8259 Use --without-readline to disable readline support." >&2;}
8260    { (exit 1); exit 1; }; }
8261 fi
8262
8263 done
8264
8265 fi
8266
8267 done
8268
8269
8270 for ac_header in readline/history.h
8271 do
8272 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8273 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8274   echo "$as_me:$LINENO: checking for $ac_header" >&5
8275 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8276 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8277   echo $ECHO_N "(cached) $ECHO_C" >&6
8278 fi
8279 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8280 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8281 else
8282   # Is the header compilable?
8283 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8284 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8285 cat >conftest.$ac_ext <<_ACEOF
8286 /* confdefs.h.  */
8287 _ACEOF
8288 cat confdefs.h >>conftest.$ac_ext
8289 cat >>conftest.$ac_ext <<_ACEOF
8290 /* end confdefs.h.  */
8291 $ac_includes_default
8292 #include <$ac_header>
8293 _ACEOF
8294 rm -f conftest.$ac_objext
8295 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8296   (eval $ac_compile) 2>conftest.er1
8297   ac_status=$?
8298   grep -v '^ *+' conftest.er1 >conftest.err
8299   rm -f conftest.er1
8300   cat conftest.err >&5
8301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8302   (exit $ac_status); } &&
8303          { ac_try='test -z "$ac_c_werror_flag"
8304                          || test ! -s conftest.err'
8305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8306   (eval $ac_try) 2>&5
8307   ac_status=$?
8308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8309   (exit $ac_status); }; } &&
8310          { ac_try='test -s conftest.$ac_objext'
8311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8312   (eval $ac_try) 2>&5
8313   ac_status=$?
8314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8315   (exit $ac_status); }; }; then
8316   ac_header_compiler=yes
8317 else
8318   echo "$as_me: failed program was:" >&5
8319 sed 's/^/| /' conftest.$ac_ext >&5
8320
8321 ac_header_compiler=no
8322 fi
8323 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8324 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8325 echo "${ECHO_T}$ac_header_compiler" >&6
8326
8327 # Is the header present?
8328 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8329 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8330 cat >conftest.$ac_ext <<_ACEOF
8331 /* confdefs.h.  */
8332 _ACEOF
8333 cat confdefs.h >>conftest.$ac_ext
8334 cat >>conftest.$ac_ext <<_ACEOF
8335 /* end confdefs.h.  */
8336 #include <$ac_header>
8337 _ACEOF
8338 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8339   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8340   ac_status=$?
8341   grep -v '^ *+' conftest.er1 >conftest.err
8342   rm -f conftest.er1
8343   cat conftest.err >&5
8344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8345   (exit $ac_status); } >/dev/null; then
8346   if test -s conftest.err; then
8347     ac_cpp_err=$ac_c_preproc_warn_flag
8348     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8349   else
8350     ac_cpp_err=
8351   fi
8352 else
8353   ac_cpp_err=yes
8354 fi
8355 if test -z "$ac_cpp_err"; then
8356   ac_header_preproc=yes
8357 else
8358   echo "$as_me: failed program was:" >&5
8359 sed 's/^/| /' conftest.$ac_ext >&5
8360
8361   ac_header_preproc=no
8362 fi
8363 rm -f conftest.err conftest.$ac_ext
8364 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8365 echo "${ECHO_T}$ac_header_preproc" >&6
8366
8367 # So?  What about this header?
8368 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8369   yes:no: )
8370     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8371 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8372     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8373 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8374     ac_header_preproc=yes
8375     ;;
8376   no:yes:* )
8377     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8378 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8379     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8380 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8381     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8382 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8383     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8384 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8385     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8386 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8387     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8388 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8389     (
8390       cat <<\_ASBOX
8391 ## ---------------------------------------- ##
8392 ## Report this to pgsql-bugs@postgresql.org ##
8393 ## ---------------------------------------- ##
8394 _ASBOX
8395     ) |
8396       sed "s/^/$as_me: WARNING:     /" >&2
8397     ;;
8398 esac
8399 echo "$as_me:$LINENO: checking for $ac_header" >&5
8400 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8401 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8402   echo $ECHO_N "(cached) $ECHO_C" >&6
8403 else
8404   eval "$as_ac_Header=\$ac_header_preproc"
8405 fi
8406 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8407 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8408
8409 fi
8410 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8411   cat >>confdefs.h <<_ACEOF
8412 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8413 _ACEOF
8414
8415 else
8416
8417 for ac_header in history.h
8418 do
8419 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8420 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8421   echo "$as_me:$LINENO: checking for $ac_header" >&5
8422 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8423 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8424   echo $ECHO_N "(cached) $ECHO_C" >&6
8425 fi
8426 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8427 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8428 else
8429   # Is the header compilable?
8430 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8431 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8432 cat >conftest.$ac_ext <<_ACEOF
8433 /* confdefs.h.  */
8434 _ACEOF
8435 cat confdefs.h >>conftest.$ac_ext
8436 cat >>conftest.$ac_ext <<_ACEOF
8437 /* end confdefs.h.  */
8438 $ac_includes_default
8439 #include <$ac_header>
8440 _ACEOF
8441 rm -f conftest.$ac_objext
8442 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8443   (eval $ac_compile) 2>conftest.er1
8444   ac_status=$?
8445   grep -v '^ *+' conftest.er1 >conftest.err
8446   rm -f conftest.er1
8447   cat conftest.err >&5
8448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8449   (exit $ac_status); } &&
8450          { ac_try='test -z "$ac_c_werror_flag"
8451                          || test ! -s conftest.err'
8452   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8453   (eval $ac_try) 2>&5
8454   ac_status=$?
8455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8456   (exit $ac_status); }; } &&
8457          { ac_try='test -s conftest.$ac_objext'
8458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8459   (eval $ac_try) 2>&5
8460   ac_status=$?
8461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8462   (exit $ac_status); }; }; then
8463   ac_header_compiler=yes
8464 else
8465   echo "$as_me: failed program was:" >&5
8466 sed 's/^/| /' conftest.$ac_ext >&5
8467
8468 ac_header_compiler=no
8469 fi
8470 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8471 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8472 echo "${ECHO_T}$ac_header_compiler" >&6
8473
8474 # Is the header present?
8475 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8476 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8477 cat >conftest.$ac_ext <<_ACEOF
8478 /* confdefs.h.  */
8479 _ACEOF
8480 cat confdefs.h >>conftest.$ac_ext
8481 cat >>conftest.$ac_ext <<_ACEOF
8482 /* end confdefs.h.  */
8483 #include <$ac_header>
8484 _ACEOF
8485 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8486   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8487   ac_status=$?
8488   grep -v '^ *+' conftest.er1 >conftest.err
8489   rm -f conftest.er1
8490   cat conftest.err >&5
8491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8492   (exit $ac_status); } >/dev/null; then
8493   if test -s conftest.err; then
8494     ac_cpp_err=$ac_c_preproc_warn_flag
8495     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8496   else
8497     ac_cpp_err=
8498   fi
8499 else
8500   ac_cpp_err=yes
8501 fi
8502 if test -z "$ac_cpp_err"; then
8503   ac_header_preproc=yes
8504 else
8505   echo "$as_me: failed program was:" >&5
8506 sed 's/^/| /' conftest.$ac_ext >&5
8507
8508   ac_header_preproc=no
8509 fi
8510 rm -f conftest.err conftest.$ac_ext
8511 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8512 echo "${ECHO_T}$ac_header_preproc" >&6
8513
8514 # So?  What about this header?
8515 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8516   yes:no: )
8517     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8518 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8519     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8520 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8521     ac_header_preproc=yes
8522     ;;
8523   no:yes:* )
8524     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8525 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8526     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8527 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8528     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8529 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8530     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8531 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8532     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8533 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8534     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8535 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8536     (
8537       cat <<\_ASBOX
8538 ## ---------------------------------------- ##
8539 ## Report this to pgsql-bugs@postgresql.org ##
8540 ## ---------------------------------------- ##
8541 _ASBOX
8542     ) |
8543       sed "s/^/$as_me: WARNING:     /" >&2
8544     ;;
8545 esac
8546 echo "$as_me:$LINENO: checking for $ac_header" >&5
8547 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8548 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8549   echo $ECHO_N "(cached) $ECHO_C" >&6
8550 else
8551   eval "$as_ac_Header=\$ac_header_preproc"
8552 fi
8553 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8554 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8555
8556 fi
8557 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8558   cat >>confdefs.h <<_ACEOF
8559 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8560 _ACEOF
8561
8562 else
8563   { { echo "$as_me:$LINENO: error: history header not found
8564 If you have readline already installed, see config.log for details on the
8565 failure.  It is possible the compiler isn't looking in the proper directory.
8566 Use --without-readline to disable readline support." >&5
8567 echo "$as_me: error: history header not found
8568 If you have readline already installed, see config.log for details on the
8569 failure.  It is possible the compiler isn't looking in the proper directory.
8570 Use --without-readline to disable readline support." >&2;}
8571    { (exit 1); exit 1; }; }
8572 fi
8573
8574 done
8575
8576 fi
8577
8578 done
8579
8580 fi
8581
8582 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8583 # Some installations of libedit usurp /usr/include/readline/, which seems
8584 # bad practice, since in combined installations readline will have its headers
8585 # there.  We might have to resort to AC_EGREP checks to make sure we found
8586 # the proper header...
8587
8588 for ac_header in editline/readline.h
8589 do
8590 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8591 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8592   echo "$as_me:$LINENO: checking for $ac_header" >&5
8593 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8594 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8595   echo $ECHO_N "(cached) $ECHO_C" >&6
8596 fi
8597 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8598 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8599 else
8600   # Is the header compilable?
8601 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8602 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8603 cat >conftest.$ac_ext <<_ACEOF
8604 /* confdefs.h.  */
8605 _ACEOF
8606 cat confdefs.h >>conftest.$ac_ext
8607 cat >>conftest.$ac_ext <<_ACEOF
8608 /* end confdefs.h.  */
8609 $ac_includes_default
8610 #include <$ac_header>
8611 _ACEOF
8612 rm -f conftest.$ac_objext
8613 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8614   (eval $ac_compile) 2>conftest.er1
8615   ac_status=$?
8616   grep -v '^ *+' conftest.er1 >conftest.err
8617   rm -f conftest.er1
8618   cat conftest.err >&5
8619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8620   (exit $ac_status); } &&
8621          { ac_try='test -z "$ac_c_werror_flag"
8622                          || test ! -s conftest.err'
8623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8624   (eval $ac_try) 2>&5
8625   ac_status=$?
8626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8627   (exit $ac_status); }; } &&
8628          { ac_try='test -s conftest.$ac_objext'
8629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8630   (eval $ac_try) 2>&5
8631   ac_status=$?
8632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8633   (exit $ac_status); }; }; then
8634   ac_header_compiler=yes
8635 else
8636   echo "$as_me: failed program was:" >&5
8637 sed 's/^/| /' conftest.$ac_ext >&5
8638
8639 ac_header_compiler=no
8640 fi
8641 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8642 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8643 echo "${ECHO_T}$ac_header_compiler" >&6
8644
8645 # Is the header present?
8646 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8647 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8648 cat >conftest.$ac_ext <<_ACEOF
8649 /* confdefs.h.  */
8650 _ACEOF
8651 cat confdefs.h >>conftest.$ac_ext
8652 cat >>conftest.$ac_ext <<_ACEOF
8653 /* end confdefs.h.  */
8654 #include <$ac_header>
8655 _ACEOF
8656 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8657   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8658   ac_status=$?
8659   grep -v '^ *+' conftest.er1 >conftest.err
8660   rm -f conftest.er1
8661   cat conftest.err >&5
8662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8663   (exit $ac_status); } >/dev/null; then
8664   if test -s conftest.err; then
8665     ac_cpp_err=$ac_c_preproc_warn_flag
8666     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8667   else
8668     ac_cpp_err=
8669   fi
8670 else
8671   ac_cpp_err=yes
8672 fi
8673 if test -z "$ac_cpp_err"; then
8674   ac_header_preproc=yes
8675 else
8676   echo "$as_me: failed program was:" >&5
8677 sed 's/^/| /' conftest.$ac_ext >&5
8678
8679   ac_header_preproc=no
8680 fi
8681 rm -f conftest.err conftest.$ac_ext
8682 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8683 echo "${ECHO_T}$ac_header_preproc" >&6
8684
8685 # So?  What about this header?
8686 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8687   yes:no: )
8688     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8689 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8690     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8691 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8692     ac_header_preproc=yes
8693     ;;
8694   no:yes:* )
8695     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8696 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8697     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8698 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8699     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8700 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8701     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8702 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8703     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8704 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8705     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8706 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8707     (
8708       cat <<\_ASBOX
8709 ## ---------------------------------------- ##
8710 ## Report this to pgsql-bugs@postgresql.org ##
8711 ## ---------------------------------------- ##
8712 _ASBOX
8713     ) |
8714       sed "s/^/$as_me: WARNING:     /" >&2
8715     ;;
8716 esac
8717 echo "$as_me:$LINENO: checking for $ac_header" >&5
8718 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8719 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8720   echo $ECHO_N "(cached) $ECHO_C" >&6
8721 else
8722   eval "$as_ac_Header=\$ac_header_preproc"
8723 fi
8724 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8725 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8726
8727 fi
8728 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8729   cat >>confdefs.h <<_ACEOF
8730 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8731 _ACEOF
8732
8733 else
8734
8735 for ac_header in readline.h
8736 do
8737 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8738 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8739   echo "$as_me:$LINENO: checking for $ac_header" >&5
8740 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8741 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8742   echo $ECHO_N "(cached) $ECHO_C" >&6
8743 fi
8744 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8745 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8746 else
8747   # Is the header compilable?
8748 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8749 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8750 cat >conftest.$ac_ext <<_ACEOF
8751 /* confdefs.h.  */
8752 _ACEOF
8753 cat confdefs.h >>conftest.$ac_ext
8754 cat >>conftest.$ac_ext <<_ACEOF
8755 /* end confdefs.h.  */
8756 $ac_includes_default
8757 #include <$ac_header>
8758 _ACEOF
8759 rm -f conftest.$ac_objext
8760 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8761   (eval $ac_compile) 2>conftest.er1
8762   ac_status=$?
8763   grep -v '^ *+' conftest.er1 >conftest.err
8764   rm -f conftest.er1
8765   cat conftest.err >&5
8766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8767   (exit $ac_status); } &&
8768          { ac_try='test -z "$ac_c_werror_flag"
8769                          || test ! -s conftest.err'
8770   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8771   (eval $ac_try) 2>&5
8772   ac_status=$?
8773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8774   (exit $ac_status); }; } &&
8775          { ac_try='test -s conftest.$ac_objext'
8776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8777   (eval $ac_try) 2>&5
8778   ac_status=$?
8779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8780   (exit $ac_status); }; }; then
8781   ac_header_compiler=yes
8782 else
8783   echo "$as_me: failed program was:" >&5
8784 sed 's/^/| /' conftest.$ac_ext >&5
8785
8786 ac_header_compiler=no
8787 fi
8788 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8789 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8790 echo "${ECHO_T}$ac_header_compiler" >&6
8791
8792 # Is the header present?
8793 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8794 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8795 cat >conftest.$ac_ext <<_ACEOF
8796 /* confdefs.h.  */
8797 _ACEOF
8798 cat confdefs.h >>conftest.$ac_ext
8799 cat >>conftest.$ac_ext <<_ACEOF
8800 /* end confdefs.h.  */
8801 #include <$ac_header>
8802 _ACEOF
8803 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8804   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8805   ac_status=$?
8806   grep -v '^ *+' conftest.er1 >conftest.err
8807   rm -f conftest.er1
8808   cat conftest.err >&5
8809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8810   (exit $ac_status); } >/dev/null; then
8811   if test -s conftest.err; then
8812     ac_cpp_err=$ac_c_preproc_warn_flag
8813     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8814   else
8815     ac_cpp_err=
8816   fi
8817 else
8818   ac_cpp_err=yes
8819 fi
8820 if test -z "$ac_cpp_err"; then
8821   ac_header_preproc=yes
8822 else
8823   echo "$as_me: failed program was:" >&5
8824 sed 's/^/| /' conftest.$ac_ext >&5
8825
8826   ac_header_preproc=no
8827 fi
8828 rm -f conftest.err conftest.$ac_ext
8829 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8830 echo "${ECHO_T}$ac_header_preproc" >&6
8831
8832 # So?  What about this header?
8833 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8834   yes:no: )
8835     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8836 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8837     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8838 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8839     ac_header_preproc=yes
8840     ;;
8841   no:yes:* )
8842     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8843 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8844     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8845 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8846     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8847 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8848     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8849 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8850     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8851 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8852     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8853 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8854     (
8855       cat <<\_ASBOX
8856 ## ---------------------------------------- ##
8857 ## Report this to pgsql-bugs@postgresql.org ##
8858 ## ---------------------------------------- ##
8859 _ASBOX
8860     ) |
8861       sed "s/^/$as_me: WARNING:     /" >&2
8862     ;;
8863 esac
8864 echo "$as_me:$LINENO: checking for $ac_header" >&5
8865 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8866 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8867   echo $ECHO_N "(cached) $ECHO_C" >&6
8868 else
8869   eval "$as_ac_Header=\$ac_header_preproc"
8870 fi
8871 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8872 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8873
8874 fi
8875 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8876   cat >>confdefs.h <<_ACEOF
8877 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8878 _ACEOF
8879
8880 else
8881
8882 for ac_header in readline/readline.h
8883 do
8884 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8885 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8886   echo "$as_me:$LINENO: checking for $ac_header" >&5
8887 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8888 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8889   echo $ECHO_N "(cached) $ECHO_C" >&6
8890 fi
8891 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8892 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8893 else
8894   # Is the header compilable?
8895 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8896 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8897 cat >conftest.$ac_ext <<_ACEOF
8898 /* confdefs.h.  */
8899 _ACEOF
8900 cat confdefs.h >>conftest.$ac_ext
8901 cat >>conftest.$ac_ext <<_ACEOF
8902 /* end confdefs.h.  */
8903 $ac_includes_default
8904 #include <$ac_header>
8905 _ACEOF
8906 rm -f conftest.$ac_objext
8907 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8908   (eval $ac_compile) 2>conftest.er1
8909   ac_status=$?
8910   grep -v '^ *+' conftest.er1 >conftest.err
8911   rm -f conftest.er1
8912   cat conftest.err >&5
8913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8914   (exit $ac_status); } &&
8915          { ac_try='test -z "$ac_c_werror_flag"
8916                          || test ! -s conftest.err'
8917   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8918   (eval $ac_try) 2>&5
8919   ac_status=$?
8920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8921   (exit $ac_status); }; } &&
8922          { ac_try='test -s conftest.$ac_objext'
8923   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8924   (eval $ac_try) 2>&5
8925   ac_status=$?
8926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8927   (exit $ac_status); }; }; then
8928   ac_header_compiler=yes
8929 else
8930   echo "$as_me: failed program was:" >&5
8931 sed 's/^/| /' conftest.$ac_ext >&5
8932
8933 ac_header_compiler=no
8934 fi
8935 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8936 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8937 echo "${ECHO_T}$ac_header_compiler" >&6
8938
8939 # Is the header present?
8940 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8941 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8942 cat >conftest.$ac_ext <<_ACEOF
8943 /* confdefs.h.  */
8944 _ACEOF
8945 cat confdefs.h >>conftest.$ac_ext
8946 cat >>conftest.$ac_ext <<_ACEOF
8947 /* end confdefs.h.  */
8948 #include <$ac_header>
8949 _ACEOF
8950 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8951   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8952   ac_status=$?
8953   grep -v '^ *+' conftest.er1 >conftest.err
8954   rm -f conftest.er1
8955   cat conftest.err >&5
8956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8957   (exit $ac_status); } >/dev/null; then
8958   if test -s conftest.err; then
8959     ac_cpp_err=$ac_c_preproc_warn_flag
8960     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8961   else
8962     ac_cpp_err=
8963   fi
8964 else
8965   ac_cpp_err=yes
8966 fi
8967 if test -z "$ac_cpp_err"; then
8968   ac_header_preproc=yes
8969 else
8970   echo "$as_me: failed program was:" >&5
8971 sed 's/^/| /' conftest.$ac_ext >&5
8972
8973   ac_header_preproc=no
8974 fi
8975 rm -f conftest.err conftest.$ac_ext
8976 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8977 echo "${ECHO_T}$ac_header_preproc" >&6
8978
8979 # So?  What about this header?
8980 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8981   yes:no: )
8982     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8983 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8984     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8985 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8986     ac_header_preproc=yes
8987     ;;
8988   no:yes:* )
8989     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8990 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8991     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8992 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8993     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8994 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8995     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8996 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8997     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8998 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8999     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9000 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9001     (
9002       cat <<\_ASBOX
9003 ## ---------------------------------------- ##
9004 ## Report this to pgsql-bugs@postgresql.org ##
9005 ## ---------------------------------------- ##
9006 _ASBOX
9007     ) |
9008       sed "s/^/$as_me: WARNING:     /" >&2
9009     ;;
9010 esac
9011 echo "$as_me:$LINENO: checking for $ac_header" >&5
9012 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9013 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9014   echo $ECHO_N "(cached) $ECHO_C" >&6
9015 else
9016   eval "$as_ac_Header=\$ac_header_preproc"
9017 fi
9018 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9019 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9020
9021 fi
9022 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9023   cat >>confdefs.h <<_ACEOF
9024 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9025 _ACEOF
9026
9027 else
9028   { { echo "$as_me:$LINENO: error: readline header not found
9029 If you have libedit already installed, see config.log for details on the
9030 failure.  It is possible the compiler isn't looking in the proper directory.
9031 Use --without-readline to disable libedit support." >&5
9032 echo "$as_me: error: readline header not found
9033 If you have libedit already installed, see config.log for details on the
9034 failure.  It is possible the compiler isn't looking in the proper directory.
9035 Use --without-readline to disable libedit support." >&2;}
9036    { (exit 1); exit 1; }; }
9037 fi
9038
9039 done
9040
9041 fi
9042
9043 done
9044
9045 fi
9046
9047 done
9048
9049
9050 for ac_header in editline/history.h
9051 do
9052 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9053 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9054   echo "$as_me:$LINENO: checking for $ac_header" >&5
9055 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9056 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9057   echo $ECHO_N "(cached) $ECHO_C" >&6
9058 fi
9059 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9060 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9061 else
9062   # Is the header compilable?
9063 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9064 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9065 cat >conftest.$ac_ext <<_ACEOF
9066 /* confdefs.h.  */
9067 _ACEOF
9068 cat confdefs.h >>conftest.$ac_ext
9069 cat >>conftest.$ac_ext <<_ACEOF
9070 /* end confdefs.h.  */
9071 $ac_includes_default
9072 #include <$ac_header>
9073 _ACEOF
9074 rm -f conftest.$ac_objext
9075 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9076   (eval $ac_compile) 2>conftest.er1
9077   ac_status=$?
9078   grep -v '^ *+' conftest.er1 >conftest.err
9079   rm -f conftest.er1
9080   cat conftest.err >&5
9081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9082   (exit $ac_status); } &&
9083          { ac_try='test -z "$ac_c_werror_flag"
9084                          || test ! -s conftest.err'
9085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9086   (eval $ac_try) 2>&5
9087   ac_status=$?
9088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9089   (exit $ac_status); }; } &&
9090          { ac_try='test -s conftest.$ac_objext'
9091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9092   (eval $ac_try) 2>&5
9093   ac_status=$?
9094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9095   (exit $ac_status); }; }; then
9096   ac_header_compiler=yes
9097 else
9098   echo "$as_me: failed program was:" >&5
9099 sed 's/^/| /' conftest.$ac_ext >&5
9100
9101 ac_header_compiler=no
9102 fi
9103 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9104 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9105 echo "${ECHO_T}$ac_header_compiler" >&6
9106
9107 # Is the header present?
9108 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9109 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9110 cat >conftest.$ac_ext <<_ACEOF
9111 /* confdefs.h.  */
9112 _ACEOF
9113 cat confdefs.h >>conftest.$ac_ext
9114 cat >>conftest.$ac_ext <<_ACEOF
9115 /* end confdefs.h.  */
9116 #include <$ac_header>
9117 _ACEOF
9118 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9119   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9120   ac_status=$?
9121   grep -v '^ *+' conftest.er1 >conftest.err
9122   rm -f conftest.er1
9123   cat conftest.err >&5
9124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9125   (exit $ac_status); } >/dev/null; then
9126   if test -s conftest.err; then
9127     ac_cpp_err=$ac_c_preproc_warn_flag
9128     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9129   else
9130     ac_cpp_err=
9131   fi
9132 else
9133   ac_cpp_err=yes
9134 fi
9135 if test -z "$ac_cpp_err"; then
9136   ac_header_preproc=yes
9137 else
9138   echo "$as_me: failed program was:" >&5
9139 sed 's/^/| /' conftest.$ac_ext >&5
9140
9141   ac_header_preproc=no
9142 fi
9143 rm -f conftest.err conftest.$ac_ext
9144 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9145 echo "${ECHO_T}$ac_header_preproc" >&6
9146
9147 # So?  What about this header?
9148 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9149   yes:no: )
9150     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9151 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9152     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9153 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9154     ac_header_preproc=yes
9155     ;;
9156   no:yes:* )
9157     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9158 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9159     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9160 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9161     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9162 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9163     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9164 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9165     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9166 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9167     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9168 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9169     (
9170       cat <<\_ASBOX
9171 ## ---------------------------------------- ##
9172 ## Report this to pgsql-bugs@postgresql.org ##
9173 ## ---------------------------------------- ##
9174 _ASBOX
9175     ) |
9176       sed "s/^/$as_me: WARNING:     /" >&2
9177     ;;
9178 esac
9179 echo "$as_me:$LINENO: checking for $ac_header" >&5
9180 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9181 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9182   echo $ECHO_N "(cached) $ECHO_C" >&6
9183 else
9184   eval "$as_ac_Header=\$ac_header_preproc"
9185 fi
9186 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9187 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9188
9189 fi
9190 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9191   cat >>confdefs.h <<_ACEOF
9192 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9193 _ACEOF
9194
9195 else
9196
9197 for ac_header in history.h
9198 do
9199 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9200 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9201   echo "$as_me:$LINENO: checking for $ac_header" >&5
9202 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9203 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9204   echo $ECHO_N "(cached) $ECHO_C" >&6
9205 fi
9206 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9207 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9208 else
9209   # Is the header compilable?
9210 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9211 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9212 cat >conftest.$ac_ext <<_ACEOF
9213 /* confdefs.h.  */
9214 _ACEOF
9215 cat confdefs.h >>conftest.$ac_ext
9216 cat >>conftest.$ac_ext <<_ACEOF
9217 /* end confdefs.h.  */
9218 $ac_includes_default
9219 #include <$ac_header>
9220 _ACEOF
9221 rm -f conftest.$ac_objext
9222 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9223   (eval $ac_compile) 2>conftest.er1
9224   ac_status=$?
9225   grep -v '^ *+' conftest.er1 >conftest.err
9226   rm -f conftest.er1
9227   cat conftest.err >&5
9228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9229   (exit $ac_status); } &&
9230          { ac_try='test -z "$ac_c_werror_flag"
9231                          || test ! -s conftest.err'
9232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9233   (eval $ac_try) 2>&5
9234   ac_status=$?
9235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9236   (exit $ac_status); }; } &&
9237          { ac_try='test -s conftest.$ac_objext'
9238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9239   (eval $ac_try) 2>&5
9240   ac_status=$?
9241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9242   (exit $ac_status); }; }; then
9243   ac_header_compiler=yes
9244 else
9245   echo "$as_me: failed program was:" >&5
9246 sed 's/^/| /' conftest.$ac_ext >&5
9247
9248 ac_header_compiler=no
9249 fi
9250 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9251 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9252 echo "${ECHO_T}$ac_header_compiler" >&6
9253
9254 # Is the header present?
9255 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9256 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9257 cat >conftest.$ac_ext <<_ACEOF
9258 /* confdefs.h.  */
9259 _ACEOF
9260 cat confdefs.h >>conftest.$ac_ext
9261 cat >>conftest.$ac_ext <<_ACEOF
9262 /* end confdefs.h.  */
9263 #include <$ac_header>
9264 _ACEOF
9265 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9266   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9267   ac_status=$?
9268   grep -v '^ *+' conftest.er1 >conftest.err
9269   rm -f conftest.er1
9270   cat conftest.err >&5
9271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9272   (exit $ac_status); } >/dev/null; then
9273   if test -s conftest.err; then
9274     ac_cpp_err=$ac_c_preproc_warn_flag
9275     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9276   else
9277     ac_cpp_err=
9278   fi
9279 else
9280   ac_cpp_err=yes
9281 fi
9282 if test -z "$ac_cpp_err"; then
9283   ac_header_preproc=yes
9284 else
9285   echo "$as_me: failed program was:" >&5
9286 sed 's/^/| /' conftest.$ac_ext >&5
9287
9288   ac_header_preproc=no
9289 fi
9290 rm -f conftest.err conftest.$ac_ext
9291 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9292 echo "${ECHO_T}$ac_header_preproc" >&6
9293
9294 # So?  What about this header?
9295 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9296   yes:no: )
9297     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9298 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9299     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9300 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9301     ac_header_preproc=yes
9302     ;;
9303   no:yes:* )
9304     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9305 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9306     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9307 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9308     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9309 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9310     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9311 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9312     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9313 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9314     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9315 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9316     (
9317       cat <<\_ASBOX
9318 ## ---------------------------------------- ##
9319 ## Report this to pgsql-bugs@postgresql.org ##
9320 ## ---------------------------------------- ##
9321 _ASBOX
9322     ) |
9323       sed "s/^/$as_me: WARNING:     /" >&2
9324     ;;
9325 esac
9326 echo "$as_me:$LINENO: checking for $ac_header" >&5
9327 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9328 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9329   echo $ECHO_N "(cached) $ECHO_C" >&6
9330 else
9331   eval "$as_ac_Header=\$ac_header_preproc"
9332 fi
9333 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9334 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9335
9336 fi
9337 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9338   cat >>confdefs.h <<_ACEOF
9339 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9340 _ACEOF
9341
9342 else
9343
9344 for ac_header in readline/history.h
9345 do
9346 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9347 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9348   echo "$as_me:$LINENO: checking for $ac_header" >&5
9349 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9350 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9351   echo $ECHO_N "(cached) $ECHO_C" >&6
9352 fi
9353 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9354 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9355 else
9356   # Is the header compilable?
9357 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9358 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9359 cat >conftest.$ac_ext <<_ACEOF
9360 /* confdefs.h.  */
9361 _ACEOF
9362 cat confdefs.h >>conftest.$ac_ext
9363 cat >>conftest.$ac_ext <<_ACEOF
9364 /* end confdefs.h.  */
9365 $ac_includes_default
9366 #include <$ac_header>
9367 _ACEOF
9368 rm -f conftest.$ac_objext
9369 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9370   (eval $ac_compile) 2>conftest.er1
9371   ac_status=$?
9372   grep -v '^ *+' conftest.er1 >conftest.err
9373   rm -f conftest.er1
9374   cat conftest.err >&5
9375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9376   (exit $ac_status); } &&
9377          { ac_try='test -z "$ac_c_werror_flag"
9378                          || test ! -s conftest.err'
9379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9380   (eval $ac_try) 2>&5
9381   ac_status=$?
9382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9383   (exit $ac_status); }; } &&
9384          { ac_try='test -s conftest.$ac_objext'
9385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9386   (eval $ac_try) 2>&5
9387   ac_status=$?
9388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9389   (exit $ac_status); }; }; then
9390   ac_header_compiler=yes
9391 else
9392   echo "$as_me: failed program was:" >&5
9393 sed 's/^/| /' conftest.$ac_ext >&5
9394
9395 ac_header_compiler=no
9396 fi
9397 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9398 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9399 echo "${ECHO_T}$ac_header_compiler" >&6
9400
9401 # Is the header present?
9402 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9403 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9404 cat >conftest.$ac_ext <<_ACEOF
9405 /* confdefs.h.  */
9406 _ACEOF
9407 cat confdefs.h >>conftest.$ac_ext
9408 cat >>conftest.$ac_ext <<_ACEOF
9409 /* end confdefs.h.  */
9410 #include <$ac_header>
9411 _ACEOF
9412 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9413   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9414   ac_status=$?
9415   grep -v '^ *+' conftest.er1 >conftest.err
9416   rm -f conftest.er1
9417   cat conftest.err >&5
9418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9419   (exit $ac_status); } >/dev/null; then
9420   if test -s conftest.err; then
9421     ac_cpp_err=$ac_c_preproc_warn_flag
9422     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9423   else
9424     ac_cpp_err=
9425   fi
9426 else
9427   ac_cpp_err=yes
9428 fi
9429 if test -z "$ac_cpp_err"; then
9430   ac_header_preproc=yes
9431 else
9432   echo "$as_me: failed program was:" >&5
9433 sed 's/^/| /' conftest.$ac_ext >&5
9434
9435   ac_header_preproc=no
9436 fi
9437 rm -f conftest.err conftest.$ac_ext
9438 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9439 echo "${ECHO_T}$ac_header_preproc" >&6
9440
9441 # So?  What about this header?
9442 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9443   yes:no: )
9444     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9445 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9446     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9447 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9448     ac_header_preproc=yes
9449     ;;
9450   no:yes:* )
9451     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9452 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9453     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9454 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9455     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9456 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9457     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9458 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9459     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9460 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9461     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9462 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9463     (
9464       cat <<\_ASBOX
9465 ## ---------------------------------------- ##
9466 ## Report this to pgsql-bugs@postgresql.org ##
9467 ## ---------------------------------------- ##
9468 _ASBOX
9469     ) |
9470       sed "s/^/$as_me: WARNING:     /" >&2
9471     ;;
9472 esac
9473 echo "$as_me:$LINENO: checking for $ac_header" >&5
9474 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9475 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9476   echo $ECHO_N "(cached) $ECHO_C" >&6
9477 else
9478   eval "$as_ac_Header=\$ac_header_preproc"
9479 fi
9480 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9481 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9482
9483 fi
9484 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9485   cat >>confdefs.h <<_ACEOF
9486 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9487 _ACEOF
9488
9489 else
9490   { { echo "$as_me:$LINENO: error: history header not found
9491 If you have libedit already installed, see config.log for details on the
9492 failure.  It is possible the compiler isn't looking in the proper directory.
9493 Use --without-readline to disable libedit support." >&5
9494 echo "$as_me: error: history header not found
9495 If you have libedit already installed, see config.log for details on the
9496 failure.  It is possible the compiler isn't looking in the proper directory.
9497 Use --without-readline to disable libedit support." >&2;}
9498    { (exit 1); exit 1; }; }
9499 fi
9500
9501 done
9502
9503 fi
9504
9505 done
9506
9507 fi
9508
9509 done
9510
9511 fi
9512
9513 if test "$with_zlib" = yes; then
9514   if test "${ac_cv_header_zlib_h+set}" = set; then
9515   echo "$as_me:$LINENO: checking for zlib.h" >&5
9516 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9517 if test "${ac_cv_header_zlib_h+set}" = set; then
9518   echo $ECHO_N "(cached) $ECHO_C" >&6
9519 fi
9520 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9521 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9522 else
9523   # Is the header compilable?
9524 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9525 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9526 cat >conftest.$ac_ext <<_ACEOF
9527 /* confdefs.h.  */
9528 _ACEOF
9529 cat confdefs.h >>conftest.$ac_ext
9530 cat >>conftest.$ac_ext <<_ACEOF
9531 /* end confdefs.h.  */
9532 $ac_includes_default
9533 #include <zlib.h>
9534 _ACEOF
9535 rm -f conftest.$ac_objext
9536 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9537   (eval $ac_compile) 2>conftest.er1
9538   ac_status=$?
9539   grep -v '^ *+' conftest.er1 >conftest.err
9540   rm -f conftest.er1
9541   cat conftest.err >&5
9542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9543   (exit $ac_status); } &&
9544          { ac_try='test -z "$ac_c_werror_flag"
9545                          || test ! -s conftest.err'
9546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9547   (eval $ac_try) 2>&5
9548   ac_status=$?
9549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9550   (exit $ac_status); }; } &&
9551          { ac_try='test -s conftest.$ac_objext'
9552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9553   (eval $ac_try) 2>&5
9554   ac_status=$?
9555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9556   (exit $ac_status); }; }; then
9557   ac_header_compiler=yes
9558 else
9559   echo "$as_me: failed program was:" >&5
9560 sed 's/^/| /' conftest.$ac_ext >&5
9561
9562 ac_header_compiler=no
9563 fi
9564 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9565 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9566 echo "${ECHO_T}$ac_header_compiler" >&6
9567
9568 # Is the header present?
9569 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9570 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9571 cat >conftest.$ac_ext <<_ACEOF
9572 /* confdefs.h.  */
9573 _ACEOF
9574 cat confdefs.h >>conftest.$ac_ext
9575 cat >>conftest.$ac_ext <<_ACEOF
9576 /* end confdefs.h.  */
9577 #include <zlib.h>
9578 _ACEOF
9579 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9580   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9581   ac_status=$?
9582   grep -v '^ *+' conftest.er1 >conftest.err
9583   rm -f conftest.er1
9584   cat conftest.err >&5
9585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9586   (exit $ac_status); } >/dev/null; then
9587   if test -s conftest.err; then
9588     ac_cpp_err=$ac_c_preproc_warn_flag
9589     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9590   else
9591     ac_cpp_err=
9592   fi
9593 else
9594   ac_cpp_err=yes
9595 fi
9596 if test -z "$ac_cpp_err"; then
9597   ac_header_preproc=yes
9598 else
9599   echo "$as_me: failed program was:" >&5
9600 sed 's/^/| /' conftest.$ac_ext >&5
9601
9602   ac_header_preproc=no
9603 fi
9604 rm -f conftest.err conftest.$ac_ext
9605 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9606 echo "${ECHO_T}$ac_header_preproc" >&6
9607
9608 # So?  What about this header?
9609 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9610   yes:no: )
9611     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9612 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9613     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9614 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9615     ac_header_preproc=yes
9616     ;;
9617   no:yes:* )
9618     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9619 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9620     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9621 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9622     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9623 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9624     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9625 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9626     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9627 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9628     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9629 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9630     (
9631       cat <<\_ASBOX
9632 ## ---------------------------------------- ##
9633 ## Report this to pgsql-bugs@postgresql.org ##
9634 ## ---------------------------------------- ##
9635 _ASBOX
9636     ) |
9637       sed "s/^/$as_me: WARNING:     /" >&2
9638     ;;
9639 esac
9640 echo "$as_me:$LINENO: checking for zlib.h" >&5
9641 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9642 if test "${ac_cv_header_zlib_h+set}" = set; then
9643   echo $ECHO_N "(cached) $ECHO_C" >&6
9644 else
9645   ac_cv_header_zlib_h=$ac_header_preproc
9646 fi
9647 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9648 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9649
9650 fi
9651 if test $ac_cv_header_zlib_h = yes; then
9652   :
9653 else
9654   { { echo "$as_me:$LINENO: error: zlib header not found
9655 If you have zlib already installed, see config.log for details on the
9656 failure.  It is possible the compiler isn't looking in the proper directory.
9657 Use --without-zlib to disable zlib support." >&5
9658 echo "$as_me: error: zlib header not found
9659 If you have zlib already installed, see config.log for details on the
9660 failure.  It is possible the compiler isn't looking in the proper directory.
9661 Use --without-zlib to disable zlib support." >&2;}
9662    { (exit 1); exit 1; }; }
9663 fi
9664
9665
9666 fi
9667
9668 if test "$with_krb5" = yes ; then
9669   if test "${ac_cv_header_krb5_h+set}" = set; then
9670   echo "$as_me:$LINENO: checking for krb5.h" >&5
9671 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9672 if test "${ac_cv_header_krb5_h+set}" = set; then
9673   echo $ECHO_N "(cached) $ECHO_C" >&6
9674 fi
9675 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9676 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9677 else
9678   # Is the header compilable?
9679 echo "$as_me:$LINENO: checking krb5.h usability" >&5
9680 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
9681 cat >conftest.$ac_ext <<_ACEOF
9682 /* confdefs.h.  */
9683 _ACEOF
9684 cat confdefs.h >>conftest.$ac_ext
9685 cat >>conftest.$ac_ext <<_ACEOF
9686 /* end confdefs.h.  */
9687 $ac_includes_default
9688 #include <krb5.h>
9689 _ACEOF
9690 rm -f conftest.$ac_objext
9691 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9692   (eval $ac_compile) 2>conftest.er1
9693   ac_status=$?
9694   grep -v '^ *+' conftest.er1 >conftest.err
9695   rm -f conftest.er1
9696   cat conftest.err >&5
9697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9698   (exit $ac_status); } &&
9699          { ac_try='test -z "$ac_c_werror_flag"
9700                          || test ! -s conftest.err'
9701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9702   (eval $ac_try) 2>&5
9703   ac_status=$?
9704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9705   (exit $ac_status); }; } &&
9706          { ac_try='test -s conftest.$ac_objext'
9707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9708   (eval $ac_try) 2>&5
9709   ac_status=$?
9710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9711   (exit $ac_status); }; }; then
9712   ac_header_compiler=yes
9713 else
9714   echo "$as_me: failed program was:" >&5
9715 sed 's/^/| /' conftest.$ac_ext >&5
9716
9717 ac_header_compiler=no
9718 fi
9719 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9720 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9721 echo "${ECHO_T}$ac_header_compiler" >&6
9722
9723 # Is the header present?
9724 echo "$as_me:$LINENO: checking krb5.h presence" >&5
9725 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
9726 cat >conftest.$ac_ext <<_ACEOF
9727 /* confdefs.h.  */
9728 _ACEOF
9729 cat confdefs.h >>conftest.$ac_ext
9730 cat >>conftest.$ac_ext <<_ACEOF
9731 /* end confdefs.h.  */
9732 #include <krb5.h>
9733 _ACEOF
9734 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9735   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9736   ac_status=$?
9737   grep -v '^ *+' conftest.er1 >conftest.err
9738   rm -f conftest.er1
9739   cat conftest.err >&5
9740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9741   (exit $ac_status); } >/dev/null; then
9742   if test -s conftest.err; then
9743     ac_cpp_err=$ac_c_preproc_warn_flag
9744     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9745   else
9746     ac_cpp_err=
9747   fi
9748 else
9749   ac_cpp_err=yes
9750 fi
9751 if test -z "$ac_cpp_err"; then
9752   ac_header_preproc=yes
9753 else
9754   echo "$as_me: failed program was:" >&5
9755 sed 's/^/| /' conftest.$ac_ext >&5
9756
9757   ac_header_preproc=no
9758 fi
9759 rm -f conftest.err conftest.$ac_ext
9760 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9761 echo "${ECHO_T}$ac_header_preproc" >&6
9762
9763 # So?  What about this header?
9764 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9765   yes:no: )
9766     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
9767 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9768     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
9769 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
9770     ac_header_preproc=yes
9771     ;;
9772   no:yes:* )
9773     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
9774 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
9775     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
9776 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
9777     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
9778 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
9779     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
9780 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9781     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
9782 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
9783     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
9784 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
9785     (
9786       cat <<\_ASBOX
9787 ## ---------------------------------------- ##
9788 ## Report this to pgsql-bugs@postgresql.org ##
9789 ## ---------------------------------------- ##
9790 _ASBOX
9791     ) |
9792       sed "s/^/$as_me: WARNING:     /" >&2
9793     ;;
9794 esac
9795 echo "$as_me:$LINENO: checking for krb5.h" >&5
9796 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9797 if test "${ac_cv_header_krb5_h+set}" = set; then
9798   echo $ECHO_N "(cached) $ECHO_C" >&6
9799 else
9800   ac_cv_header_krb5_h=$ac_header_preproc
9801 fi
9802 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9803 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9804
9805 fi
9806 if test $ac_cv_header_krb5_h = yes; then
9807   :
9808 else
9809   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
9810 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
9811    { (exit 1); exit 1; }; }
9812 fi
9813
9814
9815 fi
9816
9817 if test "$with_openssl" = yes ; then
9818   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9819   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9820 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9821 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9822   echo $ECHO_N "(cached) $ECHO_C" >&6
9823 fi
9824 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9825 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9826 else
9827   # Is the header compilable?
9828 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
9829 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
9830 cat >conftest.$ac_ext <<_ACEOF
9831 /* confdefs.h.  */
9832 _ACEOF
9833 cat confdefs.h >>conftest.$ac_ext
9834 cat >>conftest.$ac_ext <<_ACEOF
9835 /* end confdefs.h.  */
9836 $ac_includes_default
9837 #include <openssl/ssl.h>
9838 _ACEOF
9839 rm -f conftest.$ac_objext
9840 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9841   (eval $ac_compile) 2>conftest.er1
9842   ac_status=$?
9843   grep -v '^ *+' conftest.er1 >conftest.err
9844   rm -f conftest.er1
9845   cat conftest.err >&5
9846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9847   (exit $ac_status); } &&
9848          { ac_try='test -z "$ac_c_werror_flag"
9849                          || test ! -s conftest.err'
9850   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9851   (eval $ac_try) 2>&5
9852   ac_status=$?
9853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9854   (exit $ac_status); }; } &&
9855          { ac_try='test -s conftest.$ac_objext'
9856   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9857   (eval $ac_try) 2>&5
9858   ac_status=$?
9859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9860   (exit $ac_status); }; }; then
9861   ac_header_compiler=yes
9862 else
9863   echo "$as_me: failed program was:" >&5
9864 sed 's/^/| /' conftest.$ac_ext >&5
9865
9866 ac_header_compiler=no
9867 fi
9868 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9869 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9870 echo "${ECHO_T}$ac_header_compiler" >&6
9871
9872 # Is the header present?
9873 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
9874 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
9875 cat >conftest.$ac_ext <<_ACEOF
9876 /* confdefs.h.  */
9877 _ACEOF
9878 cat confdefs.h >>conftest.$ac_ext
9879 cat >>conftest.$ac_ext <<_ACEOF
9880 /* end confdefs.h.  */
9881 #include <openssl/ssl.h>
9882 _ACEOF
9883 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9884   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9885   ac_status=$?
9886   grep -v '^ *+' conftest.er1 >conftest.err
9887   rm -f conftest.er1
9888   cat conftest.err >&5
9889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9890   (exit $ac_status); } >/dev/null; then
9891   if test -s conftest.err; then
9892     ac_cpp_err=$ac_c_preproc_warn_flag
9893     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9894   else
9895     ac_cpp_err=
9896   fi
9897 else
9898   ac_cpp_err=yes
9899 fi
9900 if test -z "$ac_cpp_err"; then
9901   ac_header_preproc=yes
9902 else
9903   echo "$as_me: failed program was:" >&5
9904 sed 's/^/| /' conftest.$ac_ext >&5
9905
9906   ac_header_preproc=no
9907 fi
9908 rm -f conftest.err conftest.$ac_ext
9909 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9910 echo "${ECHO_T}$ac_header_preproc" >&6
9911
9912 # So?  What about this header?
9913 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9914   yes:no: )
9915     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9916 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9917     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
9918 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
9919     ac_header_preproc=yes
9920     ;;
9921   no:yes:* )
9922     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
9923 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
9924     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
9925 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
9926     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
9927 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
9928     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
9929 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9930     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
9931 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
9932     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
9933 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
9934     (
9935       cat <<\_ASBOX
9936 ## ---------------------------------------- ##
9937 ## Report this to pgsql-bugs@postgresql.org ##
9938 ## ---------------------------------------- ##
9939 _ASBOX
9940     ) |
9941       sed "s/^/$as_me: WARNING:     /" >&2
9942     ;;
9943 esac
9944 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9945 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9946 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9947   echo $ECHO_N "(cached) $ECHO_C" >&6
9948 else
9949   ac_cv_header_openssl_ssl_h=$ac_header_preproc
9950 fi
9951 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9952 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9953
9954 fi
9955 if test $ac_cv_header_openssl_ssl_h = yes; then
9956   :
9957 else
9958   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
9959 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
9960    { (exit 1); exit 1; }; }
9961 fi
9962
9963
9964   if test "${ac_cv_header_openssl_err_h+set}" = set; then
9965   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
9966 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
9967 if test "${ac_cv_header_openssl_err_h+set}" = set; then
9968   echo $ECHO_N "(cached) $ECHO_C" >&6
9969 fi
9970 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
9971 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
9972 else
9973   # Is the header compilable?
9974 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
9975 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
9976 cat >conftest.$ac_ext <<_ACEOF
9977 /* confdefs.h.  */
9978 _ACEOF
9979 cat confdefs.h >>conftest.$ac_ext
9980 cat >>conftest.$ac_ext <<_ACEOF
9981 /* end confdefs.h.  */
9982 $ac_includes_default
9983 #include <openssl/err.h>
9984 _ACEOF
9985 rm -f conftest.$ac_objext
9986 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9987   (eval $ac_compile) 2>conftest.er1
9988   ac_status=$?
9989   grep -v '^ *+' conftest.er1 >conftest.err
9990   rm -f conftest.er1
9991   cat conftest.err >&5
9992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9993   (exit $ac_status); } &&
9994          { ac_try='test -z "$ac_c_werror_flag"
9995                          || test ! -s conftest.err'
9996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9997   (eval $ac_try) 2>&5
9998   ac_status=$?
9999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10000   (exit $ac_status); }; } &&
10001          { ac_try='test -s conftest.$ac_objext'
10002   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10003   (eval $ac_try) 2>&5
10004   ac_status=$?
10005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10006   (exit $ac_status); }; }; then
10007   ac_header_compiler=yes
10008 else
10009   echo "$as_me: failed program was:" >&5
10010 sed 's/^/| /' conftest.$ac_ext >&5
10011
10012 ac_header_compiler=no
10013 fi
10014 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10015 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10016 echo "${ECHO_T}$ac_header_compiler" >&6
10017
10018 # Is the header present?
10019 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10020 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10021 cat >conftest.$ac_ext <<_ACEOF
10022 /* confdefs.h.  */
10023 _ACEOF
10024 cat confdefs.h >>conftest.$ac_ext
10025 cat >>conftest.$ac_ext <<_ACEOF
10026 /* end confdefs.h.  */
10027 #include <openssl/err.h>
10028 _ACEOF
10029 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10030   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10031   ac_status=$?
10032   grep -v '^ *+' conftest.er1 >conftest.err
10033   rm -f conftest.er1
10034   cat conftest.err >&5
10035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10036   (exit $ac_status); } >/dev/null; then
10037   if test -s conftest.err; then
10038     ac_cpp_err=$ac_c_preproc_warn_flag
10039     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10040   else
10041     ac_cpp_err=
10042   fi
10043 else
10044   ac_cpp_err=yes
10045 fi
10046 if test -z "$ac_cpp_err"; then
10047   ac_header_preproc=yes
10048 else
10049   echo "$as_me: failed program was:" >&5
10050 sed 's/^/| /' conftest.$ac_ext >&5
10051
10052   ac_header_preproc=no
10053 fi
10054 rm -f conftest.err conftest.$ac_ext
10055 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10056 echo "${ECHO_T}$ac_header_preproc" >&6
10057
10058 # So?  What about this header?
10059 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10060   yes:no: )
10061     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10062 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10063     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10064 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10065     ac_header_preproc=yes
10066     ;;
10067   no:yes:* )
10068     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10069 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10070     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10071 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10072     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10073 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10074     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10075 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10076     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10077 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10078     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10079 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10080     (
10081       cat <<\_ASBOX
10082 ## ---------------------------------------- ##
10083 ## Report this to pgsql-bugs@postgresql.org ##
10084 ## ---------------------------------------- ##
10085 _ASBOX
10086     ) |
10087       sed "s/^/$as_me: WARNING:     /" >&2
10088     ;;
10089 esac
10090 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10091 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10092 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10093   echo $ECHO_N "(cached) $ECHO_C" >&6
10094 else
10095   ac_cv_header_openssl_err_h=$ac_header_preproc
10096 fi
10097 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10098 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10099
10100 fi
10101 if test $ac_cv_header_openssl_err_h = yes; then
10102   :
10103 else
10104   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10105 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10106    { (exit 1); exit 1; }; }
10107 fi
10108
10109
10110 fi
10111
10112 if test "$with_pam" = yes ; then
10113
10114 for ac_header in security/pam_appl.h
10115 do
10116 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10117 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10118   echo "$as_me:$LINENO: checking for $ac_header" >&5
10119 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10120 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10121   echo $ECHO_N "(cached) $ECHO_C" >&6
10122 fi
10123 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10124 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10125 else
10126   # Is the header compilable?
10127 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10128 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10129 cat >conftest.$ac_ext <<_ACEOF
10130 /* confdefs.h.  */
10131 _ACEOF
10132 cat confdefs.h >>conftest.$ac_ext
10133 cat >>conftest.$ac_ext <<_ACEOF
10134 /* end confdefs.h.  */
10135 $ac_includes_default
10136 #include <$ac_header>
10137 _ACEOF
10138 rm -f conftest.$ac_objext
10139 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10140   (eval $ac_compile) 2>conftest.er1
10141   ac_status=$?
10142   grep -v '^ *+' conftest.er1 >conftest.err
10143   rm -f conftest.er1
10144   cat conftest.err >&5
10145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10146   (exit $ac_status); } &&
10147          { ac_try='test -z "$ac_c_werror_flag"
10148                          || test ! -s conftest.err'
10149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10150   (eval $ac_try) 2>&5
10151   ac_status=$?
10152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153   (exit $ac_status); }; } &&
10154          { ac_try='test -s conftest.$ac_objext'
10155   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10156   (eval $ac_try) 2>&5
10157   ac_status=$?
10158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10159   (exit $ac_status); }; }; then
10160   ac_header_compiler=yes
10161 else
10162   echo "$as_me: failed program was:" >&5
10163 sed 's/^/| /' conftest.$ac_ext >&5
10164
10165 ac_header_compiler=no
10166 fi
10167 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10168 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10169 echo "${ECHO_T}$ac_header_compiler" >&6
10170
10171 # Is the header present?
10172 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10173 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10174 cat >conftest.$ac_ext <<_ACEOF
10175 /* confdefs.h.  */
10176 _ACEOF
10177 cat confdefs.h >>conftest.$ac_ext
10178 cat >>conftest.$ac_ext <<_ACEOF
10179 /* end confdefs.h.  */
10180 #include <$ac_header>
10181 _ACEOF
10182 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10183   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10184   ac_status=$?
10185   grep -v '^ *+' conftest.er1 >conftest.err
10186   rm -f conftest.er1
10187   cat conftest.err >&5
10188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10189   (exit $ac_status); } >/dev/null; then
10190   if test -s conftest.err; then
10191     ac_cpp_err=$ac_c_preproc_warn_flag
10192     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10193   else
10194     ac_cpp_err=
10195   fi
10196 else
10197   ac_cpp_err=yes
10198 fi
10199 if test -z "$ac_cpp_err"; then
10200   ac_header_preproc=yes
10201 else
10202   echo "$as_me: failed program was:" >&5
10203 sed 's/^/| /' conftest.$ac_ext >&5
10204
10205   ac_header_preproc=no
10206 fi
10207 rm -f conftest.err conftest.$ac_ext
10208 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10209 echo "${ECHO_T}$ac_header_preproc" >&6
10210
10211 # So?  What about this header?
10212 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10213   yes:no: )
10214     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10215 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10216     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10217 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10218     ac_header_preproc=yes
10219     ;;
10220   no:yes:* )
10221     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10222 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10223     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10224 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10225     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10226 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10227     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10228 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10229     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10230 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10231     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10232 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10233     (
10234       cat <<\_ASBOX
10235 ## ---------------------------------------- ##
10236 ## Report this to pgsql-bugs@postgresql.org ##
10237 ## ---------------------------------------- ##
10238 _ASBOX
10239     ) |
10240       sed "s/^/$as_me: WARNING:     /" >&2
10241     ;;
10242 esac
10243 echo "$as_me:$LINENO: checking for $ac_header" >&5
10244 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10245 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10246   echo $ECHO_N "(cached) $ECHO_C" >&6
10247 else
10248   eval "$as_ac_Header=\$ac_header_preproc"
10249 fi
10250 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10251 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10252
10253 fi
10254 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10255   cat >>confdefs.h <<_ACEOF
10256 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10257 _ACEOF
10258
10259 else
10260
10261 for ac_header in pam/pam_appl.h
10262 do
10263 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10264 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10265   echo "$as_me:$LINENO: checking for $ac_header" >&5
10266 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10267 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10268   echo $ECHO_N "(cached) $ECHO_C" >&6
10269 fi
10270 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10271 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10272 else
10273   # Is the header compilable?
10274 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10275 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10276 cat >conftest.$ac_ext <<_ACEOF
10277 /* confdefs.h.  */
10278 _ACEOF
10279 cat confdefs.h >>conftest.$ac_ext
10280 cat >>conftest.$ac_ext <<_ACEOF
10281 /* end confdefs.h.  */
10282 $ac_includes_default
10283 #include <$ac_header>
10284 _ACEOF
10285 rm -f conftest.$ac_objext
10286 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10287   (eval $ac_compile) 2>conftest.er1
10288   ac_status=$?
10289   grep -v '^ *+' conftest.er1 >conftest.err
10290   rm -f conftest.er1
10291   cat conftest.err >&5
10292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10293   (exit $ac_status); } &&
10294          { ac_try='test -z "$ac_c_werror_flag"
10295                          || test ! -s conftest.err'
10296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10297   (eval $ac_try) 2>&5
10298   ac_status=$?
10299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10300   (exit $ac_status); }; } &&
10301          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
10307   ac_header_compiler=yes
10308 else
10309   echo "$as_me: failed program was:" >&5
10310 sed 's/^/| /' conftest.$ac_ext >&5
10311
10312 ac_header_compiler=no
10313 fi
10314 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10315 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10316 echo "${ECHO_T}$ac_header_compiler" >&6
10317
10318 # Is the header present?
10319 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10320 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10321 cat >conftest.$ac_ext <<_ACEOF
10322 /* confdefs.h.  */
10323 _ACEOF
10324 cat confdefs.h >>conftest.$ac_ext
10325 cat >>conftest.$ac_ext <<_ACEOF
10326 /* end confdefs.h.  */
10327 #include <$ac_header>
10328 _ACEOF
10329 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10330   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10331   ac_status=$?
10332   grep -v '^ *+' conftest.er1 >conftest.err
10333   rm -f conftest.er1
10334   cat conftest.err >&5
10335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10336   (exit $ac_status); } >/dev/null; then
10337   if test -s conftest.err; then
10338     ac_cpp_err=$ac_c_preproc_warn_flag
10339     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10340   else
10341     ac_cpp_err=
10342   fi
10343 else
10344   ac_cpp_err=yes
10345 fi
10346 if test -z "$ac_cpp_err"; then
10347   ac_header_preproc=yes
10348 else
10349   echo "$as_me: failed program was:" >&5
10350 sed 's/^/| /' conftest.$ac_ext >&5
10351
10352   ac_header_preproc=no
10353 fi
10354 rm -f conftest.err conftest.$ac_ext
10355 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10356 echo "${ECHO_T}$ac_header_preproc" >&6
10357
10358 # So?  What about this header?
10359 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10360   yes:no: )
10361     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10362 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10363     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10364 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10365     ac_header_preproc=yes
10366     ;;
10367   no:yes:* )
10368     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10369 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10370     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10371 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10372     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10373 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10374     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10375 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10376     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10377 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10378     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10379 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10380     (
10381       cat <<\_ASBOX
10382 ## ---------------------------------------- ##
10383 ## Report this to pgsql-bugs@postgresql.org ##
10384 ## ---------------------------------------- ##
10385 _ASBOX
10386     ) |
10387       sed "s/^/$as_me: WARNING:     /" >&2
10388     ;;
10389 esac
10390 echo "$as_me:$LINENO: checking for $ac_header" >&5
10391 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10392 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10393   echo $ECHO_N "(cached) $ECHO_C" >&6
10394 else
10395   eval "$as_ac_Header=\$ac_header_preproc"
10396 fi
10397 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10398 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10399
10400 fi
10401 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10402   cat >>confdefs.h <<_ACEOF
10403 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10404 _ACEOF
10405
10406 else
10407   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10408 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10409    { (exit 1); exit 1; }; }
10410 fi
10411
10412 done
10413
10414 fi
10415
10416 done
10417
10418 fi
10419
10420 if test "$with_ldap" = yes ; then
10421   if test "$PORTNAME" != "win32"; then
10422
10423 for ac_header in ldap.h
10424 do
10425 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10426 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10427   echo "$as_me:$LINENO: checking for $ac_header" >&5
10428 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10429 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10430   echo $ECHO_N "(cached) $ECHO_C" >&6
10431 fi
10432 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10433 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10434 else
10435   # Is the header compilable?
10436 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10437 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10438 cat >conftest.$ac_ext <<_ACEOF
10439 /* confdefs.h.  */
10440 _ACEOF
10441 cat confdefs.h >>conftest.$ac_ext
10442 cat >>conftest.$ac_ext <<_ACEOF
10443 /* end confdefs.h.  */
10444 $ac_includes_default
10445 #include <$ac_header>
10446 _ACEOF
10447 rm -f conftest.$ac_objext
10448 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10449   (eval $ac_compile) 2>conftest.er1
10450   ac_status=$?
10451   grep -v '^ *+' conftest.er1 >conftest.err
10452   rm -f conftest.er1
10453   cat conftest.err >&5
10454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10455   (exit $ac_status); } &&
10456          { ac_try='test -z "$ac_c_werror_flag"
10457                          || test ! -s conftest.err'
10458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10459   (eval $ac_try) 2>&5
10460   ac_status=$?
10461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10462   (exit $ac_status); }; } &&
10463          { ac_try='test -s conftest.$ac_objext'
10464   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10465   (eval $ac_try) 2>&5
10466   ac_status=$?
10467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10468   (exit $ac_status); }; }; then
10469   ac_header_compiler=yes
10470 else
10471   echo "$as_me: failed program was:" >&5
10472 sed 's/^/| /' conftest.$ac_ext >&5
10473
10474 ac_header_compiler=no
10475 fi
10476 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10477 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10478 echo "${ECHO_T}$ac_header_compiler" >&6
10479
10480 # Is the header present?
10481 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10482 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10483 cat >conftest.$ac_ext <<_ACEOF
10484 /* confdefs.h.  */
10485 _ACEOF
10486 cat confdefs.h >>conftest.$ac_ext
10487 cat >>conftest.$ac_ext <<_ACEOF
10488 /* end confdefs.h.  */
10489 #include <$ac_header>
10490 _ACEOF
10491 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10492   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10493   ac_status=$?
10494   grep -v '^ *+' conftest.er1 >conftest.err
10495   rm -f conftest.er1
10496   cat conftest.err >&5
10497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10498   (exit $ac_status); } >/dev/null; then
10499   if test -s conftest.err; then
10500     ac_cpp_err=$ac_c_preproc_warn_flag
10501     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10502   else
10503     ac_cpp_err=
10504   fi
10505 else
10506   ac_cpp_err=yes
10507 fi
10508 if test -z "$ac_cpp_err"; then
10509   ac_header_preproc=yes
10510 else
10511   echo "$as_me: failed program was:" >&5
10512 sed 's/^/| /' conftest.$ac_ext >&5
10513
10514   ac_header_preproc=no
10515 fi
10516 rm -f conftest.err conftest.$ac_ext
10517 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10518 echo "${ECHO_T}$ac_header_preproc" >&6
10519
10520 # So?  What about this header?
10521 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10522   yes:no: )
10523     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10524 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10525     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10526 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10527     ac_header_preproc=yes
10528     ;;
10529   no:yes:* )
10530     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10531 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10532     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10533 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10534     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10535 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10536     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10537 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10538     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10539 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10540     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10541 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10542     (
10543       cat <<\_ASBOX
10544 ## ---------------------------------------- ##
10545 ## Report this to pgsql-bugs@postgresql.org ##
10546 ## ---------------------------------------- ##
10547 _ASBOX
10548     ) |
10549       sed "s/^/$as_me: WARNING:     /" >&2
10550     ;;
10551 esac
10552 echo "$as_me:$LINENO: checking for $ac_header" >&5
10553 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10554 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10555   echo $ECHO_N "(cached) $ECHO_C" >&6
10556 else
10557   eval "$as_ac_Header=\$ac_header_preproc"
10558 fi
10559 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10560 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10561
10562 fi
10563 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10564   cat >>confdefs.h <<_ACEOF
10565 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10566 _ACEOF
10567
10568 else
10569   { { echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
10570 echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
10571    { (exit 1); exit 1; }; }
10572 fi
10573
10574 done
10575
10576   else
10577
10578 for ac_header in winldap.h
10579 do
10580 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10581 echo "$as_me:$LINENO: checking for $ac_header" >&5
10582 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10583 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10584   echo $ECHO_N "(cached) $ECHO_C" >&6
10585 else
10586   cat >conftest.$ac_ext <<_ACEOF
10587 /* confdefs.h.  */
10588 _ACEOF
10589 cat confdefs.h >>conftest.$ac_ext
10590 cat >>conftest.$ac_ext <<_ACEOF
10591 /* end confdefs.h.  */
10592 $ac_includes_default
10593 #include <windows.h>
10594
10595
10596 #include <$ac_header>
10597 _ACEOF
10598 rm -f conftest.$ac_objext
10599 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10600   (eval $ac_compile) 2>conftest.er1
10601   ac_status=$?
10602   grep -v '^ *+' conftest.er1 >conftest.err
10603   rm -f conftest.er1
10604   cat conftest.err >&5
10605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10606   (exit $ac_status); } &&
10607          { ac_try='test -z "$ac_c_werror_flag"
10608                          || test ! -s conftest.err'
10609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10610   (eval $ac_try) 2>&5
10611   ac_status=$?
10612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10613   (exit $ac_status); }; } &&
10614          { ac_try='test -s conftest.$ac_objext'
10615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10616   (eval $ac_try) 2>&5
10617   ac_status=$?
10618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10619   (exit $ac_status); }; }; then
10620   eval "$as_ac_Header=yes"
10621 else
10622   echo "$as_me: failed program was:" >&5
10623 sed 's/^/| /' conftest.$ac_ext >&5
10624
10625 eval "$as_ac_Header=no"
10626 fi
10627 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10628 fi
10629 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10630 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10631 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10632   cat >>confdefs.h <<_ACEOF
10633 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10634 _ACEOF
10635
10636 else
10637   { { echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
10638 echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
10639    { (exit 1); exit 1; }; }
10640 fi
10641
10642 done
10643
10644   fi
10645 fi
10646
10647 if test "$with_bonjour" = yes ; then
10648   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10649   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10650 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10651 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10652   echo $ECHO_N "(cached) $ECHO_C" >&6
10653 fi
10654 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10655 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10656 else
10657   # Is the header compilable?
10658 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10659 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10660 cat >conftest.$ac_ext <<_ACEOF
10661 /* confdefs.h.  */
10662 _ACEOF
10663 cat confdefs.h >>conftest.$ac_ext
10664 cat >>conftest.$ac_ext <<_ACEOF
10665 /* end confdefs.h.  */
10666 $ac_includes_default
10667 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10668 _ACEOF
10669 rm -f conftest.$ac_objext
10670 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10671   (eval $ac_compile) 2>conftest.er1
10672   ac_status=$?
10673   grep -v '^ *+' conftest.er1 >conftest.err
10674   rm -f conftest.er1
10675   cat conftest.err >&5
10676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10677   (exit $ac_status); } &&
10678          { ac_try='test -z "$ac_c_werror_flag"
10679                          || test ! -s conftest.err'
10680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10681   (eval $ac_try) 2>&5
10682   ac_status=$?
10683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10684   (exit $ac_status); }; } &&
10685          { ac_try='test -s conftest.$ac_objext'
10686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10687   (eval $ac_try) 2>&5
10688   ac_status=$?
10689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10690   (exit $ac_status); }; }; then
10691   ac_header_compiler=yes
10692 else
10693   echo "$as_me: failed program was:" >&5
10694 sed 's/^/| /' conftest.$ac_ext >&5
10695
10696 ac_header_compiler=no
10697 fi
10698 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10699 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10700 echo "${ECHO_T}$ac_header_compiler" >&6
10701
10702 # Is the header present?
10703 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10704 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
10705 cat >conftest.$ac_ext <<_ACEOF
10706 /* confdefs.h.  */
10707 _ACEOF
10708 cat confdefs.h >>conftest.$ac_ext
10709 cat >>conftest.$ac_ext <<_ACEOF
10710 /* end confdefs.h.  */
10711 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10712 _ACEOF
10713 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10714   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10715   ac_status=$?
10716   grep -v '^ *+' conftest.er1 >conftest.err
10717   rm -f conftest.er1
10718   cat conftest.err >&5
10719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10720   (exit $ac_status); } >/dev/null; then
10721   if test -s conftest.err; then
10722     ac_cpp_err=$ac_c_preproc_warn_flag
10723     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10724   else
10725     ac_cpp_err=
10726   fi
10727 else
10728   ac_cpp_err=yes
10729 fi
10730 if test -z "$ac_cpp_err"; then
10731   ac_header_preproc=yes
10732 else
10733   echo "$as_me: failed program was:" >&5
10734 sed 's/^/| /' conftest.$ac_ext >&5
10735
10736   ac_header_preproc=no
10737 fi
10738 rm -f conftest.err conftest.$ac_ext
10739 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10740 echo "${ECHO_T}$ac_header_preproc" >&6
10741
10742 # So?  What about this header?
10743 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10744   yes:no: )
10745     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
10746 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10747     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
10748 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
10749     ac_header_preproc=yes
10750     ;;
10751   no:yes:* )
10752     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
10753 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
10754     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
10755 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
10756     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
10757 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
10758     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
10759 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10760     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
10761 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
10762     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
10763 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
10764     (
10765       cat <<\_ASBOX
10766 ## ---------------------------------------- ##
10767 ## Report this to pgsql-bugs@postgresql.org ##
10768 ## ---------------------------------------- ##
10769 _ASBOX
10770     ) |
10771       sed "s/^/$as_me: WARNING:     /" >&2
10772     ;;
10773 esac
10774 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10775 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10776 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10777   echo $ECHO_N "(cached) $ECHO_C" >&6
10778 else
10779   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
10780 fi
10781 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10782 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10783
10784 fi
10785 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
10786   :
10787 else
10788   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
10789 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
10790    { (exit 1); exit 1; }; }
10791 fi
10792
10793
10794 fi
10795
10796
10797 ##
10798 ## Types, structures, compiler characteristics
10799 ##
10800
10801  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
10802 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10803 if test "${ac_cv_c_const+set}" = set; then
10804   echo $ECHO_N "(cached) $ECHO_C" >&6
10805 else
10806   cat >conftest.$ac_ext <<_ACEOF
10807 /* confdefs.h.  */
10808 _ACEOF
10809 cat confdefs.h >>conftest.$ac_ext
10810 cat >>conftest.$ac_ext <<_ACEOF
10811 /* end confdefs.h.  */
10812
10813 int
10814 main ()
10815 {
10816 /* FIXME: Include the comments suggested by Paul. */
10817 #ifndef __cplusplus
10818   /* Ultrix mips cc rejects this.  */
10819   typedef int charset[2];
10820   const charset x;
10821   /* SunOS 4.1.1 cc rejects this.  */
10822   char const *const *ccp;
10823   char **p;
10824   /* NEC SVR4.0.2 mips cc rejects this.  */
10825   struct point {int x, y;};
10826   static struct point const zero = {0,0};
10827   /* AIX XL C 1.02.0.0 rejects this.
10828      It does not let you subtract one const X* pointer from another in
10829      an arm of an if-expression whose if-part is not a constant
10830      expression */
10831   const char *g = "string";
10832   ccp = &g + (g ? g-g : 0);
10833   /* HPUX 7.0 cc rejects these. */
10834   ++ccp;
10835   p = (char**) ccp;
10836   ccp = (char const *const *) p;
10837   { /* SCO 3.2v4 cc rejects this.  */
10838     char *t;
10839     char const *s = 0 ? (char *) 0 : (char const *) 0;
10840
10841     *t++ = 0;
10842   }
10843   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10844     int x[] = {25, 17};
10845     const int *foo = &x[0];
10846     ++foo;
10847   }
10848   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10849     typedef const int *iptr;
10850     iptr p = 0;
10851     ++p;
10852   }
10853   { /* AIX XL C 1.02.0.0 rejects this saying
10854        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10855     struct s { int j; const int *ap[3]; };
10856     struct s *b; b->j = 5;
10857   }
10858   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10859     const int foo = 10;
10860   }
10861 #endif
10862
10863   ;
10864   return 0;
10865 }
10866 _ACEOF
10867 rm -f conftest.$ac_objext
10868 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10869   (eval $ac_compile) 2>conftest.er1
10870   ac_status=$?
10871   grep -v '^ *+' conftest.er1 >conftest.err
10872   rm -f conftest.er1
10873   cat conftest.err >&5
10874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10875   (exit $ac_status); } &&
10876          { ac_try='test -z "$ac_c_werror_flag"
10877                          || test ! -s conftest.err'
10878   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10879   (eval $ac_try) 2>&5
10880   ac_status=$?
10881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10882   (exit $ac_status); }; } &&
10883          { ac_try='test -s conftest.$ac_objext'
10884   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10885   (eval $ac_try) 2>&5
10886   ac_status=$?
10887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10888   (exit $ac_status); }; }; then
10889   ac_cv_c_const=yes
10890 else
10891   echo "$as_me: failed program was:" >&5
10892 sed 's/^/| /' conftest.$ac_ext >&5
10893
10894 ac_cv_c_const=no
10895 fi
10896 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10897 fi
10898 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
10899 echo "${ECHO_T}$ac_cv_c_const" >&6
10900 if test $ac_cv_c_const = no; then
10901
10902 cat >>confdefs.h <<\_ACEOF
10903 #define const
10904 _ACEOF
10905
10906 fi
10907
10908
10909 echo "$as_me:$LINENO: checking for inline" >&5
10910 echo $ECHO_N "checking for inline... $ECHO_C" >&6
10911 if test "${ac_cv_c_inline+set}" = set; then
10912   echo $ECHO_N "(cached) $ECHO_C" >&6
10913 else
10914   ac_cv_c_inline=no
10915 for ac_kw in inline __inline__ __inline; do
10916   cat >conftest.$ac_ext <<_ACEOF
10917 /* confdefs.h.  */
10918 _ACEOF
10919 cat confdefs.h >>conftest.$ac_ext
10920 cat >>conftest.$ac_ext <<_ACEOF
10921 /* end confdefs.h.  */
10922 #ifndef __cplusplus
10923 typedef int foo_t;
10924 static $ac_kw foo_t static_foo () {return 0; }
10925 $ac_kw int foo () {return 0; }
10926 #endif
10927
10928 _ACEOF
10929 rm -f conftest.$ac_objext
10930 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10931   (eval $ac_compile) 2>conftest.er1
10932   ac_status=$?
10933   grep -v '^ *+' conftest.er1 >conftest.err
10934   rm -f conftest.er1
10935   cat conftest.err >&5
10936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10937   (exit $ac_status); } &&
10938          { ac_try='test -z "$ac_c_werror_flag"
10939                          || test ! -s conftest.err'
10940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10941   (eval $ac_try) 2>&5
10942   ac_status=$?
10943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10944   (exit $ac_status); }; } &&
10945          { ac_try='test -s conftest.$ac_objext'
10946   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10947   (eval $ac_try) 2>&5
10948   ac_status=$?
10949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10950   (exit $ac_status); }; }; then
10951   ac_cv_c_inline=$ac_kw; break
10952 else
10953   echo "$as_me: failed program was:" >&5
10954 sed 's/^/| /' conftest.$ac_ext >&5
10955
10956 fi
10957 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10958 done
10959
10960 fi
10961 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
10962 echo "${ECHO_T}$ac_cv_c_inline" >&6
10963 case $ac_cv_c_inline in
10964   inline | yes) ;;
10965   no)
10966 cat >>confdefs.h <<\_ACEOF
10967 #define inline
10968 _ACEOF
10969  ;;
10970   *)  cat >>confdefs.h <<_ACEOF
10971 #define inline $ac_cv_c_inline
10972 _ACEOF
10973  ;;
10974 esac
10975
10976 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
10977 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
10978 if test "${ac_cv_c_stringize+set}" = set; then
10979   echo $ECHO_N "(cached) $ECHO_C" >&6
10980 else
10981   cat >conftest.$ac_ext <<_ACEOF
10982 /* confdefs.h.  */
10983 _ACEOF
10984 cat confdefs.h >>conftest.$ac_ext
10985 cat >>conftest.$ac_ext <<_ACEOF
10986 /* end confdefs.h.  */
10987 #define x(y) #y
10988
10989 char *s = x(teststring);
10990 _ACEOF
10991 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10992   $EGREP "#teststring" >/dev/null 2>&1; then
10993   ac_cv_c_stringize=no
10994 else
10995   ac_cv_c_stringize=yes
10996 fi
10997 rm -f conftest*
10998
10999 fi
11000 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
11001 echo "${ECHO_T}$ac_cv_c_stringize" >&6
11002 if test $ac_cv_c_stringize = yes; then
11003
11004 cat >>confdefs.h <<\_ACEOF
11005 #define HAVE_STRINGIZE 1
11006 _ACEOF
11007
11008 fi
11009
11010 echo "$as_me:$LINENO: checking for signed types" >&5
11011 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11012 if test "${pgac_cv_c_signed+set}" = set; then
11013   echo $ECHO_N "(cached) $ECHO_C" >&6
11014 else
11015   cat >conftest.$ac_ext <<_ACEOF
11016 /* confdefs.h.  */
11017 _ACEOF
11018 cat confdefs.h >>conftest.$ac_ext
11019 cat >>conftest.$ac_ext <<_ACEOF
11020 /* end confdefs.h.  */
11021
11022 int
11023 main ()
11024 {
11025 signed char c; signed short s; signed int i;
11026   ;
11027   return 0;
11028 }
11029 _ACEOF
11030 rm -f conftest.$ac_objext
11031 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11032   (eval $ac_compile) 2>conftest.er1
11033   ac_status=$?
11034   grep -v '^ *+' conftest.er1 >conftest.err
11035   rm -f conftest.er1
11036   cat conftest.err >&5
11037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11038   (exit $ac_status); } &&
11039          { ac_try='test -z "$ac_c_werror_flag"
11040                          || test ! -s conftest.err'
11041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11042   (eval $ac_try) 2>&5
11043   ac_status=$?
11044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11045   (exit $ac_status); }; } &&
11046          { ac_try='test -s conftest.$ac_objext'
11047   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11048   (eval $ac_try) 2>&5
11049   ac_status=$?
11050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11051   (exit $ac_status); }; }; then
11052   pgac_cv_c_signed=yes
11053 else
11054   echo "$as_me: failed program was:" >&5
11055 sed 's/^/| /' conftest.$ac_ext >&5
11056
11057 pgac_cv_c_signed=no
11058 fi
11059 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11060 fi
11061 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11062 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11063 if test x"$pgac_cv_c_signed" = xno ; then
11064
11065 cat >>confdefs.h <<\_ACEOF
11066 #define signed
11067 _ACEOF
11068
11069 fi
11070 echo "$as_me:$LINENO: checking for working volatile" >&5
11071 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11072 if test "${ac_cv_c_volatile+set}" = set; then
11073   echo $ECHO_N "(cached) $ECHO_C" >&6
11074 else
11075   cat >conftest.$ac_ext <<_ACEOF
11076 /* confdefs.h.  */
11077 _ACEOF
11078 cat confdefs.h >>conftest.$ac_ext
11079 cat >>conftest.$ac_ext <<_ACEOF
11080 /* end confdefs.h.  */
11081
11082 int
11083 main ()
11084 {
11085
11086 volatile int x;
11087 int * volatile y;
11088   ;
11089   return 0;
11090 }
11091 _ACEOF
11092 rm -f conftest.$ac_objext
11093 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11094   (eval $ac_compile) 2>conftest.er1
11095   ac_status=$?
11096   grep -v '^ *+' conftest.er1 >conftest.err
11097   rm -f conftest.er1
11098   cat conftest.err >&5
11099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11100   (exit $ac_status); } &&
11101          { ac_try='test -z "$ac_c_werror_flag"
11102                          || test ! -s conftest.err'
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); }; } &&
11108          { ac_try='test -s conftest.$ac_objext'
11109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11110   (eval $ac_try) 2>&5
11111   ac_status=$?
11112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11113   (exit $ac_status); }; }; then
11114   ac_cv_c_volatile=yes
11115 else
11116   echo "$as_me: failed program was:" >&5
11117 sed 's/^/| /' conftest.$ac_ext >&5
11118
11119 ac_cv_c_volatile=no
11120 fi
11121 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11122 fi
11123 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11124 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11125 if test $ac_cv_c_volatile = no; then
11126
11127 cat >>confdefs.h <<\_ACEOF
11128 #define volatile
11129 _ACEOF
11130
11131 fi
11132
11133 echo "$as_me:$LINENO: checking for __func__" >&5
11134 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11135 if test "${pgac_cv_funcname_func_support+set}" = set; then
11136   echo $ECHO_N "(cached) $ECHO_C" >&6
11137 else
11138   cat >conftest.$ac_ext <<_ACEOF
11139 /* confdefs.h.  */
11140 _ACEOF
11141 cat confdefs.h >>conftest.$ac_ext
11142 cat >>conftest.$ac_ext <<_ACEOF
11143 /* end confdefs.h.  */
11144 #include <stdio.h>
11145 int
11146 main ()
11147 {
11148 printf("%s\n", __func__);
11149   ;
11150   return 0;
11151 }
11152 _ACEOF
11153 rm -f conftest.$ac_objext
11154 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11155   (eval $ac_compile) 2>conftest.er1
11156   ac_status=$?
11157   grep -v '^ *+' conftest.er1 >conftest.err
11158   rm -f conftest.er1
11159   cat conftest.err >&5
11160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11161   (exit $ac_status); } &&
11162          { ac_try='test -z "$ac_c_werror_flag"
11163                          || test ! -s conftest.err'
11164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11165   (eval $ac_try) 2>&5
11166   ac_status=$?
11167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11168   (exit $ac_status); }; } &&
11169          { ac_try='test -s conftest.$ac_objext'
11170   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11171   (eval $ac_try) 2>&5
11172   ac_status=$?
11173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11174   (exit $ac_status); }; }; then
11175   pgac_cv_funcname_func_support=yes
11176 else
11177   echo "$as_me: failed program was:" >&5
11178 sed 's/^/| /' conftest.$ac_ext >&5
11179
11180 pgac_cv_funcname_func_support=no
11181 fi
11182 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11183 fi
11184 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11185 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11186 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11187
11188 cat >>confdefs.h <<\_ACEOF
11189 #define HAVE_FUNCNAME__FUNC 1
11190 _ACEOF
11191
11192 else
11193 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11194 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11195 if test "${pgac_cv_funcname_function_support+set}" = set; then
11196   echo $ECHO_N "(cached) $ECHO_C" >&6
11197 else
11198   cat >conftest.$ac_ext <<_ACEOF
11199 /* confdefs.h.  */
11200 _ACEOF
11201 cat confdefs.h >>conftest.$ac_ext
11202 cat >>conftest.$ac_ext <<_ACEOF
11203 /* end confdefs.h.  */
11204 #include <stdio.h>
11205 int
11206 main ()
11207 {
11208 printf("%s\n", __FUNCTION__);
11209   ;
11210   return 0;
11211 }
11212 _ACEOF
11213 rm -f conftest.$ac_objext
11214 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11215   (eval $ac_compile) 2>conftest.er1
11216   ac_status=$?
11217   grep -v '^ *+' conftest.er1 >conftest.err
11218   rm -f conftest.er1
11219   cat conftest.err >&5
11220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11221   (exit $ac_status); } &&
11222          { ac_try='test -z "$ac_c_werror_flag"
11223                          || test ! -s conftest.err'
11224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11225   (eval $ac_try) 2>&5
11226   ac_status=$?
11227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11228   (exit $ac_status); }; } &&
11229          { ac_try='test -s conftest.$ac_objext'
11230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11231   (eval $ac_try) 2>&5
11232   ac_status=$?
11233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11234   (exit $ac_status); }; }; then
11235   pgac_cv_funcname_function_support=yes
11236 else
11237   echo "$as_me: failed program was:" >&5
11238 sed 's/^/| /' conftest.$ac_ext >&5
11239
11240 pgac_cv_funcname_function_support=no
11241 fi
11242 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11243 fi
11244 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11245 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11246 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11247
11248 cat >>confdefs.h <<\_ACEOF
11249 #define HAVE_FUNCNAME__FUNCTION 1
11250 _ACEOF
11251
11252 fi
11253 fi
11254 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11255 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11256 if test "${ac_cv_struct_tm+set}" = set; then
11257   echo $ECHO_N "(cached) $ECHO_C" >&6
11258 else
11259   cat >conftest.$ac_ext <<_ACEOF
11260 /* confdefs.h.  */
11261 _ACEOF
11262 cat confdefs.h >>conftest.$ac_ext
11263 cat >>conftest.$ac_ext <<_ACEOF
11264 /* end confdefs.h.  */
11265 #include <sys/types.h>
11266 #include <time.h>
11267
11268 int
11269 main ()
11270 {
11271 struct tm *tp; tp->tm_sec;
11272   ;
11273   return 0;
11274 }
11275 _ACEOF
11276 rm -f conftest.$ac_objext
11277 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11278   (eval $ac_compile) 2>conftest.er1
11279   ac_status=$?
11280   grep -v '^ *+' conftest.er1 >conftest.err
11281   rm -f conftest.er1
11282   cat conftest.err >&5
11283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11284   (exit $ac_status); } &&
11285          { ac_try='test -z "$ac_c_werror_flag"
11286                          || test ! -s conftest.err'
11287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11288   (eval $ac_try) 2>&5
11289   ac_status=$?
11290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11291   (exit $ac_status); }; } &&
11292          { ac_try='test -s conftest.$ac_objext'
11293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11294   (eval $ac_try) 2>&5
11295   ac_status=$?
11296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11297   (exit $ac_status); }; }; then
11298   ac_cv_struct_tm=time.h
11299 else
11300   echo "$as_me: failed program was:" >&5
11301 sed 's/^/| /' conftest.$ac_ext >&5
11302
11303 ac_cv_struct_tm=sys/time.h
11304 fi
11305 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11306 fi
11307 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11308 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11309 if test $ac_cv_struct_tm = sys/time.h; then
11310
11311 cat >>confdefs.h <<\_ACEOF
11312 #define TM_IN_SYS_TIME 1
11313 _ACEOF
11314
11315 fi
11316
11317 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11318 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11319 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11320   echo $ECHO_N "(cached) $ECHO_C" >&6
11321 else
11322   cat >conftest.$ac_ext <<_ACEOF
11323 /* confdefs.h.  */
11324 _ACEOF
11325 cat confdefs.h >>conftest.$ac_ext
11326 cat >>conftest.$ac_ext <<_ACEOF
11327 /* end confdefs.h.  */
11328 #include <sys/types.h>
11329 #include <$ac_cv_struct_tm>
11330
11331
11332 int
11333 main ()
11334 {
11335 static struct tm ac_aggr;
11336 if (ac_aggr.tm_zone)
11337 return 0;
11338   ;
11339   return 0;
11340 }
11341 _ACEOF
11342 rm -f conftest.$ac_objext
11343 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11344   (eval $ac_compile) 2>conftest.er1
11345   ac_status=$?
11346   grep -v '^ *+' conftest.er1 >conftest.err
11347   rm -f conftest.er1
11348   cat conftest.err >&5
11349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11350   (exit $ac_status); } &&
11351          { ac_try='test -z "$ac_c_werror_flag"
11352                          || test ! -s conftest.err'
11353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11354   (eval $ac_try) 2>&5
11355   ac_status=$?
11356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11357   (exit $ac_status); }; } &&
11358          { ac_try='test -s conftest.$ac_objext'
11359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11360   (eval $ac_try) 2>&5
11361   ac_status=$?
11362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11363   (exit $ac_status); }; }; then
11364   ac_cv_member_struct_tm_tm_zone=yes
11365 else
11366   echo "$as_me: failed program was:" >&5
11367 sed 's/^/| /' conftest.$ac_ext >&5
11368
11369 cat >conftest.$ac_ext <<_ACEOF
11370 /* confdefs.h.  */
11371 _ACEOF
11372 cat confdefs.h >>conftest.$ac_ext
11373 cat >>conftest.$ac_ext <<_ACEOF
11374 /* end confdefs.h.  */
11375 #include <sys/types.h>
11376 #include <$ac_cv_struct_tm>
11377
11378
11379 int
11380 main ()
11381 {
11382 static struct tm ac_aggr;
11383 if (sizeof ac_aggr.tm_zone)
11384 return 0;
11385   ;
11386   return 0;
11387 }
11388 _ACEOF
11389 rm -f conftest.$ac_objext
11390 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11391   (eval $ac_compile) 2>conftest.er1
11392   ac_status=$?
11393   grep -v '^ *+' conftest.er1 >conftest.err
11394   rm -f conftest.er1
11395   cat conftest.err >&5
11396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11397   (exit $ac_status); } &&
11398          { ac_try='test -z "$ac_c_werror_flag"
11399                          || test ! -s conftest.err'
11400   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11401   (eval $ac_try) 2>&5
11402   ac_status=$?
11403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11404   (exit $ac_status); }; } &&
11405          { ac_try='test -s conftest.$ac_objext'
11406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11407   (eval $ac_try) 2>&5
11408   ac_status=$?
11409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11410   (exit $ac_status); }; }; then
11411   ac_cv_member_struct_tm_tm_zone=yes
11412 else
11413   echo "$as_me: failed program was:" >&5
11414 sed 's/^/| /' conftest.$ac_ext >&5
11415
11416 ac_cv_member_struct_tm_tm_zone=no
11417 fi
11418 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11419 fi
11420 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11421 fi
11422 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11423 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11424 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11425
11426 cat >>confdefs.h <<_ACEOF
11427 #define HAVE_STRUCT_TM_TM_ZONE 1
11428 _ACEOF
11429
11430
11431 fi
11432
11433 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11434
11435 cat >>confdefs.h <<\_ACEOF
11436 #define HAVE_TM_ZONE 1
11437 _ACEOF
11438
11439 fi
11440 echo "$as_me:$LINENO: checking for tzname" >&5
11441 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11442 if test "${ac_cv_var_tzname+set}" = set; then
11443   echo $ECHO_N "(cached) $ECHO_C" >&6
11444 else
11445   cat >conftest.$ac_ext <<_ACEOF
11446 /* confdefs.h.  */
11447 _ACEOF
11448 cat confdefs.h >>conftest.$ac_ext
11449 cat >>conftest.$ac_ext <<_ACEOF
11450 /* end confdefs.h.  */
11451 #include <time.h>
11452 #ifndef tzname /* For SGI.  */
11453 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11454 #endif
11455
11456 int
11457 main ()
11458 {
11459 atoi(*tzname);
11460   ;
11461   return 0;
11462 }
11463 _ACEOF
11464 rm -f conftest.$ac_objext conftest$ac_exeext
11465 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11466   (eval $ac_link) 2>conftest.er1
11467   ac_status=$?
11468   grep -v '^ *+' conftest.er1 >conftest.err
11469   rm -f conftest.er1
11470   cat conftest.err >&5
11471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11472   (exit $ac_status); } &&
11473          { ac_try='test -z "$ac_c_werror_flag"
11474                          || test ! -s conftest.err'
11475   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11476   (eval $ac_try) 2>&5
11477   ac_status=$?
11478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11479   (exit $ac_status); }; } &&
11480          { ac_try='test -s conftest$ac_exeext'
11481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11482   (eval $ac_try) 2>&5
11483   ac_status=$?
11484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11485   (exit $ac_status); }; }; then
11486   ac_cv_var_tzname=yes
11487 else
11488   echo "$as_me: failed program was:" >&5
11489 sed 's/^/| /' conftest.$ac_ext >&5
11490
11491 ac_cv_var_tzname=no
11492 fi
11493 rm -f conftest.err conftest.$ac_objext \
11494       conftest$ac_exeext conftest.$ac_ext
11495 fi
11496 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11497 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11498 if test $ac_cv_var_tzname = yes; then
11499
11500 cat >>confdefs.h <<\_ACEOF
11501 #define HAVE_TZNAME 1
11502 _ACEOF
11503
11504 fi
11505
11506 echo "$as_me:$LINENO: checking for union semun" >&5
11507 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11508 if test "${ac_cv_type_union_semun+set}" = set; then
11509   echo $ECHO_N "(cached) $ECHO_C" >&6
11510 else
11511   cat >conftest.$ac_ext <<_ACEOF
11512 /* confdefs.h.  */
11513 _ACEOF
11514 cat confdefs.h >>conftest.$ac_ext
11515 cat >>conftest.$ac_ext <<_ACEOF
11516 /* end confdefs.h.  */
11517 #include <sys/types.h>
11518 #include <sys/ipc.h>
11519 #include <sys/sem.h>
11520
11521 int
11522 main ()
11523 {
11524 if ((union semun *) 0)
11525   return 0;
11526 if (sizeof (union semun))
11527   return 0;
11528   ;
11529   return 0;
11530 }
11531 _ACEOF
11532 rm -f conftest.$ac_objext
11533 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11534   (eval $ac_compile) 2>conftest.er1
11535   ac_status=$?
11536   grep -v '^ *+' conftest.er1 >conftest.err
11537   rm -f conftest.er1
11538   cat conftest.err >&5
11539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11540   (exit $ac_status); } &&
11541          { ac_try='test -z "$ac_c_werror_flag"
11542                          || test ! -s conftest.err'
11543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11544   (eval $ac_try) 2>&5
11545   ac_status=$?
11546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11547   (exit $ac_status); }; } &&
11548          { ac_try='test -s conftest.$ac_objext'
11549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11550   (eval $ac_try) 2>&5
11551   ac_status=$?
11552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11553   (exit $ac_status); }; }; then
11554   ac_cv_type_union_semun=yes
11555 else
11556   echo "$as_me: failed program was:" >&5
11557 sed 's/^/| /' conftest.$ac_ext >&5
11558
11559 ac_cv_type_union_semun=no
11560 fi
11561 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11562 fi
11563 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11564 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11565 if test $ac_cv_type_union_semun = yes; then
11566
11567 cat >>confdefs.h <<_ACEOF
11568 #define HAVE_UNION_SEMUN 1
11569 _ACEOF
11570
11571
11572 fi
11573
11574 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11575 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11576 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11577   echo $ECHO_N "(cached) $ECHO_C" >&6
11578 else
11579   cat >conftest.$ac_ext <<_ACEOF
11580 /* confdefs.h.  */
11581 _ACEOF
11582 cat confdefs.h >>conftest.$ac_ext
11583 cat >>conftest.$ac_ext <<_ACEOF
11584 /* end confdefs.h.  */
11585 #include <sys/types.h>
11586 #ifdef HAVE_SYS_UN_H
11587 #include <sys/un.h>
11588 #endif
11589
11590
11591 int
11592 main ()
11593 {
11594 if ((struct sockaddr_un *) 0)
11595   return 0;
11596 if (sizeof (struct sockaddr_un))
11597   return 0;
11598   ;
11599   return 0;
11600 }
11601 _ACEOF
11602 rm -f conftest.$ac_objext
11603 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11604   (eval $ac_compile) 2>conftest.er1
11605   ac_status=$?
11606   grep -v '^ *+' conftest.er1 >conftest.err
11607   rm -f conftest.er1
11608   cat conftest.err >&5
11609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11610   (exit $ac_status); } &&
11611          { ac_try='test -z "$ac_c_werror_flag"
11612                          || test ! -s conftest.err'
11613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11614   (eval $ac_try) 2>&5
11615   ac_status=$?
11616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11617   (exit $ac_status); }; } &&
11618          { ac_try='test -s conftest.$ac_objext'
11619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11620   (eval $ac_try) 2>&5
11621   ac_status=$?
11622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11623   (exit $ac_status); }; }; then
11624   ac_cv_type_struct_sockaddr_un=yes
11625 else
11626   echo "$as_me: failed program was:" >&5
11627 sed 's/^/| /' conftest.$ac_ext >&5
11628
11629 ac_cv_type_struct_sockaddr_un=no
11630 fi
11631 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11632 fi
11633 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11634 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11635 if test $ac_cv_type_struct_sockaddr_un = yes; then
11636
11637 cat >>confdefs.h <<_ACEOF
11638 #define HAVE_STRUCT_SOCKADDR_UN 1
11639 _ACEOF
11640
11641
11642 cat >>confdefs.h <<\_ACEOF
11643 #define HAVE_UNIX_SOCKETS 1
11644 _ACEOF
11645
11646 fi
11647
11648 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11649 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11650 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11651   echo $ECHO_N "(cached) $ECHO_C" >&6
11652 else
11653   cat >conftest.$ac_ext <<_ACEOF
11654 /* confdefs.h.  */
11655 _ACEOF
11656 cat confdefs.h >>conftest.$ac_ext
11657 cat >>conftest.$ac_ext <<_ACEOF
11658 /* end confdefs.h.  */
11659 #include <sys/types.h>
11660 #ifdef HAVE_SYS_SOCKET_H
11661 #include <sys/socket.h>
11662 #endif
11663
11664
11665 int
11666 main ()
11667 {
11668 if ((struct sockaddr_storage *) 0)
11669   return 0;
11670 if (sizeof (struct sockaddr_storage))
11671   return 0;
11672   ;
11673   return 0;
11674 }
11675 _ACEOF
11676 rm -f conftest.$ac_objext
11677 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11678   (eval $ac_compile) 2>conftest.er1
11679   ac_status=$?
11680   grep -v '^ *+' conftest.er1 >conftest.err
11681   rm -f conftest.er1
11682   cat conftest.err >&5
11683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11684   (exit $ac_status); } &&
11685          { ac_try='test -z "$ac_c_werror_flag"
11686                          || test ! -s conftest.err'
11687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11688   (eval $ac_try) 2>&5
11689   ac_status=$?
11690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11691   (exit $ac_status); }; } &&
11692          { ac_try='test -s conftest.$ac_objext'
11693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11694   (eval $ac_try) 2>&5
11695   ac_status=$?
11696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11697   (exit $ac_status); }; }; then
11698   ac_cv_type_struct_sockaddr_storage=yes
11699 else
11700   echo "$as_me: failed program was:" >&5
11701 sed 's/^/| /' conftest.$ac_ext >&5
11702
11703 ac_cv_type_struct_sockaddr_storage=no
11704 fi
11705 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11706 fi
11707 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11708 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11709 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11710
11711 cat >>confdefs.h <<_ACEOF
11712 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11713 _ACEOF
11714
11715
11716 fi
11717
11718 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11719 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11720 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11721   echo $ECHO_N "(cached) $ECHO_C" >&6
11722 else
11723   cat >conftest.$ac_ext <<_ACEOF
11724 /* confdefs.h.  */
11725 _ACEOF
11726 cat confdefs.h >>conftest.$ac_ext
11727 cat >>conftest.$ac_ext <<_ACEOF
11728 /* end confdefs.h.  */
11729 #include <sys/types.h>
11730 #ifdef HAVE_SYS_SOCKET_H
11731 #include <sys/socket.h>
11732 #endif
11733
11734
11735 int
11736 main ()
11737 {
11738 static struct sockaddr_storage ac_aggr;
11739 if (ac_aggr.ss_family)
11740 return 0;
11741   ;
11742   return 0;
11743 }
11744 _ACEOF
11745 rm -f conftest.$ac_objext
11746 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11747   (eval $ac_compile) 2>conftest.er1
11748   ac_status=$?
11749   grep -v '^ *+' conftest.er1 >conftest.err
11750   rm -f conftest.er1
11751   cat conftest.err >&5
11752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11753   (exit $ac_status); } &&
11754          { ac_try='test -z "$ac_c_werror_flag"
11755                          || test ! -s conftest.err'
11756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11757   (eval $ac_try) 2>&5
11758   ac_status=$?
11759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11760   (exit $ac_status); }; } &&
11761          { ac_try='test -s conftest.$ac_objext'
11762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11763   (eval $ac_try) 2>&5
11764   ac_status=$?
11765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11766   (exit $ac_status); }; }; then
11767   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11768 else
11769   echo "$as_me: failed program was:" >&5
11770 sed 's/^/| /' conftest.$ac_ext >&5
11771
11772 cat >conftest.$ac_ext <<_ACEOF
11773 /* confdefs.h.  */
11774 _ACEOF
11775 cat confdefs.h >>conftest.$ac_ext
11776 cat >>conftest.$ac_ext <<_ACEOF
11777 /* end confdefs.h.  */
11778 #include <sys/types.h>
11779 #ifdef HAVE_SYS_SOCKET_H
11780 #include <sys/socket.h>
11781 #endif
11782
11783
11784 int
11785 main ()
11786 {
11787 static struct sockaddr_storage ac_aggr;
11788 if (sizeof ac_aggr.ss_family)
11789 return 0;
11790   ;
11791   return 0;
11792 }
11793 _ACEOF
11794 rm -f conftest.$ac_objext
11795 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11796   (eval $ac_compile) 2>conftest.er1
11797   ac_status=$?
11798   grep -v '^ *+' conftest.er1 >conftest.err
11799   rm -f conftest.er1
11800   cat conftest.err >&5
11801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11802   (exit $ac_status); } &&
11803          { ac_try='test -z "$ac_c_werror_flag"
11804                          || test ! -s conftest.err'
11805   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11806   (eval $ac_try) 2>&5
11807   ac_status=$?
11808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11809   (exit $ac_status); }; } &&
11810          { ac_try='test -s conftest.$ac_objext'
11811   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11812   (eval $ac_try) 2>&5
11813   ac_status=$?
11814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11815   (exit $ac_status); }; }; then
11816   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11817 else
11818   echo "$as_me: failed program was:" >&5
11819 sed 's/^/| /' conftest.$ac_ext >&5
11820
11821 ac_cv_member_struct_sockaddr_storage_ss_family=no
11822 fi
11823 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11824 fi
11825 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11826 fi
11827 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
11828 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
11829 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
11830
11831 cat >>confdefs.h <<_ACEOF
11832 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11833 _ACEOF
11834
11835
11836 fi
11837 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
11838 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
11839 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
11840   echo $ECHO_N "(cached) $ECHO_C" >&6
11841 else
11842   cat >conftest.$ac_ext <<_ACEOF
11843 /* confdefs.h.  */
11844 _ACEOF
11845 cat confdefs.h >>conftest.$ac_ext
11846 cat >>conftest.$ac_ext <<_ACEOF
11847 /* end confdefs.h.  */
11848 #include <sys/types.h>
11849 #ifdef HAVE_SYS_SOCKET_H
11850 #include <sys/socket.h>
11851 #endif
11852
11853
11854 int
11855 main ()
11856 {
11857 static struct sockaddr_storage ac_aggr;
11858 if (ac_aggr.__ss_family)
11859 return 0;
11860   ;
11861   return 0;
11862 }
11863 _ACEOF
11864 rm -f conftest.$ac_objext
11865 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11866   (eval $ac_compile) 2>conftest.er1
11867   ac_status=$?
11868   grep -v '^ *+' conftest.er1 >conftest.err
11869   rm -f conftest.er1
11870   cat conftest.err >&5
11871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11872   (exit $ac_status); } &&
11873          { ac_try='test -z "$ac_c_werror_flag"
11874                          || test ! -s conftest.err'
11875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11876   (eval $ac_try) 2>&5
11877   ac_status=$?
11878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11879   (exit $ac_status); }; } &&
11880          { ac_try='test -s conftest.$ac_objext'
11881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11882   (eval $ac_try) 2>&5
11883   ac_status=$?
11884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11885   (exit $ac_status); }; }; then
11886   ac_cv_member_struct_sockaddr_storage___ss_family=yes
11887 else
11888   echo "$as_me: failed program was:" >&5
11889 sed 's/^/| /' conftest.$ac_ext >&5
11890
11891 cat >conftest.$ac_ext <<_ACEOF
11892 /* confdefs.h.  */
11893 _ACEOF
11894 cat confdefs.h >>conftest.$ac_ext
11895 cat >>conftest.$ac_ext <<_ACEOF
11896 /* end confdefs.h.  */
11897 #include <sys/types.h>
11898 #ifdef HAVE_SYS_SOCKET_H
11899 #include <sys/socket.h>
11900 #endif
11901
11902
11903 int
11904 main ()
11905 {
11906 static struct sockaddr_storage ac_aggr;
11907 if (sizeof ac_aggr.__ss_family)
11908 return 0;
11909   ;
11910   return 0;
11911 }
11912 _ACEOF
11913 rm -f conftest.$ac_objext
11914 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11915   (eval $ac_compile) 2>conftest.er1
11916   ac_status=$?
11917   grep -v '^ *+' conftest.er1 >conftest.err
11918   rm -f conftest.er1
11919   cat conftest.err >&5
11920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11921   (exit $ac_status); } &&
11922          { ac_try='test -z "$ac_c_werror_flag"
11923                          || test ! -s conftest.err'
11924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11925   (eval $ac_try) 2>&5
11926   ac_status=$?
11927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11928   (exit $ac_status); }; } &&
11929          { ac_try='test -s conftest.$ac_objext'
11930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11931   (eval $ac_try) 2>&5
11932   ac_status=$?
11933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11934   (exit $ac_status); }; }; then
11935   ac_cv_member_struct_sockaddr_storage___ss_family=yes
11936 else
11937   echo "$as_me: failed program was:" >&5
11938 sed 's/^/| /' conftest.$ac_ext >&5
11939
11940 ac_cv_member_struct_sockaddr_storage___ss_family=no
11941 fi
11942 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11943 fi
11944 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11945 fi
11946 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
11947 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
11948 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
11949
11950 cat >>confdefs.h <<_ACEOF
11951 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
11952 _ACEOF
11953
11954
11955 fi
11956 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
11957 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
11958 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
11959   echo $ECHO_N "(cached) $ECHO_C" >&6
11960 else
11961   cat >conftest.$ac_ext <<_ACEOF
11962 /* confdefs.h.  */
11963 _ACEOF
11964 cat confdefs.h >>conftest.$ac_ext
11965 cat >>conftest.$ac_ext <<_ACEOF
11966 /* end confdefs.h.  */
11967 #include <sys/types.h>
11968 #ifdef HAVE_SYS_SOCKET_H
11969 #include <sys/socket.h>
11970 #endif
11971
11972
11973 int
11974 main ()
11975 {
11976 static struct sockaddr_storage ac_aggr;
11977 if (ac_aggr.ss_len)
11978 return 0;
11979   ;
11980   return 0;
11981 }
11982 _ACEOF
11983 rm -f conftest.$ac_objext
11984 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11985   (eval $ac_compile) 2>conftest.er1
11986   ac_status=$?
11987   grep -v '^ *+' conftest.er1 >conftest.err
11988   rm -f conftest.er1
11989   cat conftest.err >&5
11990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11991   (exit $ac_status); } &&
11992          { ac_try='test -z "$ac_c_werror_flag"
11993                          || test ! -s conftest.err'
11994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11995   (eval $ac_try) 2>&5
11996   ac_status=$?
11997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11998   (exit $ac_status); }; } &&
11999          { ac_try='test -s conftest.$ac_objext'
12000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12001   (eval $ac_try) 2>&5
12002   ac_status=$?
12003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12004   (exit $ac_status); }; }; then
12005   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12006 else
12007   echo "$as_me: failed program was:" >&5
12008 sed 's/^/| /' conftest.$ac_ext >&5
12009
12010 cat >conftest.$ac_ext <<_ACEOF
12011 /* confdefs.h.  */
12012 _ACEOF
12013 cat confdefs.h >>conftest.$ac_ext
12014 cat >>conftest.$ac_ext <<_ACEOF
12015 /* end confdefs.h.  */
12016 #include <sys/types.h>
12017 #ifdef HAVE_SYS_SOCKET_H
12018 #include <sys/socket.h>
12019 #endif
12020
12021
12022 int
12023 main ()
12024 {
12025 static struct sockaddr_storage ac_aggr;
12026 if (sizeof ac_aggr.ss_len)
12027 return 0;
12028   ;
12029   return 0;
12030 }
12031 _ACEOF
12032 rm -f conftest.$ac_objext
12033 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12034   (eval $ac_compile) 2>conftest.er1
12035   ac_status=$?
12036   grep -v '^ *+' conftest.er1 >conftest.err
12037   rm -f conftest.er1
12038   cat conftest.err >&5
12039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12040   (exit $ac_status); } &&
12041          { ac_try='test -z "$ac_c_werror_flag"
12042                          || test ! -s conftest.err'
12043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12044   (eval $ac_try) 2>&5
12045   ac_status=$?
12046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12047   (exit $ac_status); }; } &&
12048          { ac_try='test -s conftest.$ac_objext'
12049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12050   (eval $ac_try) 2>&5
12051   ac_status=$?
12052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12053   (exit $ac_status); }; }; then
12054   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12055 else
12056   echo "$as_me: failed program was:" >&5
12057 sed 's/^/| /' conftest.$ac_ext >&5
12058
12059 ac_cv_member_struct_sockaddr_storage_ss_len=no
12060 fi
12061 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12062 fi
12063 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12064 fi
12065 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12066 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12067 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12068
12069 cat >>confdefs.h <<_ACEOF
12070 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12071 _ACEOF
12072
12073
12074 fi
12075 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12076 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12077 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12078   echo $ECHO_N "(cached) $ECHO_C" >&6
12079 else
12080   cat >conftest.$ac_ext <<_ACEOF
12081 /* confdefs.h.  */
12082 _ACEOF
12083 cat confdefs.h >>conftest.$ac_ext
12084 cat >>conftest.$ac_ext <<_ACEOF
12085 /* end confdefs.h.  */
12086 #include <sys/types.h>
12087 #ifdef HAVE_SYS_SOCKET_H
12088 #include <sys/socket.h>
12089 #endif
12090
12091
12092 int
12093 main ()
12094 {
12095 static struct sockaddr_storage ac_aggr;
12096 if (ac_aggr.__ss_len)
12097 return 0;
12098   ;
12099   return 0;
12100 }
12101 _ACEOF
12102 rm -f conftest.$ac_objext
12103 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12104   (eval $ac_compile) 2>conftest.er1
12105   ac_status=$?
12106   grep -v '^ *+' conftest.er1 >conftest.err
12107   rm -f conftest.er1
12108   cat conftest.err >&5
12109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12110   (exit $ac_status); } &&
12111          { ac_try='test -z "$ac_c_werror_flag"
12112                          || test ! -s conftest.err'
12113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12114   (eval $ac_try) 2>&5
12115   ac_status=$?
12116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12117   (exit $ac_status); }; } &&
12118          { ac_try='test -s conftest.$ac_objext'
12119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12120   (eval $ac_try) 2>&5
12121   ac_status=$?
12122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12123   (exit $ac_status); }; }; then
12124   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12125 else
12126   echo "$as_me: failed program was:" >&5
12127 sed 's/^/| /' conftest.$ac_ext >&5
12128
12129 cat >conftest.$ac_ext <<_ACEOF
12130 /* confdefs.h.  */
12131 _ACEOF
12132 cat confdefs.h >>conftest.$ac_ext
12133 cat >>conftest.$ac_ext <<_ACEOF
12134 /* end confdefs.h.  */
12135 #include <sys/types.h>
12136 #ifdef HAVE_SYS_SOCKET_H
12137 #include <sys/socket.h>
12138 #endif
12139
12140
12141 int
12142 main ()
12143 {
12144 static struct sockaddr_storage ac_aggr;
12145 if (sizeof ac_aggr.__ss_len)
12146 return 0;
12147   ;
12148   return 0;
12149 }
12150 _ACEOF
12151 rm -f conftest.$ac_objext
12152 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12153   (eval $ac_compile) 2>conftest.er1
12154   ac_status=$?
12155   grep -v '^ *+' conftest.er1 >conftest.err
12156   rm -f conftest.er1
12157   cat conftest.err >&5
12158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12159   (exit $ac_status); } &&
12160          { ac_try='test -z "$ac_c_werror_flag"
12161                          || test ! -s conftest.err'
12162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12163   (eval $ac_try) 2>&5
12164   ac_status=$?
12165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12166   (exit $ac_status); }; } &&
12167          { ac_try='test -s conftest.$ac_objext'
12168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12169   (eval $ac_try) 2>&5
12170   ac_status=$?
12171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12172   (exit $ac_status); }; }; then
12173   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12174 else
12175   echo "$as_me: failed program was:" >&5
12176 sed 's/^/| /' conftest.$ac_ext >&5
12177
12178 ac_cv_member_struct_sockaddr_storage___ss_len=no
12179 fi
12180 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12181 fi
12182 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12183 fi
12184 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12185 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12186 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12187
12188 cat >>confdefs.h <<_ACEOF
12189 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12190 _ACEOF
12191
12192
12193 fi
12194 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12195 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12196 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12197   echo $ECHO_N "(cached) $ECHO_C" >&6
12198 else
12199   cat >conftest.$ac_ext <<_ACEOF
12200 /* confdefs.h.  */
12201 _ACEOF
12202 cat confdefs.h >>conftest.$ac_ext
12203 cat >>conftest.$ac_ext <<_ACEOF
12204 /* end confdefs.h.  */
12205 #include <sys/types.h>
12206 #ifdef HAVE_SYS_SOCKET_H
12207 #include <sys/socket.h>
12208 #endif
12209
12210
12211 int
12212 main ()
12213 {
12214 static struct sockaddr ac_aggr;
12215 if (ac_aggr.sa_len)
12216 return 0;
12217   ;
12218   return 0;
12219 }
12220 _ACEOF
12221 rm -f conftest.$ac_objext
12222 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12223   (eval $ac_compile) 2>conftest.er1
12224   ac_status=$?
12225   grep -v '^ *+' conftest.er1 >conftest.err
12226   rm -f conftest.er1
12227   cat conftest.err >&5
12228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12229   (exit $ac_status); } &&
12230          { ac_try='test -z "$ac_c_werror_flag"
12231                          || test ! -s conftest.err'
12232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12233   (eval $ac_try) 2>&5
12234   ac_status=$?
12235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12236   (exit $ac_status); }; } &&
12237          { ac_try='test -s conftest.$ac_objext'
12238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12239   (eval $ac_try) 2>&5
12240   ac_status=$?
12241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12242   (exit $ac_status); }; }; then
12243   ac_cv_member_struct_sockaddr_sa_len=yes
12244 else
12245   echo "$as_me: failed program was:" >&5
12246 sed 's/^/| /' conftest.$ac_ext >&5
12247
12248 cat >conftest.$ac_ext <<_ACEOF
12249 /* confdefs.h.  */
12250 _ACEOF
12251 cat confdefs.h >>conftest.$ac_ext
12252 cat >>conftest.$ac_ext <<_ACEOF
12253 /* end confdefs.h.  */
12254 #include <sys/types.h>
12255 #ifdef HAVE_SYS_SOCKET_H
12256 #include <sys/socket.h>
12257 #endif
12258
12259
12260 int
12261 main ()
12262 {
12263 static struct sockaddr ac_aggr;
12264 if (sizeof ac_aggr.sa_len)
12265 return 0;
12266   ;
12267   return 0;
12268 }
12269 _ACEOF
12270 rm -f conftest.$ac_objext
12271 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12272   (eval $ac_compile) 2>conftest.er1
12273   ac_status=$?
12274   grep -v '^ *+' conftest.er1 >conftest.err
12275   rm -f conftest.er1
12276   cat conftest.err >&5
12277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12278   (exit $ac_status); } &&
12279          { ac_try='test -z "$ac_c_werror_flag"
12280                          || test ! -s conftest.err'
12281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12282   (eval $ac_try) 2>&5
12283   ac_status=$?
12284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12285   (exit $ac_status); }; } &&
12286          { ac_try='test -s conftest.$ac_objext'
12287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12288   (eval $ac_try) 2>&5
12289   ac_status=$?
12290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12291   (exit $ac_status); }; }; then
12292   ac_cv_member_struct_sockaddr_sa_len=yes
12293 else
12294   echo "$as_me: failed program was:" >&5
12295 sed 's/^/| /' conftest.$ac_ext >&5
12296
12297 ac_cv_member_struct_sockaddr_sa_len=no
12298 fi
12299 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12300 fi
12301 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12302 fi
12303 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12304 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12305 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12306
12307 cat >>confdefs.h <<_ACEOF
12308 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12309 _ACEOF
12310
12311
12312 fi
12313
12314 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12315 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12316 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12317   echo $ECHO_N "(cached) $ECHO_C" >&6
12318 else
12319   cat >conftest.$ac_ext <<_ACEOF
12320 /* confdefs.h.  */
12321 _ACEOF
12322 cat confdefs.h >>conftest.$ac_ext
12323 cat >>conftest.$ac_ext <<_ACEOF
12324 /* end confdefs.h.  */
12325 #include <sys/types.h>
12326 #include <sys/socket.h>
12327 #include <netdb.h>
12328
12329
12330 int
12331 main ()
12332 {
12333 if ((struct addrinfo *) 0)
12334   return 0;
12335 if (sizeof (struct addrinfo))
12336   return 0;
12337   ;
12338   return 0;
12339 }
12340 _ACEOF
12341 rm -f conftest.$ac_objext
12342 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12343   (eval $ac_compile) 2>conftest.er1
12344   ac_status=$?
12345   grep -v '^ *+' conftest.er1 >conftest.err
12346   rm -f conftest.er1
12347   cat conftest.err >&5
12348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12349   (exit $ac_status); } &&
12350          { ac_try='test -z "$ac_c_werror_flag"
12351                          || test ! -s conftest.err'
12352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12353   (eval $ac_try) 2>&5
12354   ac_status=$?
12355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12356   (exit $ac_status); }; } &&
12357          { ac_try='test -s conftest.$ac_objext'
12358   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12359   (eval $ac_try) 2>&5
12360   ac_status=$?
12361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12362   (exit $ac_status); }; }; then
12363   ac_cv_type_struct_addrinfo=yes
12364 else
12365   echo "$as_me: failed program was:" >&5
12366 sed 's/^/| /' conftest.$ac_ext >&5
12367
12368 ac_cv_type_struct_addrinfo=no
12369 fi
12370 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12371 fi
12372 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12373 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12374 if test $ac_cv_type_struct_addrinfo = yes; then
12375
12376 cat >>confdefs.h <<_ACEOF
12377 #define HAVE_STRUCT_ADDRINFO 1
12378 _ACEOF
12379
12380
12381 fi
12382
12383
12384 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12385 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12386 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12387   echo $ECHO_N "(cached) $ECHO_C" >&6
12388 else
12389   cat >conftest.$ac_ext <<_ACEOF
12390 /* confdefs.h.  */
12391 _ACEOF
12392 cat confdefs.h >>conftest.$ac_ext
12393 cat >>conftest.$ac_ext <<_ACEOF
12394 /* end confdefs.h.  */
12395 #include <sys/param.h>
12396 #include <sys/types.h>
12397 #include <sys/socket.h>
12398 #include <sys/ucred.h>
12399
12400 int
12401 main ()
12402 {
12403 if ((struct cmsgcred *) 0)
12404   return 0;
12405 if (sizeof (struct cmsgcred))
12406   return 0;
12407   ;
12408   return 0;
12409 }
12410 _ACEOF
12411 rm -f conftest.$ac_objext
12412 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12413   (eval $ac_compile) 2>conftest.er1
12414   ac_status=$?
12415   grep -v '^ *+' conftest.er1 >conftest.err
12416   rm -f conftest.er1
12417   cat conftest.err >&5
12418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12419   (exit $ac_status); } &&
12420          { ac_try='test -z "$ac_c_werror_flag"
12421                          || test ! -s conftest.err'
12422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12423   (eval $ac_try) 2>&5
12424   ac_status=$?
12425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12426   (exit $ac_status); }; } &&
12427          { ac_try='test -s conftest.$ac_objext'
12428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12429   (eval $ac_try) 2>&5
12430   ac_status=$?
12431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12432   (exit $ac_status); }; }; then
12433   ac_cv_type_struct_cmsgcred=yes
12434 else
12435   echo "$as_me: failed program was:" >&5
12436 sed 's/^/| /' conftest.$ac_ext >&5
12437
12438 ac_cv_type_struct_cmsgcred=no
12439 fi
12440 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12441 fi
12442 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12443 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12444 if test $ac_cv_type_struct_cmsgcred = yes; then
12445
12446 cat >>confdefs.h <<_ACEOF
12447 #define HAVE_STRUCT_CMSGCRED 1
12448 _ACEOF
12449
12450
12451 fi
12452 echo "$as_me:$LINENO: checking for struct fcred" >&5
12453 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12454 if test "${ac_cv_type_struct_fcred+set}" = set; then
12455   echo $ECHO_N "(cached) $ECHO_C" >&6
12456 else
12457   cat >conftest.$ac_ext <<_ACEOF
12458 /* confdefs.h.  */
12459 _ACEOF
12460 cat confdefs.h >>conftest.$ac_ext
12461 cat >>conftest.$ac_ext <<_ACEOF
12462 /* end confdefs.h.  */
12463 #include <sys/param.h>
12464 #include <sys/types.h>
12465 #include <sys/socket.h>
12466 #include <sys/ucred.h>
12467
12468 int
12469 main ()
12470 {
12471 if ((struct fcred *) 0)
12472   return 0;
12473 if (sizeof (struct fcred))
12474   return 0;
12475   ;
12476   return 0;
12477 }
12478 _ACEOF
12479 rm -f conftest.$ac_objext
12480 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12481   (eval $ac_compile) 2>conftest.er1
12482   ac_status=$?
12483   grep -v '^ *+' conftest.er1 >conftest.err
12484   rm -f conftest.er1
12485   cat conftest.err >&5
12486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12487   (exit $ac_status); } &&
12488          { ac_try='test -z "$ac_c_werror_flag"
12489                          || test ! -s conftest.err'
12490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12491   (eval $ac_try) 2>&5
12492   ac_status=$?
12493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12494   (exit $ac_status); }; } &&
12495          { ac_try='test -s conftest.$ac_objext'
12496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12497   (eval $ac_try) 2>&5
12498   ac_status=$?
12499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12500   (exit $ac_status); }; }; then
12501   ac_cv_type_struct_fcred=yes
12502 else
12503   echo "$as_me: failed program was:" >&5
12504 sed 's/^/| /' conftest.$ac_ext >&5
12505
12506 ac_cv_type_struct_fcred=no
12507 fi
12508 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12509 fi
12510 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12511 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12512 if test $ac_cv_type_struct_fcred = yes; then
12513
12514 cat >>confdefs.h <<_ACEOF
12515 #define HAVE_STRUCT_FCRED 1
12516 _ACEOF
12517
12518
12519 fi
12520 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12521 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12522 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12523   echo $ECHO_N "(cached) $ECHO_C" >&6
12524 else
12525   cat >conftest.$ac_ext <<_ACEOF
12526 /* confdefs.h.  */
12527 _ACEOF
12528 cat confdefs.h >>conftest.$ac_ext
12529 cat >>conftest.$ac_ext <<_ACEOF
12530 /* end confdefs.h.  */
12531 #include <sys/param.h>
12532 #include <sys/types.h>
12533 #include <sys/socket.h>
12534 #include <sys/ucred.h>
12535
12536 int
12537 main ()
12538 {
12539 if ((struct sockcred *) 0)
12540   return 0;
12541 if (sizeof (struct sockcred))
12542   return 0;
12543   ;
12544   return 0;
12545 }
12546 _ACEOF
12547 rm -f conftest.$ac_objext
12548 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12549   (eval $ac_compile) 2>conftest.er1
12550   ac_status=$?
12551   grep -v '^ *+' conftest.er1 >conftest.err
12552   rm -f conftest.er1
12553   cat conftest.err >&5
12554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12555   (exit $ac_status); } &&
12556          { ac_try='test -z "$ac_c_werror_flag"
12557                          || test ! -s conftest.err'
12558   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12559   (eval $ac_try) 2>&5
12560   ac_status=$?
12561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12562   (exit $ac_status); }; } &&
12563          { ac_try='test -s conftest.$ac_objext'
12564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12565   (eval $ac_try) 2>&5
12566   ac_status=$?
12567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12568   (exit $ac_status); }; }; then
12569   ac_cv_type_struct_sockcred=yes
12570 else
12571   echo "$as_me: failed program was:" >&5
12572 sed 's/^/| /' conftest.$ac_ext >&5
12573
12574 ac_cv_type_struct_sockcred=no
12575 fi
12576 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12577 fi
12578 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12579 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12580 if test $ac_cv_type_struct_sockcred = yes; then
12581
12582 cat >>confdefs.h <<_ACEOF
12583 #define HAVE_STRUCT_SOCKCRED 1
12584 _ACEOF
12585
12586
12587 fi
12588
12589
12590 echo "$as_me:$LINENO: checking for struct option" >&5
12591 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12592 if test "${ac_cv_type_struct_option+set}" = set; then
12593   echo $ECHO_N "(cached) $ECHO_C" >&6
12594 else
12595   cat >conftest.$ac_ext <<_ACEOF
12596 /* confdefs.h.  */
12597 _ACEOF
12598 cat confdefs.h >>conftest.$ac_ext
12599 cat >>conftest.$ac_ext <<_ACEOF
12600 /* end confdefs.h.  */
12601 #ifdef HAVE_GETOPT_H
12602 #include <getopt.h>
12603 #endif
12604
12605 int
12606 main ()
12607 {
12608 if ((struct option *) 0)
12609   return 0;
12610 if (sizeof (struct option))
12611   return 0;
12612   ;
12613   return 0;
12614 }
12615 _ACEOF
12616 rm -f conftest.$ac_objext
12617 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12618   (eval $ac_compile) 2>conftest.er1
12619   ac_status=$?
12620   grep -v '^ *+' conftest.er1 >conftest.err
12621   rm -f conftest.er1
12622   cat conftest.err >&5
12623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12624   (exit $ac_status); } &&
12625          { ac_try='test -z "$ac_c_werror_flag"
12626                          || test ! -s conftest.err'
12627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12628   (eval $ac_try) 2>&5
12629   ac_status=$?
12630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12631   (exit $ac_status); }; } &&
12632          { ac_try='test -s conftest.$ac_objext'
12633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12634   (eval $ac_try) 2>&5
12635   ac_status=$?
12636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12637   (exit $ac_status); }; }; then
12638   ac_cv_type_struct_option=yes
12639 else
12640   echo "$as_me: failed program was:" >&5
12641 sed 's/^/| /' conftest.$ac_ext >&5
12642
12643 ac_cv_type_struct_option=no
12644 fi
12645 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12646 fi
12647 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12648 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12649 if test $ac_cv_type_struct_option = yes; then
12650
12651 cat >>confdefs.h <<_ACEOF
12652 #define HAVE_STRUCT_OPTION 1
12653 _ACEOF
12654
12655
12656 fi
12657
12658
12659 if test "$with_zlib" = yes; then
12660   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12661   # did not).  While we could work around the lack of z_streamp, it
12662   # seems unwise to encourage people to use such old zlib versions...
12663   echo "$as_me:$LINENO: checking for z_streamp" >&5
12664 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12665 if test "${ac_cv_type_z_streamp+set}" = set; then
12666   echo $ECHO_N "(cached) $ECHO_C" >&6
12667 else
12668   cat >conftest.$ac_ext <<_ACEOF
12669 /* confdefs.h.  */
12670 _ACEOF
12671 cat confdefs.h >>conftest.$ac_ext
12672 cat >>conftest.$ac_ext <<_ACEOF
12673 /* end confdefs.h.  */
12674 #include <zlib.h>
12675
12676 int
12677 main ()
12678 {
12679 if ((z_streamp *) 0)
12680   return 0;
12681 if (sizeof (z_streamp))
12682   return 0;
12683   ;
12684   return 0;
12685 }
12686 _ACEOF
12687 rm -f conftest.$ac_objext
12688 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12689   (eval $ac_compile) 2>conftest.er1
12690   ac_status=$?
12691   grep -v '^ *+' conftest.er1 >conftest.err
12692   rm -f conftest.er1
12693   cat conftest.err >&5
12694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12695   (exit $ac_status); } &&
12696          { ac_try='test -z "$ac_c_werror_flag"
12697                          || test ! -s conftest.err'
12698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12699   (eval $ac_try) 2>&5
12700   ac_status=$?
12701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12702   (exit $ac_status); }; } &&
12703          { ac_try='test -s conftest.$ac_objext'
12704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12705   (eval $ac_try) 2>&5
12706   ac_status=$?
12707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12708   (exit $ac_status); }; }; then
12709   ac_cv_type_z_streamp=yes
12710 else
12711   echo "$as_me: failed program was:" >&5
12712 sed 's/^/| /' conftest.$ac_ext >&5
12713
12714 ac_cv_type_z_streamp=no
12715 fi
12716 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12717 fi
12718 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12719 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12720 if test $ac_cv_type_z_streamp = yes; then
12721   :
12722 else
12723   { { echo "$as_me:$LINENO: error: zlib version is too old
12724 Use --without-zlib to disable zlib support." >&5
12725 echo "$as_me: error: zlib version is too old
12726 Use --without-zlib to disable zlib support." >&2;}
12727    { (exit 1); exit 1; }; }
12728 fi
12729
12730 fi
12731
12732 if test "$with_krb5" = yes; then
12733 # Check for differences between MIT and Heimdal (KTH) releases
12734   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
12735 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
12736 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
12737   echo $ECHO_N "(cached) $ECHO_C" >&6
12738 else
12739   cat >conftest.$ac_ext <<_ACEOF
12740 /* confdefs.h.  */
12741 _ACEOF
12742 cat confdefs.h >>conftest.$ac_ext
12743 cat >>conftest.$ac_ext <<_ACEOF
12744 /* end confdefs.h.  */
12745 #include <krb5.h>
12746
12747 int
12748 main ()
12749 {
12750 static krb5_ticket ac_aggr;
12751 if (ac_aggr.enc_part2)
12752 return 0;
12753   ;
12754   return 0;
12755 }
12756 _ACEOF
12757 rm -f conftest.$ac_objext
12758 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12759   (eval $ac_compile) 2>conftest.er1
12760   ac_status=$?
12761   grep -v '^ *+' conftest.er1 >conftest.err
12762   rm -f conftest.er1
12763   cat conftest.err >&5
12764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12765   (exit $ac_status); } &&
12766          { ac_try='test -z "$ac_c_werror_flag"
12767                          || test ! -s conftest.err'
12768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12769   (eval $ac_try) 2>&5
12770   ac_status=$?
12771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12772   (exit $ac_status); }; } &&
12773          { ac_try='test -s conftest.$ac_objext'
12774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12775   (eval $ac_try) 2>&5
12776   ac_status=$?
12777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12778   (exit $ac_status); }; }; then
12779   ac_cv_member_krb5_ticket_enc_part2=yes
12780 else
12781   echo "$as_me: failed program was:" >&5
12782 sed 's/^/| /' conftest.$ac_ext >&5
12783
12784 cat >conftest.$ac_ext <<_ACEOF
12785 /* confdefs.h.  */
12786 _ACEOF
12787 cat confdefs.h >>conftest.$ac_ext
12788 cat >>conftest.$ac_ext <<_ACEOF
12789 /* end confdefs.h.  */
12790 #include <krb5.h>
12791
12792 int
12793 main ()
12794 {
12795 static krb5_ticket ac_aggr;
12796 if (sizeof ac_aggr.enc_part2)
12797 return 0;
12798   ;
12799   return 0;
12800 }
12801 _ACEOF
12802 rm -f conftest.$ac_objext
12803 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12804   (eval $ac_compile) 2>conftest.er1
12805   ac_status=$?
12806   grep -v '^ *+' conftest.er1 >conftest.err
12807   rm -f conftest.er1
12808   cat conftest.err >&5
12809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12810   (exit $ac_status); } &&
12811          { ac_try='test -z "$ac_c_werror_flag"
12812                          || test ! -s conftest.err'
12813   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12814   (eval $ac_try) 2>&5
12815   ac_status=$?
12816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12817   (exit $ac_status); }; } &&
12818          { ac_try='test -s conftest.$ac_objext'
12819   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12820   (eval $ac_try) 2>&5
12821   ac_status=$?
12822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12823   (exit $ac_status); }; }; then
12824   ac_cv_member_krb5_ticket_enc_part2=yes
12825 else
12826   echo "$as_me: failed program was:" >&5
12827 sed 's/^/| /' conftest.$ac_ext >&5
12828
12829 ac_cv_member_krb5_ticket_enc_part2=no
12830 fi
12831 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12832 fi
12833 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12834 fi
12835 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
12836 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
12837 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
12838
12839 cat >>confdefs.h <<_ACEOF
12840 #define HAVE_KRB5_TICKET_ENC_PART2 1
12841 _ACEOF
12842
12843
12844 else
12845   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
12846 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
12847 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
12848   echo $ECHO_N "(cached) $ECHO_C" >&6
12849 else
12850   cat >conftest.$ac_ext <<_ACEOF
12851 /* confdefs.h.  */
12852 _ACEOF
12853 cat confdefs.h >>conftest.$ac_ext
12854 cat >>conftest.$ac_ext <<_ACEOF
12855 /* end confdefs.h.  */
12856 #include <krb5.h>
12857
12858 int
12859 main ()
12860 {
12861 static krb5_ticket ac_aggr;
12862 if (ac_aggr.client)
12863 return 0;
12864   ;
12865   return 0;
12866 }
12867 _ACEOF
12868 rm -f conftest.$ac_objext
12869 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12870   (eval $ac_compile) 2>conftest.er1
12871   ac_status=$?
12872   grep -v '^ *+' conftest.er1 >conftest.err
12873   rm -f conftest.er1
12874   cat conftest.err >&5
12875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12876   (exit $ac_status); } &&
12877          { ac_try='test -z "$ac_c_werror_flag"
12878                          || test ! -s conftest.err'
12879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12880   (eval $ac_try) 2>&5
12881   ac_status=$?
12882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12883   (exit $ac_status); }; } &&
12884          { ac_try='test -s conftest.$ac_objext'
12885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12886   (eval $ac_try) 2>&5
12887   ac_status=$?
12888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12889   (exit $ac_status); }; }; then
12890   ac_cv_member_krb5_ticket_client=yes
12891 else
12892   echo "$as_me: failed program was:" >&5
12893 sed 's/^/| /' conftest.$ac_ext >&5
12894
12895 cat >conftest.$ac_ext <<_ACEOF
12896 /* confdefs.h.  */
12897 _ACEOF
12898 cat confdefs.h >>conftest.$ac_ext
12899 cat >>conftest.$ac_ext <<_ACEOF
12900 /* end confdefs.h.  */
12901 #include <krb5.h>
12902
12903 int
12904 main ()
12905 {
12906 static krb5_ticket ac_aggr;
12907 if (sizeof ac_aggr.client)
12908 return 0;
12909   ;
12910   return 0;
12911 }
12912 _ACEOF
12913 rm -f conftest.$ac_objext
12914 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12915   (eval $ac_compile) 2>conftest.er1
12916   ac_status=$?
12917   grep -v '^ *+' conftest.er1 >conftest.err
12918   rm -f conftest.er1
12919   cat conftest.err >&5
12920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12921   (exit $ac_status); } &&
12922          { ac_try='test -z "$ac_c_werror_flag"
12923                          || test ! -s conftest.err'
12924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12925   (eval $ac_try) 2>&5
12926   ac_status=$?
12927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12928   (exit $ac_status); }; } &&
12929          { ac_try='test -s conftest.$ac_objext'
12930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12931   (eval $ac_try) 2>&5
12932   ac_status=$?
12933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12934   (exit $ac_status); }; }; then
12935   ac_cv_member_krb5_ticket_client=yes
12936 else
12937   echo "$as_me: failed program was:" >&5
12938 sed 's/^/| /' conftest.$ac_ext >&5
12939
12940 ac_cv_member_krb5_ticket_client=no
12941 fi
12942 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12943 fi
12944 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12945 fi
12946 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
12947 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
12948 if test $ac_cv_member_krb5_ticket_client = yes; then
12949
12950 cat >>confdefs.h <<_ACEOF
12951 #define HAVE_KRB5_TICKET_CLIENT 1
12952 _ACEOF
12953
12954
12955 else
12956   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
12957 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
12958    { (exit 1); exit 1; }; }
12959 fi
12960
12961 fi
12962
12963   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
12964 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
12965 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
12966   echo $ECHO_N "(cached) $ECHO_C" >&6
12967 else
12968   cat >conftest.$ac_ext <<_ACEOF
12969 /* confdefs.h.  */
12970 _ACEOF
12971 cat confdefs.h >>conftest.$ac_ext
12972 cat >>conftest.$ac_ext <<_ACEOF
12973 /* end confdefs.h.  */
12974 #include <krb5.h>
12975
12976 int
12977 main ()
12978 {
12979 static krb5_error ac_aggr;
12980 if (ac_aggr.text.data)
12981 return 0;
12982   ;
12983   return 0;
12984 }
12985 _ACEOF
12986 rm -f conftest.$ac_objext
12987 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12988   (eval $ac_compile) 2>conftest.er1
12989   ac_status=$?
12990   grep -v '^ *+' conftest.er1 >conftest.err
12991   rm -f conftest.er1
12992   cat conftest.err >&5
12993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12994   (exit $ac_status); } &&
12995          { ac_try='test -z "$ac_c_werror_flag"
12996                          || test ! -s conftest.err'
12997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12998   (eval $ac_try) 2>&5
12999   ac_status=$?
13000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13001   (exit $ac_status); }; } &&
13002          { ac_try='test -s conftest.$ac_objext'
13003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13004   (eval $ac_try) 2>&5
13005   ac_status=$?
13006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13007   (exit $ac_status); }; }; then
13008   ac_cv_member_krb5_error_text_data=yes
13009 else
13010   echo "$as_me: failed program was:" >&5
13011 sed 's/^/| /' conftest.$ac_ext >&5
13012
13013 cat >conftest.$ac_ext <<_ACEOF
13014 /* confdefs.h.  */
13015 _ACEOF
13016 cat confdefs.h >>conftest.$ac_ext
13017 cat >>conftest.$ac_ext <<_ACEOF
13018 /* end confdefs.h.  */
13019 #include <krb5.h>
13020
13021 int
13022 main ()
13023 {
13024 static krb5_error ac_aggr;
13025 if (sizeof ac_aggr.text.data)
13026 return 0;
13027   ;
13028   return 0;
13029 }
13030 _ACEOF
13031 rm -f conftest.$ac_objext
13032 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13033   (eval $ac_compile) 2>conftest.er1
13034   ac_status=$?
13035   grep -v '^ *+' conftest.er1 >conftest.err
13036   rm -f conftest.er1
13037   cat conftest.err >&5
13038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13039   (exit $ac_status); } &&
13040          { ac_try='test -z "$ac_c_werror_flag"
13041                          || test ! -s conftest.err'
13042   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13043   (eval $ac_try) 2>&5
13044   ac_status=$?
13045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13046   (exit $ac_status); }; } &&
13047          { ac_try='test -s conftest.$ac_objext'
13048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13049   (eval $ac_try) 2>&5
13050   ac_status=$?
13051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13052   (exit $ac_status); }; }; then
13053   ac_cv_member_krb5_error_text_data=yes
13054 else
13055   echo "$as_me: failed program was:" >&5
13056 sed 's/^/| /' conftest.$ac_ext >&5
13057
13058 ac_cv_member_krb5_error_text_data=no
13059 fi
13060 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13061 fi
13062 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13063 fi
13064 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13065 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13066 if test $ac_cv_member_krb5_error_text_data = yes; then
13067
13068 cat >>confdefs.h <<_ACEOF
13069 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13070 _ACEOF
13071
13072
13073 else
13074   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13075 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13076 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13077   echo $ECHO_N "(cached) $ECHO_C" >&6
13078 else
13079   cat >conftest.$ac_ext <<_ACEOF
13080 /* confdefs.h.  */
13081 _ACEOF
13082 cat confdefs.h >>conftest.$ac_ext
13083 cat >>conftest.$ac_ext <<_ACEOF
13084 /* end confdefs.h.  */
13085 #include <krb5.h>
13086
13087 int
13088 main ()
13089 {
13090 static krb5_error ac_aggr;
13091 if (ac_aggr.e_data)
13092 return 0;
13093   ;
13094   return 0;
13095 }
13096 _ACEOF
13097 rm -f conftest.$ac_objext
13098 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13099   (eval $ac_compile) 2>conftest.er1
13100   ac_status=$?
13101   grep -v '^ *+' conftest.er1 >conftest.err
13102   rm -f conftest.er1
13103   cat conftest.err >&5
13104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13105   (exit $ac_status); } &&
13106          { ac_try='test -z "$ac_c_werror_flag"
13107                          || test ! -s conftest.err'
13108   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13109   (eval $ac_try) 2>&5
13110   ac_status=$?
13111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13112   (exit $ac_status); }; } &&
13113          { ac_try='test -s conftest.$ac_objext'
13114   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13115   (eval $ac_try) 2>&5
13116   ac_status=$?
13117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13118   (exit $ac_status); }; }; then
13119   ac_cv_member_krb5_error_e_data=yes
13120 else
13121   echo "$as_me: failed program was:" >&5
13122 sed 's/^/| /' conftest.$ac_ext >&5
13123
13124 cat >conftest.$ac_ext <<_ACEOF
13125 /* confdefs.h.  */
13126 _ACEOF
13127 cat confdefs.h >>conftest.$ac_ext
13128 cat >>conftest.$ac_ext <<_ACEOF
13129 /* end confdefs.h.  */
13130 #include <krb5.h>
13131
13132 int
13133 main ()
13134 {
13135 static krb5_error ac_aggr;
13136 if (sizeof ac_aggr.e_data)
13137 return 0;
13138   ;
13139   return 0;
13140 }
13141 _ACEOF
13142 rm -f conftest.$ac_objext
13143 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13144   (eval $ac_compile) 2>conftest.er1
13145   ac_status=$?
13146   grep -v '^ *+' conftest.er1 >conftest.err
13147   rm -f conftest.er1
13148   cat conftest.err >&5
13149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13150   (exit $ac_status); } &&
13151          { ac_try='test -z "$ac_c_werror_flag"
13152                          || test ! -s conftest.err'
13153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13154   (eval $ac_try) 2>&5
13155   ac_status=$?
13156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13157   (exit $ac_status); }; } &&
13158          { ac_try='test -s conftest.$ac_objext'
13159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13160   (eval $ac_try) 2>&5
13161   ac_status=$?
13162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13163   (exit $ac_status); }; }; then
13164   ac_cv_member_krb5_error_e_data=yes
13165 else
13166   echo "$as_me: failed program was:" >&5
13167 sed 's/^/| /' conftest.$ac_ext >&5
13168
13169 ac_cv_member_krb5_error_e_data=no
13170 fi
13171 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13172 fi
13173 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13174 fi
13175 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13176 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13177 if test $ac_cv_member_krb5_error_e_data = yes; then
13178
13179 cat >>confdefs.h <<_ACEOF
13180 #define HAVE_KRB5_ERROR_E_DATA 1
13181 _ACEOF
13182
13183
13184 else
13185   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13186 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13187    { (exit 1); exit 1; }; }
13188 fi
13189
13190 fi
13191
13192 fi
13193
13194 # This is probably only present on Darwin, but may as well check always
13195 echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
13196 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6
13197 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
13198   echo $ECHO_N "(cached) $ECHO_C" >&6
13199 else
13200   cat >conftest.$ac_ext <<_ACEOF
13201 /* confdefs.h.  */
13202 _ACEOF
13203 cat confdefs.h >>conftest.$ac_ext
13204 cat >>conftest.$ac_ext <<_ACEOF
13205 /* end confdefs.h.  */
13206 #include <fcntl.h>
13207
13208 int
13209 main ()
13210 {
13211 #ifndef F_FULLFSYNC
13212   char *p = (char *) F_FULLFSYNC;
13213 #endif
13214
13215   ;
13216   return 0;
13217 }
13218 _ACEOF
13219 rm -f conftest.$ac_objext
13220 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13221   (eval $ac_compile) 2>conftest.er1
13222   ac_status=$?
13223   grep -v '^ *+' conftest.er1 >conftest.err
13224   rm -f conftest.er1
13225   cat conftest.err >&5
13226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13227   (exit $ac_status); } &&
13228          { ac_try='test -z "$ac_c_werror_flag"
13229                          || test ! -s conftest.err'
13230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13231   (eval $ac_try) 2>&5
13232   ac_status=$?
13233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13234   (exit $ac_status); }; } &&
13235          { ac_try='test -s conftest.$ac_objext'
13236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13237   (eval $ac_try) 2>&5
13238   ac_status=$?
13239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13240   (exit $ac_status); }; }; then
13241   ac_cv_have_decl_F_FULLFSYNC=yes
13242 else
13243   echo "$as_me: failed program was:" >&5
13244 sed 's/^/| /' conftest.$ac_ext >&5
13245
13246 ac_cv_have_decl_F_FULLFSYNC=no
13247 fi
13248 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13249 fi
13250 echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
13251 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6
13252 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
13253
13254 cat >>confdefs.h <<_ACEOF
13255 #define HAVE_DECL_F_FULLFSYNC 1
13256 _ACEOF
13257
13258
13259 else
13260   cat >>confdefs.h <<_ACEOF
13261 #define HAVE_DECL_F_FULLFSYNC 0
13262 _ACEOF
13263
13264
13265 fi
13266
13267
13268
13269 ##
13270 ## Functions, global variables
13271 ##
13272
13273 echo "$as_me:$LINENO: checking for int timezone" >&5
13274 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13275 if test "${pgac_cv_var_int_timezone+set}" = set; then
13276   echo $ECHO_N "(cached) $ECHO_C" >&6
13277 else
13278   cat >conftest.$ac_ext <<_ACEOF
13279 /* confdefs.h.  */
13280 _ACEOF
13281 cat confdefs.h >>conftest.$ac_ext
13282 cat >>conftest.$ac_ext <<_ACEOF
13283 /* end confdefs.h.  */
13284 #include <time.h>
13285 int res;
13286 int
13287 main ()
13288 {
13289 #ifndef __CYGWIN__
13290 res = timezone / 60;
13291 #else
13292 res = _timezone / 60;
13293 #endif
13294   ;
13295   return 0;
13296 }
13297 _ACEOF
13298 rm -f conftest.$ac_objext conftest$ac_exeext
13299 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13300   (eval $ac_link) 2>conftest.er1
13301   ac_status=$?
13302   grep -v '^ *+' conftest.er1 >conftest.err
13303   rm -f conftest.er1
13304   cat conftest.err >&5
13305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13306   (exit $ac_status); } &&
13307          { ac_try='test -z "$ac_c_werror_flag"
13308                          || test ! -s conftest.err'
13309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13310   (eval $ac_try) 2>&5
13311   ac_status=$?
13312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13313   (exit $ac_status); }; } &&
13314          { ac_try='test -s conftest$ac_exeext'
13315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13316   (eval $ac_try) 2>&5
13317   ac_status=$?
13318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13319   (exit $ac_status); }; }; then
13320   pgac_cv_var_int_timezone=yes
13321 else
13322   echo "$as_me: failed program was:" >&5
13323 sed 's/^/| /' conftest.$ac_ext >&5
13324
13325 pgac_cv_var_int_timezone=no
13326 fi
13327 rm -f conftest.err conftest.$ac_objext \
13328       conftest$ac_exeext conftest.$ac_ext
13329 fi
13330 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13331 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13332 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13333
13334 cat >>confdefs.h <<\_ACEOF
13335 #define HAVE_INT_TIMEZONE
13336 _ACEOF
13337
13338 fi
13339 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13340 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13341  if test "${ac_cv_func_accept_return+set}" = set; then
13342   echo $ECHO_N "(cached) $ECHO_C" >&6
13343 else
13344    if test "${ac_cv_func_accept_arg1+set}" = set; then
13345   echo $ECHO_N "(cached) $ECHO_C" >&6
13346 else
13347     if test "${ac_cv_func_accept_arg2+set}" = set; then
13348   echo $ECHO_N "(cached) $ECHO_C" >&6
13349 else
13350      if test "${ac_cv_func_accept_arg3+set}" = set; then
13351   echo $ECHO_N "(cached) $ECHO_C" >&6
13352 else
13353       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13354       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13355        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13356         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
13357          cat >conftest.$ac_ext <<_ACEOF
13358 /* confdefs.h.  */
13359 _ACEOF
13360 cat confdefs.h >>conftest.$ac_ext
13361 cat >>conftest.$ac_ext <<_ACEOF
13362 /* end confdefs.h.  */
13363 #ifdef HAVE_SYS_TYPES_H
13364 #include <sys/types.h>
13365 #endif
13366 #ifdef HAVE_SYS_SOCKET_H
13367 #include <sys/socket.h>
13368 #endif
13369 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13370 int
13371 main ()
13372 {
13373
13374   ;
13375   return 0;
13376 }
13377 _ACEOF
13378 rm -f conftest.$ac_objext
13379 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13380   (eval $ac_compile) 2>conftest.er1
13381   ac_status=$?
13382   grep -v '^ *+' conftest.er1 >conftest.err
13383   rm -f conftest.er1
13384   cat conftest.err >&5
13385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13386   (exit $ac_status); } &&
13387          { ac_try='test -z "$ac_c_werror_flag"
13388                          || test ! -s conftest.err'
13389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13390   (eval $ac_try) 2>&5
13391   ac_status=$?
13392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13393   (exit $ac_status); }; } &&
13394          { ac_try='test -s conftest.$ac_objext'
13395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13396   (eval $ac_try) 2>&5
13397   ac_status=$?
13398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13399   (exit $ac_status); }; }; then
13400   ac_not_found=no; break 4
13401 else
13402   echo "$as_me: failed program was:" >&5
13403 sed 's/^/| /' conftest.$ac_ext >&5
13404
13405 ac_not_found=yes
13406 fi
13407 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13408        done
13409       done
13410      done
13411     done
13412     if test "$ac_not_found" = yes; then
13413       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13414 echo "$as_me: error: could not determine argument types" >&2;}
13415    { (exit 1); exit 1; }; }
13416     fi
13417     if test "$ac_cv_func_accept_arg3" = "void"; then
13418       ac_cv_func_accept_arg3=int
13419     fi
13420
13421 fi
13422
13423 fi
13424
13425 fi
13426
13427 fi
13428  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
13429 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13430
13431 cat >>confdefs.h <<_ACEOF
13432 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13433 _ACEOF
13434
13435
13436 cat >>confdefs.h <<_ACEOF
13437 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13438 _ACEOF
13439
13440
13441 cat >>confdefs.h <<_ACEOF
13442 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13443 _ACEOF
13444
13445
13446 cat >>confdefs.h <<_ACEOF
13447 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13448 _ACEOF
13449
13450
13451 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13452 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13453 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13454   echo $ECHO_N "(cached) $ECHO_C" >&6
13455 else
13456   cat >conftest.$ac_ext <<_ACEOF
13457 /* confdefs.h.  */
13458 _ACEOF
13459 cat confdefs.h >>conftest.$ac_ext
13460 cat >>conftest.$ac_ext <<_ACEOF
13461 /* end confdefs.h.  */
13462 #include <sys/time.h>
13463 int
13464 main ()
13465 {
13466 struct timeval *tp;
13467 struct timezone *tzp;
13468 gettimeofday(tp,tzp);
13469   ;
13470   return 0;
13471 }
13472 _ACEOF
13473 rm -f conftest.$ac_objext
13474 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13475   (eval $ac_compile) 2>conftest.er1
13476   ac_status=$?
13477   grep -v '^ *+' conftest.er1 >conftest.err
13478   rm -f conftest.er1
13479   cat conftest.err >&5
13480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13481   (exit $ac_status); } &&
13482          { ac_try='test -z "$ac_c_werror_flag"
13483                          || test ! -s conftest.err'
13484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13485   (eval $ac_try) 2>&5
13486   ac_status=$?
13487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13488   (exit $ac_status); }; } &&
13489          { ac_try='test -s conftest.$ac_objext'
13490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13491   (eval $ac_try) 2>&5
13492   ac_status=$?
13493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13494   (exit $ac_status); }; }; then
13495   pgac_cv_func_gettimeofday_1arg=no
13496 else
13497   echo "$as_me: failed program was:" >&5
13498 sed 's/^/| /' conftest.$ac_ext >&5
13499
13500 pgac_cv_func_gettimeofday_1arg=yes
13501 fi
13502 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13503 fi
13504 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13505 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13506 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13507
13508 cat >>confdefs.h <<\_ACEOF
13509 #define GETTIMEOFDAY_1ARG
13510 _ACEOF
13511
13512 fi
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535 for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13536 do
13537 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13538 echo "$as_me:$LINENO: checking for $ac_func" >&5
13539 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13540 if eval "test \"\${$as_ac_var+set}\" = set"; then
13541   echo $ECHO_N "(cached) $ECHO_C" >&6
13542 else
13543   cat >conftest.$ac_ext <<_ACEOF
13544 /* confdefs.h.  */
13545 _ACEOF
13546 cat confdefs.h >>conftest.$ac_ext
13547 cat >>conftest.$ac_ext <<_ACEOF
13548 /* end confdefs.h.  */
13549 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13550    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13551 #define $ac_func innocuous_$ac_func
13552
13553 /* System header to define __stub macros and hopefully few prototypes,
13554     which can conflict with char $ac_func (); below.
13555     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13556     <limits.h> exists even on freestanding compilers.  */
13557
13558 #ifdef __STDC__
13559 # include <limits.h>
13560 #else
13561 # include <assert.h>
13562 #endif
13563
13564 #undef $ac_func
13565
13566 /* Override any gcc2 internal prototype to avoid an error.  */
13567 #ifdef __cplusplus
13568 extern "C"
13569 {
13570 #endif
13571 /* We use char because int might match the return type of a gcc2
13572    builtin and then its argument prototype would still apply.  */
13573 char $ac_func ();
13574 /* The GNU C library defines this for functions which it implements
13575     to always fail with ENOSYS.  Some functions are actually named
13576     something starting with __ and the normal name is an alias.  */
13577 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13578 choke me
13579 #else
13580 char (*f) () = $ac_func;
13581 #endif
13582 #ifdef __cplusplus
13583 }
13584 #endif
13585
13586 int
13587 main ()
13588 {
13589 return f != $ac_func;
13590   ;
13591   return 0;
13592 }
13593 _ACEOF
13594 rm -f conftest.$ac_objext conftest$ac_exeext
13595 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13596   (eval $ac_link) 2>conftest.er1
13597   ac_status=$?
13598   grep -v '^ *+' conftest.er1 >conftest.err
13599   rm -f conftest.er1
13600   cat conftest.err >&5
13601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13602   (exit $ac_status); } &&
13603          { ac_try='test -z "$ac_c_werror_flag"
13604                          || test ! -s conftest.err'
13605   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13606   (eval $ac_try) 2>&5
13607   ac_status=$?
13608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13609   (exit $ac_status); }; } &&
13610          { ac_try='test -s conftest$ac_exeext'
13611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13612   (eval $ac_try) 2>&5
13613   ac_status=$?
13614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13615   (exit $ac_status); }; }; then
13616   eval "$as_ac_var=yes"
13617 else
13618   echo "$as_me: failed program was:" >&5
13619 sed 's/^/| /' conftest.$ac_ext >&5
13620
13621 eval "$as_ac_var=no"
13622 fi
13623 rm -f conftest.err conftest.$ac_objext \
13624       conftest$ac_exeext conftest.$ac_ext
13625 fi
13626 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13627 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13628 if test `eval echo '${'$as_ac_var'}'` = yes; then
13629   cat >>confdefs.h <<_ACEOF
13630 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13631 _ACEOF
13632
13633 fi
13634 done
13635
13636
13637 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13638 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13639 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13640   echo $ECHO_N "(cached) $ECHO_C" >&6
13641 else
13642   cat >conftest.$ac_ext <<_ACEOF
13643 /* confdefs.h.  */
13644 _ACEOF
13645 cat confdefs.h >>conftest.$ac_ext
13646 cat >>conftest.$ac_ext <<_ACEOF
13647 /* end confdefs.h.  */
13648 #include <unistd.h>
13649
13650 int
13651 main ()
13652 {
13653 #ifndef fdatasync
13654   char *p = (char *) fdatasync;
13655 #endif
13656
13657   ;
13658   return 0;
13659 }
13660 _ACEOF
13661 rm -f conftest.$ac_objext
13662 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13663   (eval $ac_compile) 2>conftest.er1
13664   ac_status=$?
13665   grep -v '^ *+' conftest.er1 >conftest.err
13666   rm -f conftest.er1
13667   cat conftest.err >&5
13668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13669   (exit $ac_status); } &&
13670          { ac_try='test -z "$ac_c_werror_flag"
13671                          || test ! -s conftest.err'
13672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13673   (eval $ac_try) 2>&5
13674   ac_status=$?
13675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13676   (exit $ac_status); }; } &&
13677          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
13683   ac_cv_have_decl_fdatasync=yes
13684 else
13685   echo "$as_me: failed program was:" >&5
13686 sed 's/^/| /' conftest.$ac_ext >&5
13687
13688 ac_cv_have_decl_fdatasync=no
13689 fi
13690 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13691 fi
13692 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13693 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13694 if test $ac_cv_have_decl_fdatasync = yes; then
13695
13696 cat >>confdefs.h <<_ACEOF
13697 #define HAVE_DECL_FDATASYNC 1
13698 _ACEOF
13699
13700
13701 else
13702   cat >>confdefs.h <<_ACEOF
13703 #define HAVE_DECL_FDATASYNC 0
13704 _ACEOF
13705
13706
13707 fi
13708
13709
13710 echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
13711 echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6
13712 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
13713   echo $ECHO_N "(cached) $ECHO_C" >&6
13714 else
13715   cat >conftest.$ac_ext <<_ACEOF
13716 /* confdefs.h.  */
13717 _ACEOF
13718 cat confdefs.h >>conftest.$ac_ext
13719 cat >>conftest.$ac_ext <<_ACEOF
13720 /* end confdefs.h.  */
13721 #include <fcntl.h>
13722
13723 int
13724 main ()
13725 {
13726 #ifndef posix_fadvise
13727   char *p = (char *) posix_fadvise;
13728 #endif
13729
13730   ;
13731   return 0;
13732 }
13733 _ACEOF
13734 rm -f conftest.$ac_objext
13735 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13736   (eval $ac_compile) 2>conftest.er1
13737   ac_status=$?
13738   grep -v '^ *+' conftest.er1 >conftest.err
13739   rm -f conftest.er1
13740   cat conftest.err >&5
13741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13742   (exit $ac_status); } &&
13743          { ac_try='test -z "$ac_c_werror_flag"
13744                          || test ! -s conftest.err'
13745   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13746   (eval $ac_try) 2>&5
13747   ac_status=$?
13748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13749   (exit $ac_status); }; } &&
13750          { ac_try='test -s conftest.$ac_objext'
13751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13752   (eval $ac_try) 2>&5
13753   ac_status=$?
13754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13755   (exit $ac_status); }; }; then
13756   ac_cv_have_decl_posix_fadvise=yes
13757 else
13758   echo "$as_me: failed program was:" >&5
13759 sed 's/^/| /' conftest.$ac_ext >&5
13760
13761 ac_cv_have_decl_posix_fadvise=no
13762 fi
13763 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13764 fi
13765 echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
13766 echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6
13767 if test $ac_cv_have_decl_posix_fadvise = yes; then
13768
13769 cat >>confdefs.h <<_ACEOF
13770 #define HAVE_DECL_POSIX_FADVISE 1
13771 _ACEOF
13772
13773
13774 else
13775   cat >>confdefs.h <<_ACEOF
13776 #define HAVE_DECL_POSIX_FADVISE 0
13777 _ACEOF
13778
13779
13780 fi
13781
13782
13783
13784 HAVE_IPV6=no
13785 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
13786 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
13787 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
13788   echo $ECHO_N "(cached) $ECHO_C" >&6
13789 else
13790   cat >conftest.$ac_ext <<_ACEOF
13791 /* confdefs.h.  */
13792 _ACEOF
13793 cat confdefs.h >>conftest.$ac_ext
13794 cat >>conftest.$ac_ext <<_ACEOF
13795 /* end confdefs.h.  */
13796 $ac_includes_default
13797 #include <netinet/in.h>
13798
13799 int
13800 main ()
13801 {
13802 if ((struct sockaddr_in6 *) 0)
13803   return 0;
13804 if (sizeof (struct sockaddr_in6))
13805   return 0;
13806   ;
13807   return 0;
13808 }
13809 _ACEOF
13810 rm -f conftest.$ac_objext
13811 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13812   (eval $ac_compile) 2>conftest.er1
13813   ac_status=$?
13814   grep -v '^ *+' conftest.er1 >conftest.err
13815   rm -f conftest.er1
13816   cat conftest.err >&5
13817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13818   (exit $ac_status); } &&
13819          { ac_try='test -z "$ac_c_werror_flag"
13820                          || test ! -s conftest.err'
13821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13822   (eval $ac_try) 2>&5
13823   ac_status=$?
13824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13825   (exit $ac_status); }; } &&
13826          { ac_try='test -s conftest.$ac_objext'
13827   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13828   (eval $ac_try) 2>&5
13829   ac_status=$?
13830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13831   (exit $ac_status); }; }; then
13832   ac_cv_type_struct_sockaddr_in6=yes
13833 else
13834   echo "$as_me: failed program was:" >&5
13835 sed 's/^/| /' conftest.$ac_ext >&5
13836
13837 ac_cv_type_struct_sockaddr_in6=no
13838 fi
13839 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13840 fi
13841 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
13842 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
13843 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
13844
13845 cat >>confdefs.h <<\_ACEOF
13846 #define HAVE_IPV6 1
13847 _ACEOF
13848
13849          HAVE_IPV6=yes
13850 fi
13851
13852
13853
13854 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
13855 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
13856 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
13857   echo $ECHO_N "(cached) $ECHO_C" >&6
13858 else
13859   cat >conftest.$ac_ext <<_ACEOF
13860 /* confdefs.h.  */
13861 _ACEOF
13862 cat confdefs.h >>conftest.$ac_ext
13863 cat >>conftest.$ac_ext <<_ACEOF
13864 /* end confdefs.h.  */
13865 #include <machine/vmparam.h>
13866 #include <sys/exec.h>
13867
13868 int
13869 main ()
13870 {
13871 PS_STRINGS->ps_nargvstr = 1;
13872 PS_STRINGS->ps_argvstr = "foo";
13873   ;
13874   return 0;
13875 }
13876 _ACEOF
13877 rm -f conftest.$ac_objext conftest$ac_exeext
13878 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13879   (eval $ac_link) 2>conftest.er1
13880   ac_status=$?
13881   grep -v '^ *+' conftest.er1 >conftest.err
13882   rm -f conftest.er1
13883   cat conftest.err >&5
13884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13885   (exit $ac_status); } &&
13886          { ac_try='test -z "$ac_c_werror_flag"
13887                          || test ! -s conftest.err'
13888   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13889   (eval $ac_try) 2>&5
13890   ac_status=$?
13891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13892   (exit $ac_status); }; } &&
13893          { ac_try='test -s conftest$ac_exeext'
13894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13895   (eval $ac_try) 2>&5
13896   ac_status=$?
13897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13898   (exit $ac_status); }; }; then
13899   pgac_cv_var_PS_STRINGS=yes
13900 else
13901   echo "$as_me: failed program was:" >&5
13902 sed 's/^/| /' conftest.$ac_ext >&5
13903
13904 pgac_cv_var_PS_STRINGS=no
13905 fi
13906 rm -f conftest.err conftest.$ac_objext \
13907       conftest$ac_exeext conftest.$ac_ext
13908 fi
13909 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
13910 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
13911 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13912
13913 cat >>confdefs.h <<\_ACEOF
13914 #define HAVE_PS_STRINGS
13915 _ACEOF
13916
13917 fi
13918
13919
13920 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13921 # is missing.  Yes, there are machines that have only one.  We may
13922 # also decide to use snprintf.c if snprintf() is present but does not
13923 # have all the features we need --- see below.
13924
13925 if test "$PORTNAME" = "win32"; then
13926   # Win32 gets snprintf.c built unconditionally.
13927   #
13928   # To properly translate all NLS languages strings, we must support the
13929   # *printf() %$ format, which allows *printf() arguments to be selected
13930   # by position in the translated string.
13931   #
13932   # libintl versions < 0.13 use the native *printf() functions, and Win32
13933   # *printf() doesn't understand %$, so we must use our /port versions,
13934   # which do understand %$. libintl versions >= 0.13 include their own
13935   # *printf versions on Win32.  The libintl 0.13 release note text is:
13936   #
13937   #   C format strings with positions, as they arise when a translator
13938   #   needs to reorder a sentence, are now supported on all platforms.
13939   #   On those few platforms (NetBSD and Woe32) for which the native
13940   #   printf()/fprintf()/... functions don't support such format
13941   #   strings, replacements are provided through <libintl.h>.
13942   #
13943   # We could use libintl >= 0.13's *printf() if we were sure that we had
13944   # a litint >= 0.13 at runtime, but seeing that there is no clean way
13945   # to guarantee that, it is best to just use our own, so we are sure to
13946   # get %$ support. In include/port.h we disable the *printf() macros
13947   # that might have been defined by libintl.
13948   #
13949   # We do this unconditionally whether NLS is used or not so we are sure
13950   # that all Win32 libraries and binaries behave the same.
13951   pgac_need_repl_snprintf=yes
13952 else
13953   pgac_need_repl_snprintf=no
13954
13955 for ac_func in snprintf
13956 do
13957 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13958 echo "$as_me:$LINENO: checking for $ac_func" >&5
13959 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13960 if eval "test \"\${$as_ac_var+set}\" = set"; then
13961   echo $ECHO_N "(cached) $ECHO_C" >&6
13962 else
13963   cat >conftest.$ac_ext <<_ACEOF
13964 /* confdefs.h.  */
13965 _ACEOF
13966 cat confdefs.h >>conftest.$ac_ext
13967 cat >>conftest.$ac_ext <<_ACEOF
13968 /* end confdefs.h.  */
13969 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13970    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13971 #define $ac_func innocuous_$ac_func
13972
13973 /* System header to define __stub macros and hopefully few prototypes,
13974     which can conflict with char $ac_func (); below.
13975     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13976     <limits.h> exists even on freestanding compilers.  */
13977
13978 #ifdef __STDC__
13979 # include <limits.h>
13980 #else
13981 # include <assert.h>
13982 #endif
13983
13984 #undef $ac_func
13985
13986 /* Override any gcc2 internal prototype to avoid an error.  */
13987 #ifdef __cplusplus
13988 extern "C"
13989 {
13990 #endif
13991 /* We use char because int might match the return type of a gcc2
13992    builtin and then its argument prototype would still apply.  */
13993 char $ac_func ();
13994 /* The GNU C library defines this for functions which it implements
13995     to always fail with ENOSYS.  Some functions are actually named
13996     something starting with __ and the normal name is an alias.  */
13997 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13998 choke me
13999 #else
14000 char (*f) () = $ac_func;
14001 #endif
14002 #ifdef __cplusplus
14003 }
14004 #endif
14005
14006 int
14007 main ()
14008 {
14009 return f != $ac_func;
14010   ;
14011   return 0;
14012 }
14013 _ACEOF
14014 rm -f conftest.$ac_objext conftest$ac_exeext
14015 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14016   (eval $ac_link) 2>conftest.er1
14017   ac_status=$?
14018   grep -v '^ *+' conftest.er1 >conftest.err
14019   rm -f conftest.er1
14020   cat conftest.err >&5
14021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14022   (exit $ac_status); } &&
14023          { ac_try='test -z "$ac_c_werror_flag"
14024                          || test ! -s conftest.err'
14025   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14026   (eval $ac_try) 2>&5
14027   ac_status=$?
14028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14029   (exit $ac_status); }; } &&
14030          { ac_try='test -s conftest$ac_exeext'
14031   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14032   (eval $ac_try) 2>&5
14033   ac_status=$?
14034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14035   (exit $ac_status); }; }; then
14036   eval "$as_ac_var=yes"
14037 else
14038   echo "$as_me: failed program was:" >&5
14039 sed 's/^/| /' conftest.$ac_ext >&5
14040
14041 eval "$as_ac_var=no"
14042 fi
14043 rm -f conftest.err conftest.$ac_objext \
14044       conftest$ac_exeext conftest.$ac_ext
14045 fi
14046 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14047 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14048 if test `eval echo '${'$as_ac_var'}'` = yes; then
14049   cat >>confdefs.h <<_ACEOF
14050 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14051 _ACEOF
14052
14053 else
14054   pgac_need_repl_snprintf=yes
14055 fi
14056 done
14057
14058
14059 for ac_func in vsnprintf
14060 do
14061 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14062 echo "$as_me:$LINENO: checking for $ac_func" >&5
14063 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14064 if eval "test \"\${$as_ac_var+set}\" = set"; then
14065   echo $ECHO_N "(cached) $ECHO_C" >&6
14066 else
14067   cat >conftest.$ac_ext <<_ACEOF
14068 /* confdefs.h.  */
14069 _ACEOF
14070 cat confdefs.h >>conftest.$ac_ext
14071 cat >>conftest.$ac_ext <<_ACEOF
14072 /* end confdefs.h.  */
14073 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14074    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14075 #define $ac_func innocuous_$ac_func
14076
14077 /* System header to define __stub macros and hopefully few prototypes,
14078     which can conflict with char $ac_func (); below.
14079     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14080     <limits.h> exists even on freestanding compilers.  */
14081
14082 #ifdef __STDC__
14083 # include <limits.h>
14084 #else
14085 # include <assert.h>
14086 #endif
14087
14088 #undef $ac_func
14089
14090 /* Override any gcc2 internal prototype to avoid an error.  */
14091 #ifdef __cplusplus
14092 extern "C"
14093 {
14094 #endif
14095 /* We use char because int might match the return type of a gcc2
14096    builtin and then its argument prototype would still apply.  */
14097 char $ac_func ();
14098 /* The GNU C library defines this for functions which it implements
14099     to always fail with ENOSYS.  Some functions are actually named
14100     something starting with __ and the normal name is an alias.  */
14101 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14102 choke me
14103 #else
14104 char (*f) () = $ac_func;
14105 #endif
14106 #ifdef __cplusplus
14107 }
14108 #endif
14109
14110 int
14111 main ()
14112 {
14113 return f != $ac_func;
14114   ;
14115   return 0;
14116 }
14117 _ACEOF
14118 rm -f conftest.$ac_objext conftest$ac_exeext
14119 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14120   (eval $ac_link) 2>conftest.er1
14121   ac_status=$?
14122   grep -v '^ *+' conftest.er1 >conftest.err
14123   rm -f conftest.er1
14124   cat conftest.err >&5
14125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14126   (exit $ac_status); } &&
14127          { ac_try='test -z "$ac_c_werror_flag"
14128                          || test ! -s conftest.err'
14129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14130   (eval $ac_try) 2>&5
14131   ac_status=$?
14132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14133   (exit $ac_status); }; } &&
14134          { ac_try='test -s conftest$ac_exeext'
14135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14136   (eval $ac_try) 2>&5
14137   ac_status=$?
14138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14139   (exit $ac_status); }; }; then
14140   eval "$as_ac_var=yes"
14141 else
14142   echo "$as_me: failed program was:" >&5
14143 sed 's/^/| /' conftest.$ac_ext >&5
14144
14145 eval "$as_ac_var=no"
14146 fi
14147 rm -f conftest.err conftest.$ac_objext \
14148       conftest$ac_exeext conftest.$ac_ext
14149 fi
14150 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14151 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14152 if test `eval echo '${'$as_ac_var'}'` = yes; then
14153   cat >>confdefs.h <<_ACEOF
14154 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14155 _ACEOF
14156
14157 else
14158   pgac_need_repl_snprintf=yes
14159 fi
14160 done
14161
14162 fi
14163
14164
14165 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14166 # include/c.h will provide declarations.  Note this is a separate test
14167 # from whether the functions exist in the C library --- there are
14168 # systems that have the functions but don't bother to declare them :-(
14169
14170 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14171 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14172 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14173   echo $ECHO_N "(cached) $ECHO_C" >&6
14174 else
14175   cat >conftest.$ac_ext <<_ACEOF
14176 /* confdefs.h.  */
14177 _ACEOF
14178 cat confdefs.h >>conftest.$ac_ext
14179 cat >>conftest.$ac_ext <<_ACEOF
14180 /* end confdefs.h.  */
14181 $ac_includes_default
14182 int
14183 main ()
14184 {
14185 #ifndef snprintf
14186   char *p = (char *) snprintf;
14187 #endif
14188
14189   ;
14190   return 0;
14191 }
14192 _ACEOF
14193 rm -f conftest.$ac_objext
14194 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14195   (eval $ac_compile) 2>conftest.er1
14196   ac_status=$?
14197   grep -v '^ *+' conftest.er1 >conftest.err
14198   rm -f conftest.er1
14199   cat conftest.err >&5
14200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14201   (exit $ac_status); } &&
14202          { ac_try='test -z "$ac_c_werror_flag"
14203                          || test ! -s conftest.err'
14204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14205   (eval $ac_try) 2>&5
14206   ac_status=$?
14207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14208   (exit $ac_status); }; } &&
14209          { ac_try='test -s conftest.$ac_objext'
14210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14211   (eval $ac_try) 2>&5
14212   ac_status=$?
14213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14214   (exit $ac_status); }; }; then
14215   ac_cv_have_decl_snprintf=yes
14216 else
14217   echo "$as_me: failed program was:" >&5
14218 sed 's/^/| /' conftest.$ac_ext >&5
14219
14220 ac_cv_have_decl_snprintf=no
14221 fi
14222 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14223 fi
14224 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14225 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14226 if test $ac_cv_have_decl_snprintf = yes; then
14227
14228 cat >>confdefs.h <<_ACEOF
14229 #define HAVE_DECL_SNPRINTF 1
14230 _ACEOF
14231
14232
14233 else
14234   cat >>confdefs.h <<_ACEOF
14235 #define HAVE_DECL_SNPRINTF 0
14236 _ACEOF
14237
14238
14239 fi
14240 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14241 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14242 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14243   echo $ECHO_N "(cached) $ECHO_C" >&6
14244 else
14245   cat >conftest.$ac_ext <<_ACEOF
14246 /* confdefs.h.  */
14247 _ACEOF
14248 cat confdefs.h >>conftest.$ac_ext
14249 cat >>conftest.$ac_ext <<_ACEOF
14250 /* end confdefs.h.  */
14251 $ac_includes_default
14252 int
14253 main ()
14254 {
14255 #ifndef vsnprintf
14256   char *p = (char *) vsnprintf;
14257 #endif
14258
14259   ;
14260   return 0;
14261 }
14262 _ACEOF
14263 rm -f conftest.$ac_objext
14264 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14265   (eval $ac_compile) 2>conftest.er1
14266   ac_status=$?
14267   grep -v '^ *+' conftest.er1 >conftest.err
14268   rm -f conftest.er1
14269   cat conftest.err >&5
14270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14271   (exit $ac_status); } &&
14272          { ac_try='test -z "$ac_c_werror_flag"
14273                          || test ! -s conftest.err'
14274   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14275   (eval $ac_try) 2>&5
14276   ac_status=$?
14277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14278   (exit $ac_status); }; } &&
14279          { ac_try='test -s conftest.$ac_objext'
14280   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14281   (eval $ac_try) 2>&5
14282   ac_status=$?
14283   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14284   (exit $ac_status); }; }; then
14285   ac_cv_have_decl_vsnprintf=yes
14286 else
14287   echo "$as_me: failed program was:" >&5
14288 sed 's/^/| /' conftest.$ac_ext >&5
14289
14290 ac_cv_have_decl_vsnprintf=no
14291 fi
14292 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14293 fi
14294 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14295 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14296 if test $ac_cv_have_decl_vsnprintf = yes; then
14297
14298 cat >>confdefs.h <<_ACEOF
14299 #define HAVE_DECL_VSNPRINTF 1
14300 _ACEOF
14301
14302
14303 else
14304   cat >>confdefs.h <<_ACEOF
14305 #define HAVE_DECL_VSNPRINTF 0
14306 _ACEOF
14307
14308
14309 fi
14310
14311
14312
14313
14314 echo "$as_me:$LINENO: checking for isinf" >&5
14315 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14316 if test "${ac_cv_func_isinf+set}" = set; then
14317   echo $ECHO_N "(cached) $ECHO_C" >&6
14318 else
14319   cat >conftest.$ac_ext <<_ACEOF
14320 /* confdefs.h.  */
14321 _ACEOF
14322 cat confdefs.h >>conftest.$ac_ext
14323 cat >>conftest.$ac_ext <<_ACEOF
14324 /* end confdefs.h.  */
14325
14326 #include <math.h>
14327 double glob_double;
14328
14329 int
14330 main ()
14331 {
14332 return isinf(glob_double) ? 0 : 1;
14333   ;
14334   return 0;
14335 }
14336 _ACEOF
14337 rm -f conftest.$ac_objext conftest$ac_exeext
14338 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14339   (eval $ac_link) 2>conftest.er1
14340   ac_status=$?
14341   grep -v '^ *+' conftest.er1 >conftest.err
14342   rm -f conftest.er1
14343   cat conftest.err >&5
14344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14345   (exit $ac_status); } &&
14346          { ac_try='test -z "$ac_c_werror_flag"
14347                          || test ! -s conftest.err'
14348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14349   (eval $ac_try) 2>&5
14350   ac_status=$?
14351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14352   (exit $ac_status); }; } &&
14353          { ac_try='test -s conftest$ac_exeext'
14354   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14355   (eval $ac_try) 2>&5
14356   ac_status=$?
14357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14358   (exit $ac_status); }; }; then
14359   ac_cv_func_isinf=yes
14360 else
14361   echo "$as_me: failed program was:" >&5
14362 sed 's/^/| /' conftest.$ac_ext >&5
14363
14364 ac_cv_func_isinf=no
14365 fi
14366 rm -f conftest.err conftest.$ac_objext \
14367       conftest$ac_exeext conftest.$ac_ext
14368 fi
14369 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14370 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14371
14372 if test $ac_cv_func_isinf = yes ; then
14373
14374 cat >>confdefs.h <<\_ACEOF
14375 #define HAVE_ISINF 1
14376 _ACEOF
14377
14378 else
14379   case $LIBOBJS in
14380     "isinf.$ac_objext"   | \
14381   *" isinf.$ac_objext"   | \
14382     "isinf.$ac_objext "* | \
14383   *" isinf.$ac_objext "* ) ;;
14384   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14385 esac
14386
14387   # Look for a way to implement a substitute for isinf()
14388
14389
14390
14391
14392 for ac_func in fpclass fp_class fp_class_d class
14393 do
14394 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14395 echo "$as_me:$LINENO: checking for $ac_func" >&5
14396 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14397 if eval "test \"\${$as_ac_var+set}\" = set"; then
14398   echo $ECHO_N "(cached) $ECHO_C" >&6
14399 else
14400   cat >conftest.$ac_ext <<_ACEOF
14401 /* confdefs.h.  */
14402 _ACEOF
14403 cat confdefs.h >>conftest.$ac_ext
14404 cat >>conftest.$ac_ext <<_ACEOF
14405 /* end confdefs.h.  */
14406 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14407    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14408 #define $ac_func innocuous_$ac_func
14409
14410 /* System header to define __stub macros and hopefully few prototypes,
14411     which can conflict with char $ac_func (); below.
14412     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14413     <limits.h> exists even on freestanding compilers.  */
14414
14415 #ifdef __STDC__
14416 # include <limits.h>
14417 #else
14418 # include <assert.h>
14419 #endif
14420
14421 #undef $ac_func
14422
14423 /* Override any gcc2 internal prototype to avoid an error.  */
14424 #ifdef __cplusplus
14425 extern "C"
14426 {
14427 #endif
14428 /* We use char because int might match the return type of a gcc2
14429    builtin and then its argument prototype would still apply.  */
14430 char $ac_func ();
14431 /* The GNU C library defines this for functions which it implements
14432     to always fail with ENOSYS.  Some functions are actually named
14433     something starting with __ and the normal name is an alias.  */
14434 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14435 choke me
14436 #else
14437 char (*f) () = $ac_func;
14438 #endif
14439 #ifdef __cplusplus
14440 }
14441 #endif
14442
14443 int
14444 main ()
14445 {
14446 return f != $ac_func;
14447   ;
14448   return 0;
14449 }
14450 _ACEOF
14451 rm -f conftest.$ac_objext conftest$ac_exeext
14452 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14453   (eval $ac_link) 2>conftest.er1
14454   ac_status=$?
14455   grep -v '^ *+' conftest.er1 >conftest.err
14456   rm -f conftest.er1
14457   cat conftest.err >&5
14458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14459   (exit $ac_status); } &&
14460          { ac_try='test -z "$ac_c_werror_flag"
14461                          || test ! -s conftest.err'
14462   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14463   (eval $ac_try) 2>&5
14464   ac_status=$?
14465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14466   (exit $ac_status); }; } &&
14467          { ac_try='test -s conftest$ac_exeext'
14468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14469   (eval $ac_try) 2>&5
14470   ac_status=$?
14471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14472   (exit $ac_status); }; }; then
14473   eval "$as_ac_var=yes"
14474 else
14475   echo "$as_me: failed program was:" >&5
14476 sed 's/^/| /' conftest.$ac_ext >&5
14477
14478 eval "$as_ac_var=no"
14479 fi
14480 rm -f conftest.err conftest.$ac_objext \
14481       conftest$ac_exeext conftest.$ac_ext
14482 fi
14483 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14484 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14485 if test `eval echo '${'$as_ac_var'}'` = yes; then
14486   cat >>confdefs.h <<_ACEOF
14487 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14488 _ACEOF
14489  break
14490 fi
14491 done
14492
14493 fi
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strlcpy strtol strtoul unsetenv
14510 do
14511 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14512 echo "$as_me:$LINENO: checking for $ac_func" >&5
14513 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14514 if eval "test \"\${$as_ac_var+set}\" = set"; then
14515   echo $ECHO_N "(cached) $ECHO_C" >&6
14516 else
14517   cat >conftest.$ac_ext <<_ACEOF
14518 /* confdefs.h.  */
14519 _ACEOF
14520 cat confdefs.h >>conftest.$ac_ext
14521 cat >>conftest.$ac_ext <<_ACEOF
14522 /* end confdefs.h.  */
14523 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14524    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14525 #define $ac_func innocuous_$ac_func
14526
14527 /* System header to define __stub macros and hopefully few prototypes,
14528     which can conflict with char $ac_func (); below.
14529     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14530     <limits.h> exists even on freestanding compilers.  */
14531
14532 #ifdef __STDC__
14533 # include <limits.h>
14534 #else
14535 # include <assert.h>
14536 #endif
14537
14538 #undef $ac_func
14539
14540 /* Override any gcc2 internal prototype to avoid an error.  */
14541 #ifdef __cplusplus
14542 extern "C"
14543 {
14544 #endif
14545 /* We use char because int might match the return type of a gcc2
14546    builtin and then its argument prototype would still apply.  */
14547 char $ac_func ();
14548 /* The GNU C library defines this for functions which it implements
14549     to always fail with ENOSYS.  Some functions are actually named
14550     something starting with __ and the normal name is an alias.  */
14551 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14552 choke me
14553 #else
14554 char (*f) () = $ac_func;
14555 #endif
14556 #ifdef __cplusplus
14557 }
14558 #endif
14559
14560 int
14561 main ()
14562 {
14563 return f != $ac_func;
14564   ;
14565   return 0;
14566 }
14567 _ACEOF
14568 rm -f conftest.$ac_objext conftest$ac_exeext
14569 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14570   (eval $ac_link) 2>conftest.er1
14571   ac_status=$?
14572   grep -v '^ *+' conftest.er1 >conftest.err
14573   rm -f conftest.er1
14574   cat conftest.err >&5
14575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14576   (exit $ac_status); } &&
14577          { ac_try='test -z "$ac_c_werror_flag"
14578                          || test ! -s conftest.err'
14579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14580   (eval $ac_try) 2>&5
14581   ac_status=$?
14582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14583   (exit $ac_status); }; } &&
14584          { ac_try='test -s conftest$ac_exeext'
14585   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14586   (eval $ac_try) 2>&5
14587   ac_status=$?
14588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14589   (exit $ac_status); }; }; then
14590   eval "$as_ac_var=yes"
14591 else
14592   echo "$as_me: failed program was:" >&5
14593 sed 's/^/| /' conftest.$ac_ext >&5
14594
14595 eval "$as_ac_var=no"
14596 fi
14597 rm -f conftest.err conftest.$ac_objext \
14598       conftest$ac_exeext conftest.$ac_ext
14599 fi
14600 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14601 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14602 if test `eval echo '${'$as_ac_var'}'` = yes; then
14603   cat >>confdefs.h <<_ACEOF
14604 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14605 _ACEOF
14606
14607 else
14608   case $LIBOBJS in
14609     "$ac_func.$ac_objext"   | \
14610   *" $ac_func.$ac_objext"   | \
14611     "$ac_func.$ac_objext "* | \
14612   *" $ac_func.$ac_objext "* ) ;;
14613   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14614 esac
14615
14616 fi
14617 done
14618
14619
14620
14621 # System's version of getaddrinfo(), if any, may be used only if we found
14622 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14623 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14624 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14625 # because we want to use our own getaddrinfo.c on Windows anyway.)
14626 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14627
14628 for ac_func in getaddrinfo
14629 do
14630 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14631 echo "$as_me:$LINENO: checking for $ac_func" >&5
14632 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14633 if eval "test \"\${$as_ac_var+set}\" = set"; then
14634   echo $ECHO_N "(cached) $ECHO_C" >&6
14635 else
14636   cat >conftest.$ac_ext <<_ACEOF
14637 /* confdefs.h.  */
14638 _ACEOF
14639 cat confdefs.h >>conftest.$ac_ext
14640 cat >>conftest.$ac_ext <<_ACEOF
14641 /* end confdefs.h.  */
14642 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14643    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14644 #define $ac_func innocuous_$ac_func
14645
14646 /* System header to define __stub macros and hopefully few prototypes,
14647     which can conflict with char $ac_func (); below.
14648     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14649     <limits.h> exists even on freestanding compilers.  */
14650
14651 #ifdef __STDC__
14652 # include <limits.h>
14653 #else
14654 # include <assert.h>
14655 #endif
14656
14657 #undef $ac_func
14658
14659 /* Override any gcc2 internal prototype to avoid an error.  */
14660 #ifdef __cplusplus
14661 extern "C"
14662 {
14663 #endif
14664 /* We use char because int might match the return type of a gcc2
14665    builtin and then its argument prototype would still apply.  */
14666 char $ac_func ();
14667 /* The GNU C library defines this for functions which it implements
14668     to always fail with ENOSYS.  Some functions are actually named
14669     something starting with __ and the normal name is an alias.  */
14670 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14671 choke me
14672 #else
14673 char (*f) () = $ac_func;
14674 #endif
14675 #ifdef __cplusplus
14676 }
14677 #endif
14678
14679 int
14680 main ()
14681 {
14682 return f != $ac_func;
14683   ;
14684   return 0;
14685 }
14686 _ACEOF
14687 rm -f conftest.$ac_objext conftest$ac_exeext
14688 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14689   (eval $ac_link) 2>conftest.er1
14690   ac_status=$?
14691   grep -v '^ *+' conftest.er1 >conftest.err
14692   rm -f conftest.er1
14693   cat conftest.err >&5
14694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14695   (exit $ac_status); } &&
14696          { ac_try='test -z "$ac_c_werror_flag"
14697                          || test ! -s conftest.err'
14698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14699   (eval $ac_try) 2>&5
14700   ac_status=$?
14701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14702   (exit $ac_status); }; } &&
14703          { ac_try='test -s conftest$ac_exeext'
14704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14705   (eval $ac_try) 2>&5
14706   ac_status=$?
14707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14708   (exit $ac_status); }; }; then
14709   eval "$as_ac_var=yes"
14710 else
14711   echo "$as_me: failed program was:" >&5
14712 sed 's/^/| /' conftest.$ac_ext >&5
14713
14714 eval "$as_ac_var=no"
14715 fi
14716 rm -f conftest.err conftest.$ac_objext \
14717       conftest$ac_exeext conftest.$ac_ext
14718 fi
14719 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14720 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14721 if test `eval echo '${'$as_ac_var'}'` = yes; then
14722   cat >>confdefs.h <<_ACEOF
14723 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14724 _ACEOF
14725
14726 else
14727   case $LIBOBJS in
14728     "$ac_func.$ac_objext"   | \
14729   *" $ac_func.$ac_objext"   | \
14730     "$ac_func.$ac_objext "* | \
14731   *" $ac_func.$ac_objext "* ) ;;
14732   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14733 esac
14734
14735 fi
14736 done
14737
14738
14739 else
14740   case $LIBOBJS in
14741     "getaddrinfo.$ac_objext"   | \
14742   *" getaddrinfo.$ac_objext"   | \
14743     "getaddrinfo.$ac_objext "* | \
14744   *" getaddrinfo.$ac_objext "* ) ;;
14745   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14746 esac
14747
14748 fi
14749
14750 # similarly, use system's getopt_long() only if system provides struct option.
14751 if test x"$ac_cv_type_struct_option" = xyes ; then
14752
14753 for ac_func in getopt_long
14754 do
14755 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14756 echo "$as_me:$LINENO: checking for $ac_func" >&5
14757 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14758 if eval "test \"\${$as_ac_var+set}\" = set"; then
14759   echo $ECHO_N "(cached) $ECHO_C" >&6
14760 else
14761   cat >conftest.$ac_ext <<_ACEOF
14762 /* confdefs.h.  */
14763 _ACEOF
14764 cat confdefs.h >>conftest.$ac_ext
14765 cat >>conftest.$ac_ext <<_ACEOF
14766 /* end confdefs.h.  */
14767 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14768    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14769 #define $ac_func innocuous_$ac_func
14770
14771 /* System header to define __stub macros and hopefully few prototypes,
14772     which can conflict with char $ac_func (); below.
14773     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14774     <limits.h> exists even on freestanding compilers.  */
14775
14776 #ifdef __STDC__
14777 # include <limits.h>
14778 #else
14779 # include <assert.h>
14780 #endif
14781
14782 #undef $ac_func
14783
14784 /* Override any gcc2 internal prototype to avoid an error.  */
14785 #ifdef __cplusplus
14786 extern "C"
14787 {
14788 #endif
14789 /* We use char because int might match the return type of a gcc2
14790    builtin and then its argument prototype would still apply.  */
14791 char $ac_func ();
14792 /* The GNU C library defines this for functions which it implements
14793     to always fail with ENOSYS.  Some functions are actually named
14794     something starting with __ and the normal name is an alias.  */
14795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14796 choke me
14797 #else
14798 char (*f) () = $ac_func;
14799 #endif
14800 #ifdef __cplusplus
14801 }
14802 #endif
14803
14804 int
14805 main ()
14806 {
14807 return f != $ac_func;
14808   ;
14809   return 0;
14810 }
14811 _ACEOF
14812 rm -f conftest.$ac_objext conftest$ac_exeext
14813 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14814   (eval $ac_link) 2>conftest.er1
14815   ac_status=$?
14816   grep -v '^ *+' conftest.er1 >conftest.err
14817   rm -f conftest.er1
14818   cat conftest.err >&5
14819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14820   (exit $ac_status); } &&
14821          { ac_try='test -z "$ac_c_werror_flag"
14822                          || test ! -s conftest.err'
14823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14824   (eval $ac_try) 2>&5
14825   ac_status=$?
14826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14827   (exit $ac_status); }; } &&
14828          { ac_try='test -s conftest$ac_exeext'
14829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14830   (eval $ac_try) 2>&5
14831   ac_status=$?
14832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14833   (exit $ac_status); }; }; then
14834   eval "$as_ac_var=yes"
14835 else
14836   echo "$as_me: failed program was:" >&5
14837 sed 's/^/| /' conftest.$ac_ext >&5
14838
14839 eval "$as_ac_var=no"
14840 fi
14841 rm -f conftest.err conftest.$ac_objext \
14842       conftest$ac_exeext conftest.$ac_ext
14843 fi
14844 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14845 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14846 if test `eval echo '${'$as_ac_var'}'` = yes; then
14847   cat >>confdefs.h <<_ACEOF
14848 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14849 _ACEOF
14850
14851 else
14852   case $LIBOBJS in
14853     "$ac_func.$ac_objext"   | \
14854   *" $ac_func.$ac_objext"   | \
14855     "$ac_func.$ac_objext "* | \
14856   *" $ac_func.$ac_objext "* ) ;;
14857   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14858 esac
14859
14860 fi
14861 done
14862
14863
14864 else
14865   case $LIBOBJS in
14866     "getopt_long.$ac_objext"   | \
14867   *" getopt_long.$ac_objext"   | \
14868     "getopt_long.$ac_objext "* | \
14869   *" getopt_long.$ac_objext "* ) ;;
14870   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
14871 esac
14872
14873 fi
14874
14875 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
14876 # We override the previous test that said fseeko/ftello didn't exist
14877 # OS tests are also done in include/c.h and port/fseeko.c
14878 case $host_os in bsdi*|netbsd*)
14879 ac_cv_func_fseeko=yes
14880 esac
14881
14882 # Solaris has a very slow qsort in certain cases, so we replace it:
14883 #   http://forum.sun.com/thread.jspa?forumID=4&threadID=7231
14884 # Supposedly it is fixed in Solaris, but not sure which version, and
14885 # no confirmed testing.  2005-12-16
14886 if test "$PORTNAME" = "solaris"; then
14887 case $LIBOBJS in
14888     "qsort.$ac_objext"   | \
14889   *" qsort.$ac_objext"   | \
14890     "qsort.$ac_objext "* | \
14891   *" qsort.$ac_objext "* ) ;;
14892   *) LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
14893 esac
14894
14895 fi
14896
14897 # Win32 support
14898 if test "$PORTNAME" = "win32"; then
14899 case $LIBOBJS in
14900     "gettimeofday.$ac_objext"   | \
14901   *" gettimeofday.$ac_objext"   | \
14902     "gettimeofday.$ac_objext "* | \
14903   *" gettimeofday.$ac_objext "* ) ;;
14904   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
14905 esac
14906
14907 case $LIBOBJS in
14908     "kill.$ac_objext"   | \
14909   *" kill.$ac_objext"   | \
14910     "kill.$ac_objext "* | \
14911   *" kill.$ac_objext "* ) ;;
14912   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
14913 esac
14914
14915 case $LIBOBJS in
14916     "open.$ac_objext"   | \
14917   *" open.$ac_objext"   | \
14918     "open.$ac_objext "* | \
14919   *" open.$ac_objext "* ) ;;
14920   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
14921 esac
14922
14923 case $LIBOBJS in
14924     "rand.$ac_objext"   | \
14925   *" rand.$ac_objext"   | \
14926     "rand.$ac_objext "* | \
14927   *" rand.$ac_objext "* ) ;;
14928   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
14929 esac
14930
14931 case $LIBOBJS in
14932     "win32error.$ac_objext"   | \
14933   *" win32error.$ac_objext"   | \
14934     "win32error.$ac_objext "* | \
14935   *" win32error.$ac_objext "* ) ;;
14936   *) LIBOBJS="$LIBOBJS win32error.$ac_objext" ;;
14937 esac
14938
14939
14940 cat >>confdefs.h <<\_ACEOF
14941 #define HAVE_SYMLINK 1
14942 _ACEOF
14943
14944 fi
14945
14946 if test "$with_readline" = yes; then
14947   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
14948 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
14949 cat >conftest.$ac_ext <<_ACEOF
14950 /* confdefs.h.  */
14951 _ACEOF
14952 cat confdefs.h >>conftest.$ac_ext
14953 cat >>conftest.$ac_ext <<_ACEOF
14954 /* end confdefs.h.  */
14955 #include <stdio.h>
14956 #ifdef HAVE_READLINE_READLINE_H
14957 # include <readline/readline.h>
14958 #elif defined(HAVE_READLINE_H)
14959 # include <readline.h>
14960 #endif
14961
14962 int
14963 main ()
14964 {
14965 rl_completion_append_character = 'x';
14966   ;
14967   return 0;
14968 }
14969 _ACEOF
14970 rm -f conftest.$ac_objext conftest$ac_exeext
14971 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14972   (eval $ac_link) 2>conftest.er1
14973   ac_status=$?
14974   grep -v '^ *+' conftest.er1 >conftest.err
14975   rm -f conftest.er1
14976   cat conftest.err >&5
14977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14978   (exit $ac_status); } &&
14979          { ac_try='test -z "$ac_c_werror_flag"
14980                          || test ! -s conftest.err'
14981   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14982   (eval $ac_try) 2>&5
14983   ac_status=$?
14984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14985   (exit $ac_status); }; } &&
14986          { ac_try='test -s conftest$ac_exeext'
14987   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14988   (eval $ac_try) 2>&5
14989   ac_status=$?
14990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14991   (exit $ac_status); }; }; then
14992   echo "$as_me:$LINENO: result: yes" >&5
14993 echo "${ECHO_T}yes" >&6
14994
14995 cat >>confdefs.h <<\_ACEOF
14996 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
14997 _ACEOF
14998
14999 else
15000   echo "$as_me: failed program was:" >&5
15001 sed 's/^/| /' conftest.$ac_ext >&5
15002
15003 echo "$as_me:$LINENO: result: no" >&5
15004 echo "${ECHO_T}no" >&6
15005 fi
15006 rm -f conftest.err conftest.$ac_objext \
15007       conftest$ac_exeext conftest.$ac_ext
15008
15009
15010 for ac_func in rl_completion_matches rl_filename_completion_function
15011 do
15012 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15013 echo "$as_me:$LINENO: checking for $ac_func" >&5
15014 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15015 if eval "test \"\${$as_ac_var+set}\" = set"; then
15016   echo $ECHO_N "(cached) $ECHO_C" >&6
15017 else
15018   cat >conftest.$ac_ext <<_ACEOF
15019 /* confdefs.h.  */
15020 _ACEOF
15021 cat confdefs.h >>conftest.$ac_ext
15022 cat >>conftest.$ac_ext <<_ACEOF
15023 /* end confdefs.h.  */
15024 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15025    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15026 #define $ac_func innocuous_$ac_func
15027
15028 /* System header to define __stub macros and hopefully few prototypes,
15029     which can conflict with char $ac_func (); below.
15030     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15031     <limits.h> exists even on freestanding compilers.  */
15032
15033 #ifdef __STDC__
15034 # include <limits.h>
15035 #else
15036 # include <assert.h>
15037 #endif
15038
15039 #undef $ac_func
15040
15041 /* Override any gcc2 internal prototype to avoid an error.  */
15042 #ifdef __cplusplus
15043 extern "C"
15044 {
15045 #endif
15046 /* We use char because int might match the return type of a gcc2
15047    builtin and then its argument prototype would still apply.  */
15048 char $ac_func ();
15049 /* The GNU C library defines this for functions which it implements
15050     to always fail with ENOSYS.  Some functions are actually named
15051     something starting with __ and the normal name is an alias.  */
15052 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15053 choke me
15054 #else
15055 char (*f) () = $ac_func;
15056 #endif
15057 #ifdef __cplusplus
15058 }
15059 #endif
15060
15061 int
15062 main ()
15063 {
15064 return f != $ac_func;
15065   ;
15066   return 0;
15067 }
15068 _ACEOF
15069 rm -f conftest.$ac_objext conftest$ac_exeext
15070 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15071   (eval $ac_link) 2>conftest.er1
15072   ac_status=$?
15073   grep -v '^ *+' conftest.er1 >conftest.err
15074   rm -f conftest.er1
15075   cat conftest.err >&5
15076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15077   (exit $ac_status); } &&
15078          { ac_try='test -z "$ac_c_werror_flag"
15079                          || test ! -s conftest.err'
15080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15081   (eval $ac_try) 2>&5
15082   ac_status=$?
15083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15084   (exit $ac_status); }; } &&
15085          { ac_try='test -s conftest$ac_exeext'
15086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15087   (eval $ac_try) 2>&5
15088   ac_status=$?
15089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15090   (exit $ac_status); }; }; then
15091   eval "$as_ac_var=yes"
15092 else
15093   echo "$as_me: failed program was:" >&5
15094 sed 's/^/| /' conftest.$ac_ext >&5
15095
15096 eval "$as_ac_var=no"
15097 fi
15098 rm -f conftest.err conftest.$ac_objext \
15099       conftest$ac_exeext conftest.$ac_ext
15100 fi
15101 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15102 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15103 if test `eval echo '${'$as_ac_var'}'` = yes; then
15104   cat >>confdefs.h <<_ACEOF
15105 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15106 _ACEOF
15107
15108 fi
15109 done
15110
15111
15112 for ac_func in replace_history_entry
15113 do
15114 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15115 echo "$as_me:$LINENO: checking for $ac_func" >&5
15116 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15117 if eval "test \"\${$as_ac_var+set}\" = set"; then
15118   echo $ECHO_N "(cached) $ECHO_C" >&6
15119 else
15120   cat >conftest.$ac_ext <<_ACEOF
15121 /* confdefs.h.  */
15122 _ACEOF
15123 cat confdefs.h >>conftest.$ac_ext
15124 cat >>conftest.$ac_ext <<_ACEOF
15125 /* end confdefs.h.  */
15126 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15127    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15128 #define $ac_func innocuous_$ac_func
15129
15130 /* System header to define __stub macros and hopefully few prototypes,
15131     which can conflict with char $ac_func (); below.
15132     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15133     <limits.h> exists even on freestanding compilers.  */
15134
15135 #ifdef __STDC__
15136 # include <limits.h>
15137 #else
15138 # include <assert.h>
15139 #endif
15140
15141 #undef $ac_func
15142
15143 /* Override any gcc2 internal prototype to avoid an error.  */
15144 #ifdef __cplusplus
15145 extern "C"
15146 {
15147 #endif
15148 /* We use char because int might match the return type of a gcc2
15149    builtin and then its argument prototype would still apply.  */
15150 char $ac_func ();
15151 /* The GNU C library defines this for functions which it implements
15152     to always fail with ENOSYS.  Some functions are actually named
15153     something starting with __ and the normal name is an alias.  */
15154 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15155 choke me
15156 #else
15157 char (*f) () = $ac_func;
15158 #endif
15159 #ifdef __cplusplus
15160 }
15161 #endif
15162
15163 int
15164 main ()
15165 {
15166 return f != $ac_func;
15167   ;
15168   return 0;
15169 }
15170 _ACEOF
15171 rm -f conftest.$ac_objext conftest$ac_exeext
15172 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15173   (eval $ac_link) 2>conftest.er1
15174   ac_status=$?
15175   grep -v '^ *+' conftest.er1 >conftest.err
15176   rm -f conftest.er1
15177   cat conftest.err >&5
15178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15179   (exit $ac_status); } &&
15180          { ac_try='test -z "$ac_c_werror_flag"
15181                          || test ! -s conftest.err'
15182   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15183   (eval $ac_try) 2>&5
15184   ac_status=$?
15185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15186   (exit $ac_status); }; } &&
15187          { ac_try='test -s conftest$ac_exeext'
15188   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15189   (eval $ac_try) 2>&5
15190   ac_status=$?
15191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15192   (exit $ac_status); }; }; then
15193   eval "$as_ac_var=yes"
15194 else
15195   echo "$as_me: failed program was:" >&5
15196 sed 's/^/| /' conftest.$ac_ext >&5
15197
15198 eval "$as_ac_var=no"
15199 fi
15200 rm -f conftest.err conftest.$ac_objext \
15201       conftest$ac_exeext conftest.$ac_ext
15202 fi
15203 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15204 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15205 if test `eval echo '${'$as_ac_var'}'` = yes; then
15206   cat >>confdefs.h <<_ACEOF
15207 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15208 _ACEOF
15209
15210 fi
15211 done
15212
15213 fi
15214
15215
15216 echo "$as_me:$LINENO: checking for finite" >&5
15217 echo $ECHO_N "checking for finite... $ECHO_C" >&6
15218 cat >conftest.$ac_ext <<_ACEOF
15219 /* confdefs.h.  */
15220 _ACEOF
15221 cat confdefs.h >>conftest.$ac_ext
15222 cat >>conftest.$ac_ext <<_ACEOF
15223 /* end confdefs.h.  */
15224
15225 #include <math.h>
15226 double glob_double;
15227
15228 int
15229 main ()
15230 {
15231 return finite(glob_double) ? 0 : 1;
15232   ;
15233   return 0;
15234 }
15235 _ACEOF
15236 rm -f conftest.$ac_objext conftest$ac_exeext
15237 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15238   (eval $ac_link) 2>conftest.er1
15239   ac_status=$?
15240   grep -v '^ *+' conftest.er1 >conftest.err
15241   rm -f conftest.er1
15242   cat conftest.err >&5
15243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15244   (exit $ac_status); } &&
15245          { ac_try='test -z "$ac_c_werror_flag"
15246                          || test ! -s conftest.err'
15247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15248   (eval $ac_try) 2>&5
15249   ac_status=$?
15250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15251   (exit $ac_status); }; } &&
15252          { ac_try='test -s conftest$ac_exeext'
15253   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15254   (eval $ac_try) 2>&5
15255   ac_status=$?
15256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15257   (exit $ac_status); }; }; then
15258
15259 cat >>confdefs.h <<\_ACEOF
15260 #define HAVE_FINITE 1
15261 _ACEOF
15262
15263 echo "$as_me:$LINENO: result: yes" >&5
15264 echo "${ECHO_T}yes" >&6
15265 else
15266   echo "$as_me: failed program was:" >&5
15267 sed 's/^/| /' conftest.$ac_ext >&5
15268
15269 echo "$as_me:$LINENO: result: no" >&5
15270 echo "${ECHO_T}no" >&6
15271 fi
15272 rm -f conftest.err conftest.$ac_objext \
15273       conftest$ac_exeext conftest.$ac_ext
15274
15275 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15276 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15277 cat >conftest.$ac_ext <<_ACEOF
15278 /* confdefs.h.  */
15279 _ACEOF
15280 cat confdefs.h >>conftest.$ac_ext
15281 cat >>conftest.$ac_ext <<_ACEOF
15282 /* end confdefs.h.  */
15283 #include <setjmp.h>
15284 int
15285 main ()
15286 {
15287 sigjmp_buf x; sigsetjmp(x, 1);
15288   ;
15289   return 0;
15290 }
15291 _ACEOF
15292 rm -f conftest.$ac_objext conftest$ac_exeext
15293 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15294   (eval $ac_link) 2>conftest.er1
15295   ac_status=$?
15296   grep -v '^ *+' conftest.er1 >conftest.err
15297   rm -f conftest.er1
15298   cat conftest.err >&5
15299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15300   (exit $ac_status); } &&
15301          { ac_try='test -z "$ac_c_werror_flag"
15302                          || test ! -s conftest.err'
15303   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15304   (eval $ac_try) 2>&5
15305   ac_status=$?
15306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15307   (exit $ac_status); }; } &&
15308          { ac_try='test -s conftest$ac_exeext'
15309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15310   (eval $ac_try) 2>&5
15311   ac_status=$?
15312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15313   (exit $ac_status); }; }; then
15314
15315 cat >>confdefs.h <<\_ACEOF
15316 #define HAVE_SIGSETJMP 1
15317 _ACEOF
15318
15319 echo "$as_me:$LINENO: result: yes" >&5
15320 echo "${ECHO_T}yes" >&6
15321 else
15322   echo "$as_me: failed program was:" >&5
15323 sed 's/^/| /' conftest.$ac_ext >&5
15324
15325 echo "$as_me:$LINENO: result: no" >&5
15326 echo "${ECHO_T}no" >&6
15327 fi
15328 rm -f conftest.err conftest.$ac_objext \
15329       conftest$ac_exeext conftest.$ac_ext
15330
15331 echo "$as_me:$LINENO: checking for syslog" >&5
15332 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15333 if test "${ac_cv_func_syslog+set}" = set; then
15334   echo $ECHO_N "(cached) $ECHO_C" >&6
15335 else
15336   cat >conftest.$ac_ext <<_ACEOF
15337 /* confdefs.h.  */
15338 _ACEOF
15339 cat confdefs.h >>conftest.$ac_ext
15340 cat >>conftest.$ac_ext <<_ACEOF
15341 /* end confdefs.h.  */
15342 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15343    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15344 #define syslog innocuous_syslog
15345
15346 /* System header to define __stub macros and hopefully few prototypes,
15347     which can conflict with char syslog (); below.
15348     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15349     <limits.h> exists even on freestanding compilers.  */
15350
15351 #ifdef __STDC__
15352 # include <limits.h>
15353 #else
15354 # include <assert.h>
15355 #endif
15356
15357 #undef syslog
15358
15359 /* Override any gcc2 internal prototype to avoid an error.  */
15360 #ifdef __cplusplus
15361 extern "C"
15362 {
15363 #endif
15364 /* We use char because int might match the return type of a gcc2
15365    builtin and then its argument prototype would still apply.  */
15366 char syslog ();
15367 /* The GNU C library defines this for functions which it implements
15368     to always fail with ENOSYS.  Some functions are actually named
15369     something starting with __ and the normal name is an alias.  */
15370 #if defined (__stub_syslog) || defined (__stub___syslog)
15371 choke me
15372 #else
15373 char (*f) () = syslog;
15374 #endif
15375 #ifdef __cplusplus
15376 }
15377 #endif
15378
15379 int
15380 main ()
15381 {
15382 return f != syslog;
15383   ;
15384   return 0;
15385 }
15386 _ACEOF
15387 rm -f conftest.$ac_objext conftest$ac_exeext
15388 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15389   (eval $ac_link) 2>conftest.er1
15390   ac_status=$?
15391   grep -v '^ *+' conftest.er1 >conftest.err
15392   rm -f conftest.er1
15393   cat conftest.err >&5
15394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15395   (exit $ac_status); } &&
15396          { ac_try='test -z "$ac_c_werror_flag"
15397                          || test ! -s conftest.err'
15398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15399   (eval $ac_try) 2>&5
15400   ac_status=$?
15401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15402   (exit $ac_status); }; } &&
15403          { ac_try='test -s conftest$ac_exeext'
15404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15405   (eval $ac_try) 2>&5
15406   ac_status=$?
15407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15408   (exit $ac_status); }; }; then
15409   ac_cv_func_syslog=yes
15410 else
15411   echo "$as_me: failed program was:" >&5
15412 sed 's/^/| /' conftest.$ac_ext >&5
15413
15414 ac_cv_func_syslog=no
15415 fi
15416 rm -f conftest.err conftest.$ac_objext \
15417       conftest$ac_exeext conftest.$ac_ext
15418 fi
15419 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15420 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15421 if test $ac_cv_func_syslog = yes; then
15422   if test "${ac_cv_header_syslog_h+set}" = set; then
15423   echo "$as_me:$LINENO: checking for syslog.h" >&5
15424 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15425 if test "${ac_cv_header_syslog_h+set}" = set; then
15426   echo $ECHO_N "(cached) $ECHO_C" >&6
15427 fi
15428 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15429 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15430 else
15431   # Is the header compilable?
15432 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15433 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15434 cat >conftest.$ac_ext <<_ACEOF
15435 /* confdefs.h.  */
15436 _ACEOF
15437 cat confdefs.h >>conftest.$ac_ext
15438 cat >>conftest.$ac_ext <<_ACEOF
15439 /* end confdefs.h.  */
15440 $ac_includes_default
15441 #include <syslog.h>
15442 _ACEOF
15443 rm -f conftest.$ac_objext
15444 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15445   (eval $ac_compile) 2>conftest.er1
15446   ac_status=$?
15447   grep -v '^ *+' conftest.er1 >conftest.err
15448   rm -f conftest.er1
15449   cat conftest.err >&5
15450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15451   (exit $ac_status); } &&
15452          { ac_try='test -z "$ac_c_werror_flag"
15453                          || test ! -s conftest.err'
15454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15455   (eval $ac_try) 2>&5
15456   ac_status=$?
15457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15458   (exit $ac_status); }; } &&
15459          { ac_try='test -s conftest.$ac_objext'
15460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15461   (eval $ac_try) 2>&5
15462   ac_status=$?
15463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15464   (exit $ac_status); }; }; then
15465   ac_header_compiler=yes
15466 else
15467   echo "$as_me: failed program was:" >&5
15468 sed 's/^/| /' conftest.$ac_ext >&5
15469
15470 ac_header_compiler=no
15471 fi
15472 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15473 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15474 echo "${ECHO_T}$ac_header_compiler" >&6
15475
15476 # Is the header present?
15477 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15478 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15479 cat >conftest.$ac_ext <<_ACEOF
15480 /* confdefs.h.  */
15481 _ACEOF
15482 cat confdefs.h >>conftest.$ac_ext
15483 cat >>conftest.$ac_ext <<_ACEOF
15484 /* end confdefs.h.  */
15485 #include <syslog.h>
15486 _ACEOF
15487 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15488   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15489   ac_status=$?
15490   grep -v '^ *+' conftest.er1 >conftest.err
15491   rm -f conftest.er1
15492   cat conftest.err >&5
15493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15494   (exit $ac_status); } >/dev/null; then
15495   if test -s conftest.err; then
15496     ac_cpp_err=$ac_c_preproc_warn_flag
15497     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15498   else
15499     ac_cpp_err=
15500   fi
15501 else
15502   ac_cpp_err=yes
15503 fi
15504 if test -z "$ac_cpp_err"; then
15505   ac_header_preproc=yes
15506 else
15507   echo "$as_me: failed program was:" >&5
15508 sed 's/^/| /' conftest.$ac_ext >&5
15509
15510   ac_header_preproc=no
15511 fi
15512 rm -f conftest.err conftest.$ac_ext
15513 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15514 echo "${ECHO_T}$ac_header_preproc" >&6
15515
15516 # So?  What about this header?
15517 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15518   yes:no: )
15519     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15520 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15521     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15522 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15523     ac_header_preproc=yes
15524     ;;
15525   no:yes:* )
15526     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15527 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15528     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15529 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15530     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15531 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15532     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15533 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15534     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15535 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15536     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15537 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15538     (
15539       cat <<\_ASBOX
15540 ## ---------------------------------------- ##
15541 ## Report this to pgsql-bugs@postgresql.org ##
15542 ## ---------------------------------------- ##
15543 _ASBOX
15544     ) |
15545       sed "s/^/$as_me: WARNING:     /" >&2
15546     ;;
15547 esac
15548 echo "$as_me:$LINENO: checking for syslog.h" >&5
15549 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15550 if test "${ac_cv_header_syslog_h+set}" = set; then
15551   echo $ECHO_N "(cached) $ECHO_C" >&6
15552 else
15553   ac_cv_header_syslog_h=$ac_header_preproc
15554 fi
15555 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15556 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15557
15558 fi
15559 if test $ac_cv_header_syslog_h = yes; then
15560
15561 cat >>confdefs.h <<\_ACEOF
15562 #define HAVE_SYSLOG 1
15563 _ACEOF
15564
15565 fi
15566
15567
15568 fi
15569
15570
15571 echo "$as_me:$LINENO: checking for optreset" >&5
15572 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15573 if test "${pgac_cv_var_int_optreset+set}" = set; then
15574   echo $ECHO_N "(cached) $ECHO_C" >&6
15575 else
15576   cat >conftest.$ac_ext <<_ACEOF
15577 /* confdefs.h.  */
15578 _ACEOF
15579 cat confdefs.h >>conftest.$ac_ext
15580 cat >>conftest.$ac_ext <<_ACEOF
15581 /* end confdefs.h.  */
15582 #include <unistd.h>
15583 int
15584 main ()
15585 {
15586 extern int optreset; optreset = 1;
15587   ;
15588   return 0;
15589 }
15590 _ACEOF
15591 rm -f conftest.$ac_objext conftest$ac_exeext
15592 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15593   (eval $ac_link) 2>conftest.er1
15594   ac_status=$?
15595   grep -v '^ *+' conftest.er1 >conftest.err
15596   rm -f conftest.er1
15597   cat conftest.err >&5
15598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15599   (exit $ac_status); } &&
15600          { ac_try='test -z "$ac_c_werror_flag"
15601                          || test ! -s conftest.err'
15602   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15603   (eval $ac_try) 2>&5
15604   ac_status=$?
15605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15606   (exit $ac_status); }; } &&
15607          { ac_try='test -s conftest$ac_exeext'
15608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15609   (eval $ac_try) 2>&5
15610   ac_status=$?
15611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15612   (exit $ac_status); }; }; then
15613   pgac_cv_var_int_optreset=yes
15614 else
15615   echo "$as_me: failed program was:" >&5
15616 sed 's/^/| /' conftest.$ac_ext >&5
15617
15618 pgac_cv_var_int_optreset=no
15619 fi
15620 rm -f conftest.err conftest.$ac_objext \
15621       conftest$ac_exeext conftest.$ac_ext
15622 fi
15623 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15624 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15625 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15626
15627 cat >>confdefs.h <<\_ACEOF
15628 #define HAVE_INT_OPTRESET 1
15629 _ACEOF
15630
15631 fi
15632
15633
15634
15635 for ac_func in strtoll strtoq
15636 do
15637 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15638 echo "$as_me:$LINENO: checking for $ac_func" >&5
15639 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15640 if eval "test \"\${$as_ac_var+set}\" = set"; then
15641   echo $ECHO_N "(cached) $ECHO_C" >&6
15642 else
15643   cat >conftest.$ac_ext <<_ACEOF
15644 /* confdefs.h.  */
15645 _ACEOF
15646 cat confdefs.h >>conftest.$ac_ext
15647 cat >>conftest.$ac_ext <<_ACEOF
15648 /* end confdefs.h.  */
15649 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15650    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15651 #define $ac_func innocuous_$ac_func
15652
15653 /* System header to define __stub macros and hopefully few prototypes,
15654     which can conflict with char $ac_func (); below.
15655     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15656     <limits.h> exists even on freestanding compilers.  */
15657
15658 #ifdef __STDC__
15659 # include <limits.h>
15660 #else
15661 # include <assert.h>
15662 #endif
15663
15664 #undef $ac_func
15665
15666 /* Override any gcc2 internal prototype to avoid an error.  */
15667 #ifdef __cplusplus
15668 extern "C"
15669 {
15670 #endif
15671 /* We use char because int might match the return type of a gcc2
15672    builtin and then its argument prototype would still apply.  */
15673 char $ac_func ();
15674 /* The GNU C library defines this for functions which it implements
15675     to always fail with ENOSYS.  Some functions are actually named
15676     something starting with __ and the normal name is an alias.  */
15677 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15678 choke me
15679 #else
15680 char (*f) () = $ac_func;
15681 #endif
15682 #ifdef __cplusplus
15683 }
15684 #endif
15685
15686 int
15687 main ()
15688 {
15689 return f != $ac_func;
15690   ;
15691   return 0;
15692 }
15693 _ACEOF
15694 rm -f conftest.$ac_objext conftest$ac_exeext
15695 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15696   (eval $ac_link) 2>conftest.er1
15697   ac_status=$?
15698   grep -v '^ *+' conftest.er1 >conftest.err
15699   rm -f conftest.er1
15700   cat conftest.err >&5
15701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15702   (exit $ac_status); } &&
15703          { ac_try='test -z "$ac_c_werror_flag"
15704                          || test ! -s conftest.err'
15705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15706   (eval $ac_try) 2>&5
15707   ac_status=$?
15708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15709   (exit $ac_status); }; } &&
15710          { ac_try='test -s conftest$ac_exeext'
15711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15712   (eval $ac_try) 2>&5
15713   ac_status=$?
15714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15715   (exit $ac_status); }; }; then
15716   eval "$as_ac_var=yes"
15717 else
15718   echo "$as_me: failed program was:" >&5
15719 sed 's/^/| /' conftest.$ac_ext >&5
15720
15721 eval "$as_ac_var=no"
15722 fi
15723 rm -f conftest.err conftest.$ac_objext \
15724       conftest$ac_exeext conftest.$ac_ext
15725 fi
15726 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15727 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15728 if test `eval echo '${'$as_ac_var'}'` = yes; then
15729   cat >>confdefs.h <<_ACEOF
15730 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15731 _ACEOF
15732  break
15733 fi
15734 done
15735
15736
15737
15738 for ac_func in strtoull strtouq
15739 do
15740 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15741 echo "$as_me:$LINENO: checking for $ac_func" >&5
15742 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15743 if eval "test \"\${$as_ac_var+set}\" = set"; then
15744   echo $ECHO_N "(cached) $ECHO_C" >&6
15745 else
15746   cat >conftest.$ac_ext <<_ACEOF
15747 /* confdefs.h.  */
15748 _ACEOF
15749 cat confdefs.h >>conftest.$ac_ext
15750 cat >>conftest.$ac_ext <<_ACEOF
15751 /* end confdefs.h.  */
15752 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15753    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15754 #define $ac_func innocuous_$ac_func
15755
15756 /* System header to define __stub macros and hopefully few prototypes,
15757     which can conflict with char $ac_func (); below.
15758     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15759     <limits.h> exists even on freestanding compilers.  */
15760
15761 #ifdef __STDC__
15762 # include <limits.h>
15763 #else
15764 # include <assert.h>
15765 #endif
15766
15767 #undef $ac_func
15768
15769 /* Override any gcc2 internal prototype to avoid an error.  */
15770 #ifdef __cplusplus
15771 extern "C"
15772 {
15773 #endif
15774 /* We use char because int might match the return type of a gcc2
15775    builtin and then its argument prototype would still apply.  */
15776 char $ac_func ();
15777 /* The GNU C library defines this for functions which it implements
15778     to always fail with ENOSYS.  Some functions are actually named
15779     something starting with __ and the normal name is an alias.  */
15780 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15781 choke me
15782 #else
15783 char (*f) () = $ac_func;
15784 #endif
15785 #ifdef __cplusplus
15786 }
15787 #endif
15788
15789 int
15790 main ()
15791 {
15792 return f != $ac_func;
15793   ;
15794   return 0;
15795 }
15796 _ACEOF
15797 rm -f conftest.$ac_objext conftest$ac_exeext
15798 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15799   (eval $ac_link) 2>conftest.er1
15800   ac_status=$?
15801   grep -v '^ *+' conftest.er1 >conftest.err
15802   rm -f conftest.er1
15803   cat conftest.err >&5
15804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15805   (exit $ac_status); } &&
15806          { ac_try='test -z "$ac_c_werror_flag"
15807                          || test ! -s conftest.err'
15808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15809   (eval $ac_try) 2>&5
15810   ac_status=$?
15811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15812   (exit $ac_status); }; } &&
15813          { ac_try='test -s conftest$ac_exeext'
15814   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15815   (eval $ac_try) 2>&5
15816   ac_status=$?
15817   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15818   (exit $ac_status); }; }; then
15819   eval "$as_ac_var=yes"
15820 else
15821   echo "$as_me: failed program was:" >&5
15822 sed 's/^/| /' conftest.$ac_ext >&5
15823
15824 eval "$as_ac_var=no"
15825 fi
15826 rm -f conftest.err conftest.$ac_objext \
15827       conftest$ac_exeext conftest.$ac_ext
15828 fi
15829 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15830 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15831 if test `eval echo '${'$as_ac_var'}'` = yes; then
15832   cat >>confdefs.h <<_ACEOF
15833 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15834 _ACEOF
15835  break
15836 fi
15837 done
15838
15839
15840 # Check for one of atexit() or on_exit()
15841
15842 for ac_func in atexit
15843 do
15844 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15845 echo "$as_me:$LINENO: checking for $ac_func" >&5
15846 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15847 if eval "test \"\${$as_ac_var+set}\" = set"; then
15848   echo $ECHO_N "(cached) $ECHO_C" >&6
15849 else
15850   cat >conftest.$ac_ext <<_ACEOF
15851 /* confdefs.h.  */
15852 _ACEOF
15853 cat confdefs.h >>conftest.$ac_ext
15854 cat >>conftest.$ac_ext <<_ACEOF
15855 /* end confdefs.h.  */
15856 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15857    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15858 #define $ac_func innocuous_$ac_func
15859
15860 /* System header to define __stub macros and hopefully few prototypes,
15861     which can conflict with char $ac_func (); below.
15862     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15863     <limits.h> exists even on freestanding compilers.  */
15864
15865 #ifdef __STDC__
15866 # include <limits.h>
15867 #else
15868 # include <assert.h>
15869 #endif
15870
15871 #undef $ac_func
15872
15873 /* Override any gcc2 internal prototype to avoid an error.  */
15874 #ifdef __cplusplus
15875 extern "C"
15876 {
15877 #endif
15878 /* We use char because int might match the return type of a gcc2
15879    builtin and then its argument prototype would still apply.  */
15880 char $ac_func ();
15881 /* The GNU C library defines this for functions which it implements
15882     to always fail with ENOSYS.  Some functions are actually named
15883     something starting with __ and the normal name is an alias.  */
15884 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15885 choke me
15886 #else
15887 char (*f) () = $ac_func;
15888 #endif
15889 #ifdef __cplusplus
15890 }
15891 #endif
15892
15893 int
15894 main ()
15895 {
15896 return f != $ac_func;
15897   ;
15898   return 0;
15899 }
15900 _ACEOF
15901 rm -f conftest.$ac_objext conftest$ac_exeext
15902 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15903   (eval $ac_link) 2>conftest.er1
15904   ac_status=$?
15905   grep -v '^ *+' conftest.er1 >conftest.err
15906   rm -f conftest.er1
15907   cat conftest.err >&5
15908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15909   (exit $ac_status); } &&
15910          { ac_try='test -z "$ac_c_werror_flag"
15911                          || test ! -s conftest.err'
15912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15913   (eval $ac_try) 2>&5
15914   ac_status=$?
15915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15916   (exit $ac_status); }; } &&
15917          { ac_try='test -s conftest$ac_exeext'
15918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15919   (eval $ac_try) 2>&5
15920   ac_status=$?
15921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15922   (exit $ac_status); }; }; then
15923   eval "$as_ac_var=yes"
15924 else
15925   echo "$as_me: failed program was:" >&5
15926 sed 's/^/| /' conftest.$ac_ext >&5
15927
15928 eval "$as_ac_var=no"
15929 fi
15930 rm -f conftest.err conftest.$ac_objext \
15931       conftest$ac_exeext conftest.$ac_ext
15932 fi
15933 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15934 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15935 if test `eval echo '${'$as_ac_var'}'` = yes; then
15936   cat >>confdefs.h <<_ACEOF
15937 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15938 _ACEOF
15939
15940 else
15941
15942 for ac_func in on_exit
15943 do
15944 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15945 echo "$as_me:$LINENO: checking for $ac_func" >&5
15946 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15947 if eval "test \"\${$as_ac_var+set}\" = set"; then
15948   echo $ECHO_N "(cached) $ECHO_C" >&6
15949 else
15950   cat >conftest.$ac_ext <<_ACEOF
15951 /* confdefs.h.  */
15952 _ACEOF
15953 cat confdefs.h >>conftest.$ac_ext
15954 cat >>conftest.$ac_ext <<_ACEOF
15955 /* end confdefs.h.  */
15956 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15957    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15958 #define $ac_func innocuous_$ac_func
15959
15960 /* System header to define __stub macros and hopefully few prototypes,
15961     which can conflict with char $ac_func (); below.
15962     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15963     <limits.h> exists even on freestanding compilers.  */
15964
15965 #ifdef __STDC__
15966 # include <limits.h>
15967 #else
15968 # include <assert.h>
15969 #endif
15970
15971 #undef $ac_func
15972
15973 /* Override any gcc2 internal prototype to avoid an error.  */
15974 #ifdef __cplusplus
15975 extern "C"
15976 {
15977 #endif
15978 /* We use char because int might match the return type of a gcc2
15979    builtin and then its argument prototype would still apply.  */
15980 char $ac_func ();
15981 /* The GNU C library defines this for functions which it implements
15982     to always fail with ENOSYS.  Some functions are actually named
15983     something starting with __ and the normal name is an alias.  */
15984 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15985 choke me
15986 #else
15987 char (*f) () = $ac_func;
15988 #endif
15989 #ifdef __cplusplus
15990 }
15991 #endif
15992
15993 int
15994 main ()
15995 {
15996 return f != $ac_func;
15997   ;
15998   return 0;
15999 }
16000 _ACEOF
16001 rm -f conftest.$ac_objext conftest$ac_exeext
16002 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16003   (eval $ac_link) 2>conftest.er1
16004   ac_status=$?
16005   grep -v '^ *+' conftest.er1 >conftest.err
16006   rm -f conftest.er1
16007   cat conftest.err >&5
16008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16009   (exit $ac_status); } &&
16010          { ac_try='test -z "$ac_c_werror_flag"
16011                          || test ! -s conftest.err'
16012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16013   (eval $ac_try) 2>&5
16014   ac_status=$?
16015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16016   (exit $ac_status); }; } &&
16017          { ac_try='test -s conftest$ac_exeext'
16018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16019   (eval $ac_try) 2>&5
16020   ac_status=$?
16021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16022   (exit $ac_status); }; }; then
16023   eval "$as_ac_var=yes"
16024 else
16025   echo "$as_me: failed program was:" >&5
16026 sed 's/^/| /' conftest.$ac_ext >&5
16027
16028 eval "$as_ac_var=no"
16029 fi
16030 rm -f conftest.err conftest.$ac_objext \
16031       conftest$ac_exeext conftest.$ac_ext
16032 fi
16033 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16034 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16035 if test `eval echo '${'$as_ac_var'}'` = yes; then
16036   cat >>confdefs.h <<_ACEOF
16037 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16038 _ACEOF
16039
16040 else
16041   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
16042 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
16043    { (exit 1); exit 1; }; }
16044 fi
16045 done
16046
16047 fi
16048 done
16049
16050
16051 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16052 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16053 if test "${ac_cv_sys_largefile_source+set}" = set; then
16054   echo $ECHO_N "(cached) $ECHO_C" >&6
16055 else
16056   while :; do
16057   ac_cv_sys_largefile_source=no
16058   cat >conftest.$ac_ext <<_ACEOF
16059 /* confdefs.h.  */
16060 _ACEOF
16061 cat confdefs.h >>conftest.$ac_ext
16062 cat >>conftest.$ac_ext <<_ACEOF
16063 /* end confdefs.h.  */
16064 #include <stdio.h>
16065 int
16066 main ()
16067 {
16068 return !fseeko;
16069   ;
16070   return 0;
16071 }
16072 _ACEOF
16073 rm -f conftest.$ac_objext
16074 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16075   (eval $ac_compile) 2>conftest.er1
16076   ac_status=$?
16077   grep -v '^ *+' conftest.er1 >conftest.err
16078   rm -f conftest.er1
16079   cat conftest.err >&5
16080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16081   (exit $ac_status); } &&
16082          { ac_try='test -z "$ac_c_werror_flag"
16083                          || test ! -s conftest.err'
16084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16085   (eval $ac_try) 2>&5
16086   ac_status=$?
16087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16088   (exit $ac_status); }; } &&
16089          { ac_try='test -s conftest.$ac_objext'
16090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16091   (eval $ac_try) 2>&5
16092   ac_status=$?
16093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16094   (exit $ac_status); }; }; then
16095   break
16096 else
16097   echo "$as_me: failed program was:" >&5
16098 sed 's/^/| /' conftest.$ac_ext >&5
16099
16100 fi
16101 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16102   cat >conftest.$ac_ext <<_ACEOF
16103 /* confdefs.h.  */
16104 _ACEOF
16105 cat confdefs.h >>conftest.$ac_ext
16106 cat >>conftest.$ac_ext <<_ACEOF
16107 /* end confdefs.h.  */
16108 #define _LARGEFILE_SOURCE 1
16109 #include <stdio.h>
16110 int
16111 main ()
16112 {
16113 return !fseeko;
16114   ;
16115   return 0;
16116 }
16117 _ACEOF
16118 rm -f conftest.$ac_objext
16119 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16120   (eval $ac_compile) 2>conftest.er1
16121   ac_status=$?
16122   grep -v '^ *+' conftest.er1 >conftest.err
16123   rm -f conftest.er1
16124   cat conftest.err >&5
16125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16126   (exit $ac_status); } &&
16127          { ac_try='test -z "$ac_c_werror_flag"
16128                          || test ! -s conftest.err'
16129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16130   (eval $ac_try) 2>&5
16131   ac_status=$?
16132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16133   (exit $ac_status); }; } &&
16134          { ac_try='test -s conftest.$ac_objext'
16135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16136   (eval $ac_try) 2>&5
16137   ac_status=$?
16138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16139   (exit $ac_status); }; }; then
16140   ac_cv_sys_largefile_source=1; break
16141 else
16142   echo "$as_me: failed program was:" >&5
16143 sed 's/^/| /' conftest.$ac_ext >&5
16144
16145 fi
16146 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16147   break
16148 done
16149 fi
16150 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16151 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16152 if test "$ac_cv_sys_largefile_source" != no; then
16153
16154 cat >>confdefs.h <<_ACEOF
16155 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16156 _ACEOF
16157
16158 fi
16159 rm -f conftest*
16160
16161 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16162 # in glibc 2.1.3, but that breaks too many other things.
16163 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16164 echo "$as_me:$LINENO: checking for fseeko" >&5
16165 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16166 if test "${ac_cv_func_fseeko+set}" = set; then
16167   echo $ECHO_N "(cached) $ECHO_C" >&6
16168 else
16169   cat >conftest.$ac_ext <<_ACEOF
16170 /* confdefs.h.  */
16171 _ACEOF
16172 cat confdefs.h >>conftest.$ac_ext
16173 cat >>conftest.$ac_ext <<_ACEOF
16174 /* end confdefs.h.  */
16175 #include <stdio.h>
16176 int
16177 main ()
16178 {
16179 return fseeko && fseeko (stdin, 0, 0);
16180   ;
16181   return 0;
16182 }
16183 _ACEOF
16184 rm -f conftest.$ac_objext conftest$ac_exeext
16185 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16186   (eval $ac_link) 2>conftest.er1
16187   ac_status=$?
16188   grep -v '^ *+' conftest.er1 >conftest.err
16189   rm -f conftest.er1
16190   cat conftest.err >&5
16191   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16192   (exit $ac_status); } &&
16193          { ac_try='test -z "$ac_c_werror_flag"
16194                          || test ! -s conftest.err'
16195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16196   (eval $ac_try) 2>&5
16197   ac_status=$?
16198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16199   (exit $ac_status); }; } &&
16200          { ac_try='test -s conftest$ac_exeext'
16201   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16202   (eval $ac_try) 2>&5
16203   ac_status=$?
16204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16205   (exit $ac_status); }; }; then
16206   ac_cv_func_fseeko=yes
16207 else
16208   echo "$as_me: failed program was:" >&5
16209 sed 's/^/| /' conftest.$ac_ext >&5
16210
16211 ac_cv_func_fseeko=no
16212 fi
16213 rm -f conftest.err conftest.$ac_objext \
16214       conftest$ac_exeext conftest.$ac_ext
16215 fi
16216 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16217 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16218 if test $ac_cv_func_fseeko = yes; then
16219
16220 cat >>confdefs.h <<\_ACEOF
16221 #define HAVE_FSEEKO 1
16222 _ACEOF
16223
16224 fi
16225
16226
16227 #
16228 # Pthreads
16229 #
16230 # For each platform, we need to know about any special compile and link
16231 # libraries, and whether the normal C function names are thread-safe.
16232 # See the comment at the top of src/port/thread.c for more information.
16233 #
16234 if test "$enable_thread_safety" = yes; then
16235
16236
16237
16238
16239 ac_ext=c
16240 ac_cpp='$CPP $CPPFLAGS'
16241 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16242 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16243 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16244
16245 acx_pthread_ok=no
16246
16247 # We used to check for pthread.h first, but this fails if pthread.h
16248 # requires special compiler flags (e.g. on True64 or Sequent).
16249 # It gets checked for in the link test anyway.
16250
16251 # First of all, check if the user has set any of the PTHREAD_LIBS,
16252 # etcetera environment variables, and if threads linking works using
16253 # them:
16254 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16255         save_CFLAGS="$CFLAGS"
16256         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16257         save_LIBS="$LIBS"
16258         LIBS="$PTHREAD_LIBS $LIBS"
16259         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16260 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16261         cat >conftest.$ac_ext <<_ACEOF
16262 /* confdefs.h.  */
16263 _ACEOF
16264 cat confdefs.h >>conftest.$ac_ext
16265 cat >>conftest.$ac_ext <<_ACEOF
16266 /* end confdefs.h.  */
16267
16268 /* Override any gcc2 internal prototype to avoid an error.  */
16269 #ifdef __cplusplus
16270 extern "C"
16271 #endif
16272 /* We use char because int might match the return type of a gcc2
16273    builtin and then its argument prototype would still apply.  */
16274 char pthread_join ();
16275 int
16276 main ()
16277 {
16278 pthread_join ();
16279   ;
16280   return 0;
16281 }
16282 _ACEOF
16283 rm -f conftest.$ac_objext conftest$ac_exeext
16284 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16285   (eval $ac_link) 2>conftest.er1
16286   ac_status=$?
16287   grep -v '^ *+' conftest.er1 >conftest.err
16288   rm -f conftest.er1
16289   cat conftest.err >&5
16290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16291   (exit $ac_status); } &&
16292          { ac_try='test -z "$ac_c_werror_flag"
16293                          || test ! -s conftest.err'
16294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16295   (eval $ac_try) 2>&5
16296   ac_status=$?
16297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16298   (exit $ac_status); }; } &&
16299          { ac_try='test -s conftest$ac_exeext'
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); }; }; then
16305   acx_pthread_ok=yes
16306 else
16307   echo "$as_me: failed program was:" >&5
16308 sed 's/^/| /' conftest.$ac_ext >&5
16309
16310 fi
16311 rm -f conftest.err conftest.$ac_objext \
16312       conftest$ac_exeext conftest.$ac_ext
16313         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16314 echo "${ECHO_T}$acx_pthread_ok" >&6
16315         if test x"$acx_pthread_ok" = xno; then
16316                 PTHREAD_LIBS=""
16317                 PTHREAD_CFLAGS=""
16318         fi
16319         LIBS="$save_LIBS"
16320         CFLAGS="$save_CFLAGS"
16321 fi
16322
16323 # We must check for the threads library under a number of different
16324 # names; the ordering is very important because some systems
16325 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16326 # libraries is broken (non-POSIX).
16327
16328 # Create a list of thread flags to try.  Items starting with a "-" are
16329 # C compiler flags, and other items are library names, except for "none"
16330 # which indicates that we try without any flags at all, and "pthread-config"
16331 # which is a program returning the flags for the Pth emulation library.
16332
16333 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16334
16335 # The ordering *is* (sometimes) important.  Some notes on the
16336 # individual items follow:
16337
16338 # pthreads: AIX (must check this before -lpthread)
16339 # none: in case threads are in libc; should be tried before -Kthread and
16340 #       other compiler flags to prevent continual compiler warnings
16341 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16342 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16343 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16344 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16345 # -pthreads: Solaris/gcc
16346 # -mthreads: Mingw32/gcc, Lynx/gcc
16347 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16348 #      doesn't hurt to check since this sometimes defines pthreads too;
16349 #      also defines -D_REENTRANT)
16350 # pthread: Linux, etcetera
16351 # --thread-safe: KAI C++
16352 # pthread-config: use pthread-config program (for GNU Pth library)
16353
16354 case "${host_cpu}-${host_os}" in
16355         *solaris*)
16356
16357         # On Solaris (at least, for some versions), libc contains stubbed
16358         # (non-functional) versions of the pthreads routines, so link-based
16359         # tests will erroneously succeed.  (We need to link with -pthread or
16360         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16361         # a function called by this macro, so we could check for that, but
16362         # who knows whether they'll stub that too in a future libc.)  So,
16363         # we'll just look for -pthreads and -lpthread first:
16364
16365         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16366         ;;
16367 esac
16368
16369 if test x"$acx_pthread_ok" = xno; then
16370 for flag in $acx_pthread_flags; do
16371
16372         tryPTHREAD_CFLAGS=""
16373         tryPTHREAD_LIBS=""
16374         case $flag in
16375                 none)
16376                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16377 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16378                 ;;
16379
16380                 -*)
16381                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16382 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16383                 tryPTHREAD_CFLAGS="$flag"
16384                 ;;
16385
16386                 pthread-config)
16387                 # skip this if we already have flags defined, for PostgreSQL
16388                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16389                 # Extract the first word of "pthread-config", so it can be a program name with args.
16390 set dummy pthread-config; ac_word=$2
16391 echo "$as_me:$LINENO: checking for $ac_word" >&5
16392 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16393 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16394   echo $ECHO_N "(cached) $ECHO_C" >&6
16395 else
16396   if test -n "$acx_pthread_config"; then
16397   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16398 else
16399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16400 for as_dir in $PATH
16401 do
16402   IFS=$as_save_IFS
16403   test -z "$as_dir" && as_dir=.
16404   for ac_exec_ext in '' $ac_executable_extensions; do
16405   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16406     ac_cv_prog_acx_pthread_config="yes"
16407     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16408     break 2
16409   fi
16410 done
16411 done
16412
16413   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16414 fi
16415 fi
16416 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16417 if test -n "$acx_pthread_config"; then
16418   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16419 echo "${ECHO_T}$acx_pthread_config" >&6
16420 else
16421   echo "$as_me:$LINENO: result: no" >&5
16422 echo "${ECHO_T}no" >&6
16423 fi
16424
16425                 if test x"$acx_pthread_config" = xno; then continue; fi
16426                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16427                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16428                 ;;
16429
16430                 *)
16431                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16432 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16433                 tryPTHREAD_LIBS="-l$flag"
16434                 ;;
16435         esac
16436
16437         save_LIBS="$LIBS"
16438         save_CFLAGS="$CFLAGS"
16439         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16440         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16441
16442         # Check for various functions.  We must include pthread.h,
16443         # since some functions may be macros.  (On the Sequent, we
16444         # need a special flag -Kthread to make this header compile.)
16445         # We check for pthread_join because it is in -lpthread on IRIX
16446         # while pthread_create is in libc.  We check for pthread_attr_init
16447         # due to DEC craziness with -lpthreads.  We check for
16448         # pthread_cleanup_push because it is one of the few pthread
16449         # functions on Solaris that doesn't have a non-functional libc stub.
16450         # We try pthread_create on general principles.
16451         cat >conftest.$ac_ext <<_ACEOF
16452 /* confdefs.h.  */
16453 _ACEOF
16454 cat confdefs.h >>conftest.$ac_ext
16455 cat >>conftest.$ac_ext <<_ACEOF
16456 /* end confdefs.h.  */
16457 #include <pthread.h>
16458 int
16459 main ()
16460 {
16461 pthread_t th; pthread_join(th, 0);
16462                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16463                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16464   ;
16465   return 0;
16466 }
16467 _ACEOF
16468 rm -f conftest.$ac_objext conftest$ac_exeext
16469 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16470   (eval $ac_link) 2>conftest.er1
16471   ac_status=$?
16472   grep -v '^ *+' conftest.er1 >conftest.err
16473   rm -f conftest.er1
16474   cat conftest.err >&5
16475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16476   (exit $ac_status); } &&
16477          { ac_try='test -z "$ac_c_werror_flag"
16478                          || test ! -s conftest.err'
16479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16480   (eval $ac_try) 2>&5
16481   ac_status=$?
16482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16483   (exit $ac_status); }; } &&
16484          { ac_try='test -s conftest$ac_exeext'
16485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16486   (eval $ac_try) 2>&5
16487   ac_status=$?
16488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16489   (exit $ac_status); }; }; then
16490   acx_pthread_ok=yes
16491 else
16492   echo "$as_me: failed program was:" >&5
16493 sed 's/^/| /' conftest.$ac_ext >&5
16494
16495 acx_pthread_ok=no
16496 fi
16497 rm -f conftest.err conftest.$ac_objext \
16498       conftest$ac_exeext conftest.$ac_ext
16499
16500         if test "x$acx_pthread_ok" = xyes; then
16501             # Don't use options that are ignored by the compiler.
16502             # We find them by checking stderror.
16503             cat >conftest.$ac_ext <<_ACEOF
16504 int
16505 main (int argc, char **argv)
16506 {
16507   (void) argc;
16508   (void) argv;
16509   return 0;
16510 }
16511 _ACEOF
16512             rm -f conftest.$ac_objext conftest$ac_exeext
16513             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16514                 # we continue with more flags because Linux needs -lpthread
16515                 # for libpq builds on PostgreSQL.  The test above only
16516                 # tests for building binaries, not shared libraries.
16517                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16518                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16519             else   acx_pthread_ok=no
16520             fi
16521         fi
16522
16523         LIBS="$save_LIBS"
16524         CFLAGS="$save_CFLAGS"
16525
16526         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16527 echo "${ECHO_T}$acx_pthread_ok" >&6
16528 done
16529 fi
16530
16531 # Various other checks:
16532 if test "x$acx_pthread_ok" = xyes; then
16533         save_LIBS="$LIBS"
16534         LIBS="$PTHREAD_LIBS $LIBS"
16535         save_CFLAGS="$CFLAGS"
16536         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16537
16538         # Detect AIX lossage: threads are created detached by default
16539         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16540         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16541 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16542         cat >conftest.$ac_ext <<_ACEOF
16543 /* confdefs.h.  */
16544 _ACEOF
16545 cat confdefs.h >>conftest.$ac_ext
16546 cat >>conftest.$ac_ext <<_ACEOF
16547 /* end confdefs.h.  */
16548 #include <pthread.h>
16549 int
16550 main ()
16551 {
16552 int attr=PTHREAD_CREATE_JOINABLE;
16553   ;
16554   return 0;
16555 }
16556 _ACEOF
16557 rm -f conftest.$ac_objext conftest$ac_exeext
16558 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16559   (eval $ac_link) 2>conftest.er1
16560   ac_status=$?
16561   grep -v '^ *+' conftest.er1 >conftest.err
16562   rm -f conftest.er1
16563   cat conftest.err >&5
16564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16565   (exit $ac_status); } &&
16566          { ac_try='test -z "$ac_c_werror_flag"
16567                          || test ! -s conftest.err'
16568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16569   (eval $ac_try) 2>&5
16570   ac_status=$?
16571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16572   (exit $ac_status); }; } &&
16573          { ac_try='test -s conftest$ac_exeext'
16574   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16575   (eval $ac_try) 2>&5
16576   ac_status=$?
16577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16578   (exit $ac_status); }; }; then
16579   ok=PTHREAD_CREATE_JOINABLE
16580 else
16581   echo "$as_me: failed program was:" >&5
16582 sed 's/^/| /' conftest.$ac_ext >&5
16583
16584 ok=unknown
16585 fi
16586 rm -f conftest.err conftest.$ac_objext \
16587       conftest$ac_exeext conftest.$ac_ext
16588         if test x"$ok" = xunknown; then
16589                 cat >conftest.$ac_ext <<_ACEOF
16590 /* confdefs.h.  */
16591 _ACEOF
16592 cat confdefs.h >>conftest.$ac_ext
16593 cat >>conftest.$ac_ext <<_ACEOF
16594 /* end confdefs.h.  */
16595 #include <pthread.h>
16596 int
16597 main ()
16598 {
16599 int attr=PTHREAD_CREATE_UNDETACHED;
16600   ;
16601   return 0;
16602 }
16603 _ACEOF
16604 rm -f conftest.$ac_objext conftest$ac_exeext
16605 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16606   (eval $ac_link) 2>conftest.er1
16607   ac_status=$?
16608   grep -v '^ *+' conftest.er1 >conftest.err
16609   rm -f conftest.er1
16610   cat conftest.err >&5
16611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16612   (exit $ac_status); } &&
16613          { ac_try='test -z "$ac_c_werror_flag"
16614                          || test ! -s conftest.err'
16615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16616   (eval $ac_try) 2>&5
16617   ac_status=$?
16618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16619   (exit $ac_status); }; } &&
16620          { ac_try='test -s conftest$ac_exeext'
16621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16622   (eval $ac_try) 2>&5
16623   ac_status=$?
16624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16625   (exit $ac_status); }; }; then
16626   ok=PTHREAD_CREATE_UNDETACHED
16627 else
16628   echo "$as_me: failed program was:" >&5
16629 sed 's/^/| /' conftest.$ac_ext >&5
16630
16631 ok=unknown
16632 fi
16633 rm -f conftest.err conftest.$ac_objext \
16634       conftest$ac_exeext conftest.$ac_ext
16635         fi
16636         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16637
16638 cat >>confdefs.h <<\_ACEOF
16639 #define PTHREAD_CREATE_JOINABLE $ok
16640 _ACEOF
16641
16642         fi
16643         echo "$as_me:$LINENO: result: ${ok}" >&5
16644 echo "${ECHO_T}${ok}" >&6
16645         if test x"$ok" = xunknown; then
16646                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16647 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16648         fi
16649
16650         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16651 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16652         flag=no
16653 # We always add these in PostgreSQL
16654 #       case "${host_cpu}-${host_os}" in
16655 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16656 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16657 #       esac
16658         echo "$as_me:$LINENO: result: ${flag}" >&5
16659 echo "${ECHO_T}${flag}" >&6
16660         if test "x$flag" != xno; then
16661                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16662         fi
16663
16664         LIBS="$save_LIBS"
16665         CFLAGS="$save_CFLAGS"
16666
16667 # Supporting cc_r would require a special CC in all places that
16668 # use libpq, and that is ugly, so we don't do it.  Users can still
16669 # define their compiler as cc_r to do thread builds of everything.
16670         # More AIX lossage: must compile with cc_r
16671         # Extract the first word of "cc_r", so it can be a program name with args.
16672 set dummy cc_r; ac_word=$2
16673 echo "$as_me:$LINENO: checking for $ac_word" >&5
16674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16675 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16676   echo $ECHO_N "(cached) $ECHO_C" >&6
16677 else
16678   if test -n "$PTHREAD_CC"; then
16679   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16680 else
16681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16682 for as_dir in $PATH
16683 do
16684   IFS=$as_save_IFS
16685   test -z "$as_dir" && as_dir=.
16686   for ac_exec_ext in '' $ac_executable_extensions; do
16687   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16688     ac_cv_prog_PTHREAD_CC="cc_r"
16689     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16690     break 2
16691   fi
16692 done
16693 done
16694
16695   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16696 fi
16697 fi
16698 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16699 if test -n "$PTHREAD_CC"; then
16700   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16701 echo "${ECHO_T}$PTHREAD_CC" >&6
16702 else
16703   echo "$as_me:$LINENO: result: no" >&5
16704 echo "${ECHO_T}no" >&6
16705 fi
16706
16707 else
16708         PTHREAD_CC="$CC"
16709 fi
16710
16711
16712
16713
16714
16715 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16716 if test x"$acx_pthread_ok" = xyes; then
16717
16718 cat >>confdefs.h <<\_ACEOF
16719 #define HAVE_PTHREAD 1
16720 _ACEOF
16721
16722         :
16723 else
16724         acx_pthread_ok=no
16725
16726 fi
16727 ac_ext=c
16728 ac_cpp='$CPP $CPPFLAGS'
16729 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16730 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16731 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16732
16733         # set thread flags
16734
16735 # Some platforms use these, so just defineed them.  They can't hurt if they
16736 # are not supported.
16737 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16738
16739
16740 # At this point, we don't want to muck with the compiler name for threading.
16741 # Let's see who fails, perhaps AIX.  2004-04-23
16742 if test "$PTHREAD_CC" != "$CC"; then
16743 { { echo "$as_me:$LINENO: error:
16744 PostgreSQL does not support platforms that require a special
16745 compiler binary for thread-safety.
16746 " >&5
16747 echo "$as_me: error:
16748 PostgreSQL does not support platforms that require a special
16749 compiler binary for thread-safety.
16750 " >&2;}
16751    { (exit 1); exit 1; }; }
16752 fi
16753
16754 if test "$THREAD_SUPPORT" = no; then
16755 { { echo "$as_me:$LINENO: error:
16756 Cannot enable threads on your platform.
16757 Your platform is known to not support thread-safe programs.
16758 For details, compile and run src/bin/pg_thread_test.
16759 " >&5
16760 echo "$as_me: error:
16761 Cannot enable threads on your platform.
16762 Your platform is known to not support thread-safe programs.
16763 For details, compile and run src/bin/pg_thread_test.
16764 " >&2;}
16765    { (exit 1); exit 1; }; }
16766 fi
16767
16768 # Check for *_r functions
16769 _CFLAGS="$CFLAGS"
16770 _LIBS="$LIBS"
16771 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16772 LIBS="$LIBS $PTHREAD_LIBS"
16773
16774 if test "${ac_cv_header_pthread_h+set}" = set; then
16775   echo "$as_me:$LINENO: checking for pthread.h" >&5
16776 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16777 if test "${ac_cv_header_pthread_h+set}" = set; then
16778   echo $ECHO_N "(cached) $ECHO_C" >&6
16779 fi
16780 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16781 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16782 else
16783   # Is the header compilable?
16784 echo "$as_me:$LINENO: checking pthread.h usability" >&5
16785 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
16786 cat >conftest.$ac_ext <<_ACEOF
16787 /* confdefs.h.  */
16788 _ACEOF
16789 cat confdefs.h >>conftest.$ac_ext
16790 cat >>conftest.$ac_ext <<_ACEOF
16791 /* end confdefs.h.  */
16792 $ac_includes_default
16793 #include <pthread.h>
16794 _ACEOF
16795 rm -f conftest.$ac_objext
16796 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16797   (eval $ac_compile) 2>conftest.er1
16798   ac_status=$?
16799   grep -v '^ *+' conftest.er1 >conftest.err
16800   rm -f conftest.er1
16801   cat conftest.err >&5
16802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16803   (exit $ac_status); } &&
16804          { ac_try='test -z "$ac_c_werror_flag"
16805                          || test ! -s conftest.err'
16806   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16807   (eval $ac_try) 2>&5
16808   ac_status=$?
16809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16810   (exit $ac_status); }; } &&
16811          { ac_try='test -s conftest.$ac_objext'
16812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16813   (eval $ac_try) 2>&5
16814   ac_status=$?
16815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16816   (exit $ac_status); }; }; then
16817   ac_header_compiler=yes
16818 else
16819   echo "$as_me: failed program was:" >&5
16820 sed 's/^/| /' conftest.$ac_ext >&5
16821
16822 ac_header_compiler=no
16823 fi
16824 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16825 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16826 echo "${ECHO_T}$ac_header_compiler" >&6
16827
16828 # Is the header present?
16829 echo "$as_me:$LINENO: checking pthread.h presence" >&5
16830 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
16831 cat >conftest.$ac_ext <<_ACEOF
16832 /* confdefs.h.  */
16833 _ACEOF
16834 cat confdefs.h >>conftest.$ac_ext
16835 cat >>conftest.$ac_ext <<_ACEOF
16836 /* end confdefs.h.  */
16837 #include <pthread.h>
16838 _ACEOF
16839 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16840   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16841   ac_status=$?
16842   grep -v '^ *+' conftest.er1 >conftest.err
16843   rm -f conftest.er1
16844   cat conftest.err >&5
16845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16846   (exit $ac_status); } >/dev/null; then
16847   if test -s conftest.err; then
16848     ac_cpp_err=$ac_c_preproc_warn_flag
16849     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16850   else
16851     ac_cpp_err=
16852   fi
16853 else
16854   ac_cpp_err=yes
16855 fi
16856 if test -z "$ac_cpp_err"; then
16857   ac_header_preproc=yes
16858 else
16859   echo "$as_me: failed program was:" >&5
16860 sed 's/^/| /' conftest.$ac_ext >&5
16861
16862   ac_header_preproc=no
16863 fi
16864 rm -f conftest.err conftest.$ac_ext
16865 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16866 echo "${ECHO_T}$ac_header_preproc" >&6
16867
16868 # So?  What about this header?
16869 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16870   yes:no: )
16871     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
16872 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16873     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
16874 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
16875     ac_header_preproc=yes
16876     ;;
16877   no:yes:* )
16878     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
16879 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
16880     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
16881 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
16882     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
16883 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
16884     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
16885 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16886     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
16887 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
16888     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
16889 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
16890     (
16891       cat <<\_ASBOX
16892 ## ---------------------------------------- ##
16893 ## Report this to pgsql-bugs@postgresql.org ##
16894 ## ---------------------------------------- ##
16895 _ASBOX
16896     ) |
16897       sed "s/^/$as_me: WARNING:     /" >&2
16898     ;;
16899 esac
16900 echo "$as_me:$LINENO: checking for pthread.h" >&5
16901 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16902 if test "${ac_cv_header_pthread_h+set}" = set; then
16903   echo $ECHO_N "(cached) $ECHO_C" >&6
16904 else
16905   ac_cv_header_pthread_h=$ac_header_preproc
16906 fi
16907 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16908 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16909
16910 fi
16911 if test $ac_cv_header_pthread_h = yes; then
16912   :
16913 else
16914   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
16915 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
16916    { (exit 1); exit 1; }; }
16917 fi
16918
16919
16920
16921
16922
16923
16924 for ac_func in strerror_r getpwuid_r gethostbyname_r
16925 do
16926 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16927 echo "$as_me:$LINENO: checking for $ac_func" >&5
16928 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16929 if eval "test \"\${$as_ac_var+set}\" = set"; then
16930   echo $ECHO_N "(cached) $ECHO_C" >&6
16931 else
16932   cat >conftest.$ac_ext <<_ACEOF
16933 /* confdefs.h.  */
16934 _ACEOF
16935 cat confdefs.h >>conftest.$ac_ext
16936 cat >>conftest.$ac_ext <<_ACEOF
16937 /* end confdefs.h.  */
16938 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16939    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16940 #define $ac_func innocuous_$ac_func
16941
16942 /* System header to define __stub macros and hopefully few prototypes,
16943     which can conflict with char $ac_func (); below.
16944     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16945     <limits.h> exists even on freestanding compilers.  */
16946
16947 #ifdef __STDC__
16948 # include <limits.h>
16949 #else
16950 # include <assert.h>
16951 #endif
16952
16953 #undef $ac_func
16954
16955 /* Override any gcc2 internal prototype to avoid an error.  */
16956 #ifdef __cplusplus
16957 extern "C"
16958 {
16959 #endif
16960 /* We use char because int might match the return type of a gcc2
16961    builtin and then its argument prototype would still apply.  */
16962 char $ac_func ();
16963 /* The GNU C library defines this for functions which it implements
16964     to always fail with ENOSYS.  Some functions are actually named
16965     something starting with __ and the normal name is an alias.  */
16966 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16967 choke me
16968 #else
16969 char (*f) () = $ac_func;
16970 #endif
16971 #ifdef __cplusplus
16972 }
16973 #endif
16974
16975 int
16976 main ()
16977 {
16978 return f != $ac_func;
16979   ;
16980   return 0;
16981 }
16982 _ACEOF
16983 rm -f conftest.$ac_objext conftest$ac_exeext
16984 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16985   (eval $ac_link) 2>conftest.er1
16986   ac_status=$?
16987   grep -v '^ *+' conftest.er1 >conftest.err
16988   rm -f conftest.er1
16989   cat conftest.err >&5
16990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16991   (exit $ac_status); } &&
16992          { ac_try='test -z "$ac_c_werror_flag"
16993                          || test ! -s conftest.err'
16994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16995   (eval $ac_try) 2>&5
16996   ac_status=$?
16997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16998   (exit $ac_status); }; } &&
16999          { ac_try='test -s conftest$ac_exeext'
17000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17001   (eval $ac_try) 2>&5
17002   ac_status=$?
17003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17004   (exit $ac_status); }; }; then
17005   eval "$as_ac_var=yes"
17006 else
17007   echo "$as_me: failed program was:" >&5
17008 sed 's/^/| /' conftest.$ac_ext >&5
17009
17010 eval "$as_ac_var=no"
17011 fi
17012 rm -f conftest.err conftest.$ac_objext \
17013       conftest$ac_exeext conftest.$ac_ext
17014 fi
17015 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17016 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17017 if test `eval echo '${'$as_ac_var'}'` = yes; then
17018   cat >>confdefs.h <<_ACEOF
17019 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17020 _ACEOF
17021
17022 fi
17023 done
17024
17025
17026 # Do test here with the proper thread flags
17027 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
17028 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
17029 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
17030   echo $ECHO_N "(cached) $ECHO_C" >&6
17031 else
17032   cat >conftest.$ac_ext <<_ACEOF
17033 /* confdefs.h.  */
17034 _ACEOF
17035 cat confdefs.h >>conftest.$ac_ext
17036 cat >>conftest.$ac_ext <<_ACEOF
17037 /* end confdefs.h.  */
17038 #include <sys/types.h>
17039 #include <pwd.h>
17040 int
17041 main ()
17042 {
17043 uid_t uid;
17044 struct passwd *space;
17045 char *buf;
17046 size_t bufsize;
17047 struct passwd **result;
17048 getpwuid_r(uid, space, buf, bufsize, result);
17049   ;
17050   return 0;
17051 }
17052 _ACEOF
17053 rm -f conftest.$ac_objext
17054 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17055   (eval $ac_compile) 2>conftest.er1
17056   ac_status=$?
17057   grep -v '^ *+' conftest.er1 >conftest.err
17058   rm -f conftest.er1
17059   cat conftest.err >&5
17060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17061   (exit $ac_status); } &&
17062          { ac_try='test -z "$ac_c_werror_flag"
17063                          || test ! -s conftest.err'
17064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17065   (eval $ac_try) 2>&5
17066   ac_status=$?
17067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17068   (exit $ac_status); }; } &&
17069          { ac_try='test -s conftest.$ac_objext'
17070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17071   (eval $ac_try) 2>&5
17072   ac_status=$?
17073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17074   (exit $ac_status); }; }; then
17075   pgac_func_getpwuid_r_5arg=yes
17076 else
17077   echo "$as_me: failed program was:" >&5
17078 sed 's/^/| /' conftest.$ac_ext >&5
17079
17080 pgac_func_getpwuid_r_5arg=no
17081 fi
17082 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17083 fi
17084 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
17085 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
17086 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
17087
17088 cat >>confdefs.h <<\_ACEOF
17089 #define GETPWUID_R_5ARG
17090 _ACEOF
17091
17092 fi
17093
17094 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
17095 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
17096 if test "${pgac_func_strerror_r_int+set}" = set; then
17097   echo $ECHO_N "(cached) $ECHO_C" >&6
17098 else
17099   cat >conftest.$ac_ext <<_ACEOF
17100 /* confdefs.h.  */
17101 _ACEOF
17102 cat confdefs.h >>conftest.$ac_ext
17103 cat >>conftest.$ac_ext <<_ACEOF
17104 /* end confdefs.h.  */
17105 #include <string.h>
17106 int
17107 main ()
17108 {
17109 #ifndef _AIX
17110 int strerror_r(int, char *, size_t);
17111 #else
17112 /* Older AIX has 'int' for the third argument so we don't test the args. */
17113 int strerror_r();
17114 #endif
17115   ;
17116   return 0;
17117 }
17118 _ACEOF
17119 rm -f conftest.$ac_objext
17120 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17121   (eval $ac_compile) 2>conftest.er1
17122   ac_status=$?
17123   grep -v '^ *+' conftest.er1 >conftest.err
17124   rm -f conftest.er1
17125   cat conftest.err >&5
17126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17127   (exit $ac_status); } &&
17128          { ac_try='test -z "$ac_c_werror_flag"
17129                          || test ! -s conftest.err'
17130   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17131   (eval $ac_try) 2>&5
17132   ac_status=$?
17133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17134   (exit $ac_status); }; } &&
17135          { ac_try='test -s conftest.$ac_objext'
17136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17137   (eval $ac_try) 2>&5
17138   ac_status=$?
17139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17140   (exit $ac_status); }; }; then
17141   pgac_func_strerror_r_int=yes
17142 else
17143   echo "$as_me: failed program was:" >&5
17144 sed 's/^/| /' conftest.$ac_ext >&5
17145
17146 pgac_func_strerror_r_int=no
17147 fi
17148 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17149 fi
17150 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17151 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17152 if test x"$pgac_func_strerror_r_int" = xyes ; then
17153
17154 cat >>confdefs.h <<\_ACEOF
17155 #define STRERROR_R_INT
17156 _ACEOF
17157
17158 fi
17159
17160
17161 CFLAGS="$_CFLAGS"
17162 LIBS="$_LIBS"
17163
17164 else
17165 # do not use values from template file
17166 PTHREAD_CFLAGS=
17167 PTHREAD_LIBS=
17168 fi
17169
17170
17171
17172
17173
17174 # We can test for libldap_r only after we know PTHREAD_LIBS
17175 if test "$with_ldap" = yes ; then
17176   _LIBS="$LIBS"
17177   if test "$PORTNAME" != "win32"; then
17178
17179 echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
17180 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6
17181 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
17182   echo $ECHO_N "(cached) $ECHO_C" >&6
17183 else
17184   ac_check_lib_save_LIBS=$LIBS
17185 LIBS="-lldap  $LIBS"
17186 cat >conftest.$ac_ext <<_ACEOF
17187 /* confdefs.h.  */
17188 _ACEOF
17189 cat confdefs.h >>conftest.$ac_ext
17190 cat >>conftest.$ac_ext <<_ACEOF
17191 /* end confdefs.h.  */
17192
17193 /* Override any gcc2 internal prototype to avoid an error.  */
17194 #ifdef __cplusplus
17195 extern "C"
17196 #endif
17197 /* We use char because int might match the return type of a gcc2
17198    builtin and then its argument prototype would still apply.  */
17199 char ldap_bind ();
17200 int
17201 main ()
17202 {
17203 ldap_bind ();
17204   ;
17205   return 0;
17206 }
17207 _ACEOF
17208 rm -f conftest.$ac_objext conftest$ac_exeext
17209 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17210   (eval $ac_link) 2>conftest.er1
17211   ac_status=$?
17212   grep -v '^ *+' conftest.er1 >conftest.err
17213   rm -f conftest.er1
17214   cat conftest.err >&5
17215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17216   (exit $ac_status); } &&
17217          { ac_try='test -z "$ac_c_werror_flag"
17218                          || test ! -s conftest.err'
17219   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17220   (eval $ac_try) 2>&5
17221   ac_status=$?
17222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17223   (exit $ac_status); }; } &&
17224          { ac_try='test -s conftest$ac_exeext'
17225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17226   (eval $ac_try) 2>&5
17227   ac_status=$?
17228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17229   (exit $ac_status); }; }; then
17230   ac_cv_lib_ldap_ldap_bind=yes
17231 else
17232   echo "$as_me: failed program was:" >&5
17233 sed 's/^/| /' conftest.$ac_ext >&5
17234
17235 ac_cv_lib_ldap_ldap_bind=no
17236 fi
17237 rm -f conftest.err conftest.$ac_objext \
17238       conftest$ac_exeext conftest.$ac_ext
17239 LIBS=$ac_check_lib_save_LIBS
17240 fi
17241 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
17242 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6
17243 if test $ac_cv_lib_ldap_ldap_bind = yes; then
17244   cat >>confdefs.h <<_ACEOF
17245 #define HAVE_LIBLDAP 1
17246 _ACEOF
17247
17248   LIBS="-lldap $LIBS"
17249
17250 else
17251   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
17252 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
17253    { (exit 1); exit 1; }; }
17254 fi
17255
17256     LDAP_LIBS_BE="-lldap"
17257     if test "$enable_thread_safety" = yes; then
17258       # on some platforms ldap_r fails to link without PTHREAD_LIBS
17259
17260 echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
17261 echo $ECHO_N "checking for ldap_simple_bind in -lldap_r... $ECHO_C" >&6
17262 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
17263   echo $ECHO_N "(cached) $ECHO_C" >&6
17264 else
17265   ac_check_lib_save_LIBS=$LIBS
17266 LIBS="-lldap_r $PTHREAD_LIBS $LIBS"
17267 cat >conftest.$ac_ext <<_ACEOF
17268 /* confdefs.h.  */
17269 _ACEOF
17270 cat confdefs.h >>conftest.$ac_ext
17271 cat >>conftest.$ac_ext <<_ACEOF
17272 /* end confdefs.h.  */
17273
17274 /* Override any gcc2 internal prototype to avoid an error.  */
17275 #ifdef __cplusplus
17276 extern "C"
17277 #endif
17278 /* We use char because int might match the return type of a gcc2
17279    builtin and then its argument prototype would still apply.  */
17280 char ldap_simple_bind ();
17281 int
17282 main ()
17283 {
17284 ldap_simple_bind ();
17285   ;
17286   return 0;
17287 }
17288 _ACEOF
17289 rm -f conftest.$ac_objext conftest$ac_exeext
17290 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17291   (eval $ac_link) 2>conftest.er1
17292   ac_status=$?
17293   grep -v '^ *+' conftest.er1 >conftest.err
17294   rm -f conftest.er1
17295   cat conftest.err >&5
17296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17297   (exit $ac_status); } &&
17298          { ac_try='test -z "$ac_c_werror_flag"
17299                          || test ! -s conftest.err'
17300   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17301   (eval $ac_try) 2>&5
17302   ac_status=$?
17303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17304   (exit $ac_status); }; } &&
17305          { ac_try='test -s conftest$ac_exeext'
17306   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17307   (eval $ac_try) 2>&5
17308   ac_status=$?
17309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17310   (exit $ac_status); }; }; then
17311   ac_cv_lib_ldap_r_ldap_simple_bind=yes
17312 else
17313   echo "$as_me: failed program was:" >&5
17314 sed 's/^/| /' conftest.$ac_ext >&5
17315
17316 ac_cv_lib_ldap_r_ldap_simple_bind=no
17317 fi
17318 rm -f conftest.err conftest.$ac_objext \
17319       conftest$ac_exeext conftest.$ac_ext
17320 LIBS=$ac_check_lib_save_LIBS
17321 fi
17322 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
17323 echo "${ECHO_T}$ac_cv_lib_ldap_r_ldap_simple_bind" >&6
17324 if test $ac_cv_lib_ldap_r_ldap_simple_bind = yes; then
17325   cat >>confdefs.h <<_ACEOF
17326 #define HAVE_LIBLDAP_R 1
17327 _ACEOF
17328
17329   LIBS="-lldap_r $LIBS"
17330
17331 else
17332   { { echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
17333 echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
17334    { (exit 1); exit 1; }; }
17335 fi
17336
17337       LDAP_LIBS_FE="-lldap_r"
17338     else
17339       LDAP_LIBS_FE="-lldap"
17340     fi
17341   else
17342
17343 echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
17344 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6
17345 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
17346   echo $ECHO_N "(cached) $ECHO_C" >&6
17347 else
17348   ac_check_lib_save_LIBS=$LIBS
17349 LIBS="-lwldap32  $LIBS"
17350 cat >conftest.$ac_ext <<_ACEOF
17351 /* confdefs.h.  */
17352 _ACEOF
17353 cat confdefs.h >>conftest.$ac_ext
17354 cat >>conftest.$ac_ext <<_ACEOF
17355 /* end confdefs.h.  */
17356
17357 /* Override any gcc2 internal prototype to avoid an error.  */
17358 #ifdef __cplusplus
17359 extern "C"
17360 #endif
17361 /* We use char because int might match the return type of a gcc2
17362    builtin and then its argument prototype would still apply.  */
17363 char ldap_bind ();
17364 int
17365 main ()
17366 {
17367 ldap_bind ();
17368   ;
17369   return 0;
17370 }
17371 _ACEOF
17372 rm -f conftest.$ac_objext conftest$ac_exeext
17373 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17374   (eval $ac_link) 2>conftest.er1
17375   ac_status=$?
17376   grep -v '^ *+' conftest.er1 >conftest.err
17377   rm -f conftest.er1
17378   cat conftest.err >&5
17379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17380   (exit $ac_status); } &&
17381          { ac_try='test -z "$ac_c_werror_flag"
17382                          || test ! -s conftest.err'
17383   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17384   (eval $ac_try) 2>&5
17385   ac_status=$?
17386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17387   (exit $ac_status); }; } &&
17388          { ac_try='test -s conftest$ac_exeext'
17389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17390   (eval $ac_try) 2>&5
17391   ac_status=$?
17392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17393   (exit $ac_status); }; }; then
17394   ac_cv_lib_wldap32_ldap_bind=yes
17395 else
17396   echo "$as_me: failed program was:" >&5
17397 sed 's/^/| /' conftest.$ac_ext >&5
17398
17399 ac_cv_lib_wldap32_ldap_bind=no
17400 fi
17401 rm -f conftest.err conftest.$ac_objext \
17402       conftest$ac_exeext conftest.$ac_ext
17403 LIBS=$ac_check_lib_save_LIBS
17404 fi
17405 echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
17406 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6
17407 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
17408   cat >>confdefs.h <<_ACEOF
17409 #define HAVE_LIBWLDAP32 1
17410 _ACEOF
17411
17412   LIBS="-lwldap32 $LIBS"
17413
17414 else
17415   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
17416 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
17417    { (exit 1); exit 1; }; }
17418 fi
17419
17420     LDAP_LIBS_FE="-lwldap32"
17421     LDAP_LIBS_BE="-lwldap32"
17422   fi
17423   LIBS="$_LIBS"
17424 fi
17425
17426
17427
17428
17429 # This test makes sure that run tests work at all.  Sometimes a shared
17430 # library is found by the linker, but the runtime linker can't find it.
17431 # This check should come after all modifications of compiler or linker
17432 # variables, and before any other run tests.
17433 echo "$as_me:$LINENO: checking test program" >&5
17434 echo $ECHO_N "checking test program... $ECHO_C" >&6
17435 if test "$cross_compiling" = yes; then
17436   echo "$as_me:$LINENO: result: cross-compiling" >&5
17437 echo "${ECHO_T}cross-compiling" >&6
17438 else
17439   cat >conftest.$ac_ext <<_ACEOF
17440 /* confdefs.h.  */
17441 _ACEOF
17442 cat confdefs.h >>conftest.$ac_ext
17443 cat >>conftest.$ac_ext <<_ACEOF
17444 /* end confdefs.h.  */
17445 int main() { return 0; }
17446 _ACEOF
17447 rm -f conftest$ac_exeext
17448 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17449   (eval $ac_link) 2>&5
17450   ac_status=$?
17451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17452   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17454   (eval $ac_try) 2>&5
17455   ac_status=$?
17456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17457   (exit $ac_status); }; }; then
17458   echo "$as_me:$LINENO: result: ok" >&5
17459 echo "${ECHO_T}ok" >&6
17460 else
17461   echo "$as_me: program exited with status $ac_status" >&5
17462 echo "$as_me: failed program was:" >&5
17463 sed 's/^/| /' conftest.$ac_ext >&5
17464
17465 ( exit $ac_status )
17466 echo "$as_me:$LINENO: result: failed" >&5
17467 echo "${ECHO_T}failed" >&6
17468 { { echo "$as_me:$LINENO: error:
17469 *** Could not execute a simple test program.  This may be a problem
17470 *** related to locating shared libraries.  Check the file 'config.log'
17471 *** for the exact reason." >&5
17472 echo "$as_me: error:
17473 *** Could not execute a simple test program.  This may be a problem
17474 *** related to locating shared libraries.  Check the file 'config.log'
17475 *** for the exact reason." >&2;}
17476    { (exit 1); exit 1; }; }
17477 fi
17478 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17479 fi
17480
17481 # --------------------
17482 # Run tests below here
17483 # --------------------
17484
17485 # Force use of our snprintf if system's doesn't do arg control
17486 # See comment above at snprintf test for details.
17487 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
17488   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17489 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17490 if test "${pgac_cv_printf_arg_control+set}" = set; then
17491   echo $ECHO_N "(cached) $ECHO_C" >&6
17492 else
17493   if test "$cross_compiling" = yes; then
17494   pgac_cv_printf_arg_control=cross
17495 else
17496   cat >conftest.$ac_ext <<_ACEOF
17497 /* confdefs.h.  */
17498 _ACEOF
17499 cat confdefs.h >>conftest.$ac_ext
17500 cat >>conftest.$ac_ext <<_ACEOF
17501 /* end confdefs.h.  */
17502 #include <stdio.h>
17503 #include <string.h>
17504
17505 int main()
17506 {
17507   char buf[100];
17508
17509   /* can it swap arguments? */
17510   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17511   if (strcmp(buf, "4 3") != 0)
17512     return 1;
17513   return 0;
17514 }
17515 _ACEOF
17516 rm -f conftest$ac_exeext
17517 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17518   (eval $ac_link) 2>&5
17519   ac_status=$?
17520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17521   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17523   (eval $ac_try) 2>&5
17524   ac_status=$?
17525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17526   (exit $ac_status); }; }; then
17527   pgac_cv_printf_arg_control=yes
17528 else
17529   echo "$as_me: program exited with status $ac_status" >&5
17530 echo "$as_me: failed program was:" >&5
17531 sed 's/^/| /' conftest.$ac_ext >&5
17532
17533 ( exit $ac_status )
17534 pgac_cv_printf_arg_control=no
17535 fi
17536 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17537 fi
17538
17539 fi
17540 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17541 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17542
17543   if test $pgac_cv_printf_arg_control != yes ; then
17544     pgac_need_repl_snprintf=yes
17545   fi
17546 fi
17547
17548
17549
17550 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17551 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17552 if test "${pgac_cv_type_long_int_64+set}" = set; then
17553   echo $ECHO_N "(cached) $ECHO_C" >&6
17554 else
17555   if test "$cross_compiling" = yes; then
17556   # If cross-compiling, check the size reported by the compiler and
17557 # trust that the arithmetic works.
17558 cat >conftest.$ac_ext <<_ACEOF
17559 /* confdefs.h.  */
17560 _ACEOF
17561 cat confdefs.h >>conftest.$ac_ext
17562 cat >>conftest.$ac_ext <<_ACEOF
17563 /* end confdefs.h.  */
17564
17565 int
17566 main ()
17567 {
17568 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17569 test_array [0] = 0
17570
17571   ;
17572   return 0;
17573 }
17574 _ACEOF
17575 rm -f conftest.$ac_objext
17576 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17577   (eval $ac_compile) 2>conftest.er1
17578   ac_status=$?
17579   grep -v '^ *+' conftest.er1 >conftest.err
17580   rm -f conftest.er1
17581   cat conftest.err >&5
17582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17583   (exit $ac_status); } &&
17584          { ac_try='test -z "$ac_c_werror_flag"
17585                          || test ! -s conftest.err'
17586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17587   (eval $ac_try) 2>&5
17588   ac_status=$?
17589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17590   (exit $ac_status); }; } &&
17591          { ac_try='test -s conftest.$ac_objext'
17592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17593   (eval $ac_try) 2>&5
17594   ac_status=$?
17595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17596   (exit $ac_status); }; }; then
17597   pgac_cv_type_long_int_64=yes
17598 else
17599   echo "$as_me: failed program was:" >&5
17600 sed 's/^/| /' conftest.$ac_ext >&5
17601
17602 pgac_cv_type_long_int_64=no
17603 fi
17604 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17605 else
17606   cat >conftest.$ac_ext <<_ACEOF
17607 /* confdefs.h.  */
17608 _ACEOF
17609 cat confdefs.h >>conftest.$ac_ext
17610 cat >>conftest.$ac_ext <<_ACEOF
17611 /* end confdefs.h.  */
17612 typedef long int ac_int64;
17613
17614 /*
17615  * These are globals to discourage the compiler from folding all the
17616  * arithmetic tests down to compile-time constants.
17617  */
17618 ac_int64 a = 20000001;
17619 ac_int64 b = 40000005;
17620
17621 int does_int64_work()
17622 {
17623   ac_int64 c,d;
17624
17625   if (sizeof(ac_int64) != 8)
17626     return 0;                   /* definitely not the right size */
17627
17628   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17629   c = a * b;
17630   d = (c + b) / b;
17631   if (d != a+1)
17632     return 0;
17633   return 1;
17634 }
17635 main() {
17636   exit(! does_int64_work());
17637 }
17638 _ACEOF
17639 rm -f conftest$ac_exeext
17640 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17641   (eval $ac_link) 2>&5
17642   ac_status=$?
17643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17644   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17646   (eval $ac_try) 2>&5
17647   ac_status=$?
17648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17649   (exit $ac_status); }; }; then
17650   pgac_cv_type_long_int_64=yes
17651 else
17652   echo "$as_me: program exited with status $ac_status" >&5
17653 echo "$as_me: failed program was:" >&5
17654 sed 's/^/| /' conftest.$ac_ext >&5
17655
17656 ( exit $ac_status )
17657 pgac_cv_type_long_int_64=no
17658 fi
17659 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17660 fi
17661 fi
17662 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
17663 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
17664
17665 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17666 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17667
17668 cat >>confdefs.h <<\_ACEOF
17669 #define HAVE_LONG_INT_64
17670 _ACEOF
17671
17672 fi
17673
17674
17675 if test x"$HAVE_LONG_INT_64" = x"no" ; then
17676   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
17677 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
17678 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
17679   echo $ECHO_N "(cached) $ECHO_C" >&6
17680 else
17681   if test "$cross_compiling" = yes; then
17682   # If cross-compiling, check the size reported by the compiler and
17683 # trust that the arithmetic works.
17684 cat >conftest.$ac_ext <<_ACEOF
17685 /* confdefs.h.  */
17686 _ACEOF
17687 cat confdefs.h >>conftest.$ac_ext
17688 cat >>conftest.$ac_ext <<_ACEOF
17689 /* end confdefs.h.  */
17690
17691 int
17692 main ()
17693 {
17694 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17695 test_array [0] = 0
17696
17697   ;
17698   return 0;
17699 }
17700 _ACEOF
17701 rm -f conftest.$ac_objext
17702 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17703   (eval $ac_compile) 2>conftest.er1
17704   ac_status=$?
17705   grep -v '^ *+' conftest.er1 >conftest.err
17706   rm -f conftest.er1
17707   cat conftest.err >&5
17708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17709   (exit $ac_status); } &&
17710          { ac_try='test -z "$ac_c_werror_flag"
17711                          || test ! -s conftest.err'
17712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17713   (eval $ac_try) 2>&5
17714   ac_status=$?
17715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17716   (exit $ac_status); }; } &&
17717          { ac_try='test -s conftest.$ac_objext'
17718   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17719   (eval $ac_try) 2>&5
17720   ac_status=$?
17721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17722   (exit $ac_status); }; }; then
17723   pgac_cv_type_long_long_int_64=yes
17724 else
17725   echo "$as_me: failed program was:" >&5
17726 sed 's/^/| /' conftest.$ac_ext >&5
17727
17728 pgac_cv_type_long_long_int_64=no
17729 fi
17730 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17731 else
17732   cat >conftest.$ac_ext <<_ACEOF
17733 /* confdefs.h.  */
17734 _ACEOF
17735 cat confdefs.h >>conftest.$ac_ext
17736 cat >>conftest.$ac_ext <<_ACEOF
17737 /* end confdefs.h.  */
17738 typedef long long int ac_int64;
17739
17740 /*
17741  * These are globals to discourage the compiler from folding all the
17742  * arithmetic tests down to compile-time constants.
17743  */
17744 ac_int64 a = 20000001;
17745 ac_int64 b = 40000005;
17746
17747 int does_int64_work()
17748 {
17749   ac_int64 c,d;
17750
17751   if (sizeof(ac_int64) != 8)
17752     return 0;                   /* definitely not the right size */
17753
17754   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17755   c = a * b;
17756   d = (c + b) / b;
17757   if (d != a+1)
17758     return 0;
17759   return 1;
17760 }
17761 main() {
17762   exit(! does_int64_work());
17763 }
17764 _ACEOF
17765 rm -f conftest$ac_exeext
17766 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17767   (eval $ac_link) 2>&5
17768   ac_status=$?
17769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17770   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17772   (eval $ac_try) 2>&5
17773   ac_status=$?
17774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17775   (exit $ac_status); }; }; then
17776   pgac_cv_type_long_long_int_64=yes
17777 else
17778   echo "$as_me: program exited with status $ac_status" >&5
17779 echo "$as_me: failed program was:" >&5
17780 sed 's/^/| /' conftest.$ac_ext >&5
17781
17782 ( exit $ac_status )
17783 pgac_cv_type_long_long_int_64=no
17784 fi
17785 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17786 fi
17787 fi
17788 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
17789 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
17790
17791 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17792 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17793
17794 cat >>confdefs.h <<\_ACEOF
17795 #define HAVE_LONG_LONG_INT_64
17796 _ACEOF
17797
17798 fi
17799
17800 fi
17801
17802
17803
17804 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
17805   cat >conftest.$ac_ext <<_ACEOF
17806 /* confdefs.h.  */
17807 _ACEOF
17808 cat confdefs.h >>conftest.$ac_ext
17809 cat >>conftest.$ac_ext <<_ACEOF
17810 /* end confdefs.h.  */
17811
17812 #define INT64CONST(x)  x##LL
17813 long long int foo = INT64CONST(0x1234567890123456);
17814
17815 int
17816 main ()
17817 {
17818
17819   ;
17820   return 0;
17821 }
17822 _ACEOF
17823 rm -f conftest.$ac_objext
17824 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17825   (eval $ac_compile) 2>conftest.er1
17826   ac_status=$?
17827   grep -v '^ *+' conftest.er1 >conftest.err
17828   rm -f conftest.er1
17829   cat conftest.err >&5
17830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17831   (exit $ac_status); } &&
17832          { ac_try='test -z "$ac_c_werror_flag"
17833                          || test ! -s conftest.err'
17834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17835   (eval $ac_try) 2>&5
17836   ac_status=$?
17837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17838   (exit $ac_status); }; } &&
17839          { ac_try='test -s conftest.$ac_objext'
17840   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17841   (eval $ac_try) 2>&5
17842   ac_status=$?
17843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17844   (exit $ac_status); }; }; then
17845
17846 cat >>confdefs.h <<\_ACEOF
17847 #define HAVE_LL_CONSTANTS 1
17848 _ACEOF
17849
17850 else
17851   echo "$as_me: failed program was:" >&5
17852 sed 's/^/| /' conftest.$ac_ext >&5
17853
17854 fi
17855 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17856 fi
17857
17858
17859 # If we found "long int" is 64 bits, assume snprintf handles it.  If
17860 # we found we need to use "long long int", better check.  We cope with
17861 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
17862 # work, fall back to our own snprintf emulation (which we know uses %lld).
17863
17864 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
17865   if test $pgac_need_repl_snprintf = no; then
17866     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
17867 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
17868 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
17869   echo $ECHO_N "(cached) $ECHO_C" >&6
17870 else
17871   for pgac_format in '%lld' '%qd' '%I64d'; do
17872 if test "$cross_compiling" = yes; then
17873   pgac_cv_snprintf_long_long_int_format=cross; break
17874 else
17875   cat >conftest.$ac_ext <<_ACEOF
17876 /* confdefs.h.  */
17877 _ACEOF
17878 cat confdefs.h >>conftest.$ac_ext
17879 cat >>conftest.$ac_ext <<_ACEOF
17880 /* end confdefs.h.  */
17881 #include <stdio.h>
17882 typedef long long int ac_int64;
17883 #define INT64_FORMAT "$pgac_format"
17884
17885 ac_int64 a = 20000001;
17886 ac_int64 b = 40000005;
17887
17888 int does_int64_snprintf_work()
17889 {
17890   ac_int64 c;
17891   char buf[100];
17892
17893   if (sizeof(ac_int64) != 8)
17894     return 0;                   /* doesn't look like the right size */
17895
17896   c = a * b;
17897   snprintf(buf, 100, INT64_FORMAT, c);
17898   if (strcmp(buf, "800000140000005") != 0)
17899     return 0;                   /* either multiply or snprintf is busted */
17900   return 1;
17901 }
17902 main() {
17903   exit(! does_int64_snprintf_work());
17904 }
17905 _ACEOF
17906 rm -f conftest$ac_exeext
17907 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17908   (eval $ac_link) 2>&5
17909   ac_status=$?
17910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17911   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17913   (eval $ac_try) 2>&5
17914   ac_status=$?
17915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17916   (exit $ac_status); }; }; then
17917   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
17918 else
17919   echo "$as_me: program exited with status $ac_status" >&5
17920 echo "$as_me: failed program was:" >&5
17921 sed 's/^/| /' conftest.$ac_ext >&5
17922
17923 fi
17924 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17925 fi
17926 done
17927 fi
17928
17929 LONG_LONG_INT_FORMAT=''
17930
17931 case $pgac_cv_snprintf_long_long_int_format in
17932   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
17933 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
17934   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
17935 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
17936          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
17937   *)     echo "$as_me:$LINENO: result: none" >&5
17938 echo "${ECHO_T}none" >&6;;
17939 esac
17940     if test "$LONG_LONG_INT_FORMAT" = ""; then
17941       # Force usage of our own snprintf, since system snprintf is broken
17942       pgac_need_repl_snprintf=yes
17943       LONG_LONG_INT_FORMAT='%lld'
17944     fi
17945   else
17946     # Here if we previously decided we needed to use our own snprintf
17947     LONG_LONG_INT_FORMAT='%lld'
17948   fi
17949   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
17950   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
17951   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
17952 else
17953   # Here if we are not using 'long long int' at all
17954   INT64_FORMAT='"%ld"'
17955   UINT64_FORMAT='"%lu"'
17956 fi
17957
17958
17959 cat >>confdefs.h <<_ACEOF
17960 #define INT64_FORMAT $INT64_FORMAT
17961 _ACEOF
17962
17963
17964
17965 cat >>confdefs.h <<_ACEOF
17966 #define UINT64_FORMAT $UINT64_FORMAT
17967 _ACEOF
17968
17969
17970 # Now we have checked all the reasons to replace snprintf
17971 if test $pgac_need_repl_snprintf = yes; then
17972
17973 cat >>confdefs.h <<\_ACEOF
17974 #define USE_REPL_SNPRINTF 1
17975 _ACEOF
17976
17977   case $LIBOBJS in
17978     "snprintf.$ac_objext"   | \
17979   *" snprintf.$ac_objext"   | \
17980     "snprintf.$ac_objext "* | \
17981   *" snprintf.$ac_objext "* ) ;;
17982   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
17983 esac
17984
17985 fi
17986
17987 # Need a #define for the size of Datum (unsigned long)
17988 echo "$as_me:$LINENO: checking for unsigned long" >&5
17989 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
17990 if test "${ac_cv_type_unsigned_long+set}" = set; then
17991   echo $ECHO_N "(cached) $ECHO_C" >&6
17992 else
17993   cat >conftest.$ac_ext <<_ACEOF
17994 /* confdefs.h.  */
17995 _ACEOF
17996 cat confdefs.h >>conftest.$ac_ext
17997 cat >>conftest.$ac_ext <<_ACEOF
17998 /* end confdefs.h.  */
17999 $ac_includes_default
18000 int
18001 main ()
18002 {
18003 if ((unsigned long *) 0)
18004   return 0;
18005 if (sizeof (unsigned long))
18006   return 0;
18007   ;
18008   return 0;
18009 }
18010 _ACEOF
18011 rm -f conftest.$ac_objext
18012 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18013   (eval $ac_compile) 2>conftest.er1
18014   ac_status=$?
18015   grep -v '^ *+' conftest.er1 >conftest.err
18016   rm -f conftest.er1
18017   cat conftest.err >&5
18018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18019   (exit $ac_status); } &&
18020          { ac_try='test -z "$ac_c_werror_flag"
18021                          || test ! -s conftest.err'
18022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18023   (eval $ac_try) 2>&5
18024   ac_status=$?
18025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18026   (exit $ac_status); }; } &&
18027          { ac_try='test -s conftest.$ac_objext'
18028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18029   (eval $ac_try) 2>&5
18030   ac_status=$?
18031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18032   (exit $ac_status); }; }; then
18033   ac_cv_type_unsigned_long=yes
18034 else
18035   echo "$as_me: failed program was:" >&5
18036 sed 's/^/| /' conftest.$ac_ext >&5
18037
18038 ac_cv_type_unsigned_long=no
18039 fi
18040 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18041 fi
18042 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
18043 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
18044
18045 echo "$as_me:$LINENO: checking size of unsigned long" >&5
18046 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
18047 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
18048   echo $ECHO_N "(cached) $ECHO_C" >&6
18049 else
18050   if test "$ac_cv_type_unsigned_long" = yes; then
18051   # The cast to unsigned long works around a bug in the HP C Compiler
18052   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18053   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18054   # This bug is HP SR number 8606223364.
18055   if test "$cross_compiling" = yes; then
18056   # Depending upon the size, compute the lo and hi bounds.
18057 cat >conftest.$ac_ext <<_ACEOF
18058 /* confdefs.h.  */
18059 _ACEOF
18060 cat confdefs.h >>conftest.$ac_ext
18061 cat >>conftest.$ac_ext <<_ACEOF
18062 /* end confdefs.h.  */
18063 $ac_includes_default
18064 int
18065 main ()
18066 {
18067 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
18068 test_array [0] = 0
18069
18070   ;
18071   return 0;
18072 }
18073 _ACEOF
18074 rm -f conftest.$ac_objext
18075 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18076   (eval $ac_compile) 2>conftest.er1
18077   ac_status=$?
18078   grep -v '^ *+' conftest.er1 >conftest.err
18079   rm -f conftest.er1
18080   cat conftest.err >&5
18081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18082   (exit $ac_status); } &&
18083          { ac_try='test -z "$ac_c_werror_flag"
18084                          || test ! -s conftest.err'
18085   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18086   (eval $ac_try) 2>&5
18087   ac_status=$?
18088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18089   (exit $ac_status); }; } &&
18090          { ac_try='test -s conftest.$ac_objext'
18091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18092   (eval $ac_try) 2>&5
18093   ac_status=$?
18094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18095   (exit $ac_status); }; }; then
18096   ac_lo=0 ac_mid=0
18097   while :; do
18098     cat >conftest.$ac_ext <<_ACEOF
18099 /* confdefs.h.  */
18100 _ACEOF
18101 cat confdefs.h >>conftest.$ac_ext
18102 cat >>conftest.$ac_ext <<_ACEOF
18103 /* end confdefs.h.  */
18104 $ac_includes_default
18105 int
18106 main ()
18107 {
18108 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18109 test_array [0] = 0
18110
18111   ;
18112   return 0;
18113 }
18114 _ACEOF
18115 rm -f conftest.$ac_objext
18116 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18117   (eval $ac_compile) 2>conftest.er1
18118   ac_status=$?
18119   grep -v '^ *+' conftest.er1 >conftest.err
18120   rm -f conftest.er1
18121   cat conftest.err >&5
18122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18123   (exit $ac_status); } &&
18124          { ac_try='test -z "$ac_c_werror_flag"
18125                          || test ! -s conftest.err'
18126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18127   (eval $ac_try) 2>&5
18128   ac_status=$?
18129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18130   (exit $ac_status); }; } &&
18131          { ac_try='test -s conftest.$ac_objext'
18132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18133   (eval $ac_try) 2>&5
18134   ac_status=$?
18135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18136   (exit $ac_status); }; }; then
18137   ac_hi=$ac_mid; break
18138 else
18139   echo "$as_me: failed program was:" >&5
18140 sed 's/^/| /' conftest.$ac_ext >&5
18141
18142 ac_lo=`expr $ac_mid + 1`
18143                     if test $ac_lo -le $ac_mid; then
18144                       ac_lo= ac_hi=
18145                       break
18146                     fi
18147                     ac_mid=`expr 2 '*' $ac_mid + 1`
18148 fi
18149 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18150   done
18151 else
18152   echo "$as_me: failed program was:" >&5
18153 sed 's/^/| /' conftest.$ac_ext >&5
18154
18155 cat >conftest.$ac_ext <<_ACEOF
18156 /* confdefs.h.  */
18157 _ACEOF
18158 cat confdefs.h >>conftest.$ac_ext
18159 cat >>conftest.$ac_ext <<_ACEOF
18160 /* end confdefs.h.  */
18161 $ac_includes_default
18162 int
18163 main ()
18164 {
18165 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
18166 test_array [0] = 0
18167
18168   ;
18169   return 0;
18170 }
18171 _ACEOF
18172 rm -f conftest.$ac_objext
18173 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18174   (eval $ac_compile) 2>conftest.er1
18175   ac_status=$?
18176   grep -v '^ *+' conftest.er1 >conftest.err
18177   rm -f conftest.er1
18178   cat conftest.err >&5
18179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18180   (exit $ac_status); } &&
18181          { ac_try='test -z "$ac_c_werror_flag"
18182                          || test ! -s conftest.err'
18183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18184   (eval $ac_try) 2>&5
18185   ac_status=$?
18186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18187   (exit $ac_status); }; } &&
18188          { ac_try='test -s conftest.$ac_objext'
18189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18190   (eval $ac_try) 2>&5
18191   ac_status=$?
18192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18193   (exit $ac_status); }; }; then
18194   ac_hi=-1 ac_mid=-1
18195   while :; do
18196     cat >conftest.$ac_ext <<_ACEOF
18197 /* confdefs.h.  */
18198 _ACEOF
18199 cat confdefs.h >>conftest.$ac_ext
18200 cat >>conftest.$ac_ext <<_ACEOF
18201 /* end confdefs.h.  */
18202 $ac_includes_default
18203 int
18204 main ()
18205 {
18206 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
18207 test_array [0] = 0
18208
18209   ;
18210   return 0;
18211 }
18212 _ACEOF
18213 rm -f conftest.$ac_objext
18214 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18215   (eval $ac_compile) 2>conftest.er1
18216   ac_status=$?
18217   grep -v '^ *+' conftest.er1 >conftest.err
18218   rm -f conftest.er1
18219   cat conftest.err >&5
18220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18221   (exit $ac_status); } &&
18222          { ac_try='test -z "$ac_c_werror_flag"
18223                          || test ! -s conftest.err'
18224   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18225   (eval $ac_try) 2>&5
18226   ac_status=$?
18227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18228   (exit $ac_status); }; } &&
18229          { ac_try='test -s conftest.$ac_objext'
18230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18231   (eval $ac_try) 2>&5
18232   ac_status=$?
18233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18234   (exit $ac_status); }; }; then
18235   ac_lo=$ac_mid; break
18236 else
18237   echo "$as_me: failed program was:" >&5
18238 sed 's/^/| /' conftest.$ac_ext >&5
18239
18240 ac_hi=`expr '(' $ac_mid ')' - 1`
18241                        if test $ac_mid -le $ac_hi; then
18242                          ac_lo= ac_hi=
18243                          break
18244                        fi
18245                        ac_mid=`expr 2 '*' $ac_mid`
18246 fi
18247 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18248   done
18249 else
18250   echo "$as_me: failed program was:" >&5
18251 sed 's/^/| /' conftest.$ac_ext >&5
18252
18253 ac_lo= ac_hi=
18254 fi
18255 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18256 fi
18257 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18258 # Binary search between lo and hi bounds.
18259 while test "x$ac_lo" != "x$ac_hi"; do
18260   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18261   cat >conftest.$ac_ext <<_ACEOF
18262 /* confdefs.h.  */
18263 _ACEOF
18264 cat confdefs.h >>conftest.$ac_ext
18265 cat >>conftest.$ac_ext <<_ACEOF
18266 /* end confdefs.h.  */
18267 $ac_includes_default
18268 int
18269 main ()
18270 {
18271 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18272 test_array [0] = 0
18273
18274   ;
18275   return 0;
18276 }
18277 _ACEOF
18278 rm -f conftest.$ac_objext
18279 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18280   (eval $ac_compile) 2>conftest.er1
18281   ac_status=$?
18282   grep -v '^ *+' conftest.er1 >conftest.err
18283   rm -f conftest.er1
18284   cat conftest.err >&5
18285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18286   (exit $ac_status); } &&
18287          { ac_try='test -z "$ac_c_werror_flag"
18288                          || test ! -s conftest.err'
18289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18290   (eval $ac_try) 2>&5
18291   ac_status=$?
18292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18293   (exit $ac_status); }; } &&
18294          { ac_try='test -s conftest.$ac_objext'
18295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18296   (eval $ac_try) 2>&5
18297   ac_status=$?
18298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18299   (exit $ac_status); }; }; then
18300   ac_hi=$ac_mid
18301 else
18302   echo "$as_me: failed program was:" >&5
18303 sed 's/^/| /' conftest.$ac_ext >&5
18304
18305 ac_lo=`expr '(' $ac_mid ')' + 1`
18306 fi
18307 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18308 done
18309 case $ac_lo in
18310 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
18311 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18312 See \`config.log' for more details." >&5
18313 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18314 See \`config.log' for more details." >&2;}
18315    { (exit 1); exit 1; }; } ;;
18316 esac
18317 else
18318   if test "$cross_compiling" = yes; then
18319   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18320 See \`config.log' for more details." >&5
18321 echo "$as_me: error: cannot run test program while cross compiling
18322 See \`config.log' for more details." >&2;}
18323    { (exit 1); exit 1; }; }
18324 else
18325   cat >conftest.$ac_ext <<_ACEOF
18326 /* confdefs.h.  */
18327 _ACEOF
18328 cat confdefs.h >>conftest.$ac_ext
18329 cat >>conftest.$ac_ext <<_ACEOF
18330 /* end confdefs.h.  */
18331 $ac_includes_default
18332 long longval () { return (long) (sizeof (unsigned long)); }
18333 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
18334 #include <stdio.h>
18335 #include <stdlib.h>
18336 int
18337 main ()
18338 {
18339
18340   FILE *f = fopen ("conftest.val", "w");
18341   if (! f)
18342     exit (1);
18343   if (((long) (sizeof (unsigned long))) < 0)
18344     {
18345       long i = longval ();
18346       if (i != ((long) (sizeof (unsigned long))))
18347         exit (1);
18348       fprintf (f, "%ld\n", i);
18349     }
18350   else
18351     {
18352       unsigned long i = ulongval ();
18353       if (i != ((long) (sizeof (unsigned long))))
18354         exit (1);
18355       fprintf (f, "%lu\n", i);
18356     }
18357   exit (ferror (f) || fclose (f) != 0);
18358
18359   ;
18360   return 0;
18361 }
18362 _ACEOF
18363 rm -f conftest$ac_exeext
18364 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18365   (eval $ac_link) 2>&5
18366   ac_status=$?
18367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18368   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18369   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18370   (eval $ac_try) 2>&5
18371   ac_status=$?
18372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18373   (exit $ac_status); }; }; then
18374   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18375 else
18376   echo "$as_me: program exited with status $ac_status" >&5
18377 echo "$as_me: failed program was:" >&5
18378 sed 's/^/| /' conftest.$ac_ext >&5
18379
18380 ( exit $ac_status )
18381 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18382 See \`config.log' for more details." >&5
18383 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18384 See \`config.log' for more details." >&2;}
18385    { (exit 1); exit 1; }; }
18386 fi
18387 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18388 fi
18389 fi
18390 rm -f conftest.val
18391 else
18392   ac_cv_sizeof_unsigned_long=0
18393 fi
18394 fi
18395 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18396 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18397 cat >>confdefs.h <<_ACEOF
18398 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18399 _ACEOF
18400
18401
18402
18403 # And one for the size of size_t (enables tweaks for > 32bit address space)
18404 echo "$as_me:$LINENO: checking for size_t" >&5
18405 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18406 if test "${ac_cv_type_size_t+set}" = set; then
18407   echo $ECHO_N "(cached) $ECHO_C" >&6
18408 else
18409   cat >conftest.$ac_ext <<_ACEOF
18410 /* confdefs.h.  */
18411 _ACEOF
18412 cat confdefs.h >>conftest.$ac_ext
18413 cat >>conftest.$ac_ext <<_ACEOF
18414 /* end confdefs.h.  */
18415 $ac_includes_default
18416 int
18417 main ()
18418 {
18419 if ((size_t *) 0)
18420   return 0;
18421 if (sizeof (size_t))
18422   return 0;
18423   ;
18424   return 0;
18425 }
18426 _ACEOF
18427 rm -f conftest.$ac_objext
18428 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18429   (eval $ac_compile) 2>conftest.er1
18430   ac_status=$?
18431   grep -v '^ *+' conftest.er1 >conftest.err
18432   rm -f conftest.er1
18433   cat conftest.err >&5
18434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18435   (exit $ac_status); } &&
18436          { ac_try='test -z "$ac_c_werror_flag"
18437                          || test ! -s conftest.err'
18438   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18439   (eval $ac_try) 2>&5
18440   ac_status=$?
18441   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18442   (exit $ac_status); }; } &&
18443          { ac_try='test -s conftest.$ac_objext'
18444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18445   (eval $ac_try) 2>&5
18446   ac_status=$?
18447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18448   (exit $ac_status); }; }; then
18449   ac_cv_type_size_t=yes
18450 else
18451   echo "$as_me: failed program was:" >&5
18452 sed 's/^/| /' conftest.$ac_ext >&5
18453
18454 ac_cv_type_size_t=no
18455 fi
18456 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18457 fi
18458 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18459 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18460
18461 echo "$as_me:$LINENO: checking size of size_t" >&5
18462 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18463 if test "${ac_cv_sizeof_size_t+set}" = set; then
18464   echo $ECHO_N "(cached) $ECHO_C" >&6
18465 else
18466   if test "$ac_cv_type_size_t" = yes; then
18467   # The cast to unsigned long works around a bug in the HP C Compiler
18468   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18469   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18470   # This bug is HP SR number 8606223364.
18471   if test "$cross_compiling" = yes; then
18472   # Depending upon the size, compute the lo and hi bounds.
18473 cat >conftest.$ac_ext <<_ACEOF
18474 /* confdefs.h.  */
18475 _ACEOF
18476 cat confdefs.h >>conftest.$ac_ext
18477 cat >>conftest.$ac_ext <<_ACEOF
18478 /* end confdefs.h.  */
18479 $ac_includes_default
18480 int
18481 main ()
18482 {
18483 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18484 test_array [0] = 0
18485
18486   ;
18487   return 0;
18488 }
18489 _ACEOF
18490 rm -f conftest.$ac_objext
18491 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18492   (eval $ac_compile) 2>conftest.er1
18493   ac_status=$?
18494   grep -v '^ *+' conftest.er1 >conftest.err
18495   rm -f conftest.er1
18496   cat conftest.err >&5
18497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18498   (exit $ac_status); } &&
18499          { ac_try='test -z "$ac_c_werror_flag"
18500                          || test ! -s conftest.err'
18501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18502   (eval $ac_try) 2>&5
18503   ac_status=$?
18504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18505   (exit $ac_status); }; } &&
18506          { ac_try='test -s conftest.$ac_objext'
18507   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18508   (eval $ac_try) 2>&5
18509   ac_status=$?
18510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18511   (exit $ac_status); }; }; then
18512   ac_lo=0 ac_mid=0
18513   while :; do
18514     cat >conftest.$ac_ext <<_ACEOF
18515 /* confdefs.h.  */
18516 _ACEOF
18517 cat confdefs.h >>conftest.$ac_ext
18518 cat >>conftest.$ac_ext <<_ACEOF
18519 /* end confdefs.h.  */
18520 $ac_includes_default
18521 int
18522 main ()
18523 {
18524 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18525 test_array [0] = 0
18526
18527   ;
18528   return 0;
18529 }
18530 _ACEOF
18531 rm -f conftest.$ac_objext
18532 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18533   (eval $ac_compile) 2>conftest.er1
18534   ac_status=$?
18535   grep -v '^ *+' conftest.er1 >conftest.err
18536   rm -f conftest.er1
18537   cat conftest.err >&5
18538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18539   (exit $ac_status); } &&
18540          { ac_try='test -z "$ac_c_werror_flag"
18541                          || test ! -s conftest.err'
18542   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18543   (eval $ac_try) 2>&5
18544   ac_status=$?
18545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18546   (exit $ac_status); }; } &&
18547          { ac_try='test -s conftest.$ac_objext'
18548   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18549   (eval $ac_try) 2>&5
18550   ac_status=$?
18551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18552   (exit $ac_status); }; }; then
18553   ac_hi=$ac_mid; break
18554 else
18555   echo "$as_me: failed program was:" >&5
18556 sed 's/^/| /' conftest.$ac_ext >&5
18557
18558 ac_lo=`expr $ac_mid + 1`
18559                     if test $ac_lo -le $ac_mid; then
18560                       ac_lo= ac_hi=
18561                       break
18562                     fi
18563                     ac_mid=`expr 2 '*' $ac_mid + 1`
18564 fi
18565 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18566   done
18567 else
18568   echo "$as_me: failed program was:" >&5
18569 sed 's/^/| /' conftest.$ac_ext >&5
18570
18571 cat >conftest.$ac_ext <<_ACEOF
18572 /* confdefs.h.  */
18573 _ACEOF
18574 cat confdefs.h >>conftest.$ac_ext
18575 cat >>conftest.$ac_ext <<_ACEOF
18576 /* end confdefs.h.  */
18577 $ac_includes_default
18578 int
18579 main ()
18580 {
18581 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18582 test_array [0] = 0
18583
18584   ;
18585   return 0;
18586 }
18587 _ACEOF
18588 rm -f conftest.$ac_objext
18589 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18590   (eval $ac_compile) 2>conftest.er1
18591   ac_status=$?
18592   grep -v '^ *+' conftest.er1 >conftest.err
18593   rm -f conftest.er1
18594   cat conftest.err >&5
18595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18596   (exit $ac_status); } &&
18597          { ac_try='test -z "$ac_c_werror_flag"
18598                          || test ! -s conftest.err'
18599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18600   (eval $ac_try) 2>&5
18601   ac_status=$?
18602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18603   (exit $ac_status); }; } &&
18604          { ac_try='test -s conftest.$ac_objext'
18605   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18606   (eval $ac_try) 2>&5
18607   ac_status=$?
18608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18609   (exit $ac_status); }; }; then
18610   ac_hi=-1 ac_mid=-1
18611   while :; do
18612     cat >conftest.$ac_ext <<_ACEOF
18613 /* confdefs.h.  */
18614 _ACEOF
18615 cat confdefs.h >>conftest.$ac_ext
18616 cat >>conftest.$ac_ext <<_ACEOF
18617 /* end confdefs.h.  */
18618 $ac_includes_default
18619 int
18620 main ()
18621 {
18622 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18623 test_array [0] = 0
18624
18625   ;
18626   return 0;
18627 }
18628 _ACEOF
18629 rm -f conftest.$ac_objext
18630 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18631   (eval $ac_compile) 2>conftest.er1
18632   ac_status=$?
18633   grep -v '^ *+' conftest.er1 >conftest.err
18634   rm -f conftest.er1
18635   cat conftest.err >&5
18636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18637   (exit $ac_status); } &&
18638          { ac_try='test -z "$ac_c_werror_flag"
18639                          || test ! -s conftest.err'
18640   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18641   (eval $ac_try) 2>&5
18642   ac_status=$?
18643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18644   (exit $ac_status); }; } &&
18645          { ac_try='test -s conftest.$ac_objext'
18646   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18647   (eval $ac_try) 2>&5
18648   ac_status=$?
18649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18650   (exit $ac_status); }; }; then
18651   ac_lo=$ac_mid; break
18652 else
18653   echo "$as_me: failed program was:" >&5
18654 sed 's/^/| /' conftest.$ac_ext >&5
18655
18656 ac_hi=`expr '(' $ac_mid ')' - 1`
18657                        if test $ac_mid -le $ac_hi; then
18658                          ac_lo= ac_hi=
18659                          break
18660                        fi
18661                        ac_mid=`expr 2 '*' $ac_mid`
18662 fi
18663 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18664   done
18665 else
18666   echo "$as_me: failed program was:" >&5
18667 sed 's/^/| /' conftest.$ac_ext >&5
18668
18669 ac_lo= ac_hi=
18670 fi
18671 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18672 fi
18673 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18674 # Binary search between lo and hi bounds.
18675 while test "x$ac_lo" != "x$ac_hi"; do
18676   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18677   cat >conftest.$ac_ext <<_ACEOF
18678 /* confdefs.h.  */
18679 _ACEOF
18680 cat confdefs.h >>conftest.$ac_ext
18681 cat >>conftest.$ac_ext <<_ACEOF
18682 /* end confdefs.h.  */
18683 $ac_includes_default
18684 int
18685 main ()
18686 {
18687 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18688 test_array [0] = 0
18689
18690   ;
18691   return 0;
18692 }
18693 _ACEOF
18694 rm -f conftest.$ac_objext
18695 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18696   (eval $ac_compile) 2>conftest.er1
18697   ac_status=$?
18698   grep -v '^ *+' conftest.er1 >conftest.err
18699   rm -f conftest.er1
18700   cat conftest.err >&5
18701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18702   (exit $ac_status); } &&
18703          { ac_try='test -z "$ac_c_werror_flag"
18704                          || test ! -s conftest.err'
18705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18706   (eval $ac_try) 2>&5
18707   ac_status=$?
18708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18709   (exit $ac_status); }; } &&
18710          { ac_try='test -s conftest.$ac_objext'
18711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18712   (eval $ac_try) 2>&5
18713   ac_status=$?
18714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18715   (exit $ac_status); }; }; then
18716   ac_hi=$ac_mid
18717 else
18718   echo "$as_me: failed program was:" >&5
18719 sed 's/^/| /' conftest.$ac_ext >&5
18720
18721 ac_lo=`expr '(' $ac_mid ')' + 1`
18722 fi
18723 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18724 done
18725 case $ac_lo in
18726 ?*) ac_cv_sizeof_size_t=$ac_lo;;
18727 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18728 See \`config.log' for more details." >&5
18729 echo "$as_me: error: cannot compute sizeof (size_t), 77
18730 See \`config.log' for more details." >&2;}
18731    { (exit 1); exit 1; }; } ;;
18732 esac
18733 else
18734   if test "$cross_compiling" = yes; then
18735   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18736 See \`config.log' for more details." >&5
18737 echo "$as_me: error: cannot run test program while cross compiling
18738 See \`config.log' for more details." >&2;}
18739    { (exit 1); exit 1; }; }
18740 else
18741   cat >conftest.$ac_ext <<_ACEOF
18742 /* confdefs.h.  */
18743 _ACEOF
18744 cat confdefs.h >>conftest.$ac_ext
18745 cat >>conftest.$ac_ext <<_ACEOF
18746 /* end confdefs.h.  */
18747 $ac_includes_default
18748 long longval () { return (long) (sizeof (size_t)); }
18749 unsigned long ulongval () { return (long) (sizeof (size_t)); }
18750 #include <stdio.h>
18751 #include <stdlib.h>
18752 int
18753 main ()
18754 {
18755
18756   FILE *f = fopen ("conftest.val", "w");
18757   if (! f)
18758     exit (1);
18759   if (((long) (sizeof (size_t))) < 0)
18760     {
18761       long i = longval ();
18762       if (i != ((long) (sizeof (size_t))))
18763         exit (1);
18764       fprintf (f, "%ld\n", i);
18765     }
18766   else
18767     {
18768       unsigned long i = ulongval ();
18769       if (i != ((long) (sizeof (size_t))))
18770         exit (1);
18771       fprintf (f, "%lu\n", i);
18772     }
18773   exit (ferror (f) || fclose (f) != 0);
18774
18775   ;
18776   return 0;
18777 }
18778 _ACEOF
18779 rm -f conftest$ac_exeext
18780 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18781   (eval $ac_link) 2>&5
18782   ac_status=$?
18783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18784   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18786   (eval $ac_try) 2>&5
18787   ac_status=$?
18788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18789   (exit $ac_status); }; }; then
18790   ac_cv_sizeof_size_t=`cat conftest.val`
18791 else
18792   echo "$as_me: program exited with status $ac_status" >&5
18793 echo "$as_me: failed program was:" >&5
18794 sed 's/^/| /' conftest.$ac_ext >&5
18795
18796 ( exit $ac_status )
18797 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18798 See \`config.log' for more details." >&5
18799 echo "$as_me: error: cannot compute sizeof (size_t), 77
18800 See \`config.log' for more details." >&2;}
18801    { (exit 1); exit 1; }; }
18802 fi
18803 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18804 fi
18805 fi
18806 rm -f conftest.val
18807 else
18808   ac_cv_sizeof_size_t=0
18809 fi
18810 fi
18811 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
18812 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
18813 cat >>confdefs.h <<_ACEOF
18814 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
18815 _ACEOF
18816
18817
18818
18819 # Determine memory alignment requirements for the basic C data types.
18820
18821 echo "$as_me:$LINENO: checking for short" >&5
18822 echo $ECHO_N "checking for short... $ECHO_C" >&6
18823 if test "${ac_cv_type_short+set}" = set; then
18824   echo $ECHO_N "(cached) $ECHO_C" >&6
18825 else
18826   cat >conftest.$ac_ext <<_ACEOF
18827 /* confdefs.h.  */
18828 _ACEOF
18829 cat confdefs.h >>conftest.$ac_ext
18830 cat >>conftest.$ac_ext <<_ACEOF
18831 /* end confdefs.h.  */
18832 $ac_includes_default
18833 int
18834 main ()
18835 {
18836 if ((short *) 0)
18837   return 0;
18838 if (sizeof (short))
18839   return 0;
18840   ;
18841   return 0;
18842 }
18843 _ACEOF
18844 rm -f conftest.$ac_objext
18845 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18846   (eval $ac_compile) 2>conftest.er1
18847   ac_status=$?
18848   grep -v '^ *+' conftest.er1 >conftest.err
18849   rm -f conftest.er1
18850   cat conftest.err >&5
18851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18852   (exit $ac_status); } &&
18853          { ac_try='test -z "$ac_c_werror_flag"
18854                          || test ! -s conftest.err'
18855   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18856   (eval $ac_try) 2>&5
18857   ac_status=$?
18858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18859   (exit $ac_status); }; } &&
18860          { ac_try='test -s conftest.$ac_objext'
18861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18862   (eval $ac_try) 2>&5
18863   ac_status=$?
18864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18865   (exit $ac_status); }; }; then
18866   ac_cv_type_short=yes
18867 else
18868   echo "$as_me: failed program was:" >&5
18869 sed 's/^/| /' conftest.$ac_ext >&5
18870
18871 ac_cv_type_short=no
18872 fi
18873 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18874 fi
18875 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
18876 echo "${ECHO_T}$ac_cv_type_short" >&6
18877
18878 echo "$as_me:$LINENO: checking alignment of short" >&5
18879 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
18880 if test "${pgac_cv_alignof_short+set}" = set; then
18881   echo $ECHO_N "(cached) $ECHO_C" >&6
18882 else
18883   if test "$ac_cv_type_short" = yes; then
18884   if test "$cross_compiling" = yes; then
18885   # Depending upon the size, compute the lo and hi bounds.
18886 cat >conftest.$ac_ext <<_ACEOF
18887 /* confdefs.h.  */
18888 _ACEOF
18889 cat confdefs.h >>conftest.$ac_ext
18890 cat >>conftest.$ac_ext <<_ACEOF
18891 /* end confdefs.h.  */
18892 $ac_includes_default
18893 struct { char filler; short field; } pgac_struct;
18894 int
18895 main ()
18896 {
18897 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18898 test_array [0] = 0
18899
18900   ;
18901   return 0;
18902 }
18903 _ACEOF
18904 rm -f conftest.$ac_objext
18905 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18906   (eval $ac_compile) 2>conftest.er1
18907   ac_status=$?
18908   grep -v '^ *+' conftest.er1 >conftest.err
18909   rm -f conftest.er1
18910   cat conftest.err >&5
18911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18912   (exit $ac_status); } &&
18913          { ac_try='test -z "$ac_c_werror_flag"
18914                          || test ! -s conftest.err'
18915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18916   (eval $ac_try) 2>&5
18917   ac_status=$?
18918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18919   (exit $ac_status); }; } &&
18920          { ac_try='test -s conftest.$ac_objext'
18921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18922   (eval $ac_try) 2>&5
18923   ac_status=$?
18924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18925   (exit $ac_status); }; }; then
18926   ac_lo=0 ac_mid=0
18927   while :; do
18928     cat >conftest.$ac_ext <<_ACEOF
18929 /* confdefs.h.  */
18930 _ACEOF
18931 cat confdefs.h >>conftest.$ac_ext
18932 cat >>conftest.$ac_ext <<_ACEOF
18933 /* end confdefs.h.  */
18934 $ac_includes_default
18935 struct { char filler; short field; } pgac_struct;
18936 int
18937 main ()
18938 {
18939 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18940 test_array [0] = 0
18941
18942   ;
18943   return 0;
18944 }
18945 _ACEOF
18946 rm -f conftest.$ac_objext
18947 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18948   (eval $ac_compile) 2>conftest.er1
18949   ac_status=$?
18950   grep -v '^ *+' conftest.er1 >conftest.err
18951   rm -f conftest.er1
18952   cat conftest.err >&5
18953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18954   (exit $ac_status); } &&
18955          { ac_try='test -z "$ac_c_werror_flag"
18956                          || test ! -s conftest.err'
18957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18958   (eval $ac_try) 2>&5
18959   ac_status=$?
18960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18961   (exit $ac_status); }; } &&
18962          { ac_try='test -s conftest.$ac_objext'
18963   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18964   (eval $ac_try) 2>&5
18965   ac_status=$?
18966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18967   (exit $ac_status); }; }; then
18968   ac_hi=$ac_mid; break
18969 else
18970   echo "$as_me: failed program was:" >&5
18971 sed 's/^/| /' conftest.$ac_ext >&5
18972
18973 ac_lo=`expr $ac_mid + 1`
18974                     if test $ac_lo -le $ac_mid; then
18975                       ac_lo= ac_hi=
18976                       break
18977                     fi
18978                     ac_mid=`expr 2 '*' $ac_mid + 1`
18979 fi
18980 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18981   done
18982 else
18983   echo "$as_me: failed program was:" >&5
18984 sed 's/^/| /' conftest.$ac_ext >&5
18985
18986 cat >conftest.$ac_ext <<_ACEOF
18987 /* confdefs.h.  */
18988 _ACEOF
18989 cat confdefs.h >>conftest.$ac_ext
18990 cat >>conftest.$ac_ext <<_ACEOF
18991 /* end confdefs.h.  */
18992 $ac_includes_default
18993 struct { char filler; short field; } pgac_struct;
18994 int
18995 main ()
18996 {
18997 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
18998 test_array [0] = 0
18999
19000   ;
19001   return 0;
19002 }
19003 _ACEOF
19004 rm -f conftest.$ac_objext
19005 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19006   (eval $ac_compile) 2>conftest.er1
19007   ac_status=$?
19008   grep -v '^ *+' conftest.er1 >conftest.err
19009   rm -f conftest.er1
19010   cat conftest.err >&5
19011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19012   (exit $ac_status); } &&
19013          { ac_try='test -z "$ac_c_werror_flag"
19014                          || test ! -s conftest.err'
19015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19016   (eval $ac_try) 2>&5
19017   ac_status=$?
19018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19019   (exit $ac_status); }; } &&
19020          { ac_try='test -s conftest.$ac_objext'
19021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19022   (eval $ac_try) 2>&5
19023   ac_status=$?
19024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19025   (exit $ac_status); }; }; then
19026   ac_hi=-1 ac_mid=-1
19027   while :; do
19028     cat >conftest.$ac_ext <<_ACEOF
19029 /* confdefs.h.  */
19030 _ACEOF
19031 cat confdefs.h >>conftest.$ac_ext
19032 cat >>conftest.$ac_ext <<_ACEOF
19033 /* end confdefs.h.  */
19034 $ac_includes_default
19035 struct { char filler; short field; } pgac_struct;
19036 int
19037 main ()
19038 {
19039 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19040 test_array [0] = 0
19041
19042   ;
19043   return 0;
19044 }
19045 _ACEOF
19046 rm -f conftest.$ac_objext
19047 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19048   (eval $ac_compile) 2>conftest.er1
19049   ac_status=$?
19050   grep -v '^ *+' conftest.er1 >conftest.err
19051   rm -f conftest.er1
19052   cat conftest.err >&5
19053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19054   (exit $ac_status); } &&
19055          { ac_try='test -z "$ac_c_werror_flag"
19056                          || test ! -s conftest.err'
19057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19058   (eval $ac_try) 2>&5
19059   ac_status=$?
19060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19061   (exit $ac_status); }; } &&
19062          { ac_try='test -s conftest.$ac_objext'
19063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19064   (eval $ac_try) 2>&5
19065   ac_status=$?
19066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19067   (exit $ac_status); }; }; then
19068   ac_lo=$ac_mid; break
19069 else
19070   echo "$as_me: failed program was:" >&5
19071 sed 's/^/| /' conftest.$ac_ext >&5
19072
19073 ac_hi=`expr '(' $ac_mid ')' - 1`
19074                        if test $ac_mid -le $ac_hi; then
19075                          ac_lo= ac_hi=
19076                          break
19077                        fi
19078                        ac_mid=`expr 2 '*' $ac_mid`
19079 fi
19080 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19081   done
19082 else
19083   echo "$as_me: failed program was:" >&5
19084 sed 's/^/| /' conftest.$ac_ext >&5
19085
19086 ac_lo= ac_hi=
19087 fi
19088 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19089 fi
19090 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19091 # Binary search between lo and hi bounds.
19092 while test "x$ac_lo" != "x$ac_hi"; do
19093   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19094   cat >conftest.$ac_ext <<_ACEOF
19095 /* confdefs.h.  */
19096 _ACEOF
19097 cat confdefs.h >>conftest.$ac_ext
19098 cat >>conftest.$ac_ext <<_ACEOF
19099 /* end confdefs.h.  */
19100 $ac_includes_default
19101 struct { char filler; short field; } pgac_struct;
19102 int
19103 main ()
19104 {
19105 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19106 test_array [0] = 0
19107
19108   ;
19109   return 0;
19110 }
19111 _ACEOF
19112 rm -f conftest.$ac_objext
19113 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19114   (eval $ac_compile) 2>conftest.er1
19115   ac_status=$?
19116   grep -v '^ *+' conftest.er1 >conftest.err
19117   rm -f conftest.er1
19118   cat conftest.err >&5
19119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19120   (exit $ac_status); } &&
19121          { ac_try='test -z "$ac_c_werror_flag"
19122                          || test ! -s conftest.err'
19123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19124   (eval $ac_try) 2>&5
19125   ac_status=$?
19126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19127   (exit $ac_status); }; } &&
19128          { ac_try='test -s conftest.$ac_objext'
19129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19130   (eval $ac_try) 2>&5
19131   ac_status=$?
19132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19133   (exit $ac_status); }; }; then
19134   ac_hi=$ac_mid
19135 else
19136   echo "$as_me: failed program was:" >&5
19137 sed 's/^/| /' conftest.$ac_ext >&5
19138
19139 ac_lo=`expr '(' $ac_mid ')' + 1`
19140 fi
19141 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19142 done
19143 case $ac_lo in
19144 ?*) pgac_cv_alignof_short=$ac_lo;;
19145 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19146 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19147    { (exit 1); exit 1; }; } ;;
19148 esac
19149 else
19150   if test "$cross_compiling" = yes; then
19151   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19152 See \`config.log' for more details." >&5
19153 echo "$as_me: error: cannot run test program while cross compiling
19154 See \`config.log' for more details." >&2;}
19155    { (exit 1); exit 1; }; }
19156 else
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; short field; } pgac_struct;
19165 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19166 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19167 #include <stdio.h>
19168 #include <stdlib.h>
19169 int
19170 main ()
19171 {
19172
19173   FILE *f = fopen ("conftest.val", "w");
19174   if (! f)
19175     exit (1);
19176   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19177     {
19178       long i = longval ();
19179       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19180         exit (1);
19181       fprintf (f, "%ld\n", i);
19182     }
19183   else
19184     {
19185       unsigned long i = ulongval ();
19186       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19187         exit (1);
19188       fprintf (f, "%lu\n", i);
19189     }
19190   exit (ferror (f) || fclose (f) != 0);
19191
19192   ;
19193   return 0;
19194 }
19195 _ACEOF
19196 rm -f conftest$ac_exeext
19197 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19198   (eval $ac_link) 2>&5
19199   ac_status=$?
19200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19201   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19203   (eval $ac_try) 2>&5
19204   ac_status=$?
19205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19206   (exit $ac_status); }; }; then
19207   pgac_cv_alignof_short=`cat conftest.val`
19208 else
19209   echo "$as_me: program exited with status $ac_status" >&5
19210 echo "$as_me: failed program was:" >&5
19211 sed 's/^/| /' conftest.$ac_ext >&5
19212
19213 ( exit $ac_status )
19214 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19215 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19216    { (exit 1); exit 1; }; }
19217 fi
19218 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19219 fi
19220 fi
19221 rm -f conftest.val
19222 else
19223   pgac_cv_alignof_short=0
19224 fi
19225 fi
19226 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
19227 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
19228 cat >>confdefs.h <<_ACEOF
19229 #define ALIGNOF_SHORT $pgac_cv_alignof_short
19230 _ACEOF
19231
19232
19233 echo "$as_me:$LINENO: checking for int" >&5
19234 echo $ECHO_N "checking for int... $ECHO_C" >&6
19235 if test "${ac_cv_type_int+set}" = set; then
19236   echo $ECHO_N "(cached) $ECHO_C" >&6
19237 else
19238   cat >conftest.$ac_ext <<_ACEOF
19239 /* confdefs.h.  */
19240 _ACEOF
19241 cat confdefs.h >>conftest.$ac_ext
19242 cat >>conftest.$ac_ext <<_ACEOF
19243 /* end confdefs.h.  */
19244 $ac_includes_default
19245 int
19246 main ()
19247 {
19248 if ((int *) 0)
19249   return 0;
19250 if (sizeof (int))
19251   return 0;
19252   ;
19253   return 0;
19254 }
19255 _ACEOF
19256 rm -f conftest.$ac_objext
19257 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19258   (eval $ac_compile) 2>conftest.er1
19259   ac_status=$?
19260   grep -v '^ *+' conftest.er1 >conftest.err
19261   rm -f conftest.er1
19262   cat conftest.err >&5
19263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19264   (exit $ac_status); } &&
19265          { ac_try='test -z "$ac_c_werror_flag"
19266                          || test ! -s conftest.err'
19267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19268   (eval $ac_try) 2>&5
19269   ac_status=$?
19270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19271   (exit $ac_status); }; } &&
19272          { ac_try='test -s conftest.$ac_objext'
19273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19274   (eval $ac_try) 2>&5
19275   ac_status=$?
19276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19277   (exit $ac_status); }; }; then
19278   ac_cv_type_int=yes
19279 else
19280   echo "$as_me: failed program was:" >&5
19281 sed 's/^/| /' conftest.$ac_ext >&5
19282
19283 ac_cv_type_int=no
19284 fi
19285 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19286 fi
19287 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
19288 echo "${ECHO_T}$ac_cv_type_int" >&6
19289
19290 echo "$as_me:$LINENO: checking alignment of int" >&5
19291 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
19292 if test "${pgac_cv_alignof_int+set}" = set; then
19293   echo $ECHO_N "(cached) $ECHO_C" >&6
19294 else
19295   if test "$ac_cv_type_int" = yes; then
19296   if test "$cross_compiling" = yes; then
19297   # Depending upon the size, compute the lo and hi bounds.
19298 cat >conftest.$ac_ext <<_ACEOF
19299 /* confdefs.h.  */
19300 _ACEOF
19301 cat confdefs.h >>conftest.$ac_ext
19302 cat >>conftest.$ac_ext <<_ACEOF
19303 /* end confdefs.h.  */
19304 $ac_includes_default
19305 struct { char filler; int field; } pgac_struct;
19306 int
19307 main ()
19308 {
19309 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19310 test_array [0] = 0
19311
19312   ;
19313   return 0;
19314 }
19315 _ACEOF
19316 rm -f conftest.$ac_objext
19317 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19318   (eval $ac_compile) 2>conftest.er1
19319   ac_status=$?
19320   grep -v '^ *+' conftest.er1 >conftest.err
19321   rm -f conftest.er1
19322   cat conftest.err >&5
19323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19324   (exit $ac_status); } &&
19325          { ac_try='test -z "$ac_c_werror_flag"
19326                          || test ! -s conftest.err'
19327   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19328   (eval $ac_try) 2>&5
19329   ac_status=$?
19330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19331   (exit $ac_status); }; } &&
19332          { ac_try='test -s conftest.$ac_objext'
19333   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19334   (eval $ac_try) 2>&5
19335   ac_status=$?
19336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19337   (exit $ac_status); }; }; then
19338   ac_lo=0 ac_mid=0
19339   while :; do
19340     cat >conftest.$ac_ext <<_ACEOF
19341 /* confdefs.h.  */
19342 _ACEOF
19343 cat confdefs.h >>conftest.$ac_ext
19344 cat >>conftest.$ac_ext <<_ACEOF
19345 /* end confdefs.h.  */
19346 $ac_includes_default
19347 struct { char filler; int field; } pgac_struct;
19348 int
19349 main ()
19350 {
19351 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19352 test_array [0] = 0
19353
19354   ;
19355   return 0;
19356 }
19357 _ACEOF
19358 rm -f conftest.$ac_objext
19359 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19360   (eval $ac_compile) 2>conftest.er1
19361   ac_status=$?
19362   grep -v '^ *+' conftest.er1 >conftest.err
19363   rm -f conftest.er1
19364   cat conftest.err >&5
19365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19366   (exit $ac_status); } &&
19367          { ac_try='test -z "$ac_c_werror_flag"
19368                          || test ! -s conftest.err'
19369   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19370   (eval $ac_try) 2>&5
19371   ac_status=$?
19372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19373   (exit $ac_status); }; } &&
19374          { ac_try='test -s conftest.$ac_objext'
19375   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19376   (eval $ac_try) 2>&5
19377   ac_status=$?
19378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19379   (exit $ac_status); }; }; then
19380   ac_hi=$ac_mid; break
19381 else
19382   echo "$as_me: failed program was:" >&5
19383 sed 's/^/| /' conftest.$ac_ext >&5
19384
19385 ac_lo=`expr $ac_mid + 1`
19386                     if test $ac_lo -le $ac_mid; then
19387                       ac_lo= ac_hi=
19388                       break
19389                     fi
19390                     ac_mid=`expr 2 '*' $ac_mid + 1`
19391 fi
19392 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19393   done
19394 else
19395   echo "$as_me: failed program was:" >&5
19396 sed 's/^/| /' conftest.$ac_ext >&5
19397
19398 cat >conftest.$ac_ext <<_ACEOF
19399 /* confdefs.h.  */
19400 _ACEOF
19401 cat confdefs.h >>conftest.$ac_ext
19402 cat >>conftest.$ac_ext <<_ACEOF
19403 /* end confdefs.h.  */
19404 $ac_includes_default
19405 struct { char filler; int field; } pgac_struct;
19406 int
19407 main ()
19408 {
19409 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19410 test_array [0] = 0
19411
19412   ;
19413   return 0;
19414 }
19415 _ACEOF
19416 rm -f conftest.$ac_objext
19417 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19418   (eval $ac_compile) 2>conftest.er1
19419   ac_status=$?
19420   grep -v '^ *+' conftest.er1 >conftest.err
19421   rm -f conftest.er1
19422   cat conftest.err >&5
19423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19424   (exit $ac_status); } &&
19425          { ac_try='test -z "$ac_c_werror_flag"
19426                          || test ! -s conftest.err'
19427   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19428   (eval $ac_try) 2>&5
19429   ac_status=$?
19430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19431   (exit $ac_status); }; } &&
19432          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
19438   ac_hi=-1 ac_mid=-1
19439   while :; do
19440     cat >conftest.$ac_ext <<_ACEOF
19441 /* confdefs.h.  */
19442 _ACEOF
19443 cat confdefs.h >>conftest.$ac_ext
19444 cat >>conftest.$ac_ext <<_ACEOF
19445 /* end confdefs.h.  */
19446 $ac_includes_default
19447 struct { char filler; int field; } pgac_struct;
19448 int
19449 main ()
19450 {
19451 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19452 test_array [0] = 0
19453
19454   ;
19455   return 0;
19456 }
19457 _ACEOF
19458 rm -f conftest.$ac_objext
19459 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19460   (eval $ac_compile) 2>conftest.er1
19461   ac_status=$?
19462   grep -v '^ *+' conftest.er1 >conftest.err
19463   rm -f conftest.er1
19464   cat conftest.err >&5
19465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19466   (exit $ac_status); } &&
19467          { ac_try='test -z "$ac_c_werror_flag"
19468                          || test ! -s conftest.err'
19469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19470   (eval $ac_try) 2>&5
19471   ac_status=$?
19472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19473   (exit $ac_status); }; } &&
19474          { ac_try='test -s conftest.$ac_objext'
19475   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19476   (eval $ac_try) 2>&5
19477   ac_status=$?
19478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19479   (exit $ac_status); }; }; then
19480   ac_lo=$ac_mid; break
19481 else
19482   echo "$as_me: failed program was:" >&5
19483 sed 's/^/| /' conftest.$ac_ext >&5
19484
19485 ac_hi=`expr '(' $ac_mid ')' - 1`
19486                        if test $ac_mid -le $ac_hi; then
19487                          ac_lo= ac_hi=
19488                          break
19489                        fi
19490                        ac_mid=`expr 2 '*' $ac_mid`
19491 fi
19492 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19493   done
19494 else
19495   echo "$as_me: failed program was:" >&5
19496 sed 's/^/| /' conftest.$ac_ext >&5
19497
19498 ac_lo= ac_hi=
19499 fi
19500 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19501 fi
19502 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19503 # Binary search between lo and hi bounds.
19504 while test "x$ac_lo" != "x$ac_hi"; do
19505   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19506   cat >conftest.$ac_ext <<_ACEOF
19507 /* confdefs.h.  */
19508 _ACEOF
19509 cat confdefs.h >>conftest.$ac_ext
19510 cat >>conftest.$ac_ext <<_ACEOF
19511 /* end confdefs.h.  */
19512 $ac_includes_default
19513 struct { char filler; int field; } pgac_struct;
19514 int
19515 main ()
19516 {
19517 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19518 test_array [0] = 0
19519
19520   ;
19521   return 0;
19522 }
19523 _ACEOF
19524 rm -f conftest.$ac_objext
19525 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19526   (eval $ac_compile) 2>conftest.er1
19527   ac_status=$?
19528   grep -v '^ *+' conftest.er1 >conftest.err
19529   rm -f conftest.er1
19530   cat conftest.err >&5
19531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19532   (exit $ac_status); } &&
19533          { ac_try='test -z "$ac_c_werror_flag"
19534                          || test ! -s conftest.err'
19535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19536   (eval $ac_try) 2>&5
19537   ac_status=$?
19538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19539   (exit $ac_status); }; } &&
19540          { ac_try='test -s conftest.$ac_objext'
19541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19542   (eval $ac_try) 2>&5
19543   ac_status=$?
19544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19545   (exit $ac_status); }; }; then
19546   ac_hi=$ac_mid
19547 else
19548   echo "$as_me: failed program was:" >&5
19549 sed 's/^/| /' conftest.$ac_ext >&5
19550
19551 ac_lo=`expr '(' $ac_mid ')' + 1`
19552 fi
19553 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19554 done
19555 case $ac_lo in
19556 ?*) pgac_cv_alignof_int=$ac_lo;;
19557 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19558 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19559    { (exit 1); exit 1; }; } ;;
19560 esac
19561 else
19562   if test "$cross_compiling" = yes; then
19563   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19564 See \`config.log' for more details." >&5
19565 echo "$as_me: error: cannot run test program while cross compiling
19566 See \`config.log' for more details." >&2;}
19567    { (exit 1); exit 1; }; }
19568 else
19569   cat >conftest.$ac_ext <<_ACEOF
19570 /* confdefs.h.  */
19571 _ACEOF
19572 cat confdefs.h >>conftest.$ac_ext
19573 cat >>conftest.$ac_ext <<_ACEOF
19574 /* end confdefs.h.  */
19575 $ac_includes_default
19576 struct { char filler; int field; } pgac_struct;
19577 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19578 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19579 #include <stdio.h>
19580 #include <stdlib.h>
19581 int
19582 main ()
19583 {
19584
19585   FILE *f = fopen ("conftest.val", "w");
19586   if (! f)
19587     exit (1);
19588   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19589     {
19590       long i = longval ();
19591       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19592         exit (1);
19593       fprintf (f, "%ld\n", i);
19594     }
19595   else
19596     {
19597       unsigned long i = ulongval ();
19598       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19599         exit (1);
19600       fprintf (f, "%lu\n", i);
19601     }
19602   exit (ferror (f) || fclose (f) != 0);
19603
19604   ;
19605   return 0;
19606 }
19607 _ACEOF
19608 rm -f conftest$ac_exeext
19609 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19610   (eval $ac_link) 2>&5
19611   ac_status=$?
19612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19613   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19615   (eval $ac_try) 2>&5
19616   ac_status=$?
19617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19618   (exit $ac_status); }; }; then
19619   pgac_cv_alignof_int=`cat conftest.val`
19620 else
19621   echo "$as_me: program exited with status $ac_status" >&5
19622 echo "$as_me: failed program was:" >&5
19623 sed 's/^/| /' conftest.$ac_ext >&5
19624
19625 ( exit $ac_status )
19626 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19627 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19628    { (exit 1); exit 1; }; }
19629 fi
19630 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19631 fi
19632 fi
19633 rm -f conftest.val
19634 else
19635   pgac_cv_alignof_int=0
19636 fi
19637 fi
19638 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19639 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19640 cat >>confdefs.h <<_ACEOF
19641 #define ALIGNOF_INT $pgac_cv_alignof_int
19642 _ACEOF
19643
19644
19645 echo "$as_me:$LINENO: checking for long" >&5
19646 echo $ECHO_N "checking for long... $ECHO_C" >&6
19647 if test "${ac_cv_type_long+set}" = set; then
19648   echo $ECHO_N "(cached) $ECHO_C" >&6
19649 else
19650   cat >conftest.$ac_ext <<_ACEOF
19651 /* confdefs.h.  */
19652 _ACEOF
19653 cat confdefs.h >>conftest.$ac_ext
19654 cat >>conftest.$ac_ext <<_ACEOF
19655 /* end confdefs.h.  */
19656 $ac_includes_default
19657 int
19658 main ()
19659 {
19660 if ((long *) 0)
19661   return 0;
19662 if (sizeof (long))
19663   return 0;
19664   ;
19665   return 0;
19666 }
19667 _ACEOF
19668 rm -f conftest.$ac_objext
19669 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19670   (eval $ac_compile) 2>conftest.er1
19671   ac_status=$?
19672   grep -v '^ *+' conftest.er1 >conftest.err
19673   rm -f conftest.er1
19674   cat conftest.err >&5
19675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19676   (exit $ac_status); } &&
19677          { ac_try='test -z "$ac_c_werror_flag"
19678                          || test ! -s conftest.err'
19679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19680   (eval $ac_try) 2>&5
19681   ac_status=$?
19682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19683   (exit $ac_status); }; } &&
19684          { ac_try='test -s conftest.$ac_objext'
19685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19686   (eval $ac_try) 2>&5
19687   ac_status=$?
19688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19689   (exit $ac_status); }; }; then
19690   ac_cv_type_long=yes
19691 else
19692   echo "$as_me: failed program was:" >&5
19693 sed 's/^/| /' conftest.$ac_ext >&5
19694
19695 ac_cv_type_long=no
19696 fi
19697 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19698 fi
19699 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
19700 echo "${ECHO_T}$ac_cv_type_long" >&6
19701
19702 echo "$as_me:$LINENO: checking alignment of long" >&5
19703 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
19704 if test "${pgac_cv_alignof_long+set}" = set; then
19705   echo $ECHO_N "(cached) $ECHO_C" >&6
19706 else
19707   if test "$ac_cv_type_long" = yes; then
19708   if test "$cross_compiling" = yes; then
19709   # Depending upon the size, compute the lo and hi bounds.
19710 cat >conftest.$ac_ext <<_ACEOF
19711 /* confdefs.h.  */
19712 _ACEOF
19713 cat confdefs.h >>conftest.$ac_ext
19714 cat >>conftest.$ac_ext <<_ACEOF
19715 /* end confdefs.h.  */
19716 $ac_includes_default
19717 struct { char filler; long field; } pgac_struct;
19718 int
19719 main ()
19720 {
19721 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19722 test_array [0] = 0
19723
19724   ;
19725   return 0;
19726 }
19727 _ACEOF
19728 rm -f conftest.$ac_objext
19729 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19730   (eval $ac_compile) 2>conftest.er1
19731   ac_status=$?
19732   grep -v '^ *+' conftest.er1 >conftest.err
19733   rm -f conftest.er1
19734   cat conftest.err >&5
19735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19736   (exit $ac_status); } &&
19737          { ac_try='test -z "$ac_c_werror_flag"
19738                          || test ! -s conftest.err'
19739   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19740   (eval $ac_try) 2>&5
19741   ac_status=$?
19742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19743   (exit $ac_status); }; } &&
19744          { ac_try='test -s conftest.$ac_objext'
19745   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19746   (eval $ac_try) 2>&5
19747   ac_status=$?
19748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19749   (exit $ac_status); }; }; then
19750   ac_lo=0 ac_mid=0
19751   while :; do
19752     cat >conftest.$ac_ext <<_ACEOF
19753 /* confdefs.h.  */
19754 _ACEOF
19755 cat confdefs.h >>conftest.$ac_ext
19756 cat >>conftest.$ac_ext <<_ACEOF
19757 /* end confdefs.h.  */
19758 $ac_includes_default
19759 struct { char filler; long field; } pgac_struct;
19760 int
19761 main ()
19762 {
19763 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19764 test_array [0] = 0
19765
19766   ;
19767   return 0;
19768 }
19769 _ACEOF
19770 rm -f conftest.$ac_objext
19771 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19772   (eval $ac_compile) 2>conftest.er1
19773   ac_status=$?
19774   grep -v '^ *+' conftest.er1 >conftest.err
19775   rm -f conftest.er1
19776   cat conftest.err >&5
19777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19778   (exit $ac_status); } &&
19779          { ac_try='test -z "$ac_c_werror_flag"
19780                          || test ! -s conftest.err'
19781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19782   (eval $ac_try) 2>&5
19783   ac_status=$?
19784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19785   (exit $ac_status); }; } &&
19786          { ac_try='test -s conftest.$ac_objext'
19787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19788   (eval $ac_try) 2>&5
19789   ac_status=$?
19790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19791   (exit $ac_status); }; }; then
19792   ac_hi=$ac_mid; break
19793 else
19794   echo "$as_me: failed program was:" >&5
19795 sed 's/^/| /' conftest.$ac_ext >&5
19796
19797 ac_lo=`expr $ac_mid + 1`
19798                     if test $ac_lo -le $ac_mid; then
19799                       ac_lo= ac_hi=
19800                       break
19801                     fi
19802                     ac_mid=`expr 2 '*' $ac_mid + 1`
19803 fi
19804 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19805   done
19806 else
19807   echo "$as_me: failed program was:" >&5
19808 sed 's/^/| /' conftest.$ac_ext >&5
19809
19810 cat >conftest.$ac_ext <<_ACEOF
19811 /* confdefs.h.  */
19812 _ACEOF
19813 cat confdefs.h >>conftest.$ac_ext
19814 cat >>conftest.$ac_ext <<_ACEOF
19815 /* end confdefs.h.  */
19816 $ac_includes_default
19817 struct { char filler; long field; } pgac_struct;
19818 int
19819 main ()
19820 {
19821 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19822 test_array [0] = 0
19823
19824   ;
19825   return 0;
19826 }
19827 _ACEOF
19828 rm -f conftest.$ac_objext
19829 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19830   (eval $ac_compile) 2>conftest.er1
19831   ac_status=$?
19832   grep -v '^ *+' conftest.er1 >conftest.err
19833   rm -f conftest.er1
19834   cat conftest.err >&5
19835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19836   (exit $ac_status); } &&
19837          { ac_try='test -z "$ac_c_werror_flag"
19838                          || test ! -s conftest.err'
19839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19840   (eval $ac_try) 2>&5
19841   ac_status=$?
19842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19843   (exit $ac_status); }; } &&
19844          { ac_try='test -s conftest.$ac_objext'
19845   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19846   (eval $ac_try) 2>&5
19847   ac_status=$?
19848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19849   (exit $ac_status); }; }; then
19850   ac_hi=-1 ac_mid=-1
19851   while :; do
19852     cat >conftest.$ac_ext <<_ACEOF
19853 /* confdefs.h.  */
19854 _ACEOF
19855 cat confdefs.h >>conftest.$ac_ext
19856 cat >>conftest.$ac_ext <<_ACEOF
19857 /* end confdefs.h.  */
19858 $ac_includes_default
19859 struct { char filler; long field; } pgac_struct;
19860 int
19861 main ()
19862 {
19863 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19864 test_array [0] = 0
19865
19866   ;
19867   return 0;
19868 }
19869 _ACEOF
19870 rm -f conftest.$ac_objext
19871 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19872   (eval $ac_compile) 2>conftest.er1
19873   ac_status=$?
19874   grep -v '^ *+' conftest.er1 >conftest.err
19875   rm -f conftest.er1
19876   cat conftest.err >&5
19877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19878   (exit $ac_status); } &&
19879          { ac_try='test -z "$ac_c_werror_flag"
19880                          || test ! -s conftest.err'
19881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19882   (eval $ac_try) 2>&5
19883   ac_status=$?
19884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19885   (exit $ac_status); }; } &&
19886          { ac_try='test -s conftest.$ac_objext'
19887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19888   (eval $ac_try) 2>&5
19889   ac_status=$?
19890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19891   (exit $ac_status); }; }; then
19892   ac_lo=$ac_mid; break
19893 else
19894   echo "$as_me: failed program was:" >&5
19895 sed 's/^/| /' conftest.$ac_ext >&5
19896
19897 ac_hi=`expr '(' $ac_mid ')' - 1`
19898                        if test $ac_mid -le $ac_hi; then
19899                          ac_lo= ac_hi=
19900                          break
19901                        fi
19902                        ac_mid=`expr 2 '*' $ac_mid`
19903 fi
19904 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19905   done
19906 else
19907   echo "$as_me: failed program was:" >&5
19908 sed 's/^/| /' conftest.$ac_ext >&5
19909
19910 ac_lo= ac_hi=
19911 fi
19912 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19913 fi
19914 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19915 # Binary search between lo and hi bounds.
19916 while test "x$ac_lo" != "x$ac_hi"; do
19917   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19918   cat >conftest.$ac_ext <<_ACEOF
19919 /* confdefs.h.  */
19920 _ACEOF
19921 cat confdefs.h >>conftest.$ac_ext
19922 cat >>conftest.$ac_ext <<_ACEOF
19923 /* end confdefs.h.  */
19924 $ac_includes_default
19925 struct { char filler; long field; } pgac_struct;
19926 int
19927 main ()
19928 {
19929 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19930 test_array [0] = 0
19931
19932   ;
19933   return 0;
19934 }
19935 _ACEOF
19936 rm -f conftest.$ac_objext
19937 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19938   (eval $ac_compile) 2>conftest.er1
19939   ac_status=$?
19940   grep -v '^ *+' conftest.er1 >conftest.err
19941   rm -f conftest.er1
19942   cat conftest.err >&5
19943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19944   (exit $ac_status); } &&
19945          { ac_try='test -z "$ac_c_werror_flag"
19946                          || test ! -s conftest.err'
19947   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19948   (eval $ac_try) 2>&5
19949   ac_status=$?
19950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19951   (exit $ac_status); }; } &&
19952          { ac_try='test -s conftest.$ac_objext'
19953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19954   (eval $ac_try) 2>&5
19955   ac_status=$?
19956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19957   (exit $ac_status); }; }; then
19958   ac_hi=$ac_mid
19959 else
19960   echo "$as_me: failed program was:" >&5
19961 sed 's/^/| /' conftest.$ac_ext >&5
19962
19963 ac_lo=`expr '(' $ac_mid ')' + 1`
19964 fi
19965 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19966 done
19967 case $ac_lo in
19968 ?*) pgac_cv_alignof_long=$ac_lo;;
19969 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19970 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19971    { (exit 1); exit 1; }; } ;;
19972 esac
19973 else
19974   if test "$cross_compiling" = yes; then
19975   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19976 See \`config.log' for more details." >&5
19977 echo "$as_me: error: cannot run test program while cross compiling
19978 See \`config.log' for more details." >&2;}
19979    { (exit 1); exit 1; }; }
19980 else
19981   cat >conftest.$ac_ext <<_ACEOF
19982 /* confdefs.h.  */
19983 _ACEOF
19984 cat confdefs.h >>conftest.$ac_ext
19985 cat >>conftest.$ac_ext <<_ACEOF
19986 /* end confdefs.h.  */
19987 $ac_includes_default
19988 struct { char filler; long field; } pgac_struct;
19989 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19990 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19991 #include <stdio.h>
19992 #include <stdlib.h>
19993 int
19994 main ()
19995 {
19996
19997   FILE *f = fopen ("conftest.val", "w");
19998   if (! f)
19999     exit (1);
20000   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20001     {
20002       long i = longval ();
20003       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20004         exit (1);
20005       fprintf (f, "%ld\n", i);
20006     }
20007   else
20008     {
20009       unsigned long i = ulongval ();
20010       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20011         exit (1);
20012       fprintf (f, "%lu\n", i);
20013     }
20014   exit (ferror (f) || fclose (f) != 0);
20015
20016   ;
20017   return 0;
20018 }
20019 _ACEOF
20020 rm -f conftest$ac_exeext
20021 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20022   (eval $ac_link) 2>&5
20023   ac_status=$?
20024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20025   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20027   (eval $ac_try) 2>&5
20028   ac_status=$?
20029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20030   (exit $ac_status); }; }; then
20031   pgac_cv_alignof_long=`cat conftest.val`
20032 else
20033   echo "$as_me: program exited with status $ac_status" >&5
20034 echo "$as_me: failed program was:" >&5
20035 sed 's/^/| /' conftest.$ac_ext >&5
20036
20037 ( exit $ac_status )
20038 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
20039 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
20040    { (exit 1); exit 1; }; }
20041 fi
20042 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20043 fi
20044 fi
20045 rm -f conftest.val
20046 else
20047   pgac_cv_alignof_long=0
20048 fi
20049 fi
20050 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
20051 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
20052 cat >>confdefs.h <<_ACEOF
20053 #define ALIGNOF_LONG $pgac_cv_alignof_long
20054 _ACEOF
20055
20056
20057 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
20058   echo "$as_me:$LINENO: checking for long long int" >&5
20059 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
20060 if test "${ac_cv_type_long_long_int+set}" = set; then
20061   echo $ECHO_N "(cached) $ECHO_C" >&6
20062 else
20063   cat >conftest.$ac_ext <<_ACEOF
20064 /* confdefs.h.  */
20065 _ACEOF
20066 cat confdefs.h >>conftest.$ac_ext
20067 cat >>conftest.$ac_ext <<_ACEOF
20068 /* end confdefs.h.  */
20069 $ac_includes_default
20070 int
20071 main ()
20072 {
20073 if ((long long int *) 0)
20074   return 0;
20075 if (sizeof (long long int))
20076   return 0;
20077   ;
20078   return 0;
20079 }
20080 _ACEOF
20081 rm -f conftest.$ac_objext
20082 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20083   (eval $ac_compile) 2>conftest.er1
20084   ac_status=$?
20085   grep -v '^ *+' conftest.er1 >conftest.err
20086   rm -f conftest.er1
20087   cat conftest.err >&5
20088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20089   (exit $ac_status); } &&
20090          { ac_try='test -z "$ac_c_werror_flag"
20091                          || test ! -s conftest.err'
20092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20093   (eval $ac_try) 2>&5
20094   ac_status=$?
20095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20096   (exit $ac_status); }; } &&
20097          { ac_try='test -s conftest.$ac_objext'
20098   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20099   (eval $ac_try) 2>&5
20100   ac_status=$?
20101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20102   (exit $ac_status); }; }; then
20103   ac_cv_type_long_long_int=yes
20104 else
20105   echo "$as_me: failed program was:" >&5
20106 sed 's/^/| /' conftest.$ac_ext >&5
20107
20108 ac_cv_type_long_long_int=no
20109 fi
20110 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20111 fi
20112 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
20113 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
20114
20115 echo "$as_me:$LINENO: checking alignment of long long int" >&5
20116 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
20117 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
20118   echo $ECHO_N "(cached) $ECHO_C" >&6
20119 else
20120   if test "$ac_cv_type_long_long_int" = yes; then
20121   if test "$cross_compiling" = yes; then
20122   # Depending upon the size, compute the lo and hi bounds.
20123 cat >conftest.$ac_ext <<_ACEOF
20124 /* confdefs.h.  */
20125 _ACEOF
20126 cat confdefs.h >>conftest.$ac_ext
20127 cat >>conftest.$ac_ext <<_ACEOF
20128 /* end confdefs.h.  */
20129 $ac_includes_default
20130 struct { char filler; long long int field; } pgac_struct;
20131 int
20132 main ()
20133 {
20134 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20135 test_array [0] = 0
20136
20137   ;
20138   return 0;
20139 }
20140 _ACEOF
20141 rm -f conftest.$ac_objext
20142 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20143   (eval $ac_compile) 2>conftest.er1
20144   ac_status=$?
20145   grep -v '^ *+' conftest.er1 >conftest.err
20146   rm -f conftest.er1
20147   cat conftest.err >&5
20148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20149   (exit $ac_status); } &&
20150          { ac_try='test -z "$ac_c_werror_flag"
20151                          || test ! -s conftest.err'
20152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20153   (eval $ac_try) 2>&5
20154   ac_status=$?
20155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20156   (exit $ac_status); }; } &&
20157          { ac_try='test -s conftest.$ac_objext'
20158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20159   (eval $ac_try) 2>&5
20160   ac_status=$?
20161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20162   (exit $ac_status); }; }; then
20163   ac_lo=0 ac_mid=0
20164   while :; do
20165     cat >conftest.$ac_ext <<_ACEOF
20166 /* confdefs.h.  */
20167 _ACEOF
20168 cat confdefs.h >>conftest.$ac_ext
20169 cat >>conftest.$ac_ext <<_ACEOF
20170 /* end confdefs.h.  */
20171 $ac_includes_default
20172 struct { char filler; long long int field; } pgac_struct;
20173 int
20174 main ()
20175 {
20176 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20177 test_array [0] = 0
20178
20179   ;
20180   return 0;
20181 }
20182 _ACEOF
20183 rm -f conftest.$ac_objext
20184 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20185   (eval $ac_compile) 2>conftest.er1
20186   ac_status=$?
20187   grep -v '^ *+' conftest.er1 >conftest.err
20188   rm -f conftest.er1
20189   cat conftest.err >&5
20190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20191   (exit $ac_status); } &&
20192          { ac_try='test -z "$ac_c_werror_flag"
20193                          || test ! -s conftest.err'
20194   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20195   (eval $ac_try) 2>&5
20196   ac_status=$?
20197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20198   (exit $ac_status); }; } &&
20199          { ac_try='test -s conftest.$ac_objext'
20200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20201   (eval $ac_try) 2>&5
20202   ac_status=$?
20203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20204   (exit $ac_status); }; }; then
20205   ac_hi=$ac_mid; break
20206 else
20207   echo "$as_me: failed program was:" >&5
20208 sed 's/^/| /' conftest.$ac_ext >&5
20209
20210 ac_lo=`expr $ac_mid + 1`
20211                     if test $ac_lo -le $ac_mid; then
20212                       ac_lo= ac_hi=
20213                       break
20214                     fi
20215                     ac_mid=`expr 2 '*' $ac_mid + 1`
20216 fi
20217 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20218   done
20219 else
20220   echo "$as_me: failed program was:" >&5
20221 sed 's/^/| /' conftest.$ac_ext >&5
20222
20223 cat >conftest.$ac_ext <<_ACEOF
20224 /* confdefs.h.  */
20225 _ACEOF
20226 cat confdefs.h >>conftest.$ac_ext
20227 cat >>conftest.$ac_ext <<_ACEOF
20228 /* end confdefs.h.  */
20229 $ac_includes_default
20230 struct { char filler; long long int field; } pgac_struct;
20231 int
20232 main ()
20233 {
20234 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20235 test_array [0] = 0
20236
20237   ;
20238   return 0;
20239 }
20240 _ACEOF
20241 rm -f conftest.$ac_objext
20242 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20243   (eval $ac_compile) 2>conftest.er1
20244   ac_status=$?
20245   grep -v '^ *+' conftest.er1 >conftest.err
20246   rm -f conftest.er1
20247   cat conftest.err >&5
20248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20249   (exit $ac_status); } &&
20250          { ac_try='test -z "$ac_c_werror_flag"
20251                          || test ! -s conftest.err'
20252   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20253   (eval $ac_try) 2>&5
20254   ac_status=$?
20255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20256   (exit $ac_status); }; } &&
20257          { ac_try='test -s conftest.$ac_objext'
20258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20259   (eval $ac_try) 2>&5
20260   ac_status=$?
20261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20262   (exit $ac_status); }; }; then
20263   ac_hi=-1 ac_mid=-1
20264   while :; do
20265     cat >conftest.$ac_ext <<_ACEOF
20266 /* confdefs.h.  */
20267 _ACEOF
20268 cat confdefs.h >>conftest.$ac_ext
20269 cat >>conftest.$ac_ext <<_ACEOF
20270 /* end confdefs.h.  */
20271 $ac_includes_default
20272 struct { char filler; long long int field; } pgac_struct;
20273 int
20274 main ()
20275 {
20276 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20277 test_array [0] = 0
20278
20279   ;
20280   return 0;
20281 }
20282 _ACEOF
20283 rm -f conftest.$ac_objext
20284 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20285   (eval $ac_compile) 2>conftest.er1
20286   ac_status=$?
20287   grep -v '^ *+' conftest.er1 >conftest.err
20288   rm -f conftest.er1
20289   cat conftest.err >&5
20290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20291   (exit $ac_status); } &&
20292          { ac_try='test -z "$ac_c_werror_flag"
20293                          || test ! -s conftest.err'
20294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20295   (eval $ac_try) 2>&5
20296   ac_status=$?
20297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20298   (exit $ac_status); }; } &&
20299          { ac_try='test -s conftest.$ac_objext'
20300   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20301   (eval $ac_try) 2>&5
20302   ac_status=$?
20303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20304   (exit $ac_status); }; }; then
20305   ac_lo=$ac_mid; break
20306 else
20307   echo "$as_me: failed program was:" >&5
20308 sed 's/^/| /' conftest.$ac_ext >&5
20309
20310 ac_hi=`expr '(' $ac_mid ')' - 1`
20311                        if test $ac_mid -le $ac_hi; then
20312                          ac_lo= ac_hi=
20313                          break
20314                        fi
20315                        ac_mid=`expr 2 '*' $ac_mid`
20316 fi
20317 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20318   done
20319 else
20320   echo "$as_me: failed program was:" >&5
20321 sed 's/^/| /' conftest.$ac_ext >&5
20322
20323 ac_lo= ac_hi=
20324 fi
20325 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20326 fi
20327 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20328 # Binary search between lo and hi bounds.
20329 while test "x$ac_lo" != "x$ac_hi"; do
20330   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20331   cat >conftest.$ac_ext <<_ACEOF
20332 /* confdefs.h.  */
20333 _ACEOF
20334 cat confdefs.h >>conftest.$ac_ext
20335 cat >>conftest.$ac_ext <<_ACEOF
20336 /* end confdefs.h.  */
20337 $ac_includes_default
20338 struct { char filler; long long int field; } pgac_struct;
20339 int
20340 main ()
20341 {
20342 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20343 test_array [0] = 0
20344
20345   ;
20346   return 0;
20347 }
20348 _ACEOF
20349 rm -f conftest.$ac_objext
20350 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20351   (eval $ac_compile) 2>conftest.er1
20352   ac_status=$?
20353   grep -v '^ *+' conftest.er1 >conftest.err
20354   rm -f conftest.er1
20355   cat conftest.err >&5
20356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20357   (exit $ac_status); } &&
20358          { ac_try='test -z "$ac_c_werror_flag"
20359                          || test ! -s conftest.err'
20360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20361   (eval $ac_try) 2>&5
20362   ac_status=$?
20363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20364   (exit $ac_status); }; } &&
20365          { ac_try='test -s conftest.$ac_objext'
20366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20367   (eval $ac_try) 2>&5
20368   ac_status=$?
20369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20370   (exit $ac_status); }; }; then
20371   ac_hi=$ac_mid
20372 else
20373   echo "$as_me: failed program was:" >&5
20374 sed 's/^/| /' conftest.$ac_ext >&5
20375
20376 ac_lo=`expr '(' $ac_mid ')' + 1`
20377 fi
20378 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20379 done
20380 case $ac_lo in
20381 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20382 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20383 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20384    { (exit 1); exit 1; }; } ;;
20385 esac
20386 else
20387   if test "$cross_compiling" = yes; then
20388   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20389 See \`config.log' for more details." >&5
20390 echo "$as_me: error: cannot run test program while cross compiling
20391 See \`config.log' for more details." >&2;}
20392    { (exit 1); exit 1; }; }
20393 else
20394   cat >conftest.$ac_ext <<_ACEOF
20395 /* confdefs.h.  */
20396 _ACEOF
20397 cat confdefs.h >>conftest.$ac_ext
20398 cat >>conftest.$ac_ext <<_ACEOF
20399 /* end confdefs.h.  */
20400 $ac_includes_default
20401 struct { char filler; long long int field; } pgac_struct;
20402 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20403 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20404 #include <stdio.h>
20405 #include <stdlib.h>
20406 int
20407 main ()
20408 {
20409
20410   FILE *f = fopen ("conftest.val", "w");
20411   if (! f)
20412     exit (1);
20413   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20414     {
20415       long i = longval ();
20416       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20417         exit (1);
20418       fprintf (f, "%ld\n", i);
20419     }
20420   else
20421     {
20422       unsigned long i = ulongval ();
20423       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20424         exit (1);
20425       fprintf (f, "%lu\n", i);
20426     }
20427   exit (ferror (f) || fclose (f) != 0);
20428
20429   ;
20430   return 0;
20431 }
20432 _ACEOF
20433 rm -f conftest$ac_exeext
20434 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20435   (eval $ac_link) 2>&5
20436   ac_status=$?
20437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20438   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20440   (eval $ac_try) 2>&5
20441   ac_status=$?
20442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20443   (exit $ac_status); }; }; then
20444   pgac_cv_alignof_long_long_int=`cat conftest.val`
20445 else
20446   echo "$as_me: program exited with status $ac_status" >&5
20447 echo "$as_me: failed program was:" >&5
20448 sed 's/^/| /' conftest.$ac_ext >&5
20449
20450 ( exit $ac_status )
20451 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20452 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20453    { (exit 1); exit 1; }; }
20454 fi
20455 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20456 fi
20457 fi
20458 rm -f conftest.val
20459 else
20460   pgac_cv_alignof_long_long_int=0
20461 fi
20462 fi
20463 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20464 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20465 cat >>confdefs.h <<_ACEOF
20466 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20467 _ACEOF
20468
20469
20470 fi
20471 echo "$as_me:$LINENO: checking for double" >&5
20472 echo $ECHO_N "checking for double... $ECHO_C" >&6
20473 if test "${ac_cv_type_double+set}" = set; then
20474   echo $ECHO_N "(cached) $ECHO_C" >&6
20475 else
20476   cat >conftest.$ac_ext <<_ACEOF
20477 /* confdefs.h.  */
20478 _ACEOF
20479 cat confdefs.h >>conftest.$ac_ext
20480 cat >>conftest.$ac_ext <<_ACEOF
20481 /* end confdefs.h.  */
20482 $ac_includes_default
20483 int
20484 main ()
20485 {
20486 if ((double *) 0)
20487   return 0;
20488 if (sizeof (double))
20489   return 0;
20490   ;
20491   return 0;
20492 }
20493 _ACEOF
20494 rm -f conftest.$ac_objext
20495 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20496   (eval $ac_compile) 2>conftest.er1
20497   ac_status=$?
20498   grep -v '^ *+' conftest.er1 >conftest.err
20499   rm -f conftest.er1
20500   cat conftest.err >&5
20501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20502   (exit $ac_status); } &&
20503          { ac_try='test -z "$ac_c_werror_flag"
20504                          || test ! -s conftest.err'
20505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20506   (eval $ac_try) 2>&5
20507   ac_status=$?
20508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20509   (exit $ac_status); }; } &&
20510          { ac_try='test -s conftest.$ac_objext'
20511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20512   (eval $ac_try) 2>&5
20513   ac_status=$?
20514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20515   (exit $ac_status); }; }; then
20516   ac_cv_type_double=yes
20517 else
20518   echo "$as_me: failed program was:" >&5
20519 sed 's/^/| /' conftest.$ac_ext >&5
20520
20521 ac_cv_type_double=no
20522 fi
20523 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20524 fi
20525 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20526 echo "${ECHO_T}$ac_cv_type_double" >&6
20527
20528 echo "$as_me:$LINENO: checking alignment of double" >&5
20529 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20530 if test "${pgac_cv_alignof_double+set}" = set; then
20531   echo $ECHO_N "(cached) $ECHO_C" >&6
20532 else
20533   if test "$ac_cv_type_double" = yes; then
20534   if test "$cross_compiling" = yes; then
20535   # Depending upon the size, compute the lo and hi bounds.
20536 cat >conftest.$ac_ext <<_ACEOF
20537 /* confdefs.h.  */
20538 _ACEOF
20539 cat confdefs.h >>conftest.$ac_ext
20540 cat >>conftest.$ac_ext <<_ACEOF
20541 /* end confdefs.h.  */
20542 $ac_includes_default
20543 struct { char filler; double field; } pgac_struct;
20544 int
20545 main ()
20546 {
20547 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20548 test_array [0] = 0
20549
20550   ;
20551   return 0;
20552 }
20553 _ACEOF
20554 rm -f conftest.$ac_objext
20555 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20556   (eval $ac_compile) 2>conftest.er1
20557   ac_status=$?
20558   grep -v '^ *+' conftest.er1 >conftest.err
20559   rm -f conftest.er1
20560   cat conftest.err >&5
20561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20562   (exit $ac_status); } &&
20563          { ac_try='test -z "$ac_c_werror_flag"
20564                          || test ! -s conftest.err'
20565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20566   (eval $ac_try) 2>&5
20567   ac_status=$?
20568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20569   (exit $ac_status); }; } &&
20570          { ac_try='test -s conftest.$ac_objext'
20571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20572   (eval $ac_try) 2>&5
20573   ac_status=$?
20574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20575   (exit $ac_status); }; }; then
20576   ac_lo=0 ac_mid=0
20577   while :; do
20578     cat >conftest.$ac_ext <<_ACEOF
20579 /* confdefs.h.  */
20580 _ACEOF
20581 cat confdefs.h >>conftest.$ac_ext
20582 cat >>conftest.$ac_ext <<_ACEOF
20583 /* end confdefs.h.  */
20584 $ac_includes_default
20585 struct { char filler; double field; } pgac_struct;
20586 int
20587 main ()
20588 {
20589 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20590 test_array [0] = 0
20591
20592   ;
20593   return 0;
20594 }
20595 _ACEOF
20596 rm -f conftest.$ac_objext
20597 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20598   (eval $ac_compile) 2>conftest.er1
20599   ac_status=$?
20600   grep -v '^ *+' conftest.er1 >conftest.err
20601   rm -f conftest.er1
20602   cat conftest.err >&5
20603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20604   (exit $ac_status); } &&
20605          { ac_try='test -z "$ac_c_werror_flag"
20606                          || test ! -s conftest.err'
20607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20608   (eval $ac_try) 2>&5
20609   ac_status=$?
20610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20611   (exit $ac_status); }; } &&
20612          { ac_try='test -s conftest.$ac_objext'
20613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20614   (eval $ac_try) 2>&5
20615   ac_status=$?
20616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20617   (exit $ac_status); }; }; then
20618   ac_hi=$ac_mid; break
20619 else
20620   echo "$as_me: failed program was:" >&5
20621 sed 's/^/| /' conftest.$ac_ext >&5
20622
20623 ac_lo=`expr $ac_mid + 1`
20624                     if test $ac_lo -le $ac_mid; then
20625                       ac_lo= ac_hi=
20626                       break
20627                     fi
20628                     ac_mid=`expr 2 '*' $ac_mid + 1`
20629 fi
20630 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20631   done
20632 else
20633   echo "$as_me: failed program was:" >&5
20634 sed 's/^/| /' conftest.$ac_ext >&5
20635
20636 cat >conftest.$ac_ext <<_ACEOF
20637 /* confdefs.h.  */
20638 _ACEOF
20639 cat confdefs.h >>conftest.$ac_ext
20640 cat >>conftest.$ac_ext <<_ACEOF
20641 /* end confdefs.h.  */
20642 $ac_includes_default
20643 struct { char filler; double field; } pgac_struct;
20644 int
20645 main ()
20646 {
20647 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20648 test_array [0] = 0
20649
20650   ;
20651   return 0;
20652 }
20653 _ACEOF
20654 rm -f conftest.$ac_objext
20655 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20656   (eval $ac_compile) 2>conftest.er1
20657   ac_status=$?
20658   grep -v '^ *+' conftest.er1 >conftest.err
20659   rm -f conftest.er1
20660   cat conftest.err >&5
20661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20662   (exit $ac_status); } &&
20663          { ac_try='test -z "$ac_c_werror_flag"
20664                          || test ! -s conftest.err'
20665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20666   (eval $ac_try) 2>&5
20667   ac_status=$?
20668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20669   (exit $ac_status); }; } &&
20670          { ac_try='test -s conftest.$ac_objext'
20671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20672   (eval $ac_try) 2>&5
20673   ac_status=$?
20674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20675   (exit $ac_status); }; }; then
20676   ac_hi=-1 ac_mid=-1
20677   while :; do
20678     cat >conftest.$ac_ext <<_ACEOF
20679 /* confdefs.h.  */
20680 _ACEOF
20681 cat confdefs.h >>conftest.$ac_ext
20682 cat >>conftest.$ac_ext <<_ACEOF
20683 /* end confdefs.h.  */
20684 $ac_includes_default
20685 struct { char filler; double field; } pgac_struct;
20686 int
20687 main ()
20688 {
20689 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20690 test_array [0] = 0
20691
20692   ;
20693   return 0;
20694 }
20695 _ACEOF
20696 rm -f conftest.$ac_objext
20697 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20698   (eval $ac_compile) 2>conftest.er1
20699   ac_status=$?
20700   grep -v '^ *+' conftest.er1 >conftest.err
20701   rm -f conftest.er1
20702   cat conftest.err >&5
20703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20704   (exit $ac_status); } &&
20705          { ac_try='test -z "$ac_c_werror_flag"
20706                          || test ! -s conftest.err'
20707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20708   (eval $ac_try) 2>&5
20709   ac_status=$?
20710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20711   (exit $ac_status); }; } &&
20712          { ac_try='test -s conftest.$ac_objext'
20713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20714   (eval $ac_try) 2>&5
20715   ac_status=$?
20716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20717   (exit $ac_status); }; }; then
20718   ac_lo=$ac_mid; break
20719 else
20720   echo "$as_me: failed program was:" >&5
20721 sed 's/^/| /' conftest.$ac_ext >&5
20722
20723 ac_hi=`expr '(' $ac_mid ')' - 1`
20724                        if test $ac_mid -le $ac_hi; then
20725                          ac_lo= ac_hi=
20726                          break
20727                        fi
20728                        ac_mid=`expr 2 '*' $ac_mid`
20729 fi
20730 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20731   done
20732 else
20733   echo "$as_me: failed program was:" >&5
20734 sed 's/^/| /' conftest.$ac_ext >&5
20735
20736 ac_lo= ac_hi=
20737 fi
20738 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20739 fi
20740 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20741 # Binary search between lo and hi bounds.
20742 while test "x$ac_lo" != "x$ac_hi"; do
20743   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20744   cat >conftest.$ac_ext <<_ACEOF
20745 /* confdefs.h.  */
20746 _ACEOF
20747 cat confdefs.h >>conftest.$ac_ext
20748 cat >>conftest.$ac_ext <<_ACEOF
20749 /* end confdefs.h.  */
20750 $ac_includes_default
20751 struct { char filler; double field; } pgac_struct;
20752 int
20753 main ()
20754 {
20755 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20756 test_array [0] = 0
20757
20758   ;
20759   return 0;
20760 }
20761 _ACEOF
20762 rm -f conftest.$ac_objext
20763 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20764   (eval $ac_compile) 2>conftest.er1
20765   ac_status=$?
20766   grep -v '^ *+' conftest.er1 >conftest.err
20767   rm -f conftest.er1
20768   cat conftest.err >&5
20769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20770   (exit $ac_status); } &&
20771          { ac_try='test -z "$ac_c_werror_flag"
20772                          || test ! -s conftest.err'
20773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20774   (eval $ac_try) 2>&5
20775   ac_status=$?
20776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20777   (exit $ac_status); }; } &&
20778          { ac_try='test -s conftest.$ac_objext'
20779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20780   (eval $ac_try) 2>&5
20781   ac_status=$?
20782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20783   (exit $ac_status); }; }; then
20784   ac_hi=$ac_mid
20785 else
20786   echo "$as_me: failed program was:" >&5
20787 sed 's/^/| /' conftest.$ac_ext >&5
20788
20789 ac_lo=`expr '(' $ac_mid ')' + 1`
20790 fi
20791 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20792 done
20793 case $ac_lo in
20794 ?*) pgac_cv_alignof_double=$ac_lo;;
20795 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20796 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20797    { (exit 1); exit 1; }; } ;;
20798 esac
20799 else
20800   if test "$cross_compiling" = yes; then
20801   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20802 See \`config.log' for more details." >&5
20803 echo "$as_me: error: cannot run test program while cross compiling
20804 See \`config.log' for more details." >&2;}
20805    { (exit 1); exit 1; }; }
20806 else
20807   cat >conftest.$ac_ext <<_ACEOF
20808 /* confdefs.h.  */
20809 _ACEOF
20810 cat confdefs.h >>conftest.$ac_ext
20811 cat >>conftest.$ac_ext <<_ACEOF
20812 /* end confdefs.h.  */
20813 $ac_includes_default
20814 struct { char filler; double field; } pgac_struct;
20815 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20816 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20817 #include <stdio.h>
20818 #include <stdlib.h>
20819 int
20820 main ()
20821 {
20822
20823   FILE *f = fopen ("conftest.val", "w");
20824   if (! f)
20825     exit (1);
20826   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20827     {
20828       long i = longval ();
20829       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20830         exit (1);
20831       fprintf (f, "%ld\n", i);
20832     }
20833   else
20834     {
20835       unsigned long i = ulongval ();
20836       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20837         exit (1);
20838       fprintf (f, "%lu\n", i);
20839     }
20840   exit (ferror (f) || fclose (f) != 0);
20841
20842   ;
20843   return 0;
20844 }
20845 _ACEOF
20846 rm -f conftest$ac_exeext
20847 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20848   (eval $ac_link) 2>&5
20849   ac_status=$?
20850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20851   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20853   (eval $ac_try) 2>&5
20854   ac_status=$?
20855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20856   (exit $ac_status); }; }; then
20857   pgac_cv_alignof_double=`cat conftest.val`
20858 else
20859   echo "$as_me: program exited with status $ac_status" >&5
20860 echo "$as_me: failed program was:" >&5
20861 sed 's/^/| /' conftest.$ac_ext >&5
20862
20863 ( exit $ac_status )
20864 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20865 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20866    { (exit 1); exit 1; }; }
20867 fi
20868 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20869 fi
20870 fi
20871 rm -f conftest.val
20872 else
20873   pgac_cv_alignof_double=0
20874 fi
20875 fi
20876 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
20877 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
20878 cat >>confdefs.h <<_ACEOF
20879 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
20880 _ACEOF
20881
20882
20883
20884 # Compute maximum alignment of any basic type.
20885 # We assume long's alignment is at least as strong as char, short, or int;
20886 # but we must check long long (if it exists) and double.
20887
20888 MAX_ALIGNOF=$pgac_cv_alignof_long
20889 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
20890   MAX_ALIGNOF=$pgac_cv_alignof_double
20891 fi
20892 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
20893   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
20894 fi
20895
20896 cat >>confdefs.h <<_ACEOF
20897 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
20898 _ACEOF
20899
20900
20901
20902 # Some platforms predefine the types int8, int16, etc.  Only check
20903 # a (hopefully) representative subset.
20904 echo "$as_me:$LINENO: checking for int8" >&5
20905 echo $ECHO_N "checking for int8... $ECHO_C" >&6
20906 if test "${ac_cv_type_int8+set}" = set; then
20907   echo $ECHO_N "(cached) $ECHO_C" >&6
20908 else
20909   cat >conftest.$ac_ext <<_ACEOF
20910 /* confdefs.h.  */
20911 _ACEOF
20912 cat confdefs.h >>conftest.$ac_ext
20913 cat >>conftest.$ac_ext <<_ACEOF
20914 /* end confdefs.h.  */
20915 #include <stdio.h>
20916 #ifdef HAVE_SUPPORTDEFS_H
20917 #include <SupportDefs.h>
20918 #endif
20919
20920 int
20921 main ()
20922 {
20923 if ((int8 *) 0)
20924   return 0;
20925 if (sizeof (int8))
20926   return 0;
20927   ;
20928   return 0;
20929 }
20930 _ACEOF
20931 rm -f conftest.$ac_objext
20932 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20933   (eval $ac_compile) 2>conftest.er1
20934   ac_status=$?
20935   grep -v '^ *+' conftest.er1 >conftest.err
20936   rm -f conftest.er1
20937   cat conftest.err >&5
20938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20939   (exit $ac_status); } &&
20940          { ac_try='test -z "$ac_c_werror_flag"
20941                          || test ! -s conftest.err'
20942   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20943   (eval $ac_try) 2>&5
20944   ac_status=$?
20945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20946   (exit $ac_status); }; } &&
20947          { ac_try='test -s conftest.$ac_objext'
20948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20949   (eval $ac_try) 2>&5
20950   ac_status=$?
20951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20952   (exit $ac_status); }; }; then
20953   ac_cv_type_int8=yes
20954 else
20955   echo "$as_me: failed program was:" >&5
20956 sed 's/^/| /' conftest.$ac_ext >&5
20957
20958 ac_cv_type_int8=no
20959 fi
20960 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20961 fi
20962 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
20963 echo "${ECHO_T}$ac_cv_type_int8" >&6
20964 if test $ac_cv_type_int8 = yes; then
20965
20966 cat >>confdefs.h <<_ACEOF
20967 #define HAVE_INT8 1
20968 _ACEOF
20969
20970
20971 fi
20972 echo "$as_me:$LINENO: checking for uint8" >&5
20973 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
20974 if test "${ac_cv_type_uint8+set}" = set; then
20975   echo $ECHO_N "(cached) $ECHO_C" >&6
20976 else
20977   cat >conftest.$ac_ext <<_ACEOF
20978 /* confdefs.h.  */
20979 _ACEOF
20980 cat confdefs.h >>conftest.$ac_ext
20981 cat >>conftest.$ac_ext <<_ACEOF
20982 /* end confdefs.h.  */
20983 #include <stdio.h>
20984 #ifdef HAVE_SUPPORTDEFS_H
20985 #include <SupportDefs.h>
20986 #endif
20987
20988 int
20989 main ()
20990 {
20991 if ((uint8 *) 0)
20992   return 0;
20993 if (sizeof (uint8))
20994   return 0;
20995   ;
20996   return 0;
20997 }
20998 _ACEOF
20999 rm -f conftest.$ac_objext
21000 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21001   (eval $ac_compile) 2>conftest.er1
21002   ac_status=$?
21003   grep -v '^ *+' conftest.er1 >conftest.err
21004   rm -f conftest.er1
21005   cat conftest.err >&5
21006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21007   (exit $ac_status); } &&
21008          { ac_try='test -z "$ac_c_werror_flag"
21009                          || test ! -s conftest.err'
21010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21011   (eval $ac_try) 2>&5
21012   ac_status=$?
21013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21014   (exit $ac_status); }; } &&
21015          { ac_try='test -s conftest.$ac_objext'
21016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21017   (eval $ac_try) 2>&5
21018   ac_status=$?
21019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21020   (exit $ac_status); }; }; then
21021   ac_cv_type_uint8=yes
21022 else
21023   echo "$as_me: failed program was:" >&5
21024 sed 's/^/| /' conftest.$ac_ext >&5
21025
21026 ac_cv_type_uint8=no
21027 fi
21028 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21029 fi
21030 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
21031 echo "${ECHO_T}$ac_cv_type_uint8" >&6
21032 if test $ac_cv_type_uint8 = yes; then
21033
21034 cat >>confdefs.h <<_ACEOF
21035 #define HAVE_UINT8 1
21036 _ACEOF
21037
21038
21039 fi
21040 echo "$as_me:$LINENO: checking for int64" >&5
21041 echo $ECHO_N "checking for int64... $ECHO_C" >&6
21042 if test "${ac_cv_type_int64+set}" = set; then
21043   echo $ECHO_N "(cached) $ECHO_C" >&6
21044 else
21045   cat >conftest.$ac_ext <<_ACEOF
21046 /* confdefs.h.  */
21047 _ACEOF
21048 cat confdefs.h >>conftest.$ac_ext
21049 cat >>conftest.$ac_ext <<_ACEOF
21050 /* end confdefs.h.  */
21051 #include <stdio.h>
21052 #ifdef HAVE_SUPPORTDEFS_H
21053 #include <SupportDefs.h>
21054 #endif
21055
21056 int
21057 main ()
21058 {
21059 if ((int64 *) 0)
21060   return 0;
21061 if (sizeof (int64))
21062   return 0;
21063   ;
21064   return 0;
21065 }
21066 _ACEOF
21067 rm -f conftest.$ac_objext
21068 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21069   (eval $ac_compile) 2>conftest.er1
21070   ac_status=$?
21071   grep -v '^ *+' conftest.er1 >conftest.err
21072   rm -f conftest.er1
21073   cat conftest.err >&5
21074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21075   (exit $ac_status); } &&
21076          { ac_try='test -z "$ac_c_werror_flag"
21077                          || test ! -s conftest.err'
21078   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21079   (eval $ac_try) 2>&5
21080   ac_status=$?
21081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21082   (exit $ac_status); }; } &&
21083          { ac_try='test -s conftest.$ac_objext'
21084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21085   (eval $ac_try) 2>&5
21086   ac_status=$?
21087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21088   (exit $ac_status); }; }; then
21089   ac_cv_type_int64=yes
21090 else
21091   echo "$as_me: failed program was:" >&5
21092 sed 's/^/| /' conftest.$ac_ext >&5
21093
21094 ac_cv_type_int64=no
21095 fi
21096 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21097 fi
21098 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
21099 echo "${ECHO_T}$ac_cv_type_int64" >&6
21100 if test $ac_cv_type_int64 = yes; then
21101
21102 cat >>confdefs.h <<_ACEOF
21103 #define HAVE_INT64 1
21104 _ACEOF
21105
21106
21107 fi
21108 echo "$as_me:$LINENO: checking for uint64" >&5
21109 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
21110 if test "${ac_cv_type_uint64+set}" = set; then
21111   echo $ECHO_N "(cached) $ECHO_C" >&6
21112 else
21113   cat >conftest.$ac_ext <<_ACEOF
21114 /* confdefs.h.  */
21115 _ACEOF
21116 cat confdefs.h >>conftest.$ac_ext
21117 cat >>conftest.$ac_ext <<_ACEOF
21118 /* end confdefs.h.  */
21119 #include <stdio.h>
21120 #ifdef HAVE_SUPPORTDEFS_H
21121 #include <SupportDefs.h>
21122 #endif
21123
21124 int
21125 main ()
21126 {
21127 if ((uint64 *) 0)
21128   return 0;
21129 if (sizeof (uint64))
21130   return 0;
21131   ;
21132   return 0;
21133 }
21134 _ACEOF
21135 rm -f conftest.$ac_objext
21136 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21137   (eval $ac_compile) 2>conftest.er1
21138   ac_status=$?
21139   grep -v '^ *+' conftest.er1 >conftest.err
21140   rm -f conftest.er1
21141   cat conftest.err >&5
21142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21143   (exit $ac_status); } &&
21144          { ac_try='test -z "$ac_c_werror_flag"
21145                          || test ! -s conftest.err'
21146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21147   (eval $ac_try) 2>&5
21148   ac_status=$?
21149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21150   (exit $ac_status); }; } &&
21151          { ac_try='test -s conftest.$ac_objext'
21152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21153   (eval $ac_try) 2>&5
21154   ac_status=$?
21155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21156   (exit $ac_status); }; }; then
21157   ac_cv_type_uint64=yes
21158 else
21159   echo "$as_me: failed program was:" >&5
21160 sed 's/^/| /' conftest.$ac_ext >&5
21161
21162 ac_cv_type_uint64=no
21163 fi
21164 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21165 fi
21166 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
21167 echo "${ECHO_T}$ac_cv_type_uint64" >&6
21168 if test $ac_cv_type_uint64 = yes; then
21169
21170 cat >>confdefs.h <<_ACEOF
21171 #define HAVE_UINT64 1
21172 _ACEOF
21173
21174
21175 fi
21176
21177
21178 # We also check for sig_atomic_t, which *should* be defined per ANSI
21179 # C, but is missing on some old platforms.
21180 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
21181 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
21182 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
21183   echo $ECHO_N "(cached) $ECHO_C" >&6
21184 else
21185   cat >conftest.$ac_ext <<_ACEOF
21186 /* confdefs.h.  */
21187 _ACEOF
21188 cat confdefs.h >>conftest.$ac_ext
21189 cat >>conftest.$ac_ext <<_ACEOF
21190 /* end confdefs.h.  */
21191 #include <signal.h>
21192
21193 int
21194 main ()
21195 {
21196 if ((sig_atomic_t *) 0)
21197   return 0;
21198 if (sizeof (sig_atomic_t))
21199   return 0;
21200   ;
21201   return 0;
21202 }
21203 _ACEOF
21204 rm -f conftest.$ac_objext
21205 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21206   (eval $ac_compile) 2>conftest.er1
21207   ac_status=$?
21208   grep -v '^ *+' conftest.er1 >conftest.err
21209   rm -f conftest.er1
21210   cat conftest.err >&5
21211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21212   (exit $ac_status); } &&
21213          { ac_try='test -z "$ac_c_werror_flag"
21214                          || test ! -s conftest.err'
21215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21216   (eval $ac_try) 2>&5
21217   ac_status=$?
21218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21219   (exit $ac_status); }; } &&
21220          { ac_try='test -s conftest.$ac_objext'
21221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21222   (eval $ac_try) 2>&5
21223   ac_status=$?
21224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21225   (exit $ac_status); }; }; then
21226   ac_cv_type_sig_atomic_t=yes
21227 else
21228   echo "$as_me: failed program was:" >&5
21229 sed 's/^/| /' conftest.$ac_ext >&5
21230
21231 ac_cv_type_sig_atomic_t=no
21232 fi
21233 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21234 fi
21235 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
21236 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
21237 if test $ac_cv_type_sig_atomic_t = yes; then
21238
21239 cat >>confdefs.h <<_ACEOF
21240 #define HAVE_SIG_ATOMIC_T 1
21241 _ACEOF
21242
21243
21244 fi
21245
21246
21247
21248 if test x"$template" != x"win32"
21249 then
21250 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
21251 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
21252 if test "${pgac_cv_func_posix_signals+set}" = set; then
21253   echo $ECHO_N "(cached) $ECHO_C" >&6
21254 else
21255   cat >conftest.$ac_ext <<_ACEOF
21256 /* confdefs.h.  */
21257 _ACEOF
21258 cat confdefs.h >>conftest.$ac_ext
21259 cat >>conftest.$ac_ext <<_ACEOF
21260 /* end confdefs.h.  */
21261 #include <signal.h>
21262
21263 int
21264 main ()
21265 {
21266 struct sigaction act, oact;
21267 sigemptyset(&act.sa_mask);
21268 act.sa_flags = SA_RESTART;
21269 sigaction(0, &act, &oact);
21270   ;
21271   return 0;
21272 }
21273 _ACEOF
21274 rm -f conftest.$ac_objext conftest$ac_exeext
21275 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21276   (eval $ac_link) 2>conftest.er1
21277   ac_status=$?
21278   grep -v '^ *+' conftest.er1 >conftest.err
21279   rm -f conftest.er1
21280   cat conftest.err >&5
21281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21282   (exit $ac_status); } &&
21283          { ac_try='test -z "$ac_c_werror_flag"
21284                          || test ! -s conftest.err'
21285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21286   (eval $ac_try) 2>&5
21287   ac_status=$?
21288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21289   (exit $ac_status); }; } &&
21290          { ac_try='test -s conftest$ac_exeext'
21291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21292   (eval $ac_try) 2>&5
21293   ac_status=$?
21294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21295   (exit $ac_status); }; }; then
21296   pgac_cv_func_posix_signals=yes
21297 else
21298   echo "$as_me: failed program was:" >&5
21299 sed 's/^/| /' conftest.$ac_ext >&5
21300
21301 pgac_cv_func_posix_signals=no
21302 fi
21303 rm -f conftest.err conftest.$ac_objext \
21304       conftest$ac_exeext conftest.$ac_ext
21305 fi
21306 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
21307 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
21308 if test x"$pgac_cv_func_posix_signals" = xyes ; then
21309
21310 cat >>confdefs.h <<\_ACEOF
21311 #define HAVE_POSIX_SIGNALS
21312 _ACEOF
21313
21314 fi
21315 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
21316
21317 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
21318   { { echo "$as_me:$LINENO: error:
21319 *** Thread-safety requires POSIX signals, which are not supported by your
21320 *** operating system.
21321 " >&5
21322 echo "$as_me: error:
21323 *** Thread-safety requires POSIX signals, which are not supported by your
21324 *** operating system.
21325 " >&2;}
21326    { (exit 1); exit 1; }; }
21327 fi
21328 fi
21329
21330 if test $ac_cv_func_fseeko = yes; then
21331 # Check whether --enable-largefile or --disable-largefile was given.
21332 if test "${enable_largefile+set}" = set; then
21333   enableval="$enable_largefile"
21334
21335 fi;
21336 if test "$enable_largefile" != no; then
21337
21338   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
21339 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
21340 if test "${ac_cv_sys_largefile_CC+set}" = set; then
21341   echo $ECHO_N "(cached) $ECHO_C" >&6
21342 else
21343   ac_cv_sys_largefile_CC=no
21344      if test "$GCC" != yes; then
21345        ac_save_CC=$CC
21346        while :; do
21347          # IRIX 6.2 and later do not support large files by default,
21348          # so use the C compiler's -n32 option if that helps.
21349          cat >conftest.$ac_ext <<_ACEOF
21350 /* confdefs.h.  */
21351 _ACEOF
21352 cat confdefs.h >>conftest.$ac_ext
21353 cat >>conftest.$ac_ext <<_ACEOF
21354 /* end confdefs.h.  */
21355 #include <sys/types.h>
21356  /* Check that off_t can represent 2**63 - 1 correctly.
21357     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21358     since some C++ compilers masquerading as C compilers
21359     incorrectly reject 9223372036854775807.  */
21360 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21361   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21362                        && LARGE_OFF_T % 2147483647 == 1)
21363                       ? 1 : -1];
21364 int
21365 main ()
21366 {
21367
21368   ;
21369   return 0;
21370 }
21371 _ACEOF
21372          rm -f conftest.$ac_objext
21373 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21374   (eval $ac_compile) 2>conftest.er1
21375   ac_status=$?
21376   grep -v '^ *+' conftest.er1 >conftest.err
21377   rm -f conftest.er1
21378   cat conftest.err >&5
21379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21380   (exit $ac_status); } &&
21381          { ac_try='test -z "$ac_c_werror_flag"
21382                          || test ! -s conftest.err'
21383   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21384   (eval $ac_try) 2>&5
21385   ac_status=$?
21386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21387   (exit $ac_status); }; } &&
21388          { ac_try='test -s conftest.$ac_objext'
21389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21390   (eval $ac_try) 2>&5
21391   ac_status=$?
21392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21393   (exit $ac_status); }; }; then
21394   break
21395 else
21396   echo "$as_me: failed program was:" >&5
21397 sed 's/^/| /' conftest.$ac_ext >&5
21398
21399 fi
21400 rm -f conftest.err conftest.$ac_objext
21401          CC="$CC -n32"
21402          rm -f conftest.$ac_objext
21403 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21404   (eval $ac_compile) 2>conftest.er1
21405   ac_status=$?
21406   grep -v '^ *+' conftest.er1 >conftest.err
21407   rm -f conftest.er1
21408   cat conftest.err >&5
21409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21410   (exit $ac_status); } &&
21411          { ac_try='test -z "$ac_c_werror_flag"
21412                          || test ! -s conftest.err'
21413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21414   (eval $ac_try) 2>&5
21415   ac_status=$?
21416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21417   (exit $ac_status); }; } &&
21418          { ac_try='test -s conftest.$ac_objext'
21419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21420   (eval $ac_try) 2>&5
21421   ac_status=$?
21422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21423   (exit $ac_status); }; }; then
21424   ac_cv_sys_largefile_CC=' -n32'; break
21425 else
21426   echo "$as_me: failed program was:" >&5
21427 sed 's/^/| /' conftest.$ac_ext >&5
21428
21429 fi
21430 rm -f conftest.err conftest.$ac_objext
21431          break
21432        done
21433        CC=$ac_save_CC
21434        rm -f conftest.$ac_ext
21435     fi
21436 fi
21437 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21438 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21439   if test "$ac_cv_sys_largefile_CC" != no; then
21440     CC=$CC$ac_cv_sys_largefile_CC
21441   fi
21442
21443   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21444 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21445 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21446   echo $ECHO_N "(cached) $ECHO_C" >&6
21447 else
21448   while :; do
21449   ac_cv_sys_file_offset_bits=no
21450   cat >conftest.$ac_ext <<_ACEOF
21451 /* confdefs.h.  */
21452 _ACEOF
21453 cat confdefs.h >>conftest.$ac_ext
21454 cat >>conftest.$ac_ext <<_ACEOF
21455 /* end confdefs.h.  */
21456 #include <sys/types.h>
21457  /* Check that off_t can represent 2**63 - 1 correctly.
21458     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21459     since some C++ compilers masquerading as C compilers
21460     incorrectly reject 9223372036854775807.  */
21461 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21462   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21463                        && LARGE_OFF_T % 2147483647 == 1)
21464                       ? 1 : -1];
21465 int
21466 main ()
21467 {
21468
21469   ;
21470   return 0;
21471 }
21472 _ACEOF
21473 rm -f conftest.$ac_objext
21474 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21475   (eval $ac_compile) 2>conftest.er1
21476   ac_status=$?
21477   grep -v '^ *+' conftest.er1 >conftest.err
21478   rm -f conftest.er1
21479   cat conftest.err >&5
21480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21481   (exit $ac_status); } &&
21482          { ac_try='test -z "$ac_c_werror_flag"
21483                          || test ! -s conftest.err'
21484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21485   (eval $ac_try) 2>&5
21486   ac_status=$?
21487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21488   (exit $ac_status); }; } &&
21489          { ac_try='test -s conftest.$ac_objext'
21490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21491   (eval $ac_try) 2>&5
21492   ac_status=$?
21493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21494   (exit $ac_status); }; }; then
21495   break
21496 else
21497   echo "$as_me: failed program was:" >&5
21498 sed 's/^/| /' conftest.$ac_ext >&5
21499
21500 fi
21501 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21502   cat >conftest.$ac_ext <<_ACEOF
21503 /* confdefs.h.  */
21504 _ACEOF
21505 cat confdefs.h >>conftest.$ac_ext
21506 cat >>conftest.$ac_ext <<_ACEOF
21507 /* end confdefs.h.  */
21508 #define _FILE_OFFSET_BITS 64
21509 #include <sys/types.h>
21510  /* Check that off_t can represent 2**63 - 1 correctly.
21511     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21512     since some C++ compilers masquerading as C compilers
21513     incorrectly reject 9223372036854775807.  */
21514 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21515   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21516                        && LARGE_OFF_T % 2147483647 == 1)
21517                       ? 1 : -1];
21518 int
21519 main ()
21520 {
21521
21522   ;
21523   return 0;
21524 }
21525 _ACEOF
21526 rm -f conftest.$ac_objext
21527 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21528   (eval $ac_compile) 2>conftest.er1
21529   ac_status=$?
21530   grep -v '^ *+' conftest.er1 >conftest.err
21531   rm -f conftest.er1
21532   cat conftest.err >&5
21533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21534   (exit $ac_status); } &&
21535          { ac_try='test -z "$ac_c_werror_flag"
21536                          || test ! -s conftest.err'
21537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21538   (eval $ac_try) 2>&5
21539   ac_status=$?
21540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21541   (exit $ac_status); }; } &&
21542          { ac_try='test -s conftest.$ac_objext'
21543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21544   (eval $ac_try) 2>&5
21545   ac_status=$?
21546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21547   (exit $ac_status); }; }; then
21548   ac_cv_sys_file_offset_bits=64; break
21549 else
21550   echo "$as_me: failed program was:" >&5
21551 sed 's/^/| /' conftest.$ac_ext >&5
21552
21553 fi
21554 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21555   break
21556 done
21557 fi
21558 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21559 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21560 if test "$ac_cv_sys_file_offset_bits" != no; then
21561
21562 cat >>confdefs.h <<_ACEOF
21563 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21564 _ACEOF
21565
21566 fi
21567 rm -f conftest*
21568   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21569 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21570 if test "${ac_cv_sys_large_files+set}" = set; then
21571   echo $ECHO_N "(cached) $ECHO_C" >&6
21572 else
21573   while :; do
21574   ac_cv_sys_large_files=no
21575   cat >conftest.$ac_ext <<_ACEOF
21576 /* confdefs.h.  */
21577 _ACEOF
21578 cat confdefs.h >>conftest.$ac_ext
21579 cat >>conftest.$ac_ext <<_ACEOF
21580 /* end confdefs.h.  */
21581 #include <sys/types.h>
21582  /* Check that off_t can represent 2**63 - 1 correctly.
21583     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21584     since some C++ compilers masquerading as C compilers
21585     incorrectly reject 9223372036854775807.  */
21586 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21587   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21588                        && LARGE_OFF_T % 2147483647 == 1)
21589                       ? 1 : -1];
21590 int
21591 main ()
21592 {
21593
21594   ;
21595   return 0;
21596 }
21597 _ACEOF
21598 rm -f conftest.$ac_objext
21599 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21600   (eval $ac_compile) 2>conftest.er1
21601   ac_status=$?
21602   grep -v '^ *+' conftest.er1 >conftest.err
21603   rm -f conftest.er1
21604   cat conftest.err >&5
21605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21606   (exit $ac_status); } &&
21607          { ac_try='test -z "$ac_c_werror_flag"
21608                          || test ! -s conftest.err'
21609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21610   (eval $ac_try) 2>&5
21611   ac_status=$?
21612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21613   (exit $ac_status); }; } &&
21614          { ac_try='test -s conftest.$ac_objext'
21615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21616   (eval $ac_try) 2>&5
21617   ac_status=$?
21618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21619   (exit $ac_status); }; }; then
21620   break
21621 else
21622   echo "$as_me: failed program was:" >&5
21623 sed 's/^/| /' conftest.$ac_ext >&5
21624
21625 fi
21626 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21627   cat >conftest.$ac_ext <<_ACEOF
21628 /* confdefs.h.  */
21629 _ACEOF
21630 cat confdefs.h >>conftest.$ac_ext
21631 cat >>conftest.$ac_ext <<_ACEOF
21632 /* end confdefs.h.  */
21633 #define _LARGE_FILES 1
21634 #include <sys/types.h>
21635  /* Check that off_t can represent 2**63 - 1 correctly.
21636     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21637     since some C++ compilers masquerading as C compilers
21638     incorrectly reject 9223372036854775807.  */
21639 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21640   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21641                        && LARGE_OFF_T % 2147483647 == 1)
21642                       ? 1 : -1];
21643 int
21644 main ()
21645 {
21646
21647   ;
21648   return 0;
21649 }
21650 _ACEOF
21651 rm -f conftest.$ac_objext
21652 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21653   (eval $ac_compile) 2>conftest.er1
21654   ac_status=$?
21655   grep -v '^ *+' conftest.er1 >conftest.err
21656   rm -f conftest.er1
21657   cat conftest.err >&5
21658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21659   (exit $ac_status); } &&
21660          { ac_try='test -z "$ac_c_werror_flag"
21661                          || test ! -s conftest.err'
21662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21663   (eval $ac_try) 2>&5
21664   ac_status=$?
21665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21666   (exit $ac_status); }; } &&
21667          { ac_try='test -s conftest.$ac_objext'
21668   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21669   (eval $ac_try) 2>&5
21670   ac_status=$?
21671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21672   (exit $ac_status); }; }; then
21673   ac_cv_sys_large_files=1; break
21674 else
21675   echo "$as_me: failed program was:" >&5
21676 sed 's/^/| /' conftest.$ac_ext >&5
21677
21678 fi
21679 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21680   break
21681 done
21682 fi
21683 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
21684 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
21685 if test "$ac_cv_sys_large_files" != no; then
21686
21687 cat >>confdefs.h <<_ACEOF
21688 #define _LARGE_FILES $ac_cv_sys_large_files
21689 _ACEOF
21690
21691 fi
21692 rm -f conftest*
21693 fi
21694
21695 fi
21696
21697 # SunOS doesn't handle negative byte comparisons properly with +/- return
21698 echo "$as_me:$LINENO: checking for working memcmp" >&5
21699 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
21700 if test "${ac_cv_func_memcmp_working+set}" = set; then
21701   echo $ECHO_N "(cached) $ECHO_C" >&6
21702 else
21703   if test "$cross_compiling" = yes; then
21704   ac_cv_func_memcmp_working=no
21705 else
21706   cat >conftest.$ac_ext <<_ACEOF
21707 /* confdefs.h.  */
21708 _ACEOF
21709 cat confdefs.h >>conftest.$ac_ext
21710 cat >>conftest.$ac_ext <<_ACEOF
21711 /* end confdefs.h.  */
21712 $ac_includes_default
21713 int
21714 main ()
21715 {
21716
21717   /* Some versions of memcmp are not 8-bit clean.  */
21718   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21719   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
21720     exit (1);
21721
21722   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
21723      or more and with at least one buffer not starting on a 4-byte boundary.
21724      William Lewis provided this test program.   */
21725   {
21726     char foo[21];
21727     char bar[21];
21728     int i;
21729     for (i = 0; i < 4; i++)
21730       {
21731         char *a = foo + i;
21732         char *b = bar + i;
21733         strcpy (a, "--------01111111");
21734         strcpy (b, "--------10000000");
21735         if (memcmp (a, b, 16) >= 0)
21736           exit (1);
21737       }
21738     exit (0);
21739   }
21740
21741   ;
21742   return 0;
21743 }
21744 _ACEOF
21745 rm -f conftest$ac_exeext
21746 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21747   (eval $ac_link) 2>&5
21748   ac_status=$?
21749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21750   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21752   (eval $ac_try) 2>&5
21753   ac_status=$?
21754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21755   (exit $ac_status); }; }; then
21756   ac_cv_func_memcmp_working=yes
21757 else
21758   echo "$as_me: program exited with status $ac_status" >&5
21759 echo "$as_me: failed program was:" >&5
21760 sed 's/^/| /' conftest.$ac_ext >&5
21761
21762 ( exit $ac_status )
21763 ac_cv_func_memcmp_working=no
21764 fi
21765 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21766 fi
21767 fi
21768 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21769 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21770 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21771     "memcmp.$ac_objext"   | \
21772   *" memcmp.$ac_objext"   | \
21773     "memcmp.$ac_objext "* | \
21774   *" memcmp.$ac_objext "* ) ;;
21775   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21776 esac
21777
21778
21779
21780
21781 # Select semaphore implementation type.
21782 if test "$PORTNAME" != "win32"; then
21783   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21784
21785 cat >>confdefs.h <<\_ACEOF
21786 #define USE_NAMED_POSIX_SEMAPHORES 1
21787 _ACEOF
21788
21789     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21790   else
21791     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21792
21793 cat >>confdefs.h <<\_ACEOF
21794 #define USE_UNNAMED_POSIX_SEMAPHORES 1
21795 _ACEOF
21796
21797       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21798     else
21799
21800 cat >>confdefs.h <<\_ACEOF
21801 #define USE_SYSV_SEMAPHORES 1
21802 _ACEOF
21803
21804       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21805     fi
21806   fi
21807 else
21808
21809 cat >>confdefs.h <<\_ACEOF
21810 #define USE_WIN32_SEMAPHORES 1
21811 _ACEOF
21812
21813   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
21814 fi
21815
21816
21817 # Select shared-memory implementation type.
21818
21819 cat >>confdefs.h <<\_ACEOF
21820 #define USE_SYSV_SHARED_MEMORY 1
21821 _ACEOF
21822
21823 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
21824
21825
21826 # If not set in template file, set bytes to use libc memset()
21827 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
21828   MEMSET_LOOP_LIMIT=1024
21829 fi
21830
21831 cat >>confdefs.h <<_ACEOF
21832 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
21833 _ACEOF
21834
21835
21836
21837 if test "$enable_nls" = yes ; then
21838
21839   echo "$as_me:$LINENO: checking for library containing gettext" >&5
21840 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
21841 if test "${ac_cv_search_gettext+set}" = set; then
21842   echo $ECHO_N "(cached) $ECHO_C" >&6
21843 else
21844   ac_func_search_save_LIBS=$LIBS
21845 ac_cv_search_gettext=no
21846 cat >conftest.$ac_ext <<_ACEOF
21847 /* confdefs.h.  */
21848 _ACEOF
21849 cat confdefs.h >>conftest.$ac_ext
21850 cat >>conftest.$ac_ext <<_ACEOF
21851 /* end confdefs.h.  */
21852
21853 /* Override any gcc2 internal prototype to avoid an error.  */
21854 #ifdef __cplusplus
21855 extern "C"
21856 #endif
21857 /* We use char because int might match the return type of a gcc2
21858    builtin and then its argument prototype would still apply.  */
21859 char gettext ();
21860 int
21861 main ()
21862 {
21863 gettext ();
21864   ;
21865   return 0;
21866 }
21867 _ACEOF
21868 rm -f conftest.$ac_objext conftest$ac_exeext
21869 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21870   (eval $ac_link) 2>conftest.er1
21871   ac_status=$?
21872   grep -v '^ *+' conftest.er1 >conftest.err
21873   rm -f conftest.er1
21874   cat conftest.err >&5
21875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21876   (exit $ac_status); } &&
21877          { ac_try='test -z "$ac_c_werror_flag"
21878                          || test ! -s conftest.err'
21879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21880   (eval $ac_try) 2>&5
21881   ac_status=$?
21882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21883   (exit $ac_status); }; } &&
21884          { ac_try='test -s conftest$ac_exeext'
21885   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21886   (eval $ac_try) 2>&5
21887   ac_status=$?
21888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21889   (exit $ac_status); }; }; then
21890   ac_cv_search_gettext="none required"
21891 else
21892   echo "$as_me: failed program was:" >&5
21893 sed 's/^/| /' conftest.$ac_ext >&5
21894
21895 fi
21896 rm -f conftest.err conftest.$ac_objext \
21897       conftest$ac_exeext conftest.$ac_ext
21898 if test "$ac_cv_search_gettext" = no; then
21899   for ac_lib in intl; do
21900     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21901     cat >conftest.$ac_ext <<_ACEOF
21902 /* confdefs.h.  */
21903 _ACEOF
21904 cat confdefs.h >>conftest.$ac_ext
21905 cat >>conftest.$ac_ext <<_ACEOF
21906 /* end confdefs.h.  */
21907
21908 /* Override any gcc2 internal prototype to avoid an error.  */
21909 #ifdef __cplusplus
21910 extern "C"
21911 #endif
21912 /* We use char because int might match the return type of a gcc2
21913    builtin and then its argument prototype would still apply.  */
21914 char gettext ();
21915 int
21916 main ()
21917 {
21918 gettext ();
21919   ;
21920   return 0;
21921 }
21922 _ACEOF
21923 rm -f conftest.$ac_objext conftest$ac_exeext
21924 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21925   (eval $ac_link) 2>conftest.er1
21926   ac_status=$?
21927   grep -v '^ *+' conftest.er1 >conftest.err
21928   rm -f conftest.er1
21929   cat conftest.err >&5
21930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21931   (exit $ac_status); } &&
21932          { ac_try='test -z "$ac_c_werror_flag"
21933                          || test ! -s conftest.err'
21934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21935   (eval $ac_try) 2>&5
21936   ac_status=$?
21937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21938   (exit $ac_status); }; } &&
21939          { ac_try='test -s conftest$ac_exeext'
21940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21941   (eval $ac_try) 2>&5
21942   ac_status=$?
21943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21944   (exit $ac_status); }; }; then
21945   ac_cv_search_gettext="-l$ac_lib"
21946 break
21947 else
21948   echo "$as_me: failed program was:" >&5
21949 sed 's/^/| /' conftest.$ac_ext >&5
21950
21951 fi
21952 rm -f conftest.err conftest.$ac_objext \
21953       conftest$ac_exeext conftest.$ac_ext
21954   done
21955 fi
21956 LIBS=$ac_func_search_save_LIBS
21957 fi
21958 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
21959 echo "${ECHO_T}$ac_cv_search_gettext" >&6
21960 if test "$ac_cv_search_gettext" != no; then
21961   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
21962
21963 else
21964   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
21965 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
21966    { (exit 1); exit 1; }; }
21967 fi
21968
21969   if test "${ac_cv_header_libintl_h+set}" = set; then
21970   echo "$as_me:$LINENO: checking for libintl.h" >&5
21971 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21972 if test "${ac_cv_header_libintl_h+set}" = set; then
21973   echo $ECHO_N "(cached) $ECHO_C" >&6
21974 fi
21975 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21976 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21977 else
21978   # Is the header compilable?
21979 echo "$as_me:$LINENO: checking libintl.h usability" >&5
21980 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
21981 cat >conftest.$ac_ext <<_ACEOF
21982 /* confdefs.h.  */
21983 _ACEOF
21984 cat confdefs.h >>conftest.$ac_ext
21985 cat >>conftest.$ac_ext <<_ACEOF
21986 /* end confdefs.h.  */
21987 $ac_includes_default
21988 #include <libintl.h>
21989 _ACEOF
21990 rm -f conftest.$ac_objext
21991 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21992   (eval $ac_compile) 2>conftest.er1
21993   ac_status=$?
21994   grep -v '^ *+' conftest.er1 >conftest.err
21995   rm -f conftest.er1
21996   cat conftest.err >&5
21997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21998   (exit $ac_status); } &&
21999          { ac_try='test -z "$ac_c_werror_flag"
22000                          || test ! -s conftest.err'
22001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22002   (eval $ac_try) 2>&5
22003   ac_status=$?
22004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22005   (exit $ac_status); }; } &&
22006          { ac_try='test -s conftest.$ac_objext'
22007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22008   (eval $ac_try) 2>&5
22009   ac_status=$?
22010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22011   (exit $ac_status); }; }; then
22012   ac_header_compiler=yes
22013 else
22014   echo "$as_me: failed program was:" >&5
22015 sed 's/^/| /' conftest.$ac_ext >&5
22016
22017 ac_header_compiler=no
22018 fi
22019 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22020 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22021 echo "${ECHO_T}$ac_header_compiler" >&6
22022
22023 # Is the header present?
22024 echo "$as_me:$LINENO: checking libintl.h presence" >&5
22025 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
22026 cat >conftest.$ac_ext <<_ACEOF
22027 /* confdefs.h.  */
22028 _ACEOF
22029 cat confdefs.h >>conftest.$ac_ext
22030 cat >>conftest.$ac_ext <<_ACEOF
22031 /* end confdefs.h.  */
22032 #include <libintl.h>
22033 _ACEOF
22034 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22035   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22036   ac_status=$?
22037   grep -v '^ *+' conftest.er1 >conftest.err
22038   rm -f conftest.er1
22039   cat conftest.err >&5
22040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22041   (exit $ac_status); } >/dev/null; then
22042   if test -s conftest.err; then
22043     ac_cpp_err=$ac_c_preproc_warn_flag
22044     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22045   else
22046     ac_cpp_err=
22047   fi
22048 else
22049   ac_cpp_err=yes
22050 fi
22051 if test -z "$ac_cpp_err"; then
22052   ac_header_preproc=yes
22053 else
22054   echo "$as_me: failed program was:" >&5
22055 sed 's/^/| /' conftest.$ac_ext >&5
22056
22057   ac_header_preproc=no
22058 fi
22059 rm -f conftest.err conftest.$ac_ext
22060 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22061 echo "${ECHO_T}$ac_header_preproc" >&6
22062
22063 # So?  What about this header?
22064 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22065   yes:no: )
22066     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22067 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22068     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
22069 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
22070     ac_header_preproc=yes
22071     ;;
22072   no:yes:* )
22073     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
22074 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
22075     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
22076 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
22077     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
22078 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
22079     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
22080 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22081     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
22082 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
22083     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
22084 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
22085     (
22086       cat <<\_ASBOX
22087 ## ---------------------------------------- ##
22088 ## Report this to pgsql-bugs@postgresql.org ##
22089 ## ---------------------------------------- ##
22090 _ASBOX
22091     ) |
22092       sed "s/^/$as_me: WARNING:     /" >&2
22093     ;;
22094 esac
22095 echo "$as_me:$LINENO: checking for libintl.h" >&5
22096 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
22097 if test "${ac_cv_header_libintl_h+set}" = set; then
22098   echo $ECHO_N "(cached) $ECHO_C" >&6
22099 else
22100   ac_cv_header_libintl_h=$ac_header_preproc
22101 fi
22102 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
22103 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
22104
22105 fi
22106 if test $ac_cv_header_libintl_h = yes; then
22107   :
22108 else
22109   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
22110 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
22111    { (exit 1); exit 1; }; }
22112 fi
22113
22114
22115   for ac_prog in msgfmt
22116 do
22117   # Extract the first word of "$ac_prog", so it can be a program name with args.
22118 set dummy $ac_prog; ac_word=$2
22119 echo "$as_me:$LINENO: checking for $ac_word" >&5
22120 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22121 if test "${ac_cv_prog_MSGFMT+set}" = set; then
22122   echo $ECHO_N "(cached) $ECHO_C" >&6
22123 else
22124   if test -n "$MSGFMT"; then
22125   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
22126 else
22127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22128 for as_dir in $PATH
22129 do
22130   IFS=$as_save_IFS
22131   test -z "$as_dir" && as_dir=.
22132   for ac_exec_ext in '' $ac_executable_extensions; do
22133   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22134     ac_cv_prog_MSGFMT="$ac_prog"
22135     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22136     break 2
22137   fi
22138 done
22139 done
22140
22141 fi
22142 fi
22143 MSGFMT=$ac_cv_prog_MSGFMT
22144 if test -n "$MSGFMT"; then
22145   echo "$as_me:$LINENO: result: $MSGFMT" >&5
22146 echo "${ECHO_T}$MSGFMT" >&6
22147 else
22148   echo "$as_me:$LINENO: result: no" >&5
22149 echo "${ECHO_T}no" >&6
22150 fi
22151
22152   test -n "$MSGFMT" && break
22153 done
22154
22155   if test -z "$MSGFMT"; then
22156     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
22157 echo "$as_me: error: msgfmt is required for NLS" >&2;}
22158    { (exit 1); exit 1; }; }
22159   fi
22160   for ac_prog in msgmerge
22161 do
22162   # Extract the first word of "$ac_prog", so it can be a program name with args.
22163 set dummy $ac_prog; ac_word=$2
22164 echo "$as_me:$LINENO: checking for $ac_word" >&5
22165 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22166 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
22167   echo $ECHO_N "(cached) $ECHO_C" >&6
22168 else
22169   if test -n "$MSGMERGE"; then
22170   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
22171 else
22172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22173 for as_dir in $PATH
22174 do
22175   IFS=$as_save_IFS
22176   test -z "$as_dir" && as_dir=.
22177   for ac_exec_ext in '' $ac_executable_extensions; do
22178   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22179     ac_cv_prog_MSGMERGE="$ac_prog"
22180     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22181     break 2
22182   fi
22183 done
22184 done
22185
22186 fi
22187 fi
22188 MSGMERGE=$ac_cv_prog_MSGMERGE
22189 if test -n "$MSGMERGE"; then
22190   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
22191 echo "${ECHO_T}$MSGMERGE" >&6
22192 else
22193   echo "$as_me:$LINENO: result: no" >&5
22194 echo "${ECHO_T}no" >&6
22195 fi
22196
22197   test -n "$MSGMERGE" && break
22198 done
22199
22200   for ac_prog in xgettext
22201 do
22202   # Extract the first word of "$ac_prog", so it can be a program name with args.
22203 set dummy $ac_prog; ac_word=$2
22204 echo "$as_me:$LINENO: checking for $ac_word" >&5
22205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22206 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
22207   echo $ECHO_N "(cached) $ECHO_C" >&6
22208 else
22209   if test -n "$XGETTEXT"; then
22210   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
22211 else
22212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22213 for as_dir in $PATH
22214 do
22215   IFS=$as_save_IFS
22216   test -z "$as_dir" && as_dir=.
22217   for ac_exec_ext in '' $ac_executable_extensions; do
22218   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22219     ac_cv_prog_XGETTEXT="$ac_prog"
22220     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22221     break 2
22222   fi
22223 done
22224 done
22225
22226 fi
22227 fi
22228 XGETTEXT=$ac_cv_prog_XGETTEXT
22229 if test -n "$XGETTEXT"; then
22230   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
22231 echo "${ECHO_T}$XGETTEXT" >&6
22232 else
22233   echo "$as_me:$LINENO: result: no" >&5
22234 echo "${ECHO_T}no" >&6
22235 fi
22236
22237   test -n "$XGETTEXT" && break
22238 done
22239
22240
22241   # Note: share/locale is always the default, independent of $datadir
22242   localedir='${prefix}/share/locale'
22243
22244
22245 fi
22246
22247 # Check for Tcl configuration script tclConfig.sh
22248 if test "$with_tcl" = yes; then
22249     for ac_prog in tclsh tcl
22250 do
22251   # Extract the first word of "$ac_prog", so it can be a program name with args.
22252 set dummy $ac_prog; ac_word=$2
22253 echo "$as_me:$LINENO: checking for $ac_word" >&5
22254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22255 if test "${ac_cv_path_TCLSH+set}" = set; then
22256   echo $ECHO_N "(cached) $ECHO_C" >&6
22257 else
22258   case $TCLSH in
22259   [\\/]* | ?:[\\/]*)
22260   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
22261   ;;
22262   *)
22263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22264 for as_dir in $PATH
22265 do
22266   IFS=$as_save_IFS
22267   test -z "$as_dir" && as_dir=.
22268   for ac_exec_ext in '' $ac_executable_extensions; do
22269   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22270     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
22271     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22272     break 2
22273   fi
22274 done
22275 done
22276
22277   ;;
22278 esac
22279 fi
22280 TCLSH=$ac_cv_path_TCLSH
22281
22282 if test -n "$TCLSH"; then
22283   echo "$as_me:$LINENO: result: $TCLSH" >&5
22284 echo "${ECHO_T}$TCLSH" >&6
22285 else
22286   echo "$as_me:$LINENO: result: no" >&5
22287 echo "${ECHO_T}no" >&6
22288 fi
22289
22290   test -n "$TCLSH" && break
22291 done
22292
22293 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
22294 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
22295 # Let user override test
22296 if test -z "$TCL_CONFIG_SH"; then
22297     pgac_test_dirs="$with_tclconfig"
22298
22299     set X $pgac_test_dirs; shift
22300     if test $# -eq 0; then
22301         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
22302 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
22303    { (exit 1); exit 1; }; }
22304         set X `echo 'puts $auto_path' | $TCLSH`; shift
22305     fi
22306
22307     for pgac_dir do
22308         if test -r "$pgac_dir/tclConfig.sh"; then
22309             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
22310             break
22311         fi
22312     done
22313 fi
22314
22315 if test -z "$TCL_CONFIG_SH"; then
22316     echo "$as_me:$LINENO: result: no" >&5
22317 echo "${ECHO_T}no" >&6
22318     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
22319 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
22320    { (exit 1); exit 1; }; }
22321 else
22322     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
22323 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
22324 fi
22325
22326
22327
22328     . "$TCL_CONFIG_SH"
22329 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
22330 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
22331 eval TCL_LIBS=\"$TCL_LIBS\"
22332 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
22333 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
22334
22335         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
22336     ac_save_CPPFLAGS=$CPPFLAGS
22337     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
22338     if test "${ac_cv_header_tcl_h+set}" = set; then
22339   echo "$as_me:$LINENO: checking for tcl.h" >&5
22340 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22341 if test "${ac_cv_header_tcl_h+set}" = set; then
22342   echo $ECHO_N "(cached) $ECHO_C" >&6
22343 fi
22344 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22345 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22346 else
22347   # Is the header compilable?
22348 echo "$as_me:$LINENO: checking tcl.h usability" >&5
22349 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
22350 cat >conftest.$ac_ext <<_ACEOF
22351 /* confdefs.h.  */
22352 _ACEOF
22353 cat confdefs.h >>conftest.$ac_ext
22354 cat >>conftest.$ac_ext <<_ACEOF
22355 /* end confdefs.h.  */
22356 $ac_includes_default
22357 #include <tcl.h>
22358 _ACEOF
22359 rm -f conftest.$ac_objext
22360 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22361   (eval $ac_compile) 2>conftest.er1
22362   ac_status=$?
22363   grep -v '^ *+' conftest.er1 >conftest.err
22364   rm -f conftest.er1
22365   cat conftest.err >&5
22366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22367   (exit $ac_status); } &&
22368          { ac_try='test -z "$ac_c_werror_flag"
22369                          || test ! -s conftest.err'
22370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22371   (eval $ac_try) 2>&5
22372   ac_status=$?
22373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22374   (exit $ac_status); }; } &&
22375          { ac_try='test -s conftest.$ac_objext'
22376   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22377   (eval $ac_try) 2>&5
22378   ac_status=$?
22379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22380   (exit $ac_status); }; }; then
22381   ac_header_compiler=yes
22382 else
22383   echo "$as_me: failed program was:" >&5
22384 sed 's/^/| /' conftest.$ac_ext >&5
22385
22386 ac_header_compiler=no
22387 fi
22388 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22389 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22390 echo "${ECHO_T}$ac_header_compiler" >&6
22391
22392 # Is the header present?
22393 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22394 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22395 cat >conftest.$ac_ext <<_ACEOF
22396 /* confdefs.h.  */
22397 _ACEOF
22398 cat confdefs.h >>conftest.$ac_ext
22399 cat >>conftest.$ac_ext <<_ACEOF
22400 /* end confdefs.h.  */
22401 #include <tcl.h>
22402 _ACEOF
22403 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22404   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22405   ac_status=$?
22406   grep -v '^ *+' conftest.er1 >conftest.err
22407   rm -f conftest.er1
22408   cat conftest.err >&5
22409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22410   (exit $ac_status); } >/dev/null; then
22411   if test -s conftest.err; then
22412     ac_cpp_err=$ac_c_preproc_warn_flag
22413     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22414   else
22415     ac_cpp_err=
22416   fi
22417 else
22418   ac_cpp_err=yes
22419 fi
22420 if test -z "$ac_cpp_err"; then
22421   ac_header_preproc=yes
22422 else
22423   echo "$as_me: failed program was:" >&5
22424 sed 's/^/| /' conftest.$ac_ext >&5
22425
22426   ac_header_preproc=no
22427 fi
22428 rm -f conftest.err conftest.$ac_ext
22429 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22430 echo "${ECHO_T}$ac_header_preproc" >&6
22431
22432 # So?  What about this header?
22433 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22434   yes:no: )
22435     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22436 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22437     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22438 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22439     ac_header_preproc=yes
22440     ;;
22441   no:yes:* )
22442     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22443 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22444     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22445 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22446     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22447 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22448     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22449 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22450     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22451 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22452     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22453 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22454     (
22455       cat <<\_ASBOX
22456 ## ---------------------------------------- ##
22457 ## Report this to pgsql-bugs@postgresql.org ##
22458 ## ---------------------------------------- ##
22459 _ASBOX
22460     ) |
22461       sed "s/^/$as_me: WARNING:     /" >&2
22462     ;;
22463 esac
22464 echo "$as_me:$LINENO: checking for tcl.h" >&5
22465 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22466 if test "${ac_cv_header_tcl_h+set}" = set; then
22467   echo $ECHO_N "(cached) $ECHO_C" >&6
22468 else
22469   ac_cv_header_tcl_h=$ac_header_preproc
22470 fi
22471 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22472 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22473
22474 fi
22475 if test $ac_cv_header_tcl_h = yes; then
22476   :
22477 else
22478   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22479 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22480    { (exit 1); exit 1; }; }
22481 fi
22482
22483
22484     CPPFLAGS=$ac_save_CPPFLAGS
22485 fi
22486
22487 #
22488 # Check for DocBook and tools
22489 #
22490 for ac_prog in onsgmls nsgmls
22491 do
22492   # Extract the first word of "$ac_prog", so it can be a program name with args.
22493 set dummy $ac_prog; ac_word=$2
22494 echo "$as_me:$LINENO: checking for $ac_word" >&5
22495 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22496 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22497   echo $ECHO_N "(cached) $ECHO_C" >&6
22498 else
22499   if test -n "$NSGMLS"; then
22500   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22501 else
22502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22503 for as_dir in $PATH
22504 do
22505   IFS=$as_save_IFS
22506   test -z "$as_dir" && as_dir=.
22507   for ac_exec_ext in '' $ac_executable_extensions; do
22508   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22509     ac_cv_prog_NSGMLS="$ac_prog"
22510     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22511     break 2
22512   fi
22513 done
22514 done
22515
22516 fi
22517 fi
22518 NSGMLS=$ac_cv_prog_NSGMLS
22519 if test -n "$NSGMLS"; then
22520   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22521 echo "${ECHO_T}$NSGMLS" >&6
22522 else
22523   echo "$as_me:$LINENO: result: no" >&5
22524 echo "${ECHO_T}no" >&6
22525 fi
22526
22527   test -n "$NSGMLS" && break
22528 done
22529
22530 for ac_prog in openjade jade
22531 do
22532   # Extract the first word of "$ac_prog", so it can be a program name with args.
22533 set dummy $ac_prog; ac_word=$2
22534 echo "$as_me:$LINENO: checking for $ac_word" >&5
22535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22536 if test "${ac_cv_prog_JADE+set}" = set; then
22537   echo $ECHO_N "(cached) $ECHO_C" >&6
22538 else
22539   if test -n "$JADE"; then
22540   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22541 else
22542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22543 for as_dir in $PATH
22544 do
22545   IFS=$as_save_IFS
22546   test -z "$as_dir" && as_dir=.
22547   for ac_exec_ext in '' $ac_executable_extensions; do
22548   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22549     ac_cv_prog_JADE="$ac_prog"
22550     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22551     break 2
22552   fi
22553 done
22554 done
22555
22556 fi
22557 fi
22558 JADE=$ac_cv_prog_JADE
22559 if test -n "$JADE"; then
22560   echo "$as_me:$LINENO: result: $JADE" >&5
22561 echo "${ECHO_T}$JADE" >&6
22562 else
22563   echo "$as_me:$LINENO: result: no" >&5
22564 echo "${ECHO_T}no" >&6
22565 fi
22566
22567   test -n "$JADE" && break
22568 done
22569
22570
22571 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22572 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22573 if test "${pgac_cv_check_docbook+set}" = set; then
22574   echo $ECHO_N "(cached) $ECHO_C" >&6
22575 else
22576   cat >conftest.sgml <<EOF
22577 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22578 <book>
22579  <title>test</title>
22580  <chapter>
22581   <title>random</title>
22582    <sect1>
22583     <title>testsect</title>
22584     <para>text</para>
22585   </sect1>
22586  </chapter>
22587 </book>
22588 EOF
22589
22590 pgac_cv_check_docbook=no
22591
22592 if test -n "$NSGMLS"; then
22593   $NSGMLS -s conftest.sgml 1>&5 2>&1
22594   if test $? -eq 0; then
22595     pgac_cv_check_docbook=yes
22596   fi
22597 fi
22598 rm -f conftest.sgml
22599 fi
22600 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22601 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22602
22603 have_docbook=$pgac_cv_check_docbook
22604
22605
22606 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22607 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22608 if test "${pgac_cv_path_stylesheets+set}" = set; then
22609   echo $ECHO_N "(cached) $ECHO_C" >&6
22610 else
22611   if test -n "$DOCBOOKSTYLE"; then
22612   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22613 else
22614   for pgac_prefix in /usr /usr/local /opt; do
22615     for pgac_infix in share lib; do
22616       for pgac_postfix in \
22617         sgml/stylesheets/nwalsh-modular \
22618         sgml/stylesheets/docbook \
22619                 sgml/docbook-dsssl \
22620         sgml/docbook/dsssl/modular \
22621         sgml/docbook/stylesheet/dsssl/modular \
22622         sgml/docbook/dsssl-stylesheets
22623       do
22624         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22625         if test -r "$pgac_candidate/html/docbook.dsl" \
22626            && test -r "$pgac_candidate/print/docbook.dsl"
22627         then
22628           pgac_cv_path_stylesheets=$pgac_candidate
22629           break 3
22630         fi
22631       done
22632     done
22633   done
22634 fi
22635 fi
22636
22637 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22638
22639 if test -n "$DOCBOOKSTYLE"; then
22640   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22641 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22642 else
22643   echo "$as_me:$LINENO: result: no" >&5
22644 echo "${ECHO_T}no" >&6
22645 fi
22646 if test -n "$DOCBOOKSTYLE"; then
22647   for ac_prog in collateindex.pl
22648 do
22649   # Extract the first word of "$ac_prog", so it can be a program name with args.
22650 set dummy $ac_prog; ac_word=$2
22651 echo "$as_me:$LINENO: checking for $ac_word" >&5
22652 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22653 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22654   echo $ECHO_N "(cached) $ECHO_C" >&6
22655 else
22656   case $COLLATEINDEX in
22657   [\\/]* | ?:[\\/]*)
22658   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22659   ;;
22660   *)
22661   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22662 for as_dir in $DOCBOOKSTYLE/bin $PATH
22663 do
22664   IFS=$as_save_IFS
22665   test -z "$as_dir" && as_dir=.
22666   for ac_exec_ext in '' $ac_executable_extensions; do
22667   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22668     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22669     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22670     break 2
22671   fi
22672 done
22673 done
22674
22675   ;;
22676 esac
22677 fi
22678 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22679
22680 if test -n "$COLLATEINDEX"; then
22681   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22682 echo "${ECHO_T}$COLLATEINDEX" >&6
22683 else
22684   echo "$as_me:$LINENO: result: no" >&5
22685 echo "${ECHO_T}no" >&6
22686 fi
22687
22688   test -n "$COLLATEINDEX" && break
22689 done
22690
22691 else
22692   for ac_prog in collateindex.pl
22693 do
22694   # Extract the first word of "$ac_prog", so it can be a program name with args.
22695 set dummy $ac_prog; ac_word=$2
22696 echo "$as_me:$LINENO: checking for $ac_word" >&5
22697 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22698 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22699   echo $ECHO_N "(cached) $ECHO_C" >&6
22700 else
22701   case $COLLATEINDEX in
22702   [\\/]* | ?:[\\/]*)
22703   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22704   ;;
22705   *)
22706   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22707 for as_dir in $PATH
22708 do
22709   IFS=$as_save_IFS
22710   test -z "$as_dir" && as_dir=.
22711   for ac_exec_ext in '' $ac_executable_extensions; do
22712   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22713     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22714     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22715     break 2
22716   fi
22717 done
22718 done
22719
22720   ;;
22721 esac
22722 fi
22723 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22724
22725 if test -n "$COLLATEINDEX"; then
22726   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22727 echo "${ECHO_T}$COLLATEINDEX" >&6
22728 else
22729   echo "$as_me:$LINENO: result: no" >&5
22730 echo "${ECHO_T}no" >&6
22731 fi
22732
22733   test -n "$COLLATEINDEX" && break
22734 done
22735
22736 fi
22737 for ac_prog in sgmlspl
22738 do
22739   # Extract the first word of "$ac_prog", so it can be a program name with args.
22740 set dummy $ac_prog; ac_word=$2
22741 echo "$as_me:$LINENO: checking for $ac_word" >&5
22742 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22743 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
22744   echo $ECHO_N "(cached) $ECHO_C" >&6
22745 else
22746   if test -n "$SGMLSPL"; then
22747   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
22748 else
22749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22750 for as_dir in $PATH
22751 do
22752   IFS=$as_save_IFS
22753   test -z "$as_dir" && as_dir=.
22754   for ac_exec_ext in '' $ac_executable_extensions; do
22755   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22756     ac_cv_prog_SGMLSPL="$ac_prog"
22757     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22758     break 2
22759   fi
22760 done
22761 done
22762
22763 fi
22764 fi
22765 SGMLSPL=$ac_cv_prog_SGMLSPL
22766 if test -n "$SGMLSPL"; then
22767   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22768 echo "${ECHO_T}$SGMLSPL" >&6
22769 else
22770   echo "$as_me:$LINENO: result: no" >&5
22771 echo "${ECHO_T}no" >&6
22772 fi
22773
22774   test -n "$SGMLSPL" && break
22775 done
22776
22777
22778 # Thread testing
22779
22780 # We have to run the thread test near the end so we have all our symbols
22781 # defined.  Cross compiling throws a warning.
22782 #
22783 if test "$enable_thread_safety_force" = yes; then
22784 if test x"$template" != x"win32"
22785 then
22786   { echo "$as_me:$LINENO: WARNING:
22787 *** Skipping thread test program.  --enable-thread-safety-force was used.
22788 *** Run the program in src/test/thread on the your machine and add
22789 proper locking function calls to your applications to guarantee thread
22790 safety.
22791 " >&5
22792 echo "$as_me: WARNING:
22793 *** Skipping thread test program.  --enable-thread-safety-force was used.
22794 *** Run the program in src/test/thread on the your machine and add
22795 proper locking function calls to your applications to guarantee thread
22796 safety.
22797 " >&2;}
22798 else
22799 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22800 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22801 fi
22802 elif test "$enable_thread_safety" = yes; then
22803 if test x"$template" != x"win32"
22804 then
22805 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
22806 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
22807
22808 _CFLAGS="$CFLAGS"
22809 _LIBS="$LIBS"
22810 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
22811 LIBS="$LIBS $PTHREAD_LIBS"
22812 if test "$cross_compiling" = yes; then
22813   echo "$as_me:$LINENO: result: maybe" >&5
22814 echo "${ECHO_T}maybe" >&6
22815   { echo "$as_me:$LINENO: WARNING:
22816 *** Skipping thread test program because of cross-compile build.
22817 *** Run the program in src/test/thread on the target machine.
22818 " >&5
22819 echo "$as_me: WARNING:
22820 *** Skipping thread test program because of cross-compile build.
22821 *** Run the program in src/test/thread on the target machine.
22822 " >&2;}
22823 else
22824   cat >conftest.$ac_ext <<_ACEOF
22825 /* confdefs.h.  */
22826 _ACEOF
22827 cat confdefs.h >>conftest.$ac_ext
22828 cat >>conftest.$ac_ext <<_ACEOF
22829 /* end confdefs.h.  */
22830 #include "$srcdir/src/test/thread/thread_test.c"
22831 _ACEOF
22832 rm -f conftest$ac_exeext
22833 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22834   (eval $ac_link) 2>&5
22835   ac_status=$?
22836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22837   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22839   (eval $ac_try) 2>&5
22840   ac_status=$?
22841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22842   (exit $ac_status); }; }; then
22843   echo "$as_me:$LINENO: result: yes" >&5
22844 echo "${ECHO_T}yes" >&6
22845 else
22846   echo "$as_me: program exited with status $ac_status" >&5
22847 echo "$as_me: failed program was:" >&5
22848 sed 's/^/| /' conftest.$ac_ext >&5
22849
22850 ( exit $ac_status )
22851 echo "$as_me:$LINENO: result: no" >&5
22852 echo "${ECHO_T}no" >&6
22853   { { echo "$as_me:$LINENO: error:
22854 *** Thread test program failed.  Your platform is not thread-safe.
22855 *** Check the file 'config.log'for the exact reason.
22856 ***
22857 *** You can use the configure option --enable-thread-safety-force
22858 *** to force threads to be enabled.  However, you must then run
22859 *** the program in src/test/thread and add locking function calls
22860 *** to your applications to guarantee thread safety.
22861 " >&5
22862 echo "$as_me: error:
22863 *** Thread test program failed.  Your platform is not thread-safe.
22864 *** Check the file 'config.log'for the exact reason.
22865 ***
22866 *** You can use the configure option --enable-thread-safety-force
22867 *** to force threads to be enabled.  However, you must then run
22868 *** the program in src/test/thread and add locking function calls
22869 *** to your applications to guarantee thread safety.
22870 " >&2;}
22871    { (exit 1); exit 1; }; }
22872 fi
22873 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22874 fi
22875 CFLAGS="$_CFLAGS"
22876 LIBS="$_LIBS"
22877 else
22878 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22879 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22880 fi
22881 fi
22882
22883 # prepare build tree if outside source tree
22884 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
22885 # Note 2: /bin/pwd might be better than shell's built-in at getting
22886 #         a symlink-free name.
22887 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
22888   vpath_build=no
22889 else
22890   vpath_build=yes
22891   if test "$no_create" != yes; then
22892     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
22893     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
22894     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
22895       || { { echo "$as_me:$LINENO: error: failed" >&5
22896 echo "$as_me: error: failed" >&2;}
22897    { (exit 1); exit 1; }; }
22898     echo "$as_me:$LINENO: result: done" >&5
22899 echo "${ECHO_T}done" >&6
22900   fi
22901 fi
22902
22903
22904
22905                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
22906
22907
22908                                                             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}"
22909
22910
22911 if test "$PORTNAME" = "win32"; then
22912           ac_config_commands="$ac_config_commands check_win32_symlinks"
22913
22914 fi
22915
22916           ac_config_headers="$ac_config_headers src/include/pg_config.h"
22917
22918
22919           ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
22920
22921
22922
22923 #
22924 # Warn about unknown options
22925 #
22926
22927
22928   for var in `set |sed -ne '/^\(with_\|enable\_\)/ s/=.*//p'` ; do
22929      case $var in
22930        with_template) ;;
22931 with_docdir) ;;
22932 with_includes) ;;
22933 with_libraries) ;;
22934 with_libs) ;;
22935 enable_integer_datetimes) ;;
22936 enable_nls) ;;
22937 with_pgport) ;;
22938 enable_shared) ;;
22939 enable_rpath) ;;
22940 enable_spinlocks) ;;
22941 enable_debug) ;;
22942 enable_dtrace) ;;
22943 with_CC) ;;
22944 enable_depend) ;;
22945 enable_cassert) ;;
22946 enable_thread_safety) ;;
22947 enable_thread_safety_force) ;;
22948 with_tcl) ;;
22949 with_tclconfig) ;;
22950 with_perl) ;;
22951 with_python) ;;
22952 with_krb5) ;;
22953 with_krb_srvnam) ;;
22954 with_pam) ;;
22955 with_ldap) ;;
22956 with_bonjour) ;;
22957 with_openssl) ;;
22958 with_libedit_preferred) ;;
22959 with_readline) ;;
22960 with_zlib) ;;
22961
22962        with_gnu_ld) ;;
22963      *)
22964        echo -n "*** Option ignored: "
22965        echo $var | sed -e 's/\(^=*\)/--\1/;s/_/-/g'
22966        ;;
22967      esac
22968   done
22969
22970
22971 cat >confcache <<\_ACEOF
22972 # This file is a shell script that caches the results of configure
22973 # tests run on this system so they can be shared between configure
22974 # scripts and configure runs, see configure's option --config-cache.
22975 # It is not useful on other systems.  If it contains results you don't
22976 # want to keep, you may remove or edit it.
22977 #
22978 # config.status only pays attention to the cache file if you give it
22979 # the --recheck option to rerun configure.
22980 #
22981 # `ac_cv_env_foo' variables (set or unset) will be overridden when
22982 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22983 # following values.
22984
22985 _ACEOF
22986
22987 # The following way of writing the cache mishandles newlines in values,
22988 # but we know of no workaround that is simple, portable, and efficient.
22989 # So, don't put newlines in cache variables' values.
22990 # Ultrix sh set writes to stderr and can't be redirected directly,
22991 # and sets the high bit in the cache file unless we assign to the vars.
22992 {
22993   (set) 2>&1 |
22994     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22995     *ac_space=\ *)
22996       # `set' does not quote correctly, so add quotes (double-quote
22997       # substitution turns \\\\ into \\, and sed turns \\ into \).
22998       sed -n \
22999         "s/'/'\\\\''/g;
23000           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23001       ;;
23002     *)
23003       # `set' quotes correctly as required by POSIX, so do not add quotes.
23004       sed -n \
23005         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23006       ;;
23007     esac;
23008 } |
23009   sed '
23010      t clear
23011      : clear
23012      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23013      t end
23014      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23015      : end' >>confcache
23016 if diff $cache_file confcache >/dev/null 2>&1; then :; else
23017   if test -w $cache_file; then
23018     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23019     cat confcache >$cache_file
23020   else
23021     echo "not updating unwritable cache $cache_file"
23022   fi
23023 fi
23024 rm -f confcache
23025
23026 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23027 # Let make expand exec_prefix.
23028 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23029
23030 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23031 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23032 # trailing colons and then remove the whole line if VPATH becomes empty
23033 # (actually we leave an empty line to preserve line numbers).
23034 if test "x$srcdir" = x.; then
23035   ac_vpsub='/^[  ]*VPATH[        ]*=/{
23036 s/:*\$(srcdir):*/:/;
23037 s/:*\${srcdir}:*/:/;
23038 s/:*@srcdir@:*/:/;
23039 s/^\([^=]*=[     ]*\):*/\1/;
23040 s/:*$//;
23041 s/^[^=]*=[       ]*$//;
23042 }'
23043 fi
23044
23045 DEFS=-DHAVE_CONFIG_H
23046
23047 ac_libobjs=
23048 ac_ltlibobjs=
23049 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23050   # 1. Remove the extension, and $U if already installed.
23051   ac_i=`echo "$ac_i" |
23052          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
23053   # 2. Add them.
23054   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
23055   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
23056 done
23057 LIBOBJS=$ac_libobjs
23058
23059 LTLIBOBJS=$ac_ltlibobjs
23060
23061
23062
23063 : ${CONFIG_STATUS=./config.status}
23064 ac_clean_files_save=$ac_clean_files
23065 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23066 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23067 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23068 cat >$CONFIG_STATUS <<_ACEOF
23069 #! $SHELL
23070 # Generated by $as_me.
23071 # Run this file to recreate the current configuration.
23072 # Compiler output produced by configure, useful for debugging
23073 # configure, is in config.log if it exists.
23074
23075 debug=false
23076 ac_cs_recheck=false
23077 ac_cs_silent=false
23078 SHELL=\${CONFIG_SHELL-$SHELL}
23079 _ACEOF
23080
23081 cat >>$CONFIG_STATUS <<\_ACEOF
23082 ## --------------------- ##
23083 ## M4sh Initialization.  ##
23084 ## --------------------- ##
23085
23086 # Be Bourne compatible
23087 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23088   emulate sh
23089   NULLCMD=:
23090   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23091   # is contrary to our usage.  Disable this feature.
23092   alias -g '${1+"$@"}'='"$@"'
23093 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23094   set -o posix
23095 fi
23096 DUALCASE=1; export DUALCASE # for MKS sh
23097
23098 # Support unset when possible.
23099 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23100   as_unset=unset
23101 else
23102   as_unset=false
23103 fi
23104
23105
23106 # Work around bugs in pre-3.0 UWIN ksh.
23107 $as_unset ENV MAIL MAILPATH
23108 PS1='$ '
23109 PS2='> '
23110 PS4='+ '
23111
23112 # NLS nuisances.
23113 for as_var in \
23114   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23115   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23116   LC_TELEPHONE LC_TIME
23117 do
23118   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23119     eval $as_var=C; export $as_var
23120   else
23121     $as_unset $as_var
23122   fi
23123 done
23124
23125 # Required to use basename.
23126 if expr a : '\(a\)' >/dev/null 2>&1; then
23127   as_expr=expr
23128 else
23129   as_expr=false
23130 fi
23131
23132 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
23133   as_basename=basename
23134 else
23135   as_basename=false
23136 fi
23137
23138
23139 # Name of the executable.
23140 as_me=`$as_basename "$0" ||
23141 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23142          X"$0" : 'X\(//\)$' \| \
23143          X"$0" : 'X\(/\)$' \| \
23144          .     : '\(.\)' 2>/dev/null ||
23145 echo X/"$0" |
23146     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
23147           /^X\/\(\/\/\)$/{ s//\1/; q; }
23148           /^X\/\(\/\).*/{ s//\1/; q; }
23149           s/.*/./; q'`
23150
23151
23152 # PATH needs CR, and LINENO needs CR and PATH.
23153 # Avoid depending upon Character Ranges.
23154 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23155 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23156 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23157 as_cr_digits='0123456789'
23158 as_cr_alnum=$as_cr_Letters$as_cr_digits
23159
23160 # The user is always right.
23161 if test "${PATH_SEPARATOR+set}" != set; then
23162   echo "#! /bin/sh" >conf$$.sh
23163   echo  "exit 0"   >>conf$$.sh
23164   chmod +x conf$$.sh
23165   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23166     PATH_SEPARATOR=';'
23167   else
23168     PATH_SEPARATOR=:
23169   fi
23170   rm -f conf$$.sh
23171 fi
23172
23173
23174   as_lineno_1=$LINENO
23175   as_lineno_2=$LINENO
23176   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23177   test "x$as_lineno_1" != "x$as_lineno_2" &&
23178   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
23179   # Find who we are.  Look in the path if we contain no path at all
23180   # relative or not.
23181   case $0 in
23182     *[\\/]* ) as_myself=$0 ;;
23183     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23184 for as_dir in $PATH
23185 do
23186   IFS=$as_save_IFS
23187   test -z "$as_dir" && as_dir=.
23188   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23189 done
23190
23191        ;;
23192   esac
23193   # We did not find ourselves, most probably we were run as `sh COMMAND'
23194   # in which case we are not to be found in the path.
23195   if test "x$as_myself" = x; then
23196     as_myself=$0
23197   fi
23198   if test ! -f "$as_myself"; then
23199     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23200 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23201    { (exit 1); exit 1; }; }
23202   fi
23203   case $CONFIG_SHELL in
23204   '')
23205     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23206 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23207 do
23208   IFS=$as_save_IFS
23209   test -z "$as_dir" && as_dir=.
23210   for as_base in sh bash ksh sh5; do
23211          case $as_dir in
23212          /*)
23213            if ("$as_dir/$as_base" -c '
23214   as_lineno_1=$LINENO
23215   as_lineno_2=$LINENO
23216   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23217   test "x$as_lineno_1" != "x$as_lineno_2" &&
23218   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
23219              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23220              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
23221              CONFIG_SHELL=$as_dir/$as_base
23222              export CONFIG_SHELL
23223              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23224            fi;;
23225          esac
23226        done
23227 done
23228 ;;
23229   esac
23230
23231   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23232   # uniformly replaced by the line number.  The first 'sed' inserts a
23233   # line-number line before each line; the second 'sed' does the real
23234   # work.  The second script uses 'N' to pair each line-number line
23235   # with the numbered line, and appends trailing '-' during
23236   # substitution so that $LINENO is not a special case at line end.
23237   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23238   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
23239   sed '=' <$as_myself |
23240     sed '
23241       N
23242       s,$,-,
23243       : loop
23244       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23245       t loop
23246       s,-$,,
23247       s,^['$as_cr_digits']*\n,,
23248     ' >$as_me.lineno &&
23249   chmod +x $as_me.lineno ||
23250     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23251 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23252    { (exit 1); exit 1; }; }
23253
23254   # Don't try to exec as it changes $[0], causing all sort of problems
23255   # (the dirname of $[0] is not the place where we might find the
23256   # original and so on.  Autoconf is especially sensible to this).
23257   . ./$as_me.lineno
23258   # Exit status is that of the last command.
23259   exit
23260 }
23261
23262
23263 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23264   *c*,-n*) ECHO_N= ECHO_C='
23265 ' ECHO_T='      ' ;;
23266   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23267   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
23268 esac
23269
23270 if expr a : '\(a\)' >/dev/null 2>&1; then
23271   as_expr=expr
23272 else
23273   as_expr=false
23274 fi
23275
23276 rm -f conf$$ conf$$.exe conf$$.file
23277 echo >conf$$.file
23278 if ln -s conf$$.file conf$$ 2>/dev/null; then
23279   # We could just check for DJGPP; but this test a) works b) is more generic
23280   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23281   if test -f conf$$.exe; then
23282     # Don't use ln at all; we don't have any links
23283     as_ln_s='cp -p'
23284   else
23285     as_ln_s='ln -s'
23286   fi
23287 elif ln conf$$.file conf$$ 2>/dev/null; then
23288   as_ln_s=ln
23289 else
23290   as_ln_s='cp -p'
23291 fi
23292 rm -f conf$$ conf$$.exe conf$$.file
23293
23294 if mkdir -p . 2>/dev/null; then
23295   as_mkdir_p=:
23296 else
23297   test -d ./-p && rmdir ./-p
23298   as_mkdir_p=false
23299 fi
23300
23301 as_executable_p="test -f"
23302
23303 # Sed expression to map a string onto a valid CPP name.
23304 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
23305
23306 # Sed expression to map a string onto a valid variable name.
23307 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
23308
23309
23310 # IFS
23311 # We need space, tab and new line, in precisely that order.
23312 as_nl='
23313 '
23314 IFS="   $as_nl"
23315
23316 # CDPATH.
23317 $as_unset CDPATH
23318
23319 exec 6>&1
23320
23321 # Open the log real soon, to keep \$[0] and so on meaningful, and to
23322 # report actual input values of CONFIG_FILES etc. instead of their
23323 # values after options handling.  Logging --version etc. is OK.
23324 exec 5>>config.log
23325 {
23326   echo
23327   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23328 ## Running $as_me. ##
23329 _ASBOX
23330 } >&5
23331 cat >&5 <<_CSEOF
23332
23333 This file was extended by PostgreSQL $as_me 8.2beta1, which was
23334 generated by GNU Autoconf 2.59.  Invocation command line was
23335
23336   CONFIG_FILES    = $CONFIG_FILES
23337   CONFIG_HEADERS  = $CONFIG_HEADERS
23338   CONFIG_LINKS    = $CONFIG_LINKS
23339   CONFIG_COMMANDS = $CONFIG_COMMANDS
23340   $ $0 $@
23341
23342 _CSEOF
23343 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23344 echo >&5
23345 _ACEOF
23346
23347 # Files that config.status was made for.
23348 if test -n "$ac_config_files"; then
23349   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23350 fi
23351
23352 if test -n "$ac_config_headers"; then
23353   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23354 fi
23355
23356 if test -n "$ac_config_links"; then
23357   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23358 fi
23359
23360 if test -n "$ac_config_commands"; then
23361   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23362 fi
23363
23364 cat >>$CONFIG_STATUS <<\_ACEOF
23365
23366 ac_cs_usage="\
23367 \`$as_me' instantiates files from templates according to the
23368 current configuration.
23369
23370 Usage: $0 [OPTIONS] [FILE]...
23371
23372   -h, --help       print this help, then exit
23373   -V, --version    print version number, then exit
23374   -q, --quiet      do not print progress messages
23375   -d, --debug      don't remove temporary files
23376       --recheck    update $as_me by reconfiguring in the same conditions
23377   --file=FILE[:TEMPLATE]
23378                    instantiate the configuration file FILE
23379   --header=FILE[:TEMPLATE]
23380                    instantiate the configuration header FILE
23381
23382 Configuration files:
23383 $config_files
23384
23385 Configuration headers:
23386 $config_headers
23387
23388 Configuration links:
23389 $config_links
23390
23391 Configuration commands:
23392 $config_commands
23393
23394 Report bugs to <bug-autoconf@gnu.org>."
23395 _ACEOF
23396
23397 cat >>$CONFIG_STATUS <<_ACEOF
23398 ac_cs_version="\\
23399 PostgreSQL config.status 8.2beta1
23400 configured by $0, generated by GNU Autoconf 2.59,
23401   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23402
23403 Copyright (C) 2003 Free Software Foundation, Inc.
23404 This config.status script is free software; the Free Software Foundation
23405 gives unlimited permission to copy, distribute and modify it."
23406 srcdir=$srcdir
23407 _ACEOF
23408
23409 cat >>$CONFIG_STATUS <<\_ACEOF
23410 # If no file are specified by the user, then we need to provide default
23411 # value.  By we need to know if files were specified by the user.
23412 ac_need_defaults=:
23413 while test $# != 0
23414 do
23415   case $1 in
23416   --*=*)
23417     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23418     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23419     ac_shift=:
23420     ;;
23421   -*)
23422     ac_option=$1
23423     ac_optarg=$2
23424     ac_shift=shift
23425     ;;
23426   *) # This is not an option, so the user has probably given explicit
23427      # arguments.
23428      ac_option=$1
23429      ac_need_defaults=false;;
23430   esac
23431
23432   case $ac_option in
23433   # Handling of the options.
23434 _ACEOF
23435 cat >>$CONFIG_STATUS <<\_ACEOF
23436   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23437     ac_cs_recheck=: ;;
23438   --version | --vers* | -V )
23439     echo "$ac_cs_version"; exit 0 ;;
23440   --he | --h)
23441     # Conflict between --help and --header
23442     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23443 Try \`$0 --help' for more information." >&5
23444 echo "$as_me: error: ambiguous option: $1
23445 Try \`$0 --help' for more information." >&2;}
23446    { (exit 1); exit 1; }; };;
23447   --help | --hel | -h )
23448     echo "$ac_cs_usage"; exit 0 ;;
23449   --debug | --d* | -d )
23450     debug=: ;;
23451   --file | --fil | --fi | --f )
23452     $ac_shift
23453     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23454     ac_need_defaults=false;;
23455   --header | --heade | --head | --hea )
23456     $ac_shift
23457     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23458     ac_need_defaults=false;;
23459   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23460   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23461     ac_cs_silent=: ;;
23462
23463   # This is an error.
23464   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23465 Try \`$0 --help' for more information." >&5
23466 echo "$as_me: error: unrecognized option: $1
23467 Try \`$0 --help' for more information." >&2;}
23468    { (exit 1); exit 1; }; } ;;
23469
23470   *) ac_config_targets="$ac_config_targets $1" ;;
23471
23472   esac
23473   shift
23474 done
23475
23476 ac_configure_extra_args=
23477
23478 if $ac_cs_silent; then
23479   exec 6>/dev/null
23480   ac_configure_extra_args="$ac_configure_extra_args --silent"
23481 fi
23482
23483 _ACEOF
23484 cat >>$CONFIG_STATUS <<_ACEOF
23485 if \$ac_cs_recheck; then
23486   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23487   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23488 fi
23489
23490 _ACEOF
23491
23492
23493
23494
23495
23496 cat >>$CONFIG_STATUS <<\_ACEOF
23497 for ac_config_target in $ac_config_targets
23498 do
23499   case "$ac_config_target" in
23500   # Handling of arguments.
23501   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23502   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23503   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23504   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23505   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23506   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23507   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23508   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23509   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23510   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23511   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23512   "src/interfaces/ecpg/include/ecpg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
23513   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23514 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23515    { (exit 1); exit 1; }; };;
23516   esac
23517 done
23518
23519 # If the user did not use the arguments to specify the items to instantiate,
23520 # then the envvar interface is used.  Set only those that are not.
23521 # We use the long form for the default assignment because of an extremely
23522 # bizarre bug on SunOS 4.1.3.
23523 if $ac_need_defaults; then
23524   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23525   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23526   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23527   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23528 fi
23529
23530 # Have a temporary directory for convenience.  Make it in the build tree
23531 # simply because there is no reason to put it here, and in addition,
23532 # creating and moving files from /tmp can sometimes cause problems.
23533 # Create a temporary directory, and hook for its removal unless debugging.
23534 $debug ||
23535 {
23536   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23537   trap '{ (exit 1); exit 1; }' 1 2 13 15
23538 }
23539
23540 # Create a (secure) tmp directory for tmp files.
23541
23542 {
23543   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23544   test -n "$tmp" && test -d "$tmp"
23545 }  ||
23546 {
23547   tmp=./confstat$$-$RANDOM
23548   (umask 077 && mkdir $tmp)
23549 } ||
23550 {
23551    echo "$me: cannot create a temporary directory in ." >&2
23552    { (exit 1); exit 1; }
23553 }
23554
23555 _ACEOF
23556
23557 cat >>$CONFIG_STATUS <<_ACEOF
23558
23559 #
23560 # CONFIG_FILES section.
23561 #
23562
23563 # No need to generate the scripts if there are no CONFIG_FILES.
23564 # This happens for instance when ./config.status config.h
23565 if test -n "\$CONFIG_FILES"; then
23566   # Protect against being on the right side of a sed subst in config.status.
23567   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23568    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23569 s,@SHELL@,$SHELL,;t t
23570 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23571 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23572 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23573 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23574 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23575 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23576 s,@exec_prefix@,$exec_prefix,;t t
23577 s,@prefix@,$prefix,;t t
23578 s,@program_transform_name@,$program_transform_name,;t t
23579 s,@bindir@,$bindir,;t t
23580 s,@sbindir@,$sbindir,;t t
23581 s,@libexecdir@,$libexecdir,;t t
23582 s,@datadir@,$datadir,;t t
23583 s,@sysconfdir@,$sysconfdir,;t t
23584 s,@sharedstatedir@,$sharedstatedir,;t t
23585 s,@localstatedir@,$localstatedir,;t t
23586 s,@libdir@,$libdir,;t t
23587 s,@includedir@,$includedir,;t t
23588 s,@oldincludedir@,$oldincludedir,;t t
23589 s,@infodir@,$infodir,;t t
23590 s,@mandir@,$mandir,;t t
23591 s,@build_alias@,$build_alias,;t t
23592 s,@host_alias@,$host_alias,;t t
23593 s,@target_alias@,$target_alias,;t t
23594 s,@DEFS@,$DEFS,;t t
23595 s,@ECHO_C@,$ECHO_C,;t t
23596 s,@ECHO_N@,$ECHO_N,;t t
23597 s,@ECHO_T@,$ECHO_T,;t t
23598 s,@LIBS@,$LIBS,;t t
23599 s,@configure_args@,$configure_args,;t t
23600 s,@build@,$build,;t t
23601 s,@build_cpu@,$build_cpu,;t t
23602 s,@build_vendor@,$build_vendor,;t t
23603 s,@build_os@,$build_os,;t t
23604 s,@host@,$host,;t t
23605 s,@host_cpu@,$host_cpu,;t t
23606 s,@host_vendor@,$host_vendor,;t t
23607 s,@host_os@,$host_os,;t t
23608 s,@PORTNAME@,$PORTNAME,;t t
23609 s,@docdir@,$docdir,;t t
23610 s,@enable_nls@,$enable_nls,;t t
23611 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23612 s,@default_port@,$default_port,;t t
23613 s,@enable_shared@,$enable_shared,;t t
23614 s,@enable_rpath@,$enable_rpath,;t t
23615 s,@enable_debug@,$enable_debug,;t t
23616 s,@DTRACE@,$DTRACE,;t t
23617 s,@DTRACEFLAGS@,$DTRACEFLAGS,;t t
23618 s,@enable_dtrace@,$enable_dtrace,;t t
23619 s,@CC@,$CC,;t t
23620 s,@CFLAGS@,$CFLAGS,;t t
23621 s,@LDFLAGS@,$LDFLAGS,;t t
23622 s,@CPPFLAGS@,$CPPFLAGS,;t t
23623 s,@ac_ct_CC@,$ac_ct_CC,;t t
23624 s,@EXEEXT@,$EXEEXT,;t t
23625 s,@OBJEXT@,$OBJEXT,;t t
23626 s,@CPP@,$CPP,;t t
23627 s,@GCC@,$GCC,;t t
23628 s,@TAS@,$TAS,;t t
23629 s,@autodepend@,$autodepend,;t t
23630 s,@INCLUDES@,$INCLUDES,;t t
23631 s,@enable_thread_safety@,$enable_thread_safety,;t t
23632 s,@with_tcl@,$with_tcl,;t t
23633 s,@with_perl@,$with_perl,;t t
23634 s,@with_python@,$with_python,;t t
23635 s,@with_krb5@,$with_krb5,;t t
23636 s,@krb_srvtab@,$krb_srvtab,;t t
23637 s,@with_pam@,$with_pam,;t t
23638 s,@with_ldap@,$with_ldap,;t t
23639 s,@with_bonjour@,$with_bonjour,;t t
23640 s,@with_openssl@,$with_openssl,;t t
23641 s,@with_zlib@,$with_zlib,;t t
23642 s,@EGREP@,$EGREP,;t t
23643 s,@ELF_SYS@,$ELF_SYS,;t t
23644 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23645 s,@AWK@,$AWK,;t t
23646 s,@FLEX@,$FLEX,;t t
23647 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23648 s,@LN_S@,$LN_S,;t t
23649 s,@LD@,$LD,;t t
23650 s,@with_gnu_ld@,$with_gnu_ld,;t t
23651 s,@ld_R_works@,$ld_R_works,;t t
23652 s,@RANLIB@,$RANLIB,;t t
23653 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23654 s,@TAR@,$TAR,;t t
23655 s,@STRIP@,$STRIP,;t t
23656 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23657 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23658 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23659 s,@YACC@,$YACC,;t t
23660 s,@YFLAGS@,$YFLAGS,;t t
23661 s,@PERL@,$PERL,;t t
23662 s,@perl_archlibexp@,$perl_archlibexp,;t t
23663 s,@perl_privlibexp@,$perl_privlibexp,;t t
23664 s,@perl_useshrplib@,$perl_useshrplib,;t t
23665 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23666 s,@PYTHON@,$PYTHON,;t t
23667 s,@python_version@,$python_version,;t t
23668 s,@python_configdir@,$python_configdir,;t t
23669 s,@python_includespec@,$python_includespec,;t t
23670 s,@python_libdir@,$python_libdir,;t t
23671 s,@python_libspec@,$python_libspec,;t t
23672 s,@python_additional_libs@,$python_additional_libs,;t t
23673 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23674 s,@LIBOBJS@,$LIBOBJS,;t t
23675 s,@acx_pthread_config@,$acx_pthread_config,;t t
23676 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23677 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23678 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23679 s,@LDAP_LIBS_FE@,$LDAP_LIBS_FE,;t t
23680 s,@LDAP_LIBS_BE@,$LDAP_LIBS_BE,;t t
23681 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23682 s,@MSGFMT@,$MSGFMT,;t t
23683 s,@MSGMERGE@,$MSGMERGE,;t t
23684 s,@XGETTEXT@,$XGETTEXT,;t t
23685 s,@localedir@,$localedir,;t t
23686 s,@TCLSH@,$TCLSH,;t t
23687 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23688 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23689 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23690 s,@TCL_LIBS@,$TCL_LIBS,;t t
23691 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23692 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23693 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23694 s,@NSGMLS@,$NSGMLS,;t t
23695 s,@JADE@,$JADE,;t t
23696 s,@have_docbook@,$have_docbook,;t t
23697 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23698 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23699 s,@SGMLSPL@,$SGMLSPL,;t t
23700 s,@vpath_build@,$vpath_build,;t t
23701 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23702 CEOF
23703
23704 _ACEOF
23705
23706   cat >>$CONFIG_STATUS <<\_ACEOF
23707   # Split the substitutions into bite-sized pieces for seds with
23708   # small command number limits, like on Digital OSF/1 and HP-UX.
23709   ac_max_sed_lines=48
23710   ac_sed_frag=1 # Number of current file.
23711   ac_beg=1 # First line for current file.
23712   ac_end=$ac_max_sed_lines # Line after last line for current file.
23713   ac_more_lines=:
23714   ac_sed_cmds=
23715   while $ac_more_lines; do
23716     if test $ac_beg -gt 1; then
23717       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23718     else
23719       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23720     fi
23721     if test ! -s $tmp/subs.frag; then
23722       ac_more_lines=false
23723     else
23724       # The purpose of the label and of the branching condition is to
23725       # speed up the sed processing (if there are no `@' at all, there
23726       # is no need to browse any of the substitutions).
23727       # These are the two extra sed commands mentioned above.
23728       (echo ':t
23729   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23730       if test -z "$ac_sed_cmds"; then
23731         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23732       else
23733         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23734       fi
23735       ac_sed_frag=`expr $ac_sed_frag + 1`
23736       ac_beg=$ac_end
23737       ac_end=`expr $ac_end + $ac_max_sed_lines`
23738     fi
23739   done
23740   if test -z "$ac_sed_cmds"; then
23741     ac_sed_cmds=cat
23742   fi
23743 fi # test -n "$CONFIG_FILES"
23744
23745 _ACEOF
23746 cat >>$CONFIG_STATUS <<\_ACEOF
23747 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23748   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23749   case $ac_file in
23750   - | *:- | *:-:* ) # input from stdin
23751         cat >$tmp/stdin
23752         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23753         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23754   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23755         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23756   * )   ac_file_in=$ac_file.in ;;
23757   esac
23758
23759   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23760   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23761 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23762          X"$ac_file" : 'X\(//\)[^/]' \| \
23763          X"$ac_file" : 'X\(//\)$' \| \
23764          X"$ac_file" : 'X\(/\)' \| \
23765          .     : '\(.\)' 2>/dev/null ||
23766 echo X"$ac_file" |
23767     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23768           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23769           /^X\(\/\/\)$/{ s//\1/; q; }
23770           /^X\(\/\).*/{ s//\1/; q; }
23771           s/.*/./; q'`
23772   { if $as_mkdir_p; then
23773     mkdir -p "$ac_dir"
23774   else
23775     as_dir="$ac_dir"
23776     as_dirs=
23777     while test ! -d "$as_dir"; do
23778       as_dirs="$as_dir $as_dirs"
23779       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23780 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23781          X"$as_dir" : 'X\(//\)[^/]' \| \
23782          X"$as_dir" : 'X\(//\)$' \| \
23783          X"$as_dir" : 'X\(/\)' \| \
23784          .     : '\(.\)' 2>/dev/null ||
23785 echo X"$as_dir" |
23786     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23787           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23788           /^X\(\/\/\)$/{ s//\1/; q; }
23789           /^X\(\/\).*/{ s//\1/; q; }
23790           s/.*/./; q'`
23791     done
23792     test ! -n "$as_dirs" || mkdir $as_dirs
23793   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23794 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23795    { (exit 1); exit 1; }; }; }
23796
23797   ac_builddir=.
23798
23799 if test "$ac_dir" != .; then
23800   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23801   # A "../" for each directory in $ac_dir_suffix.
23802   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23803 else
23804   ac_dir_suffix= ac_top_builddir=
23805 fi
23806
23807 case $srcdir in
23808   .)  # No --srcdir option.  We are building in place.
23809     ac_srcdir=.
23810     if test -z "$ac_top_builddir"; then
23811        ac_top_srcdir=.
23812     else
23813        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23814     fi ;;
23815   [\\/]* | ?:[\\/]* )  # Absolute path.
23816     ac_srcdir=$srcdir$ac_dir_suffix;
23817     ac_top_srcdir=$srcdir ;;
23818   *) # Relative path.
23819     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23820     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23821 esac
23822
23823 # Do not use `cd foo && pwd` to compute absolute paths, because
23824 # the directories may not exist.
23825 case `pwd` in
23826 .) ac_abs_builddir="$ac_dir";;
23827 *)
23828   case "$ac_dir" in
23829   .) ac_abs_builddir=`pwd`;;
23830   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23831   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23832   esac;;
23833 esac
23834 case $ac_abs_builddir in
23835 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23836 *)
23837   case ${ac_top_builddir}. in
23838   .) ac_abs_top_builddir=$ac_abs_builddir;;
23839   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23840   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23841   esac;;
23842 esac
23843 case $ac_abs_builddir in
23844 .) ac_abs_srcdir=$ac_srcdir;;
23845 *)
23846   case $ac_srcdir in
23847   .) ac_abs_srcdir=$ac_abs_builddir;;
23848   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23849   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23850   esac;;
23851 esac
23852 case $ac_abs_builddir in
23853 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23854 *)
23855   case $ac_top_srcdir in
23856   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23857   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23858   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23859   esac;;
23860 esac
23861
23862
23863
23864   if test x"$ac_file" != x-; then
23865     { echo "$as_me:$LINENO: creating $ac_file" >&5
23866 echo "$as_me: creating $ac_file" >&6;}
23867     rm -f "$ac_file"
23868   fi
23869   # Let's still pretend it is `configure' which instantiates (i.e., don't
23870   # use $as_me), people would be surprised to read:
23871   #    /* config.h.  Generated by config.status.  */
23872   if test x"$ac_file" = x-; then
23873     configure_input=
23874   else
23875     configure_input="$ac_file.  "
23876   fi
23877   configure_input=$configure_input"Generated from `echo $ac_file_in |
23878                                      sed 's,.*/,,'` by configure."
23879
23880   # First look for the input files in the build tree, otherwise in the
23881   # src tree.
23882   ac_file_inputs=`IFS=:
23883     for f in $ac_file_in; do
23884       case $f in
23885       -) echo $tmp/stdin ;;
23886       [\\/$]*)
23887          # Absolute (can't be DOS-style, as IFS=:)
23888          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23889 echo "$as_me: error: cannot find input file: $f" >&2;}
23890    { (exit 1); exit 1; }; }
23891          echo "$f";;
23892       *) # Relative
23893          if test -f "$f"; then
23894            # Build tree
23895            echo "$f"
23896          elif test -f "$srcdir/$f"; then
23897            # Source tree
23898            echo "$srcdir/$f"
23899          else
23900            # /dev/null tree
23901            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23902 echo "$as_me: error: cannot find input file: $f" >&2;}
23903    { (exit 1); exit 1; }; }
23904          fi;;
23905       esac
23906     done` || { (exit 1); exit 1; }
23907 _ACEOF
23908 cat >>$CONFIG_STATUS <<_ACEOF
23909   sed "$ac_vpsub
23910 $extrasub
23911 _ACEOF
23912 cat >>$CONFIG_STATUS <<\_ACEOF
23913 :t
23914 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23915 s,@configure_input@,$configure_input,;t t
23916 s,@srcdir@,$ac_srcdir,;t t
23917 s,@abs_srcdir@,$ac_abs_srcdir,;t t
23918 s,@top_srcdir@,$ac_top_srcdir,;t t
23919 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23920 s,@builddir@,$ac_builddir,;t t
23921 s,@abs_builddir@,$ac_abs_builddir,;t t
23922 s,@top_builddir@,$ac_top_builddir,;t t
23923 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23924 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23925   rm -f $tmp/stdin
23926   if test x"$ac_file" != x-; then
23927     mv $tmp/out $ac_file
23928   else
23929     cat $tmp/out
23930     rm -f $tmp/out
23931   fi
23932
23933 done
23934 _ACEOF
23935 cat >>$CONFIG_STATUS <<\_ACEOF
23936
23937 #
23938 # CONFIG_HEADER section.
23939 #
23940
23941 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23942 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23943 #
23944 # ac_d sets the value in "#define NAME VALUE" lines.
23945 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
23946 ac_dB='[         ].*$,\1#\2'
23947 ac_dC=' '
23948 ac_dD=',;t'
23949 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23950 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23951 ac_uB='$,\1#\2define\3'
23952 ac_uC=' '
23953 ac_uD=',;t'
23954
23955 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23956   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23957   case $ac_file in
23958   - | *:- | *:-:* ) # input from stdin
23959         cat >$tmp/stdin
23960         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23961         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23962   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23963         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23964   * )   ac_file_in=$ac_file.in ;;
23965   esac
23966
23967   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23968 echo "$as_me: creating $ac_file" >&6;}
23969
23970   # First look for the input files in the build tree, otherwise in the
23971   # src tree.
23972   ac_file_inputs=`IFS=:
23973     for f in $ac_file_in; do
23974       case $f in
23975       -) echo $tmp/stdin ;;
23976       [\\/$]*)
23977          # Absolute (can't be DOS-style, as IFS=:)
23978          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23979 echo "$as_me: error: cannot find input file: $f" >&2;}
23980    { (exit 1); exit 1; }; }
23981          # Do quote $f, to prevent DOS paths from being IFS'd.
23982          echo "$f";;
23983       *) # Relative
23984          if test -f "$f"; then
23985            # Build tree
23986            echo "$f"
23987          elif test -f "$srcdir/$f"; then
23988            # Source tree
23989            echo "$srcdir/$f"
23990          else
23991            # /dev/null tree
23992            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23993 echo "$as_me: error: cannot find input file: $f" >&2;}
23994    { (exit 1); exit 1; }; }
23995          fi;;
23996       esac
23997     done` || { (exit 1); exit 1; }
23998   # Remove the trailing spaces.
23999   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
24000
24001 _ACEOF
24002
24003 # Transform confdefs.h into two sed scripts, `conftest.defines' and
24004 # `conftest.undefs', that substitutes the proper values into
24005 # config.h.in to produce config.h.  The first handles `#define'
24006 # templates, and the second `#undef' templates.
24007 # And first: Protect against being on the right side of a sed subst in
24008 # config.status.  Protect against being in an unquoted here document
24009 # in config.status.
24010 rm -f conftest.defines conftest.undefs
24011 # Using a here document instead of a string reduces the quoting nightmare.
24012 # Putting comments in sed scripts is not portable.
24013 #
24014 # `end' is used to avoid that the second main sed command (meant for
24015 # 0-ary CPP macros) applies to n-ary macro definitions.
24016 # See the Autoconf documentation for `clear'.
24017 cat >confdef2sed.sed <<\_ACEOF
24018 s/[\\&,]/\\&/g
24019 s,[\\$`],\\&,g
24020 t clear
24021 : clear
24022 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
24023 t end
24024 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
24025 : end
24026 _ACEOF
24027 # If some macros were called several times there might be several times
24028 # the same #defines, which is useless.  Nevertheless, we may not want to
24029 # sort them, since we want the *last* AC-DEFINE to be honored.
24030 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
24031 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
24032 rm -f confdef2sed.sed
24033
24034 # This sed command replaces #undef with comments.  This is necessary, for
24035 # example, in the case of _POSIX_SOURCE, which is predefined and required
24036 # on some systems where configure will not decide to define it.
24037 cat >>conftest.undefs <<\_ACEOF
24038 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
24039 _ACEOF
24040
24041 # Break up conftest.defines because some shells have a limit on the size
24042 # of here documents, and old seds have small limits too (100 cmds).
24043 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
24044 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
24045 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
24046 echo '  :' >>$CONFIG_STATUS
24047 rm -f conftest.tail
24048 while grep . conftest.defines >/dev/null
24049 do
24050   # Write a limited-size here document to $tmp/defines.sed.
24051   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
24052   # Speed up: don't consider the non `#define' lines.
24053   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
24054   # Work around the forget-to-reset-the-flag bug.
24055   echo 't clr' >>$CONFIG_STATUS
24056   echo ': clr' >>$CONFIG_STATUS
24057   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
24058   echo 'CEOF
24059   sed -f $tmp/defines.sed $tmp/in >$tmp/out
24060   rm -f $tmp/in
24061   mv $tmp/out $tmp/in
24062 ' >>$CONFIG_STATUS
24063   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
24064   rm -f conftest.defines
24065   mv conftest.tail conftest.defines
24066 done
24067 rm -f conftest.defines
24068 echo '  fi # grep' >>$CONFIG_STATUS
24069 echo >>$CONFIG_STATUS
24070
24071 # Break up conftest.undefs because some shells have a limit on the size
24072 # of here documents, and old seds have small limits too (100 cmds).
24073 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
24074 rm -f conftest.tail
24075 while grep . conftest.undefs >/dev/null
24076 do
24077   # Write a limited-size here document to $tmp/undefs.sed.
24078   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
24079   # Speed up: don't consider the non `#undef'
24080   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
24081   # Work around the forget-to-reset-the-flag bug.
24082   echo 't clr' >>$CONFIG_STATUS
24083   echo ': clr' >>$CONFIG_STATUS
24084   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
24085   echo 'CEOF
24086   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
24087   rm -f $tmp/in
24088   mv $tmp/out $tmp/in
24089 ' >>$CONFIG_STATUS
24090   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
24091   rm -f conftest.undefs
24092   mv conftest.tail conftest.undefs
24093 done
24094 rm -f conftest.undefs
24095
24096 cat >>$CONFIG_STATUS <<\_ACEOF
24097   # Let's still pretend it is `configure' which instantiates (i.e., don't
24098   # use $as_me), people would be surprised to read:
24099   #    /* config.h.  Generated by config.status.  */
24100   if test x"$ac_file" = x-; then
24101     echo "/* Generated by configure.  */" >$tmp/config.h
24102   else
24103     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
24104   fi
24105   cat $tmp/in >>$tmp/config.h
24106   rm -f $tmp/in
24107   if test x"$ac_file" != x-; then
24108     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
24109       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
24110 echo "$as_me: $ac_file is unchanged" >&6;}
24111     else
24112       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
24113 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24114          X"$ac_file" : 'X\(//\)[^/]' \| \
24115          X"$ac_file" : 'X\(//\)$' \| \
24116          X"$ac_file" : 'X\(/\)' \| \
24117          .     : '\(.\)' 2>/dev/null ||
24118 echo X"$ac_file" |
24119     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24120           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24121           /^X\(\/\/\)$/{ s//\1/; q; }
24122           /^X\(\/\).*/{ s//\1/; q; }
24123           s/.*/./; q'`
24124       { if $as_mkdir_p; then
24125     mkdir -p "$ac_dir"
24126   else
24127     as_dir="$ac_dir"
24128     as_dirs=
24129     while test ! -d "$as_dir"; do
24130       as_dirs="$as_dir $as_dirs"
24131       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24132 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24133          X"$as_dir" : 'X\(//\)[^/]' \| \
24134          X"$as_dir" : 'X\(//\)$' \| \
24135          X"$as_dir" : 'X\(/\)' \| \
24136          .     : '\(.\)' 2>/dev/null ||
24137 echo X"$as_dir" |
24138     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24139           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24140           /^X\(\/\/\)$/{ s//\1/; q; }
24141           /^X\(\/\).*/{ s//\1/; q; }
24142           s/.*/./; q'`
24143     done
24144     test ! -n "$as_dirs" || mkdir $as_dirs
24145   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24146 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24147    { (exit 1); exit 1; }; }; }
24148
24149       rm -f $ac_file
24150       mv $tmp/config.h $ac_file
24151     fi
24152   else
24153     cat $tmp/config.h
24154     rm -f $tmp/config.h
24155   fi
24156   # Run the commands associated with the file.
24157   case $ac_file in
24158     src/include/pg_config.h )
24159 # Update timestamp for pg_config.h (see Makefile.global)
24160 echo >src/include/stamp-h
24161  ;;
24162   esac
24163 done
24164 _ACEOF
24165 cat >>$CONFIG_STATUS <<\_ACEOF
24166
24167 #
24168 # CONFIG_LINKS section.
24169 #
24170
24171 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
24172   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24173   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24174
24175   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
24176 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
24177
24178   if test ! -r $srcdir/$ac_source; then
24179     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
24180 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
24181    { (exit 1); exit 1; }; }
24182   fi
24183   rm -f $ac_dest
24184
24185   # Make relative symlinks.
24186   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
24187 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24188          X"$ac_dest" : 'X\(//\)[^/]' \| \
24189          X"$ac_dest" : 'X\(//\)$' \| \
24190          X"$ac_dest" : 'X\(/\)' \| \
24191          .     : '\(.\)' 2>/dev/null ||
24192 echo X"$ac_dest" |
24193     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24194           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24195           /^X\(\/\/\)$/{ s//\1/; q; }
24196           /^X\(\/\).*/{ s//\1/; q; }
24197           s/.*/./; q'`
24198   { if $as_mkdir_p; then
24199     mkdir -p "$ac_dest_dir"
24200   else
24201     as_dir="$ac_dest_dir"
24202     as_dirs=
24203     while test ! -d "$as_dir"; do
24204       as_dirs="$as_dir $as_dirs"
24205       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24206 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24207          X"$as_dir" : 'X\(//\)[^/]' \| \
24208          X"$as_dir" : 'X\(//\)$' \| \
24209          X"$as_dir" : 'X\(/\)' \| \
24210          .     : '\(.\)' 2>/dev/null ||
24211 echo X"$as_dir" |
24212     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24213           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24214           /^X\(\/\/\)$/{ s//\1/; q; }
24215           /^X\(\/\).*/{ s//\1/; q; }
24216           s/.*/./; q'`
24217     done
24218     test ! -n "$as_dirs" || mkdir $as_dirs
24219   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
24220 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
24221    { (exit 1); exit 1; }; }; }
24222
24223   ac_builddir=.
24224
24225 if test "$ac_dest_dir" != .; then
24226   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
24227   # A "../" for each directory in $ac_dir_suffix.
24228   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24229 else
24230   ac_dir_suffix= ac_top_builddir=
24231 fi
24232
24233 case $srcdir in
24234   .)  # No --srcdir option.  We are building in place.
24235     ac_srcdir=.
24236     if test -z "$ac_top_builddir"; then
24237        ac_top_srcdir=.
24238     else
24239        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24240     fi ;;
24241   [\\/]* | ?:[\\/]* )  # Absolute path.
24242     ac_srcdir=$srcdir$ac_dir_suffix;
24243     ac_top_srcdir=$srcdir ;;
24244   *) # Relative path.
24245     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24246     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24247 esac
24248
24249 # Do not use `cd foo && pwd` to compute absolute paths, because
24250 # the directories may not exist.
24251 case `pwd` in
24252 .) ac_abs_builddir="$ac_dest_dir";;
24253 *)
24254   case "$ac_dest_dir" in
24255   .) ac_abs_builddir=`pwd`;;
24256   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
24257   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
24258   esac;;
24259 esac
24260 case $ac_abs_builddir in
24261 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24262 *)
24263   case ${ac_top_builddir}. in
24264   .) ac_abs_top_builddir=$ac_abs_builddir;;
24265   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24266   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24267   esac;;
24268 esac
24269 case $ac_abs_builddir in
24270 .) ac_abs_srcdir=$ac_srcdir;;
24271 *)
24272   case $ac_srcdir in
24273   .) ac_abs_srcdir=$ac_abs_builddir;;
24274   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24275   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24276   esac;;
24277 esac
24278 case $ac_abs_builddir in
24279 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24280 *)
24281   case $ac_top_srcdir in
24282   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24283   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24284   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24285   esac;;
24286 esac
24287
24288
24289   case $srcdir in
24290   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
24291       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
24292   esac
24293
24294   # Try a symlink, then a hard link, then a copy.
24295   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
24296     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
24297     cp -p $srcdir/$ac_source $ac_dest ||
24298     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
24299 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
24300    { (exit 1); exit 1; }; }
24301 done
24302 _ACEOF
24303 cat >>$CONFIG_STATUS <<\_ACEOF
24304
24305 #
24306 # CONFIG_COMMANDS section.
24307 #
24308 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24309   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24310   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24311   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24312 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24313          X"$ac_dest" : 'X\(//\)[^/]' \| \
24314          X"$ac_dest" : 'X\(//\)$' \| \
24315          X"$ac_dest" : 'X\(/\)' \| \
24316          .     : '\(.\)' 2>/dev/null ||
24317 echo X"$ac_dest" |
24318     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24319           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24320           /^X\(\/\/\)$/{ s//\1/; q; }
24321           /^X\(\/\).*/{ s//\1/; q; }
24322           s/.*/./; q'`
24323   { if $as_mkdir_p; then
24324     mkdir -p "$ac_dir"
24325   else
24326     as_dir="$ac_dir"
24327     as_dirs=
24328     while test ! -d "$as_dir"; do
24329       as_dirs="$as_dir $as_dirs"
24330       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24331 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24332          X"$as_dir" : 'X\(//\)[^/]' \| \
24333          X"$as_dir" : 'X\(//\)$' \| \
24334          X"$as_dir" : 'X\(/\)' \| \
24335          .     : '\(.\)' 2>/dev/null ||
24336 echo X"$as_dir" |
24337     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24338           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24339           /^X\(\/\/\)$/{ s//\1/; q; }
24340           /^X\(\/\).*/{ s//\1/; q; }
24341           s/.*/./; q'`
24342     done
24343     test ! -n "$as_dirs" || mkdir $as_dirs
24344   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24345 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24346    { (exit 1); exit 1; }; }; }
24347
24348   ac_builddir=.
24349
24350 if test "$ac_dir" != .; then
24351   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24352   # A "../" for each directory in $ac_dir_suffix.
24353   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24354 else
24355   ac_dir_suffix= ac_top_builddir=
24356 fi
24357
24358 case $srcdir in
24359   .)  # No --srcdir option.  We are building in place.
24360     ac_srcdir=.
24361     if test -z "$ac_top_builddir"; then
24362        ac_top_srcdir=.
24363     else
24364        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24365     fi ;;
24366   [\\/]* | ?:[\\/]* )  # Absolute path.
24367     ac_srcdir=$srcdir$ac_dir_suffix;
24368     ac_top_srcdir=$srcdir ;;
24369   *) # Relative path.
24370     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24371     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24372 esac
24373
24374 # Do not use `cd foo && pwd` to compute absolute paths, because
24375 # the directories may not exist.
24376 case `pwd` in
24377 .) ac_abs_builddir="$ac_dir";;
24378 *)
24379   case "$ac_dir" in
24380   .) ac_abs_builddir=`pwd`;;
24381   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24382   *) ac_abs_builddir=`pwd`/"$ac_dir";;
24383   esac;;
24384 esac
24385 case $ac_abs_builddir in
24386 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24387 *)
24388   case ${ac_top_builddir}. in
24389   .) ac_abs_top_builddir=$ac_abs_builddir;;
24390   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24391   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24392   esac;;
24393 esac
24394 case $ac_abs_builddir in
24395 .) ac_abs_srcdir=$ac_srcdir;;
24396 *)
24397   case $ac_srcdir in
24398   .) ac_abs_srcdir=$ac_abs_builddir;;
24399   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24400   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24401   esac;;
24402 esac
24403 case $ac_abs_builddir in
24404 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24405 *)
24406   case $ac_top_srcdir in
24407   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24408   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24409   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24410   esac;;
24411 esac
24412
24413
24414   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24415 echo "$as_me: executing $ac_dest commands" >&6;}
24416   case $ac_dest in
24417     check_win32_symlinks )
24418 # Links sometimes fail undetected on Mingw -
24419 # so here we detect it and warn the user
24420 for FILE in $CONFIG_LINKS
24421  do
24422         # test -e works for symlinks in the MinGW console
24423         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
24424 echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
24425  done
24426  ;;
24427   esac
24428 done
24429 _ACEOF
24430
24431 cat >>$CONFIG_STATUS <<\_ACEOF
24432
24433 { (exit 0); exit 0; }
24434 _ACEOF
24435 chmod +x $CONFIG_STATUS
24436 ac_clean_files=$ac_clean_files_save
24437
24438
24439 # configure is writing to config.log, and then calls config.status.
24440 # config.status does its own redirection, appending to config.log.
24441 # Unfortunately, on DOS this fails, as config.log is still kept open
24442 # by configure, so config.status won't be able to write to it; its
24443 # output is simply discarded.  So we exec the FD to /dev/null,
24444 # effectively closing config.log, so it can be properly (re)opened and
24445 # appended to by config.status.  When coming back to configure, we
24446 # need to make the FD available again.
24447 if test "$no_create" != yes; then
24448   ac_cs_success=:
24449   ac_config_status_args=
24450   test "$silent" = yes &&
24451     ac_config_status_args="$ac_config_status_args --quiet"
24452   exec 5>/dev/null
24453   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24454   exec 5>>config.log
24455   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24456   # would make configure fail if this is the last instruction.
24457   $ac_cs_success || { (exit 1); exit 1; }
24458 fi
24459
24460