]> granicus.if.org Git - postgresql/blob - configure
Make sure BYTE_ORDER gets defined in 64-bit builds on Solaris,
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59 for PostgreSQL 8.3devel.
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-2007, 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.3devel'
275 PACKAGE_STRING='PostgreSQL 8.3devel'
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.3devel 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.3devel:";;
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   --without-readline      do not use GNU Readline nor BSD Libedit for editing
896   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
897   --with-libxml           build with XML support
898   --without-zlib          do not use Zlib
899   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
900
901 Some influential environment variables:
902   CC          C compiler command
903   CFLAGS      C compiler flags
904   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
905               nonstandard directory <lib dir>
906   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
907               headers in a nonstandard directory <include dir>
908   CPP         C preprocessor
909   LDFLAGS_SL
910   DOCBOOKSTYLE
911               location of DocBook stylesheets
912
913 Use these variables to override the choices made by `configure' or to help
914 it to find libraries and programs with nonstandard names/locations.
915
916 Report bugs to <pgsql-bugs@postgresql.org>.
917 _ACEOF
918 fi
919
920 if test "$ac_init_help" = "recursive"; then
921   # If there are subdirs, report their specific --help.
922   ac_popdir=`pwd`
923   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
924     test -d $ac_dir || continue
925     ac_builddir=.
926
927 if test "$ac_dir" != .; then
928   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
929   # A "../" for each directory in $ac_dir_suffix.
930   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
931 else
932   ac_dir_suffix= ac_top_builddir=
933 fi
934
935 case $srcdir in
936   .)  # No --srcdir option.  We are building in place.
937     ac_srcdir=.
938     if test -z "$ac_top_builddir"; then
939        ac_top_srcdir=.
940     else
941        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
942     fi ;;
943   [\\/]* | ?:[\\/]* )  # Absolute path.
944     ac_srcdir=$srcdir$ac_dir_suffix;
945     ac_top_srcdir=$srcdir ;;
946   *) # Relative path.
947     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
948     ac_top_srcdir=$ac_top_builddir$srcdir ;;
949 esac
950
951 # Do not use `cd foo && pwd` to compute absolute paths, because
952 # the directories may not exist.
953 case `pwd` in
954 .) ac_abs_builddir="$ac_dir";;
955 *)
956   case "$ac_dir" in
957   .) ac_abs_builddir=`pwd`;;
958   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
959   *) ac_abs_builddir=`pwd`/"$ac_dir";;
960   esac;;
961 esac
962 case $ac_abs_builddir in
963 .) ac_abs_top_builddir=${ac_top_builddir}.;;
964 *)
965   case ${ac_top_builddir}. in
966   .) ac_abs_top_builddir=$ac_abs_builddir;;
967   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
968   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
969   esac;;
970 esac
971 case $ac_abs_builddir in
972 .) ac_abs_srcdir=$ac_srcdir;;
973 *)
974   case $ac_srcdir in
975   .) ac_abs_srcdir=$ac_abs_builddir;;
976   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
977   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
978   esac;;
979 esac
980 case $ac_abs_builddir in
981 .) ac_abs_top_srcdir=$ac_top_srcdir;;
982 *)
983   case $ac_top_srcdir in
984   .) ac_abs_top_srcdir=$ac_abs_builddir;;
985   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
986   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
987   esac;;
988 esac
989
990     cd $ac_dir
991     # Check for guested configure; otherwise get Cygnus style configure.
992     if test -f $ac_srcdir/configure.gnu; then
993       echo
994       $SHELL $ac_srcdir/configure.gnu  --help=recursive
995     elif test -f $ac_srcdir/configure; then
996       echo
997       $SHELL $ac_srcdir/configure  --help=recursive
998     elif test -f $ac_srcdir/configure.ac ||
999            test -f $ac_srcdir/configure.in; then
1000       echo
1001       $ac_configure --help
1002     else
1003       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1004     fi
1005     cd $ac_popdir
1006   done
1007 fi
1008
1009 test -n "$ac_init_help" && exit 0
1010 if $ac_init_version; then
1011   cat <<\_ACEOF
1012 PostgreSQL configure 8.3devel
1013 generated by GNU Autoconf 2.59
1014
1015 Copyright (C) 2003 Free Software Foundation, Inc.
1016 This configure script is free software; the Free Software Foundation
1017 gives unlimited permission to copy, distribute and modify it.
1018
1019 Copyright (c) 1996-2007, PostgreSQL Global Development Group
1020 _ACEOF
1021   exit 0
1022 fi
1023 exec 5>config.log
1024 cat >&5 <<_ACEOF
1025 This file contains any messages produced by compilers while
1026 running configure, to aid debugging if configure makes a mistake.
1027
1028 It was created by PostgreSQL $as_me 8.3devel, which was
1029 generated by GNU Autoconf 2.59.  Invocation command line was
1030
1031   $ $0 $@
1032
1033 _ACEOF
1034 {
1035 cat <<_ASUNAME
1036 ## --------- ##
1037 ## Platform. ##
1038 ## --------- ##
1039
1040 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1041 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1042 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1043 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1044 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1045
1046 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1047 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1048
1049 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1050 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1051 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1052 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1053 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1054 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1055 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1056
1057 _ASUNAME
1058
1059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1060 for as_dir in $PATH
1061 do
1062   IFS=$as_save_IFS
1063   test -z "$as_dir" && as_dir=.
1064   echo "PATH: $as_dir"
1065 done
1066
1067 } >&5
1068
1069 cat >&5 <<_ACEOF
1070
1071
1072 ## ----------- ##
1073 ## Core tests. ##
1074 ## ----------- ##
1075
1076 _ACEOF
1077
1078
1079 # Keep a trace of the command line.
1080 # Strip out --no-create and --no-recursion so they do not pile up.
1081 # Strip out --silent because we don't want to record it for future runs.
1082 # Also quote any args containing shell meta-characters.
1083 # Make two passes to allow for proper duplicate-argument suppression.
1084 ac_configure_args=
1085 ac_configure_args0=
1086 ac_configure_args1=
1087 ac_sep=
1088 ac_must_keep_next=false
1089 for ac_pass in 1 2
1090 do
1091   for ac_arg
1092   do
1093     case $ac_arg in
1094     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1095     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1096     | -silent | --silent | --silen | --sile | --sil)
1097       continue ;;
1098     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1099       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1100     esac
1101     case $ac_pass in
1102     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1103     2)
1104       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1105       if test $ac_must_keep_next = true; then
1106         ac_must_keep_next=false # Got value, back to normal.
1107       else
1108         case $ac_arg in
1109           *=* | --config-cache | -C | -disable-* | --disable-* \
1110           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1111           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1112           | -with-* | --with-* | -without-* | --without-* | --x)
1113             case "$ac_configure_args0 " in
1114               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1115             esac
1116             ;;
1117           -* ) ac_must_keep_next=true ;;
1118         esac
1119       fi
1120       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1121       # Get rid of the leading space.
1122       ac_sep=" "
1123       ;;
1124     esac
1125   done
1126 done
1127 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1128 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1129
1130 # When interrupted or exit'd, cleanup temporary files, and complete
1131 # config.log.  We remove comments because anyway the quotes in there
1132 # would cause problems or look ugly.
1133 # WARNING: Be sure not to use single quotes in there, as some shells,
1134 # such as our DU 5.0 friend, will then `close' the trap.
1135 trap 'exit_status=$?
1136   # Save into config.log some information that might help in debugging.
1137   {
1138     echo
1139
1140     cat <<\_ASBOX
1141 ## ---------------- ##
1142 ## Cache variables. ##
1143 ## ---------------- ##
1144 _ASBOX
1145     echo
1146     # The following way of writing the cache mishandles newlines in values,
1147 {
1148   (set) 2>&1 |
1149     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1150     *ac_space=\ *)
1151       sed -n \
1152         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1153           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1154       ;;
1155     *)
1156       sed -n \
1157         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1158       ;;
1159     esac;
1160 }
1161     echo
1162
1163     cat <<\_ASBOX
1164 ## ----------------- ##
1165 ## Output variables. ##
1166 ## ----------------- ##
1167 _ASBOX
1168     echo
1169     for ac_var in $ac_subst_vars
1170     do
1171       eval ac_val=$`echo $ac_var`
1172       echo "$ac_var='"'"'$ac_val'"'"'"
1173     done | sort
1174     echo
1175
1176     if test -n "$ac_subst_files"; then
1177       cat <<\_ASBOX
1178 ## ------------- ##
1179 ## Output files. ##
1180 ## ------------- ##
1181 _ASBOX
1182       echo
1183       for ac_var in $ac_subst_files
1184       do
1185         eval ac_val=$`echo $ac_var`
1186         echo "$ac_var='"'"'$ac_val'"'"'"
1187       done | sort
1188       echo
1189     fi
1190
1191     if test -s confdefs.h; then
1192       cat <<\_ASBOX
1193 ## ----------- ##
1194 ## confdefs.h. ##
1195 ## ----------- ##
1196 _ASBOX
1197       echo
1198       sed "/^$/d" confdefs.h | sort
1199       echo
1200     fi
1201     test "$ac_signal" != 0 &&
1202       echo "$as_me: caught signal $ac_signal"
1203     echo "$as_me: exit $exit_status"
1204   } >&5
1205   rm -f core *.core &&
1206   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1207     exit $exit_status
1208      ' 0
1209 for ac_signal in 1 2 13 15; do
1210   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1211 done
1212 ac_signal=0
1213
1214 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1215 rm -rf conftest* confdefs.h
1216 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1217 echo >confdefs.h
1218
1219 # Predefined preprocessor variables.
1220
1221 cat >>confdefs.h <<_ACEOF
1222 #define PACKAGE_NAME "$PACKAGE_NAME"
1223 _ACEOF
1224
1225
1226 cat >>confdefs.h <<_ACEOF
1227 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1228 _ACEOF
1229
1230
1231 cat >>confdefs.h <<_ACEOF
1232 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1233 _ACEOF
1234
1235
1236 cat >>confdefs.h <<_ACEOF
1237 #define PACKAGE_STRING "$PACKAGE_STRING"
1238 _ACEOF
1239
1240
1241 cat >>confdefs.h <<_ACEOF
1242 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1243 _ACEOF
1244
1245
1246 # Let the site file select an alternate cache file if it wants to.
1247 # Prefer explicitly selected file to automatically selected ones.
1248 if test -z "$CONFIG_SITE"; then
1249   if test "x$prefix" != xNONE; then
1250     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1251   else
1252     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1253   fi
1254 fi
1255 for ac_site_file in $CONFIG_SITE; do
1256   if test -r "$ac_site_file"; then
1257     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1258 echo "$as_me: loading site script $ac_site_file" >&6;}
1259     sed 's/^/| /' "$ac_site_file" >&5
1260     . "$ac_site_file"
1261   fi
1262 done
1263
1264 if test -r "$cache_file"; then
1265   # Some versions of bash will fail to source /dev/null (special
1266   # files actually), so we avoid doing that.
1267   if test -f "$cache_file"; then
1268     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1269 echo "$as_me: loading cache $cache_file" >&6;}
1270     case $cache_file in
1271       [\\/]* | ?:[\\/]* ) . $cache_file;;
1272       *)                      . ./$cache_file;;
1273     esac
1274   fi
1275 else
1276   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1277 echo "$as_me: creating cache $cache_file" >&6;}
1278   >$cache_file
1279 fi
1280
1281 # Check that the precious variables saved in the cache have kept the same
1282 # value.
1283 ac_cache_corrupted=false
1284 for ac_var in `(set) 2>&1 |
1285                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1286   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1287   eval ac_new_set=\$ac_env_${ac_var}_set
1288   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1289   eval ac_new_val="\$ac_env_${ac_var}_value"
1290   case $ac_old_set,$ac_new_set in
1291     set,)
1292       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1293 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1294       ac_cache_corrupted=: ;;
1295     ,set)
1296       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1297 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1298       ac_cache_corrupted=: ;;
1299     ,);;
1300     *)
1301       if test "x$ac_old_val" != "x$ac_new_val"; then
1302         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1303 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1304         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1305 echo "$as_me:   former value:  $ac_old_val" >&2;}
1306         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1307 echo "$as_me:   current value: $ac_new_val" >&2;}
1308         ac_cache_corrupted=:
1309       fi;;
1310   esac
1311   # Pass precious variables to config.status.
1312   if test "$ac_new_set" = set; then
1313     case $ac_new_val in
1314     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1315       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1316     *) ac_arg=$ac_var=$ac_new_val ;;
1317     esac
1318     case " $ac_configure_args " in
1319       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1320       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1321     esac
1322   fi
1323 done
1324 if $ac_cache_corrupted; then
1325   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1326 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1327   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1328 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1329    { (exit 1); exit 1; }; }
1330 fi
1331
1332 ac_ext=c
1333 ac_cpp='$CPP $CPPFLAGS'
1334 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1335 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1336 ac_compiler_gnu=$ac_cv_c_compiler_gnu
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
1368 ac_aux_dir=
1369 for ac_dir in config $srcdir/config; do
1370   if test -f $ac_dir/install-sh; then
1371     ac_aux_dir=$ac_dir
1372     ac_install_sh="$ac_aux_dir/install-sh -c"
1373     break
1374   elif test -f $ac_dir/install.sh; then
1375     ac_aux_dir=$ac_dir
1376     ac_install_sh="$ac_aux_dir/install.sh -c"
1377     break
1378   elif test -f $ac_dir/shtool; then
1379     ac_aux_dir=$ac_dir
1380     ac_install_sh="$ac_aux_dir/shtool install -c"
1381     break
1382   fi
1383 done
1384 if test -z "$ac_aux_dir"; then
1385   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1386 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1387    { (exit 1); exit 1; }; }
1388 fi
1389 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1390 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1391 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1392
1393
1394 configure_args=$ac_configure_args
1395
1396
1397
1398 cat >>confdefs.h <<_ACEOF
1399 #define PG_VERSION "$PACKAGE_VERSION"
1400 _ACEOF
1401
1402
1403 # Make sure we can run config.sub.
1404 $ac_config_sub sun4 >/dev/null 2>&1 ||
1405   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1406 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1407    { (exit 1); exit 1; }; }
1408
1409 echo "$as_me:$LINENO: checking build system type" >&5
1410 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1411 if test "${ac_cv_build+set}" = set; then
1412   echo $ECHO_N "(cached) $ECHO_C" >&6
1413 else
1414   ac_cv_build_alias=$build_alias
1415 test -z "$ac_cv_build_alias" &&
1416   ac_cv_build_alias=`$ac_config_guess`
1417 test -z "$ac_cv_build_alias" &&
1418   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1419 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1420    { (exit 1); exit 1; }; }
1421 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1422   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1423 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1424    { (exit 1); exit 1; }; }
1425
1426 fi
1427 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1428 echo "${ECHO_T}$ac_cv_build" >&6
1429 build=$ac_cv_build
1430 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1431 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1432 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1433
1434
1435 echo "$as_me:$LINENO: checking host system type" >&5
1436 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1437 if test "${ac_cv_host+set}" = set; then
1438   echo $ECHO_N "(cached) $ECHO_C" >&6
1439 else
1440   ac_cv_host_alias=$host_alias
1441 test -z "$ac_cv_host_alias" &&
1442   ac_cv_host_alias=$ac_cv_build_alias
1443 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1444   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1445 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1446    { (exit 1); exit 1; }; }
1447
1448 fi
1449 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1450 echo "${ECHO_T}$ac_cv_host" >&6
1451 host=$ac_cv_host
1452 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1453 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1454 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1455
1456
1457
1458 template=
1459 echo "$as_me:$LINENO: checking which template to use" >&5
1460 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1461
1462
1463 pgac_args="$pgac_args with_template"
1464
1465
1466 # Check whether --with-template or --without-template was given.
1467 if test "${with_template+set}" = set; then
1468   withval="$with_template"
1469
1470   case $withval in
1471     yes)
1472       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1473 echo "$as_me: error: argument required for --with-template option" >&2;}
1474    { (exit 1); exit 1; }; }
1475       ;;
1476     no)
1477       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1478 echo "$as_me: error: argument required for --with-template option" >&2;}
1479    { (exit 1); exit 1; }; }
1480       ;;
1481     *)
1482
1483   case $withval in
1484     list)   echo; ls "$srcdir/src/template"; exit;;
1485     *)      if test -f "$srcdir/src/template/$with_template" ; then
1486               template=$withval
1487             else
1488               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1489 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1490    { (exit 1); exit 1; }; }
1491             fi;;
1492   esac
1493
1494       ;;
1495   esac
1496
1497 else
1498
1499 # --with-template not given
1500
1501 case $host_os in
1502      aix*) template=aix ;;
1503     bsdi*) template=bsdi ;;
1504   cygwin*) template=cygwin ;;
1505   darwin*) template=darwin ;;
1506     dgux*) template=dgux ;;
1507  freebsd*) template=freebsd ;;
1508     hpux*) template=hpux ;;
1509     irix*) template=irix ;;
1510  linux*|gnu*|k*bsd*-gnu)
1511            template=linux ;;
1512    mingw*) template=win32 ;;
1513   netbsd*) template=netbsd ;;
1514 nextstep*) template=nextstep ;;
1515  openbsd*) template=openbsd ;;
1516      osf*) template=osf ;;
1517      sco*) template=sco ;;
1518  solaris*) template=solaris ;;
1519    sunos*) template=sunos4 ;;
1520  sysv4.2*)
1521         case $host_vendor in
1522           univel) template=univel ;;
1523         esac ;;
1524    sysv4*) template=svr4 ;;
1525    sysv5*) template=unixware ;;
1526   ultrix*) template=ultrix4 ;;
1527 esac
1528
1529   if test x"$template" = x"" ; then
1530     { { echo "$as_me:$LINENO: error:
1531 *******************************************************************
1532 PostgreSQL has apparently not been ported to your platform yet.
1533 To try a manual configuration, look into the src/template directory
1534 for a similar platform and use the '--with-template=' option.
1535
1536 Please also contact <pgsql-ports@postgresql.org> to see about
1537 rectifying this.  Include the above 'checking host system type...'
1538 line.
1539 *******************************************************************
1540 " >&5
1541 echo "$as_me: error:
1542 *******************************************************************
1543 PostgreSQL has apparently not been ported to your platform yet.
1544 To try a manual configuration, look into the src/template directory
1545 for a similar platform and use the '--with-template=' option.
1546
1547 Please also contact <pgsql-ports@postgresql.org> to see about
1548 rectifying this.  Include the above 'checking host system type...'
1549 line.
1550 *******************************************************************
1551 " >&2;}
1552    { (exit 1); exit 1; }; }
1553   fi
1554
1555
1556 fi;
1557
1558
1559 echo "$as_me:$LINENO: result: $template" >&5
1560 echo "${ECHO_T}$template" >&6
1561
1562 PORTNAME=$template
1563
1564
1565 # Initialize default assumption that we do not need separate assembly code
1566 # for TAS (test-and-set).  This can be overridden by the template file
1567 # when it's executed.
1568 need_tas=no
1569 tas_file=dummy.s
1570
1571
1572
1573 ##
1574 ## Command line options
1575 ##
1576
1577 #
1578 # Installation directory for documentation
1579 #
1580
1581 pgac_args="$pgac_args with_docdir"
1582
1583
1584 # Check whether --with-docdir or --without-docdir was given.
1585 if test "${with_docdir+set}" = set; then
1586   withval="$with_docdir"
1587
1588   case $withval in
1589     yes)
1590       { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1591 echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1592    { (exit 1); exit 1; }; }
1593       ;;
1594     no)
1595       docdir=
1596       ;;
1597     *)
1598       docdir=$withval
1599       ;;
1600   esac
1601
1602 else
1603   docdir='${prefix}/doc'
1604 fi;
1605
1606
1607
1608
1609 #
1610 # Add non-standard directories to the include path
1611 #
1612
1613 pgac_args="$pgac_args with_includes"
1614
1615
1616 # Check whether --with-includes or --without-includes was given.
1617 if test "${with_includes+set}" = set; then
1618   withval="$with_includes"
1619
1620   case $withval in
1621     yes)
1622       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1623 echo "$as_me: error: argument required for --with-includes option" >&2;}
1624    { (exit 1); exit 1; }; }
1625       ;;
1626     no)
1627       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1628 echo "$as_me: error: argument required for --with-includes option" >&2;}
1629    { (exit 1); exit 1; }; }
1630       ;;
1631     *)
1632
1633       ;;
1634   esac
1635
1636 fi;
1637
1638
1639
1640 #
1641 # Add non-standard directories to the library search path
1642 #
1643
1644 pgac_args="$pgac_args with_libraries"
1645
1646
1647 # Check whether --with-libraries or --without-libraries was given.
1648 if test "${with_libraries+set}" = set; then
1649   withval="$with_libraries"
1650
1651   case $withval in
1652     yes)
1653       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1654 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1655    { (exit 1); exit 1; }; }
1656       ;;
1657     no)
1658       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1659 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1660    { (exit 1); exit 1; }; }
1661       ;;
1662     *)
1663       LIBRARY_DIRS=$withval
1664       ;;
1665   esac
1666
1667 fi;
1668
1669
1670
1671 pgac_args="$pgac_args with_libs"
1672
1673
1674 # Check whether --with-libs or --without-libs was given.
1675 if test "${with_libs+set}" = set; then
1676   withval="$with_libs"
1677
1678   case $withval in
1679     yes)
1680       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1681 echo "$as_me: error: argument required for --with-libs option" >&2;}
1682    { (exit 1); exit 1; }; }
1683       ;;
1684     no)
1685       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1686 echo "$as_me: error: argument required for --with-libs option" >&2;}
1687    { (exit 1); exit 1; }; }
1688       ;;
1689     *)
1690       LIBRARY_DIRS=$withval
1691       ;;
1692   esac
1693
1694 fi;
1695
1696
1697
1698 #
1699 # 64-bit integer date/time storage (--enable-integer-datetimes)
1700 #
1701 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1702 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1703
1704 pgac_args="$pgac_args enable_integer_datetimes"
1705
1706 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1707 if test "${enable_integer_datetimes+set}" = set; then
1708   enableval="$enable_integer_datetimes"
1709
1710   case $enableval in
1711     yes)
1712
1713 cat >>confdefs.h <<\_ACEOF
1714 #define USE_INTEGER_DATETIMES 1
1715 _ACEOF
1716
1717       ;;
1718     no)
1719       :
1720       ;;
1721     *)
1722       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1723 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1724    { (exit 1); exit 1; }; }
1725       ;;
1726   esac
1727
1728 else
1729   enable_integer_datetimes=no
1730
1731 fi;
1732
1733 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1734 echo "${ECHO_T}$enable_integer_datetimes" >&6
1735
1736
1737 #
1738 # NLS
1739 #
1740 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1741 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1742
1743 pgac_args="$pgac_args enable_nls"
1744
1745 # Check whether --enable-nls or --disable-nls was given.
1746 if test "${enable_nls+set}" = set; then
1747   enableval="$enable_nls"
1748
1749   case $enableval in
1750     yes)
1751       :
1752       ;;
1753     no)
1754       :
1755       ;;
1756     *)
1757       enable_nls=yes
1758 WANTED_LANGUAGES=$enableval
1759       ;;
1760   esac
1761
1762 else
1763   enable_nls=no
1764 fi;
1765
1766
1767 if test "$enable_nls" = yes; then
1768
1769 cat >>confdefs.h <<\_ACEOF
1770 #define ENABLE_NLS 1
1771 _ACEOF
1772
1773 fi
1774
1775 echo "$as_me:$LINENO: result: $enable_nls" >&5
1776 echo "${ECHO_T}$enable_nls" >&6
1777
1778
1779
1780 #
1781 # Default port number (--with-pgport), default 5432
1782 #
1783 echo "$as_me:$LINENO: checking for default port number" >&5
1784 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1785
1786 pgac_args="$pgac_args with_pgport"
1787
1788
1789 # Check whether --with-pgport or --without-pgport was given.
1790 if test "${with_pgport+set}" = set; then
1791   withval="$with_pgport"
1792
1793   case $withval in
1794     yes)
1795       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1796 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1797    { (exit 1); exit 1; }; }
1798       ;;
1799     no)
1800       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1801 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1802    { (exit 1); exit 1; }; }
1803       ;;
1804     *)
1805       default_port=$withval
1806       ;;
1807   esac
1808
1809 else
1810   default_port=5432
1811 fi;
1812
1813 echo "$as_me:$LINENO: result: $default_port" >&5
1814 echo "${ECHO_T}$default_port" >&6
1815 # Need both of these because some places want an integer and some a string
1816
1817 cat >>confdefs.h <<_ACEOF
1818 #define DEF_PGPORT ${default_port}
1819 _ACEOF
1820
1821
1822 cat >>confdefs.h <<_ACEOF
1823 #define DEF_PGPORT_STR "${default_port}"
1824 _ACEOF
1825
1826
1827
1828 #
1829 # Option to disable shared libraries
1830 #
1831
1832 pgac_args="$pgac_args enable_shared"
1833
1834 # Check whether --enable-shared or --disable-shared was given.
1835 if test "${enable_shared+set}" = set; then
1836   enableval="$enable_shared"
1837
1838   case $enableval in
1839     yes)
1840       :
1841       ;;
1842     no)
1843       :
1844       ;;
1845     *)
1846       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1847 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1848    { (exit 1); exit 1; }; }
1849       ;;
1850   esac
1851
1852 else
1853   enable_shared=yes
1854
1855 fi;
1856
1857
1858
1859 #
1860 # '-rpath'-like feature can be disabled
1861 #
1862
1863 pgac_args="$pgac_args enable_rpath"
1864
1865 # Check whether --enable-rpath or --disable-rpath was given.
1866 if test "${enable_rpath+set}" = set; then
1867   enableval="$enable_rpath"
1868
1869   case $enableval in
1870     yes)
1871       :
1872       ;;
1873     no)
1874       :
1875       ;;
1876     *)
1877       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1878 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1879    { (exit 1); exit 1; }; }
1880       ;;
1881   esac
1882
1883 else
1884   enable_rpath=yes
1885
1886 fi;
1887
1888
1889
1890 #
1891 # Spinlocks
1892 #
1893
1894 pgac_args="$pgac_args enable_spinlocks"
1895
1896 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1897 if test "${enable_spinlocks+set}" = set; then
1898   enableval="$enable_spinlocks"
1899
1900   case $enableval in
1901     yes)
1902       :
1903       ;;
1904     no)
1905       :
1906       ;;
1907     *)
1908       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1909 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1910    { (exit 1); exit 1; }; }
1911       ;;
1912   esac
1913
1914 else
1915   enable_spinlocks=yes
1916
1917 fi;
1918
1919
1920 #
1921 # --enable-debug adds -g to compiler flags
1922 #
1923
1924 pgac_args="$pgac_args enable_debug"
1925
1926 # Check whether --enable-debug or --disable-debug was given.
1927 if test "${enable_debug+set}" = set; then
1928   enableval="$enable_debug"
1929
1930   case $enableval in
1931     yes)
1932       :
1933       ;;
1934     no)
1935       :
1936       ;;
1937     *)
1938       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1939 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1940    { (exit 1); exit 1; }; }
1941       ;;
1942   esac
1943
1944 else
1945   enable_debug=no
1946
1947 fi;
1948
1949
1950
1951 #
1952 # DTrace
1953 #
1954
1955 pgac_args="$pgac_args enable_dtrace"
1956
1957 # Check whether --enable-dtrace or --disable-dtrace was given.
1958 if test "${enable_dtrace+set}" = set; then
1959   enableval="$enable_dtrace"
1960
1961   case $enableval in
1962     yes)
1963
1964 cat >>confdefs.h <<\_ACEOF
1965 #define ENABLE_DTRACE 1
1966 _ACEOF
1967
1968 for ac_prog in dtrace
1969 do
1970   # Extract the first word of "$ac_prog", so it can be a program name with args.
1971 set dummy $ac_prog; ac_word=$2
1972 echo "$as_me:$LINENO: checking for $ac_word" >&5
1973 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1974 if test "${ac_cv_prog_DTRACE+set}" = set; then
1975   echo $ECHO_N "(cached) $ECHO_C" >&6
1976 else
1977   if test -n "$DTRACE"; then
1978   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
1979 else
1980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1981 for as_dir in $PATH
1982 do
1983   IFS=$as_save_IFS
1984   test -z "$as_dir" && as_dir=.
1985   for ac_exec_ext in '' $ac_executable_extensions; do
1986   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1987     ac_cv_prog_DTRACE="$ac_prog"
1988     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1989     break 2
1990   fi
1991 done
1992 done
1993
1994 fi
1995 fi
1996 DTRACE=$ac_cv_prog_DTRACE
1997 if test -n "$DTRACE"; then
1998   echo "$as_me:$LINENO: result: $DTRACE" >&5
1999 echo "${ECHO_T}$DTRACE" >&6
2000 else
2001   echo "$as_me:$LINENO: result: no" >&5
2002 echo "${ECHO_T}no" >&6
2003 fi
2004
2005   test -n "$DTRACE" && break
2006 done
2007
2008 if test -z "$DTRACE"; then
2009   { { echo "$as_me:$LINENO: error: dtrace not found" >&5
2010 echo "$as_me: error: dtrace not found" >&2;}
2011    { (exit 1); exit 1; }; }
2012 fi
2013
2014       ;;
2015     no)
2016       :
2017       ;;
2018     *)
2019       { { echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2020 echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2021    { (exit 1); exit 1; }; }
2022       ;;
2023   esac
2024
2025 else
2026   enable_dtrace=no
2027
2028 fi;
2029
2030
2031
2032 #
2033 # C compiler
2034 #
2035
2036 # For historical reasons you can also use --with-CC to specify the C compiler
2037 # to use, although the standard way to do this is to set the CC environment
2038 # variable.
2039
2040 pgac_args="$pgac_args with_CC"
2041
2042
2043 # Check whether --with-CC or --without-CC was given.
2044 if test "${with_CC+set}" = set; then
2045   withval="$with_CC"
2046
2047   case $withval in
2048     yes)
2049       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2050 echo "$as_me: error: argument required for --with-CC option" >&2;}
2051    { (exit 1); exit 1; }; }
2052       ;;
2053     no)
2054       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2055 echo "$as_me: error: argument required for --with-CC option" >&2;}
2056    { (exit 1); exit 1; }; }
2057       ;;
2058     *)
2059       CC=$with_CC
2060       ;;
2061   esac
2062
2063 fi;
2064
2065
2066 case $template in
2067   aix) pgac_cc_list="gcc xlc";;
2068  irix) pgac_cc_list="cc";; # no gcc
2069     *) pgac_cc_list="gcc cc";;
2070 esac
2071
2072 ac_ext=c
2073 ac_cpp='$CPP $CPPFLAGS'
2074 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2075 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2076 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2077 if test -n "$ac_tool_prefix"; then
2078   for ac_prog in $pgac_cc_list
2079   do
2080     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2081 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2082 echo "$as_me:$LINENO: checking for $ac_word" >&5
2083 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2084 if test "${ac_cv_prog_CC+set}" = set; then
2085   echo $ECHO_N "(cached) $ECHO_C" >&6
2086 else
2087   if test -n "$CC"; then
2088   ac_cv_prog_CC="$CC" # Let the user override the test.
2089 else
2090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2091 for as_dir in $PATH
2092 do
2093   IFS=$as_save_IFS
2094   test -z "$as_dir" && as_dir=.
2095   for ac_exec_ext in '' $ac_executable_extensions; do
2096   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2097     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2098     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2099     break 2
2100   fi
2101 done
2102 done
2103
2104 fi
2105 fi
2106 CC=$ac_cv_prog_CC
2107 if test -n "$CC"; then
2108   echo "$as_me:$LINENO: result: $CC" >&5
2109 echo "${ECHO_T}$CC" >&6
2110 else
2111   echo "$as_me:$LINENO: result: no" >&5
2112 echo "${ECHO_T}no" >&6
2113 fi
2114
2115     test -n "$CC" && break
2116   done
2117 fi
2118 if test -z "$CC"; then
2119   ac_ct_CC=$CC
2120   for ac_prog in $pgac_cc_list
2121 do
2122   # Extract the first word of "$ac_prog", so it can be a program name with args.
2123 set dummy $ac_prog; ac_word=$2
2124 echo "$as_me:$LINENO: checking for $ac_word" >&5
2125 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2126 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2127   echo $ECHO_N "(cached) $ECHO_C" >&6
2128 else
2129   if test -n "$ac_ct_CC"; then
2130   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2131 else
2132 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2133 for as_dir in $PATH
2134 do
2135   IFS=$as_save_IFS
2136   test -z "$as_dir" && as_dir=.
2137   for ac_exec_ext in '' $ac_executable_extensions; do
2138   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2139     ac_cv_prog_ac_ct_CC="$ac_prog"
2140     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2141     break 2
2142   fi
2143 done
2144 done
2145
2146 fi
2147 fi
2148 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2149 if test -n "$ac_ct_CC"; then
2150   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2151 echo "${ECHO_T}$ac_ct_CC" >&6
2152 else
2153   echo "$as_me:$LINENO: result: no" >&5
2154 echo "${ECHO_T}no" >&6
2155 fi
2156
2157   test -n "$ac_ct_CC" && break
2158 done
2159
2160   CC=$ac_ct_CC
2161 fi
2162
2163
2164 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2165 See \`config.log' for more details." >&5
2166 echo "$as_me: error: no acceptable C compiler found in \$PATH
2167 See \`config.log' for more details." >&2;}
2168    { (exit 1); exit 1; }; }
2169
2170 # Provide some information about the compiler.
2171 echo "$as_me:$LINENO:" \
2172      "checking for C compiler version" >&5
2173 ac_compiler=`set X $ac_compile; echo $2`
2174 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2175   (eval $ac_compiler --version </dev/null >&5) 2>&5
2176   ac_status=$?
2177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2178   (exit $ac_status); }
2179 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2180   (eval $ac_compiler -v </dev/null >&5) 2>&5
2181   ac_status=$?
2182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2183   (exit $ac_status); }
2184 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2185   (eval $ac_compiler -V </dev/null >&5) 2>&5
2186   ac_status=$?
2187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2188   (exit $ac_status); }
2189
2190 cat >conftest.$ac_ext <<_ACEOF
2191 /* confdefs.h.  */
2192 _ACEOF
2193 cat confdefs.h >>conftest.$ac_ext
2194 cat >>conftest.$ac_ext <<_ACEOF
2195 /* end confdefs.h.  */
2196
2197 int
2198 main ()
2199 {
2200
2201   ;
2202   return 0;
2203 }
2204 _ACEOF
2205 ac_clean_files_save=$ac_clean_files
2206 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2207 # Try to create an executable without -o first, disregard a.out.
2208 # It will help us diagnose broken compilers, and finding out an intuition
2209 # of exeext.
2210 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2211 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2212 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2213 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2214   (eval $ac_link_default) 2>&5
2215   ac_status=$?
2216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2217   (exit $ac_status); }; then
2218   # Find the output, starting from the most likely.  This scheme is
2219 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2220 # resort.
2221
2222 # Be careful to initialize this variable, since it used to be cached.
2223 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2224 ac_cv_exeext=
2225 # b.out is created by i960 compilers.
2226 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2227 do
2228   test -f "$ac_file" || continue
2229   case $ac_file in
2230     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2231         ;;
2232     conftest.$ac_ext )
2233         # This is the source file.
2234         ;;
2235     [ab].out )
2236         # We found the default executable, but exeext='' is most
2237         # certainly right.
2238         break;;
2239     *.* )
2240         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2241         # FIXME: I believe we export ac_cv_exeext for Libtool,
2242         # but it would be cool to find out if it's true.  Does anybody
2243         # maintain Libtool? --akim.
2244         export ac_cv_exeext
2245         break;;
2246     * )
2247         break;;
2248   esac
2249 done
2250 else
2251   echo "$as_me: failed program was:" >&5
2252 sed 's/^/| /' conftest.$ac_ext >&5
2253
2254 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2255 See \`config.log' for more details." >&5
2256 echo "$as_me: error: C compiler cannot create executables
2257 See \`config.log' for more details." >&2;}
2258    { (exit 77); exit 77; }; }
2259 fi
2260
2261 ac_exeext=$ac_cv_exeext
2262 echo "$as_me:$LINENO: result: $ac_file" >&5
2263 echo "${ECHO_T}$ac_file" >&6
2264
2265 # Check the compiler produces executables we can run.  If not, either
2266 # the compiler is broken, or we cross compile.
2267 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2268 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2269 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2270 # If not cross compiling, check that we can run a simple program.
2271 if test "$cross_compiling" != yes; then
2272   if { ac_try='./$ac_file'
2273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2274   (eval $ac_try) 2>&5
2275   ac_status=$?
2276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2277   (exit $ac_status); }; }; then
2278     cross_compiling=no
2279   else
2280     if test "$cross_compiling" = maybe; then
2281         cross_compiling=yes
2282     else
2283         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2284 If you meant to cross compile, use \`--host'.
2285 See \`config.log' for more details." >&5
2286 echo "$as_me: error: cannot run C compiled programs.
2287 If you meant to cross compile, use \`--host'.
2288 See \`config.log' for more details." >&2;}
2289    { (exit 1); exit 1; }; }
2290     fi
2291   fi
2292 fi
2293 echo "$as_me:$LINENO: result: yes" >&5
2294 echo "${ECHO_T}yes" >&6
2295
2296 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2297 ac_clean_files=$ac_clean_files_save
2298 # Check the compiler produces executables we can run.  If not, either
2299 # the compiler is broken, or we cross compile.
2300 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2301 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2302 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2303 echo "${ECHO_T}$cross_compiling" >&6
2304
2305 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2306 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2307 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2308   (eval $ac_link) 2>&5
2309   ac_status=$?
2310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2311   (exit $ac_status); }; then
2312   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2313 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2314 # work properly (i.e., refer to `conftest.exe'), while it won't with
2315 # `rm'.
2316 for ac_file in conftest.exe conftest conftest.*; do
2317   test -f "$ac_file" || continue
2318   case $ac_file in
2319     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2320     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2321           export ac_cv_exeext
2322           break;;
2323     * ) break;;
2324   esac
2325 done
2326 else
2327   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2328 See \`config.log' for more details." >&5
2329 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2330 See \`config.log' for more details." >&2;}
2331    { (exit 1); exit 1; }; }
2332 fi
2333
2334 rm -f conftest$ac_cv_exeext
2335 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2336 echo "${ECHO_T}$ac_cv_exeext" >&6
2337
2338 rm -f conftest.$ac_ext
2339 EXEEXT=$ac_cv_exeext
2340 ac_exeext=$EXEEXT
2341 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2342 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2343 if test "${ac_cv_objext+set}" = set; then
2344   echo $ECHO_N "(cached) $ECHO_C" >&6
2345 else
2346   cat >conftest.$ac_ext <<_ACEOF
2347 /* confdefs.h.  */
2348 _ACEOF
2349 cat confdefs.h >>conftest.$ac_ext
2350 cat >>conftest.$ac_ext <<_ACEOF
2351 /* end confdefs.h.  */
2352
2353 int
2354 main ()
2355 {
2356
2357   ;
2358   return 0;
2359 }
2360 _ACEOF
2361 rm -f conftest.o conftest.obj
2362 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2363   (eval $ac_compile) 2>&5
2364   ac_status=$?
2365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2366   (exit $ac_status); }; then
2367   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2368   case $ac_file in
2369     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2370     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2371        break;;
2372   esac
2373 done
2374 else
2375   echo "$as_me: failed program was:" >&5
2376 sed 's/^/| /' conftest.$ac_ext >&5
2377
2378 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2379 See \`config.log' for more details." >&5
2380 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2381 See \`config.log' for more details." >&2;}
2382    { (exit 1); exit 1; }; }
2383 fi
2384
2385 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2386 fi
2387 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2388 echo "${ECHO_T}$ac_cv_objext" >&6
2389 OBJEXT=$ac_cv_objext
2390 ac_objext=$OBJEXT
2391 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2392 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2393 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2394   echo $ECHO_N "(cached) $ECHO_C" >&6
2395 else
2396   cat >conftest.$ac_ext <<_ACEOF
2397 /* confdefs.h.  */
2398 _ACEOF
2399 cat confdefs.h >>conftest.$ac_ext
2400 cat >>conftest.$ac_ext <<_ACEOF
2401 /* end confdefs.h.  */
2402
2403 int
2404 main ()
2405 {
2406 #ifndef __GNUC__
2407        choke me
2408 #endif
2409
2410   ;
2411   return 0;
2412 }
2413 _ACEOF
2414 rm -f conftest.$ac_objext
2415 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2416   (eval $ac_compile) 2>conftest.er1
2417   ac_status=$?
2418   grep -v '^ *+' conftest.er1 >conftest.err
2419   rm -f conftest.er1
2420   cat conftest.err >&5
2421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2422   (exit $ac_status); } &&
2423          { ac_try='test -z "$ac_c_werror_flag"
2424                          || test ! -s conftest.err'
2425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2426   (eval $ac_try) 2>&5
2427   ac_status=$?
2428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2429   (exit $ac_status); }; } &&
2430          { ac_try='test -s conftest.$ac_objext'
2431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2432   (eval $ac_try) 2>&5
2433   ac_status=$?
2434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2435   (exit $ac_status); }; }; then
2436   ac_compiler_gnu=yes
2437 else
2438   echo "$as_me: failed program was:" >&5
2439 sed 's/^/| /' conftest.$ac_ext >&5
2440
2441 ac_compiler_gnu=no
2442 fi
2443 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2444 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2445
2446 fi
2447 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2448 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2449 GCC=`test $ac_compiler_gnu = yes && echo yes`
2450 ac_test_CFLAGS=${CFLAGS+set}
2451 ac_save_CFLAGS=$CFLAGS
2452 CFLAGS="-g"
2453 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2454 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2455 if test "${ac_cv_prog_cc_g+set}" = set; then
2456   echo $ECHO_N "(cached) $ECHO_C" >&6
2457 else
2458   cat >conftest.$ac_ext <<_ACEOF
2459 /* confdefs.h.  */
2460 _ACEOF
2461 cat confdefs.h >>conftest.$ac_ext
2462 cat >>conftest.$ac_ext <<_ACEOF
2463 /* end confdefs.h.  */
2464
2465 int
2466 main ()
2467 {
2468
2469   ;
2470   return 0;
2471 }
2472 _ACEOF
2473 rm -f conftest.$ac_objext
2474 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2475   (eval $ac_compile) 2>conftest.er1
2476   ac_status=$?
2477   grep -v '^ *+' conftest.er1 >conftest.err
2478   rm -f conftest.er1
2479   cat conftest.err >&5
2480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2481   (exit $ac_status); } &&
2482          { ac_try='test -z "$ac_c_werror_flag"
2483                          || test ! -s conftest.err'
2484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2485   (eval $ac_try) 2>&5
2486   ac_status=$?
2487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2488   (exit $ac_status); }; } &&
2489          { ac_try='test -s conftest.$ac_objext'
2490   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2491   (eval $ac_try) 2>&5
2492   ac_status=$?
2493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2494   (exit $ac_status); }; }; then
2495   ac_cv_prog_cc_g=yes
2496 else
2497   echo "$as_me: failed program was:" >&5
2498 sed 's/^/| /' conftest.$ac_ext >&5
2499
2500 ac_cv_prog_cc_g=no
2501 fi
2502 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2503 fi
2504 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2505 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2506 if test "$ac_test_CFLAGS" = set; then
2507   CFLAGS=$ac_save_CFLAGS
2508 elif test $ac_cv_prog_cc_g = yes; then
2509   if test "$GCC" = yes; then
2510     CFLAGS="-g -O2"
2511   else
2512     CFLAGS="-g"
2513   fi
2514 else
2515   if test "$GCC" = yes; then
2516     CFLAGS="-O2"
2517   else
2518     CFLAGS=
2519   fi
2520 fi
2521 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2522 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2523 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2524   echo $ECHO_N "(cached) $ECHO_C" >&6
2525 else
2526   ac_cv_prog_cc_stdc=no
2527 ac_save_CC=$CC
2528 cat >conftest.$ac_ext <<_ACEOF
2529 /* confdefs.h.  */
2530 _ACEOF
2531 cat confdefs.h >>conftest.$ac_ext
2532 cat >>conftest.$ac_ext <<_ACEOF
2533 /* end confdefs.h.  */
2534 #include <stdarg.h>
2535 #include <stdio.h>
2536 #include <sys/types.h>
2537 #include <sys/stat.h>
2538 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2539 struct buf { int x; };
2540 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2541 static char *e (p, i)
2542      char **p;
2543      int i;
2544 {
2545   return p[i];
2546 }
2547 static char *f (char * (*g) (char **, int), char **p, ...)
2548 {
2549   char *s;
2550   va_list v;
2551   va_start (v,p);
2552   s = g (p, va_arg (v,int));
2553   va_end (v);
2554   return s;
2555 }
2556
2557 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2558    function prototypes and stuff, but not '\xHH' hex character constants.
2559    These don't provoke an error unfortunately, instead are silently treated
2560    as 'x'.  The following induces an error, until -std1 is added to get
2561    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2562    array size at least.  It's necessary to write '\x00'==0 to get something
2563    that's true only with -std1.  */
2564 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2565
2566 int test (int i, double x);
2567 struct s1 {int (*f) (int a);};
2568 struct s2 {int (*f) (double a);};
2569 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2570 int argc;
2571 char **argv;
2572 int
2573 main ()
2574 {
2575 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2576   ;
2577   return 0;
2578 }
2579 _ACEOF
2580 # Don't try gcc -ansi; that turns off useful extensions and
2581 # breaks some systems' header files.
2582 # AIX                   -qlanglvl=ansi
2583 # Ultrix and OSF/1      -std1
2584 # HP-UX 10.20 and later -Ae
2585 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2586 # SVR4                  -Xc -D__EXTENSIONS__
2587 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2588 do
2589   CC="$ac_save_CC $ac_arg"
2590   rm -f conftest.$ac_objext
2591 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2592   (eval $ac_compile) 2>conftest.er1
2593   ac_status=$?
2594   grep -v '^ *+' conftest.er1 >conftest.err
2595   rm -f conftest.er1
2596   cat conftest.err >&5
2597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2598   (exit $ac_status); } &&
2599          { ac_try='test -z "$ac_c_werror_flag"
2600                          || test ! -s conftest.err'
2601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2602   (eval $ac_try) 2>&5
2603   ac_status=$?
2604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2605   (exit $ac_status); }; } &&
2606          { ac_try='test -s conftest.$ac_objext'
2607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2608   (eval $ac_try) 2>&5
2609   ac_status=$?
2610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2611   (exit $ac_status); }; }; then
2612   ac_cv_prog_cc_stdc=$ac_arg
2613 break
2614 else
2615   echo "$as_me: failed program was:" >&5
2616 sed 's/^/| /' conftest.$ac_ext >&5
2617
2618 fi
2619 rm -f conftest.err conftest.$ac_objext
2620 done
2621 rm -f conftest.$ac_ext conftest.$ac_objext
2622 CC=$ac_save_CC
2623
2624 fi
2625
2626 case "x$ac_cv_prog_cc_stdc" in
2627   x|xno)
2628     echo "$as_me:$LINENO: result: none needed" >&5
2629 echo "${ECHO_T}none needed" >&6 ;;
2630   *)
2631     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2632 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2633     CC="$CC $ac_cv_prog_cc_stdc" ;;
2634 esac
2635
2636 # Some people use a C++ compiler to compile C.  Since we use `exit',
2637 # in C++ we need to declare it.  In case someone uses the same compiler
2638 # for both compiling C and C++ we need to have the C++ compiler decide
2639 # the declaration of exit, since it's the most demanding environment.
2640 cat >conftest.$ac_ext <<_ACEOF
2641 #ifndef __cplusplus
2642   choke me
2643 #endif
2644 _ACEOF
2645 rm -f conftest.$ac_objext
2646 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2647   (eval $ac_compile) 2>conftest.er1
2648   ac_status=$?
2649   grep -v '^ *+' conftest.er1 >conftest.err
2650   rm -f conftest.er1
2651   cat conftest.err >&5
2652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2653   (exit $ac_status); } &&
2654          { ac_try='test -z "$ac_c_werror_flag"
2655                          || test ! -s conftest.err'
2656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2657   (eval $ac_try) 2>&5
2658   ac_status=$?
2659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2660   (exit $ac_status); }; } &&
2661          { ac_try='test -s conftest.$ac_objext'
2662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2663   (eval $ac_try) 2>&5
2664   ac_status=$?
2665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2666   (exit $ac_status); }; }; then
2667   for ac_declaration in \
2668    '' \
2669    'extern "C" void std::exit (int) throw (); using std::exit;' \
2670    'extern "C" void std::exit (int); using std::exit;' \
2671    'extern "C" void exit (int) throw ();' \
2672    'extern "C" void exit (int);' \
2673    'void exit (int);'
2674 do
2675   cat >conftest.$ac_ext <<_ACEOF
2676 /* confdefs.h.  */
2677 _ACEOF
2678 cat confdefs.h >>conftest.$ac_ext
2679 cat >>conftest.$ac_ext <<_ACEOF
2680 /* end confdefs.h.  */
2681 $ac_declaration
2682 #include <stdlib.h>
2683 int
2684 main ()
2685 {
2686 exit (42);
2687   ;
2688   return 0;
2689 }
2690 _ACEOF
2691 rm -f conftest.$ac_objext
2692 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2693   (eval $ac_compile) 2>conftest.er1
2694   ac_status=$?
2695   grep -v '^ *+' conftest.er1 >conftest.err
2696   rm -f conftest.er1
2697   cat conftest.err >&5
2698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2699   (exit $ac_status); } &&
2700          { ac_try='test -z "$ac_c_werror_flag"
2701                          || test ! -s conftest.err'
2702   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2703   (eval $ac_try) 2>&5
2704   ac_status=$?
2705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2706   (exit $ac_status); }; } &&
2707          { ac_try='test -s conftest.$ac_objext'
2708   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2709   (eval $ac_try) 2>&5
2710   ac_status=$?
2711   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2712   (exit $ac_status); }; }; then
2713   :
2714 else
2715   echo "$as_me: failed program was:" >&5
2716 sed 's/^/| /' conftest.$ac_ext >&5
2717
2718 continue
2719 fi
2720 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2721   cat >conftest.$ac_ext <<_ACEOF
2722 /* confdefs.h.  */
2723 _ACEOF
2724 cat confdefs.h >>conftest.$ac_ext
2725 cat >>conftest.$ac_ext <<_ACEOF
2726 /* end confdefs.h.  */
2727 $ac_declaration
2728 int
2729 main ()
2730 {
2731 exit (42);
2732   ;
2733   return 0;
2734 }
2735 _ACEOF
2736 rm -f conftest.$ac_objext
2737 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2738   (eval $ac_compile) 2>conftest.er1
2739   ac_status=$?
2740   grep -v '^ *+' conftest.er1 >conftest.err
2741   rm -f conftest.er1
2742   cat conftest.err >&5
2743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2744   (exit $ac_status); } &&
2745          { ac_try='test -z "$ac_c_werror_flag"
2746                          || test ! -s conftest.err'
2747   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2748   (eval $ac_try) 2>&5
2749   ac_status=$?
2750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2751   (exit $ac_status); }; } &&
2752          { ac_try='test -s conftest.$ac_objext'
2753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2754   (eval $ac_try) 2>&5
2755   ac_status=$?
2756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2757   (exit $ac_status); }; }; then
2758   break
2759 else
2760   echo "$as_me: failed program was:" >&5
2761 sed 's/^/| /' conftest.$ac_ext >&5
2762
2763 fi
2764 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2765 done
2766 rm -f conftest*
2767 if test -n "$ac_declaration"; then
2768   echo '#ifdef __cplusplus' >>confdefs.h
2769   echo $ac_declaration      >>confdefs.h
2770   echo '#endif'             >>confdefs.h
2771 fi
2772
2773 else
2774   echo "$as_me: failed program was:" >&5
2775 sed 's/^/| /' conftest.$ac_ext >&5
2776
2777 fi
2778 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2779 ac_ext=c
2780 ac_cpp='$CPP $CPPFLAGS'
2781 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2782 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2783 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2784
2785
2786 unset CFLAGS
2787
2788 #
2789 # Read the template
2790 #
2791 . "$srcdir/src/template/$template" || exit
2792
2793 # CFLAGS are selected so:
2794 # If the user specifies something in the environment, that is used.
2795 # else:  If the template file set something, that is used.
2796 # else:  If the compiler is GCC, then we use -O2.
2797 # else:  If the compiler is something else, then we use -0.
2798
2799 if test "$ac_env_CFLAGS_set" = set; then
2800   CFLAGS=$ac_env_CFLAGS_value
2801 elif test "${CFLAGS+set}" = set; then
2802   : # (keep what template set)
2803 elif test "$GCC" = yes; then
2804   CFLAGS="-O2"
2805 else
2806   # if the user selected debug mode, don't use -O
2807   if test "$enable_debug" != yes; then
2808     CFLAGS="-O"
2809   fi
2810 fi
2811
2812 # Some versions of GCC support some additional useful warning flags.
2813 # Check whether they are supported, and add them to CFLAGS if so.
2814
2815 if test "$GCC" = yes; then
2816
2817 # ICC pretends to be GCC but it's lying; it doesn't support these options.
2818 # So we have to check if "GCC" is really ICC.
2819
2820 cat >conftest.$ac_ext <<_ACEOF
2821 /* confdefs.h.  */
2822 _ACEOF
2823 cat confdefs.h >>conftest.$ac_ext
2824 cat >>conftest.$ac_ext <<_ACEOF
2825 /* end confdefs.h.  */
2826
2827 int
2828 main ()
2829 {
2830 #ifndef __INTEL_COMPILER
2831 choke me
2832 #endif
2833   ;
2834   return 0;
2835 }
2836 _ACEOF
2837 rm -f conftest.$ac_objext
2838 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2839   (eval $ac_compile) 2>conftest.er1
2840   ac_status=$?
2841   grep -v '^ *+' conftest.er1 >conftest.err
2842   rm -f conftest.er1
2843   cat conftest.err >&5
2844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2845   (exit $ac_status); } &&
2846          { ac_try='test -z "$ac_c_werror_flag"
2847                          || test ! -s conftest.err'
2848   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2849   (eval $ac_try) 2>&5
2850   ac_status=$?
2851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2852   (exit $ac_status); }; } &&
2853          { ac_try='test -s conftest.$ac_objext'
2854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2855   (eval $ac_try) 2>&5
2856   ac_status=$?
2857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2858   (exit $ac_status); }; }; then
2859   ICC=yes
2860 else
2861   echo "$as_me: failed program was:" >&5
2862 sed 's/^/| /' conftest.$ac_ext >&5
2863
2864 ICC=no
2865 fi
2866 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2867
2868   if test "$ICC" = no; then
2869     CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
2870
2871     echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2872 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2873 pgac_save_CFLAGS=$CFLAGS
2874 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2875 cat >conftest.$ac_ext <<_ACEOF
2876 /* confdefs.h.  */
2877 _ACEOF
2878 cat confdefs.h >>conftest.$ac_ext
2879 cat >>conftest.$ac_ext <<_ACEOF
2880 /* end confdefs.h.  */
2881
2882 int
2883 main ()
2884 {
2885
2886   ;
2887   return 0;
2888 }
2889 _ACEOF
2890 rm -f conftest.$ac_objext
2891 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2892   (eval $ac_compile) 2>conftest.er1
2893   ac_status=$?
2894   grep -v '^ *+' conftest.er1 >conftest.err
2895   rm -f conftest.er1
2896   cat conftest.err >&5
2897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2898   (exit $ac_status); } &&
2899          { ac_try='test -z "$ac_c_werror_flag"
2900                          || test ! -s conftest.err'
2901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2902   (eval $ac_try) 2>&5
2903   ac_status=$?
2904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2905   (exit $ac_status); }; } &&
2906          { ac_try='test -s conftest.$ac_objext'
2907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2908   (eval $ac_try) 2>&5
2909   ac_status=$?
2910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2911   (exit $ac_status); }; }; then
2912   echo "$as_me:$LINENO: result: yes" >&5
2913 echo "${ECHO_T}yes" >&6
2914 else
2915   echo "$as_me: failed program was:" >&5
2916 sed 's/^/| /' conftest.$ac_ext >&5
2917
2918 CFLAGS="$pgac_save_CFLAGS"
2919                     echo "$as_me:$LINENO: result: no" >&5
2920 echo "${ECHO_T}no" >&6
2921 fi
2922 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2923
2924     echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2925 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2926 pgac_save_CFLAGS=$CFLAGS
2927 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2928 cat >conftest.$ac_ext <<_ACEOF
2929 /* confdefs.h.  */
2930 _ACEOF
2931 cat confdefs.h >>conftest.$ac_ext
2932 cat >>conftest.$ac_ext <<_ACEOF
2933 /* end confdefs.h.  */
2934
2935 int
2936 main ()
2937 {
2938
2939   ;
2940   return 0;
2941 }
2942 _ACEOF
2943 rm -f conftest.$ac_objext
2944 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2945   (eval $ac_compile) 2>conftest.er1
2946   ac_status=$?
2947   grep -v '^ *+' conftest.er1 >conftest.err
2948   rm -f conftest.er1
2949   cat conftest.err >&5
2950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2951   (exit $ac_status); } &&
2952          { ac_try='test -z "$ac_c_werror_flag"
2953                          || test ! -s conftest.err'
2954   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2955   (eval $ac_try) 2>&5
2956   ac_status=$?
2957   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2958   (exit $ac_status); }; } &&
2959          { ac_try='test -s conftest.$ac_objext'
2960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2961   (eval $ac_try) 2>&5
2962   ac_status=$?
2963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2964   (exit $ac_status); }; }; then
2965   echo "$as_me:$LINENO: result: yes" >&5
2966 echo "${ECHO_T}yes" >&6
2967 else
2968   echo "$as_me: failed program was:" >&5
2969 sed 's/^/| /' conftest.$ac_ext >&5
2970
2971 CFLAGS="$pgac_save_CFLAGS"
2972                     echo "$as_me:$LINENO: result: no" >&5
2973 echo "${ECHO_T}no" >&6
2974 fi
2975 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2976
2977   else
2978     # Intel compiler has a bug/misoptimization in checking for
2979     # division by NAN (NaN == 0), -mp1 fixes it, so add it to the
2980     # CFLAGS.
2981     echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5
2982 echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6
2983 pgac_save_CFLAGS=$CFLAGS
2984 CFLAGS="$pgac_save_CFLAGS -mp1"
2985 cat >conftest.$ac_ext <<_ACEOF
2986 /* confdefs.h.  */
2987 _ACEOF
2988 cat confdefs.h >>conftest.$ac_ext
2989 cat >>conftest.$ac_ext <<_ACEOF
2990 /* end confdefs.h.  */
2991
2992 int
2993 main ()
2994 {
2995
2996   ;
2997   return 0;
2998 }
2999 _ACEOF
3000 rm -f conftest.$ac_objext
3001 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3002   (eval $ac_compile) 2>conftest.er1
3003   ac_status=$?
3004   grep -v '^ *+' conftest.er1 >conftest.err
3005   rm -f conftest.er1
3006   cat conftest.err >&5
3007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3008   (exit $ac_status); } &&
3009          { ac_try='test -z "$ac_c_werror_flag"
3010                          || test ! -s conftest.err'
3011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3012   (eval $ac_try) 2>&5
3013   ac_status=$?
3014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3015   (exit $ac_status); }; } &&
3016          { ac_try='test -s conftest.$ac_objext'
3017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3018   (eval $ac_try) 2>&5
3019   ac_status=$?
3020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3021   (exit $ac_status); }; }; then
3022   echo "$as_me:$LINENO: result: yes" >&5
3023 echo "${ECHO_T}yes" >&6
3024 else
3025   echo "$as_me: failed program was:" >&5
3026 sed 's/^/| /' conftest.$ac_ext >&5
3027
3028 CFLAGS="$pgac_save_CFLAGS"
3029                     echo "$as_me:$LINENO: result: no" >&5
3030 echo "${ECHO_T}no" >&6
3031 fi
3032 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3033
3034   fi
3035
3036   # Disable strict-aliasing rules; needed for gcc 3.3+
3037   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
3038 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
3039 pgac_save_CFLAGS=$CFLAGS
3040 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
3041 cat >conftest.$ac_ext <<_ACEOF
3042 /* confdefs.h.  */
3043 _ACEOF
3044 cat confdefs.h >>conftest.$ac_ext
3045 cat >>conftest.$ac_ext <<_ACEOF
3046 /* end confdefs.h.  */
3047
3048 int
3049 main ()
3050 {
3051
3052   ;
3053   return 0;
3054 }
3055 _ACEOF
3056 rm -f conftest.$ac_objext
3057 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3058   (eval $ac_compile) 2>conftest.er1
3059   ac_status=$?
3060   grep -v '^ *+' conftest.er1 >conftest.err
3061   rm -f conftest.er1
3062   cat conftest.err >&5
3063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3064   (exit $ac_status); } &&
3065          { ac_try='test -z "$ac_c_werror_flag"
3066                          || test ! -s conftest.err'
3067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3068   (eval $ac_try) 2>&5
3069   ac_status=$?
3070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3071   (exit $ac_status); }; } &&
3072          { ac_try='test -s conftest.$ac_objext'
3073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3074   (eval $ac_try) 2>&5
3075   ac_status=$?
3076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3077   (exit $ac_status); }; }; then
3078   echo "$as_me:$LINENO: result: yes" >&5
3079 echo "${ECHO_T}yes" >&6
3080 else
3081   echo "$as_me: failed program was:" >&5
3082 sed 's/^/| /' conftest.$ac_ext >&5
3083
3084 CFLAGS="$pgac_save_CFLAGS"
3085                     echo "$as_me:$LINENO: result: no" >&5
3086 echo "${ECHO_T}no" >&6
3087 fi
3088 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3089
3090 elif test x"${CC}" = x"xlc"; then
3091   # AIX xlc has to have strict aliasing turned off too
3092   echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
3093 echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6
3094 pgac_save_CFLAGS=$CFLAGS
3095 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
3096 cat >conftest.$ac_ext <<_ACEOF
3097 /* confdefs.h.  */
3098 _ACEOF
3099 cat confdefs.h >>conftest.$ac_ext
3100 cat >>conftest.$ac_ext <<_ACEOF
3101 /* end confdefs.h.  */
3102
3103 int
3104 main ()
3105 {
3106
3107   ;
3108   return 0;
3109 }
3110 _ACEOF
3111 rm -f conftest.$ac_objext
3112 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3113   (eval $ac_compile) 2>conftest.er1
3114   ac_status=$?
3115   grep -v '^ *+' conftest.er1 >conftest.err
3116   rm -f conftest.er1
3117   cat conftest.err >&5
3118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3119   (exit $ac_status); } &&
3120          { ac_try='test -z "$ac_c_werror_flag"
3121                          || test ! -s conftest.err'
3122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3123   (eval $ac_try) 2>&5
3124   ac_status=$?
3125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3126   (exit $ac_status); }; } &&
3127          { ac_try='test -s conftest.$ac_objext'
3128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3129   (eval $ac_try) 2>&5
3130   ac_status=$?
3131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3132   (exit $ac_status); }; }; then
3133   echo "$as_me:$LINENO: result: yes" >&5
3134 echo "${ECHO_T}yes" >&6
3135 else
3136   echo "$as_me: failed program was:" >&5
3137 sed 's/^/| /' conftest.$ac_ext >&5
3138
3139 CFLAGS="$pgac_save_CFLAGS"
3140                     echo "$as_me:$LINENO: result: no" >&5
3141 echo "${ECHO_T}no" >&6
3142 fi
3143 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3144
3145 fi
3146
3147 # supply -g if --enable-debug
3148 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
3149   CFLAGS="$CFLAGS -g"
3150 fi
3151
3152 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
3153 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
3154
3155 # We already have this in Makefile.win32, but configure needs it too
3156 if test "$PORTNAME" = "win32"; then
3157   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
3158 fi
3159
3160 # Check if the compiler still works with the template settings
3161 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
3162 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
3163 cat >conftest.$ac_ext <<_ACEOF
3164 /* confdefs.h.  */
3165 _ACEOF
3166 cat confdefs.h >>conftest.$ac_ext
3167 cat >>conftest.$ac_ext <<_ACEOF
3168 /* end confdefs.h.  */
3169
3170 int
3171 main ()
3172 {
3173 return 0;
3174   ;
3175   return 0;
3176 }
3177 _ACEOF
3178 rm -f conftest.$ac_objext conftest$ac_exeext
3179 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3180   (eval $ac_link) 2>conftest.er1
3181   ac_status=$?
3182   grep -v '^ *+' conftest.er1 >conftest.err
3183   rm -f conftest.er1
3184   cat conftest.err >&5
3185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3186   (exit $ac_status); } &&
3187          { ac_try='test -z "$ac_c_werror_flag"
3188                          || test ! -s conftest.err'
3189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3190   (eval $ac_try) 2>&5
3191   ac_status=$?
3192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3193   (exit $ac_status); }; } &&
3194          { ac_try='test -s conftest$ac_exeext'
3195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3196   (eval $ac_try) 2>&5
3197   ac_status=$?
3198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3199   (exit $ac_status); }; }; then
3200   echo "$as_me:$LINENO: result: yes" >&5
3201 echo "${ECHO_T}yes" >&6
3202 else
3203   echo "$as_me: failed program was:" >&5
3204 sed 's/^/| /' conftest.$ac_ext >&5
3205
3206 echo "$as_me:$LINENO: result: no" >&5
3207 echo "${ECHO_T}no" >&6
3208    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
3209 echo "$as_me: error: cannot proceed" >&2;}
3210    { (exit 1); exit 1; }; }
3211 fi
3212 rm -f conftest.err conftest.$ac_objext \
3213       conftest$ac_exeext conftest.$ac_ext
3214
3215 # Defend against gcc -ffast-math
3216 if test "$GCC" = yes; then
3217 cat >conftest.$ac_ext <<_ACEOF
3218 /* confdefs.h.  */
3219 _ACEOF
3220 cat confdefs.h >>conftest.$ac_ext
3221 cat >>conftest.$ac_ext <<_ACEOF
3222 /* end confdefs.h.  */
3223
3224 int
3225 main ()
3226 {
3227 #ifdef __FAST_MATH__
3228 choke me
3229 #endif
3230   ;
3231   return 0;
3232 }
3233 _ACEOF
3234 rm -f conftest.$ac_objext
3235 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3236   (eval $ac_compile) 2>conftest.er1
3237   ac_status=$?
3238   grep -v '^ *+' conftest.er1 >conftest.err
3239   rm -f conftest.er1
3240   cat conftest.err >&5
3241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3242   (exit $ac_status); } &&
3243          { ac_try='test -z "$ac_c_werror_flag"
3244                          || test ! -s conftest.err'
3245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3246   (eval $ac_try) 2>&5
3247   ac_status=$?
3248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3249   (exit $ac_status); }; } &&
3250          { ac_try='test -s conftest.$ac_objext'
3251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3252   (eval $ac_try) 2>&5
3253   ac_status=$?
3254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3255   (exit $ac_status); }; }; then
3256   :
3257 else
3258   echo "$as_me: failed program was:" >&5
3259 sed 's/^/| /' conftest.$ac_ext >&5
3260
3261 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3262 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3263    { (exit 1); exit 1; }; }
3264 fi
3265 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3266 fi
3267
3268 ac_ext=c
3269 ac_cpp='$CPP $CPPFLAGS'
3270 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3271 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3272 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3273 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3274 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3275 # On Suns, sometimes $CPP names a directory.
3276 if test -n "$CPP" && test -d "$CPP"; then
3277   CPP=
3278 fi
3279 if test -z "$CPP"; then
3280   if test "${ac_cv_prog_CPP+set}" = set; then
3281   echo $ECHO_N "(cached) $ECHO_C" >&6
3282 else
3283       # Double quotes because CPP needs to be expanded
3284     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3285     do
3286       ac_preproc_ok=false
3287 for ac_c_preproc_warn_flag in '' yes
3288 do
3289   # Use a header file that comes with gcc, so configuring glibc
3290   # with a fresh cross-compiler works.
3291   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3292   # <limits.h> exists even on freestanding compilers.
3293   # On the NeXT, cc -E runs the code through the compiler's parser,
3294   # not just through cpp. "Syntax error" is here to catch this case.
3295   cat >conftest.$ac_ext <<_ACEOF
3296 /* confdefs.h.  */
3297 _ACEOF
3298 cat confdefs.h >>conftest.$ac_ext
3299 cat >>conftest.$ac_ext <<_ACEOF
3300 /* end confdefs.h.  */
3301 #ifdef __STDC__
3302 # include <limits.h>
3303 #else
3304 # include <assert.h>
3305 #endif
3306                      Syntax error
3307 _ACEOF
3308 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3309   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3310   ac_status=$?
3311   grep -v '^ *+' conftest.er1 >conftest.err
3312   rm -f conftest.er1
3313   cat conftest.err >&5
3314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3315   (exit $ac_status); } >/dev/null; then
3316   if test -s conftest.err; then
3317     ac_cpp_err=$ac_c_preproc_warn_flag
3318     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3319   else
3320     ac_cpp_err=
3321   fi
3322 else
3323   ac_cpp_err=yes
3324 fi
3325 if test -z "$ac_cpp_err"; then
3326   :
3327 else
3328   echo "$as_me: failed program was:" >&5
3329 sed 's/^/| /' conftest.$ac_ext >&5
3330
3331   # Broken: fails on valid input.
3332 continue
3333 fi
3334 rm -f conftest.err conftest.$ac_ext
3335
3336   # OK, works on sane cases.  Now check whether non-existent headers
3337   # can be detected and how.
3338   cat >conftest.$ac_ext <<_ACEOF
3339 /* confdefs.h.  */
3340 _ACEOF
3341 cat confdefs.h >>conftest.$ac_ext
3342 cat >>conftest.$ac_ext <<_ACEOF
3343 /* end confdefs.h.  */
3344 #include <ac_nonexistent.h>
3345 _ACEOF
3346 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3347   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3348   ac_status=$?
3349   grep -v '^ *+' conftest.er1 >conftest.err
3350   rm -f conftest.er1
3351   cat conftest.err >&5
3352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3353   (exit $ac_status); } >/dev/null; then
3354   if test -s conftest.err; then
3355     ac_cpp_err=$ac_c_preproc_warn_flag
3356     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3357   else
3358     ac_cpp_err=
3359   fi
3360 else
3361   ac_cpp_err=yes
3362 fi
3363 if test -z "$ac_cpp_err"; then
3364   # Broken: success on invalid input.
3365 continue
3366 else
3367   echo "$as_me: failed program was:" >&5
3368 sed 's/^/| /' conftest.$ac_ext >&5
3369
3370   # Passes both tests.
3371 ac_preproc_ok=:
3372 break
3373 fi
3374 rm -f conftest.err conftest.$ac_ext
3375
3376 done
3377 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3378 rm -f conftest.err conftest.$ac_ext
3379 if $ac_preproc_ok; then
3380   break
3381 fi
3382
3383     done
3384     ac_cv_prog_CPP=$CPP
3385
3386 fi
3387   CPP=$ac_cv_prog_CPP
3388 else
3389   ac_cv_prog_CPP=$CPP
3390 fi
3391 echo "$as_me:$LINENO: result: $CPP" >&5
3392 echo "${ECHO_T}$CPP" >&6
3393 ac_preproc_ok=false
3394 for ac_c_preproc_warn_flag in '' yes
3395 do
3396   # Use a header file that comes with gcc, so configuring glibc
3397   # with a fresh cross-compiler works.
3398   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3399   # <limits.h> exists even on freestanding compilers.
3400   # On the NeXT, cc -E runs the code through the compiler's parser,
3401   # not just through cpp. "Syntax error" is here to catch this case.
3402   cat >conftest.$ac_ext <<_ACEOF
3403 /* confdefs.h.  */
3404 _ACEOF
3405 cat confdefs.h >>conftest.$ac_ext
3406 cat >>conftest.$ac_ext <<_ACEOF
3407 /* end confdefs.h.  */
3408 #ifdef __STDC__
3409 # include <limits.h>
3410 #else
3411 # include <assert.h>
3412 #endif
3413                      Syntax error
3414 _ACEOF
3415 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3416   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3417   ac_status=$?
3418   grep -v '^ *+' conftest.er1 >conftest.err
3419   rm -f conftest.er1
3420   cat conftest.err >&5
3421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3422   (exit $ac_status); } >/dev/null; then
3423   if test -s conftest.err; then
3424     ac_cpp_err=$ac_c_preproc_warn_flag
3425     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3426   else
3427     ac_cpp_err=
3428   fi
3429 else
3430   ac_cpp_err=yes
3431 fi
3432 if test -z "$ac_cpp_err"; then
3433   :
3434 else
3435   echo "$as_me: failed program was:" >&5
3436 sed 's/^/| /' conftest.$ac_ext >&5
3437
3438   # Broken: fails on valid input.
3439 continue
3440 fi
3441 rm -f conftest.err conftest.$ac_ext
3442
3443   # OK, works on sane cases.  Now check whether non-existent headers
3444   # can be detected and how.
3445   cat >conftest.$ac_ext <<_ACEOF
3446 /* confdefs.h.  */
3447 _ACEOF
3448 cat confdefs.h >>conftest.$ac_ext
3449 cat >>conftest.$ac_ext <<_ACEOF
3450 /* end confdefs.h.  */
3451 #include <ac_nonexistent.h>
3452 _ACEOF
3453 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3454   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3455   ac_status=$?
3456   grep -v '^ *+' conftest.er1 >conftest.err
3457   rm -f conftest.er1
3458   cat conftest.err >&5
3459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3460   (exit $ac_status); } >/dev/null; then
3461   if test -s conftest.err; then
3462     ac_cpp_err=$ac_c_preproc_warn_flag
3463     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3464   else
3465     ac_cpp_err=
3466   fi
3467 else
3468   ac_cpp_err=yes
3469 fi
3470 if test -z "$ac_cpp_err"; then
3471   # Broken: success on invalid input.
3472 continue
3473 else
3474   echo "$as_me: failed program was:" >&5
3475 sed 's/^/| /' conftest.$ac_ext >&5
3476
3477   # Passes both tests.
3478 ac_preproc_ok=:
3479 break
3480 fi
3481 rm -f conftest.err conftest.$ac_ext
3482
3483 done
3484 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3485 rm -f conftest.err conftest.$ac_ext
3486 if $ac_preproc_ok; then
3487   :
3488 else
3489   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3490 See \`config.log' for more details." >&5
3491 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3492 See \`config.log' for more details." >&2;}
3493    { (exit 1); exit 1; }; }
3494 fi
3495
3496 ac_ext=c
3497 ac_cpp='$CPP $CPPFLAGS'
3498 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3499 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3500 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3501
3502
3503
3504 # Create compiler version string
3505 if test x"$GCC" = x"yes" ; then
3506   cc_string="GCC `${CC} --version | sed q`"
3507 else
3508   cc_string=$CC
3509 fi
3510
3511 cat >>confdefs.h <<_ACEOF
3512 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3513 _ACEOF
3514
3515
3516
3517 #
3518 # Set up TAS assembly code if needed; the template file has now had its
3519 # chance to request this.
3520 #
3521           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3522
3523
3524 if test "$need_tas" = yes ; then
3525   TAS=tas.o
3526 else
3527   TAS=""
3528 fi
3529
3530
3531
3532 #
3533 # Automatic dependency tracking
3534 #
3535
3536 pgac_args="$pgac_args enable_depend"
3537
3538 # Check whether --enable-depend or --disable-depend was given.
3539 if test "${enable_depend+set}" = set; then
3540   enableval="$enable_depend"
3541
3542   case $enableval in
3543     yes)
3544       autodepend=yes
3545       ;;
3546     no)
3547       :
3548       ;;
3549     *)
3550       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3551 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3552    { (exit 1); exit 1; }; }
3553       ;;
3554   esac
3555
3556 else
3557   enable_depend=no
3558
3559 fi;
3560
3561
3562
3563
3564 #
3565 # Enable assert checks
3566 #
3567
3568 pgac_args="$pgac_args enable_cassert"
3569
3570 # Check whether --enable-cassert or --disable-cassert was given.
3571 if test "${enable_cassert+set}" = set; then
3572   enableval="$enable_cassert"
3573
3574   case $enableval in
3575     yes)
3576
3577 cat >>confdefs.h <<\_ACEOF
3578 #define USE_ASSERT_CHECKING 1
3579 _ACEOF
3580
3581       ;;
3582     no)
3583       :
3584       ;;
3585     *)
3586       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3587 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3588    { (exit 1); exit 1; }; }
3589       ;;
3590   esac
3591
3592 else
3593   enable_cassert=no
3594
3595 fi;
3596
3597
3598
3599 #
3600 # Include directories
3601 #
3602 ac_save_IFS=$IFS
3603 IFS="${IFS}${PATH_SEPARATOR}"
3604 # SRCH_INC comes from the template file
3605 for dir in $with_includes $SRCH_INC; do
3606   if test -d "$dir"; then
3607     INCLUDES="$INCLUDES -I$dir"
3608   else
3609     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3610 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3611   fi
3612 done
3613 IFS=$ac_save_IFS
3614
3615
3616
3617 #
3618 # Library directories
3619 #
3620 ac_save_IFS=$IFS
3621 IFS="${IFS}${PATH_SEPARATOR}"
3622 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3623 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3624   if test -d "$dir"; then
3625     LIBDIRS="$LIBDIRS -L$dir"
3626   else
3627     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3628 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3629   fi
3630 done
3631 IFS=$ac_save_IFS
3632
3633 #
3634 # Enable thread-safe client libraries
3635 #
3636 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3637 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3638
3639 pgac_args="$pgac_args enable_thread_safety"
3640
3641 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3642 if test "${enable_thread_safety+set}" = set; then
3643   enableval="$enable_thread_safety"
3644
3645   case $enableval in
3646     yes)
3647       :
3648       ;;
3649     no)
3650       :
3651       ;;
3652     *)
3653       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3654 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3655    { (exit 1); exit 1; }; }
3656       ;;
3657   esac
3658
3659 else
3660   enable_thread_safety=no
3661
3662 fi;
3663
3664
3665 pgac_args="$pgac_args enable_thread_safety_force"
3666
3667 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3668 if test "${enable_thread_safety_force+set}" = set; then
3669   enableval="$enable_thread_safety_force"
3670
3671   case $enableval in
3672     yes)
3673       :
3674       ;;
3675     no)
3676       :
3677       ;;
3678     *)
3679       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3680 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3681    { (exit 1); exit 1; }; }
3682       ;;
3683   esac
3684
3685 else
3686   enable_thread_safety_force=no
3687
3688 fi;
3689
3690 if test "$enable_thread_safety" = yes -o \
3691         "$enable_thread_safety_force" = yes; then
3692   enable_thread_safety="yes"    # for 'force'
3693
3694 cat >>confdefs.h <<\_ACEOF
3695 #define ENABLE_THREAD_SAFETY 1
3696 _ACEOF
3697
3698 fi
3699 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3700 echo "${ECHO_T}$enable_thread_safety" >&6
3701
3702
3703 #
3704 # Optionally build Tcl modules (PL/Tcl)
3705 #
3706 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3707 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3708
3709 pgac_args="$pgac_args with_tcl"
3710
3711
3712 # Check whether --with-tcl or --without-tcl was given.
3713 if test "${with_tcl+set}" = set; then
3714   withval="$with_tcl"
3715
3716   case $withval in
3717     yes)
3718       :
3719       ;;
3720     no)
3721       :
3722       ;;
3723     *)
3724       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3725 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3726    { (exit 1); exit 1; }; }
3727       ;;
3728   esac
3729
3730 else
3731   with_tcl=no
3732
3733 fi;
3734
3735 echo "$as_me:$LINENO: result: $with_tcl" >&5
3736 echo "${ECHO_T}$with_tcl" >&6
3737
3738
3739 # We see if the path to the Tcl/Tk configuration scripts is specified.
3740 # This will override the use of tclsh to find the paths to search.
3741
3742
3743 pgac_args="$pgac_args with_tclconfig"
3744
3745
3746 # Check whether --with-tclconfig or --without-tclconfig was given.
3747 if test "${with_tclconfig+set}" = set; then
3748   withval="$with_tclconfig"
3749
3750   case $withval in
3751     yes)
3752       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3753 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3754    { (exit 1); exit 1; }; }
3755       ;;
3756     no)
3757       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3758 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3759    { (exit 1); exit 1; }; }
3760       ;;
3761     *)
3762
3763       ;;
3764   esac
3765
3766 fi;
3767
3768
3769 #
3770 # Optionally build Perl modules (PL/Perl)
3771 #
3772 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3773 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3774
3775 pgac_args="$pgac_args with_perl"
3776
3777
3778 # Check whether --with-perl or --without-perl was given.
3779 if test "${with_perl+set}" = set; then
3780   withval="$with_perl"
3781
3782   case $withval in
3783     yes)
3784       :
3785       ;;
3786     no)
3787       :
3788       ;;
3789     *)
3790       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3791 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3792    { (exit 1); exit 1; }; }
3793       ;;
3794   esac
3795
3796 else
3797   with_perl=no
3798
3799 fi;
3800
3801 echo "$as_me:$LINENO: result: $with_perl" >&5
3802 echo "${ECHO_T}$with_perl" >&6
3803
3804
3805 #
3806 # Optionally build Python modules (PL/Python)
3807 #
3808 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3809 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3810
3811 pgac_args="$pgac_args with_python"
3812
3813
3814 # Check whether --with-python or --without-python was given.
3815 if test "${with_python+set}" = set; then
3816   withval="$with_python"
3817
3818   case $withval in
3819     yes)
3820       :
3821       ;;
3822     no)
3823       :
3824       ;;
3825     *)
3826       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3827 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3828    { (exit 1); exit 1; }; }
3829       ;;
3830   esac
3831
3832 else
3833   with_python=no
3834
3835 fi;
3836
3837 echo "$as_me:$LINENO: result: $with_python" >&5
3838 echo "${ECHO_T}$with_python" >&6
3839
3840
3841 #
3842 # Kerberos 5
3843 #
3844 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3845 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3846
3847 pgac_args="$pgac_args with_krb5"
3848
3849
3850 # Check whether --with-krb5 or --without-krb5 was given.
3851 if test "${with_krb5+set}" = set; then
3852   withval="$with_krb5"
3853
3854   case $withval in
3855     yes)
3856
3857
3858 cat >>confdefs.h <<\_ACEOF
3859 #define KRB5 1
3860 _ACEOF
3861
3862   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3863
3864       ;;
3865     no)
3866       :
3867       ;;
3868     *)
3869       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3870 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3871    { (exit 1); exit 1; }; }
3872       ;;
3873   esac
3874
3875 else
3876   with_krb5=no
3877
3878 fi;
3879
3880 echo "$as_me:$LINENO: result: $with_krb5" >&5
3881 echo "${ECHO_T}$with_krb5" >&6
3882
3883
3884
3885
3886
3887
3888 #
3889 # Kerberos configuration parameters
3890 #
3891
3892 pgac_args="$pgac_args with_krb_srvnam"
3893
3894
3895 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3896 if test "${with_krb_srvnam+set}" = set; then
3897   withval="$with_krb_srvnam"
3898
3899   case $withval in
3900     yes)
3901       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3902 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3903    { (exit 1); exit 1; }; }
3904       ;;
3905     no)
3906       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3907 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3908    { (exit 1); exit 1; }; }
3909       ;;
3910     *)
3911
3912       ;;
3913   esac
3914
3915 else
3916   with_krb_srvnam="postgres"
3917 fi;
3918
3919
3920 cat >>confdefs.h <<_ACEOF
3921 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3922 _ACEOF
3923
3924
3925
3926 #
3927 # PAM
3928 #
3929 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3930 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3931
3932 pgac_args="$pgac_args with_pam"
3933
3934
3935 # Check whether --with-pam or --without-pam was given.
3936 if test "${with_pam+set}" = set; then
3937   withval="$with_pam"
3938
3939   case $withval in
3940     yes)
3941
3942 cat >>confdefs.h <<\_ACEOF
3943 #define USE_PAM 1
3944 _ACEOF
3945
3946       ;;
3947     no)
3948       :
3949       ;;
3950     *)
3951       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3952 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3953    { (exit 1); exit 1; }; }
3954       ;;
3955   esac
3956
3957 else
3958   with_pam=no
3959
3960 fi;
3961
3962 echo "$as_me:$LINENO: result: $with_pam" >&5
3963 echo "${ECHO_T}$with_pam" >&6
3964
3965
3966
3967 #
3968 # LDAP
3969 #
3970 echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
3971 echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6
3972
3973 pgac_args="$pgac_args with_ldap"
3974
3975
3976 # Check whether --with-ldap or --without-ldap was given.
3977 if test "${with_ldap+set}" = set; then
3978   withval="$with_ldap"
3979
3980   case $withval in
3981     yes)
3982
3983 cat >>confdefs.h <<\_ACEOF
3984 #define USE_LDAP 1
3985 _ACEOF
3986
3987       ;;
3988     no)
3989       :
3990       ;;
3991     *)
3992       { { echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
3993 echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
3994    { (exit 1); exit 1; }; }
3995       ;;
3996   esac
3997
3998 else
3999   with_ldap=no
4000
4001 fi;
4002
4003 echo "$as_me:$LINENO: result: $with_ldap" >&5
4004 echo "${ECHO_T}$with_ldap" >&6
4005
4006
4007
4008 #
4009 # Bonjour
4010 #
4011 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
4012 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
4013
4014 pgac_args="$pgac_args with_bonjour"
4015
4016
4017 # Check whether --with-bonjour or --without-bonjour was given.
4018 if test "${with_bonjour+set}" = set; then
4019   withval="$with_bonjour"
4020
4021   case $withval in
4022     yes)
4023
4024 cat >>confdefs.h <<\_ACEOF
4025 #define USE_BONJOUR 1
4026 _ACEOF
4027
4028       ;;
4029     no)
4030       :
4031       ;;
4032     *)
4033       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
4034 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
4035    { (exit 1); exit 1; }; }
4036       ;;
4037   esac
4038
4039 else
4040   with_bonjour=no
4041
4042 fi;
4043
4044 echo "$as_me:$LINENO: result: $with_bonjour" >&5
4045 echo "${ECHO_T}$with_bonjour" >&6
4046
4047
4048
4049 #
4050 # OpenSSL
4051 #
4052 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
4053 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
4054
4055 pgac_args="$pgac_args with_openssl"
4056
4057
4058 # Check whether --with-openssl or --without-openssl was given.
4059 if test "${with_openssl+set}" = set; then
4060   withval="$with_openssl"
4061
4062   case $withval in
4063     yes)
4064
4065 cat >>confdefs.h <<\_ACEOF
4066 #define USE_SSL 1
4067 _ACEOF
4068
4069       ;;
4070     no)
4071       :
4072       ;;
4073     *)
4074       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
4075 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
4076    { (exit 1); exit 1; }; }
4077       ;;
4078   esac
4079
4080 else
4081   with_openssl=no
4082
4083 fi;
4084
4085 echo "$as_me:$LINENO: result: $with_openssl" >&5
4086 echo "${ECHO_T}$with_openssl" >&6
4087
4088
4089
4090 #
4091 # Readline
4092 #
4093
4094 pgac_args="$pgac_args with_readline"
4095
4096
4097 # Check whether --with-readline or --without-readline was given.
4098 if test "${with_readline+set}" = set; then
4099   withval="$with_readline"
4100
4101   case $withval in
4102     yes)
4103       :
4104       ;;
4105     no)
4106       :
4107       ;;
4108     *)
4109       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
4110 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
4111    { (exit 1); exit 1; }; }
4112       ;;
4113   esac
4114
4115 else
4116   with_readline=yes
4117
4118 fi;
4119
4120 # readline on MinGW has problems with backslashes in psql and other bugs.
4121 # This is particularly a problem with non-US code pages.
4122 # Therefore disable its use until we understand the cause. 2004-07-20
4123 if test "$PORTNAME" = "win32"; then
4124   if test "$with_readline" = yes; then
4125     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
4126 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
4127     with_readline=no
4128   fi
4129 fi
4130
4131
4132 #
4133 # Prefer libedit
4134 #
4135
4136 pgac_args="$pgac_args with_libedit_preferred"
4137
4138
4139 # Check whether --with-libedit-preferred or --without-libedit-preferred was given.
4140 if test "${with_libedit_preferred+set}" = set; then
4141   withval="$with_libedit_preferred"
4142
4143   case $withval in
4144     yes)
4145       :
4146       ;;
4147     no)
4148       :
4149       ;;
4150     *)
4151       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
4152 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
4153    { (exit 1); exit 1; }; }
4154       ;;
4155   esac
4156
4157 else
4158   with_libedit_preferred=no
4159
4160 fi;
4161
4162
4163
4164 #
4165 # XML
4166 #
4167
4168 pgac_args="$pgac_args with_libxml"
4169
4170
4171 # Check whether --with-libxml or --without-libxml was given.
4172 if test "${with_libxml+set}" = set; then
4173   withval="$with_libxml"
4174
4175   case $withval in
4176     yes)
4177
4178 cat >>confdefs.h <<\_ACEOF
4179 #define USE_LIBXML 1
4180 _ACEOF
4181
4182       ;;
4183     no)
4184       :
4185       ;;
4186     *)
4187       { { echo "$as_me:$LINENO: error: no argument expected for --with-libxml option" >&5
4188 echo "$as_me: error: no argument expected for --with-libxml option" >&2;}
4189    { (exit 1); exit 1; }; }
4190       ;;
4191   esac
4192
4193 else
4194   with_libxml=no
4195
4196 fi;
4197
4198
4199
4200 #
4201 # Zlib
4202 #
4203
4204 pgac_args="$pgac_args with_zlib"
4205
4206
4207 # Check whether --with-zlib or --without-zlib was given.
4208 if test "${with_zlib+set}" = set; then
4209   withval="$with_zlib"
4210
4211   case $withval in
4212     yes)
4213       :
4214       ;;
4215     no)
4216       :
4217       ;;
4218     *)
4219       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
4220 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
4221    { (exit 1); exit 1; }; }
4222       ;;
4223   esac
4224
4225 else
4226   with_zlib=yes
4227
4228 fi;
4229
4230
4231
4232 #
4233 # Elf
4234 #
4235
4236 # Assume system is ELF if it predefines __ELF__ as 1,
4237 # otherwise believe host_os based default.
4238 case $host_os in
4239     freebsd1*|freebsd2*) elf=no;;
4240     freebsd3*|freebsd4*) elf=yes;;
4241 esac
4242
4243
4244 echo "$as_me:$LINENO: checking for egrep" >&5
4245 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4246 if test "${ac_cv_prog_egrep+set}" = set; then
4247   echo $ECHO_N "(cached) $ECHO_C" >&6
4248 else
4249   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4250     then ac_cv_prog_egrep='grep -E'
4251     else ac_cv_prog_egrep='egrep'
4252     fi
4253 fi
4254 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4255 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4256  EGREP=$ac_cv_prog_egrep
4257
4258
4259 cat >conftest.$ac_ext <<_ACEOF
4260 /* confdefs.h.  */
4261 _ACEOF
4262 cat confdefs.h >>conftest.$ac_ext
4263 cat >>conftest.$ac_ext <<_ACEOF
4264 /* end confdefs.h.  */
4265 #if __ELF__
4266   yes
4267 #endif
4268
4269 _ACEOF
4270 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4271   $EGREP "yes" >/dev/null 2>&1; then
4272   ELF_SYS=true
4273 else
4274   if test "X$elf" = "Xyes" ; then
4275   ELF_SYS=true
4276 else
4277   ELF_SYS=
4278 fi
4279 fi
4280 rm -f conftest*
4281
4282
4283
4284 #
4285 # Assignments
4286 #
4287
4288 CPPFLAGS="$CPPFLAGS $INCLUDES"
4289 LDFLAGS="$LDFLAGS $LIBDIRS"
4290
4291 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
4292 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
4293 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
4294 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
4295
4296
4297
4298 for ac_prog in gawk mawk nawk awk
4299 do
4300   # Extract the first word of "$ac_prog", so it can be a program name with args.
4301 set dummy $ac_prog; ac_word=$2
4302 echo "$as_me:$LINENO: checking for $ac_word" >&5
4303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4304 if test "${ac_cv_prog_AWK+set}" = set; then
4305   echo $ECHO_N "(cached) $ECHO_C" >&6
4306 else
4307   if test -n "$AWK"; then
4308   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4309 else
4310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4311 for as_dir in $PATH
4312 do
4313   IFS=$as_save_IFS
4314   test -z "$as_dir" && as_dir=.
4315   for ac_exec_ext in '' $ac_executable_extensions; do
4316   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4317     ac_cv_prog_AWK="$ac_prog"
4318     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4319     break 2
4320   fi
4321 done
4322 done
4323
4324 fi
4325 fi
4326 AWK=$ac_cv_prog_AWK
4327 if test -n "$AWK"; then
4328   echo "$as_me:$LINENO: result: $AWK" >&5
4329 echo "${ECHO_T}$AWK" >&6
4330 else
4331   echo "$as_me:$LINENO: result: no" >&5
4332 echo "${ECHO_T}no" >&6
4333 fi
4334
4335   test -n "$AWK" && break
4336 done
4337
4338 echo "$as_me:$LINENO: checking for flex" >&5
4339 echo $ECHO_N "checking for flex... $ECHO_C" >&6
4340 if test "${pgac_cv_path_flex+set}" = set; then
4341   echo $ECHO_N "(cached) $ECHO_C" >&6
4342 else
4343   # Let the user override the test
4344 if test -n "$FLEX"; then
4345   pgac_cv_path_flex=$FLEX
4346 else
4347   pgac_save_IFS=$IFS
4348   IFS=$PATH_SEPARATOR
4349   for pgac_dir in $PATH; do
4350     IFS=$pgac_save_IFS
4351     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
4352       pgac_dir=`pwd`
4353     fi
4354     for pgac_prog in flex lex; do
4355       pgac_candidate="$pgac_dir/$pgac_prog"
4356       if test -f "$pgac_candidate" \
4357         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4358       then
4359         echo '%%'  > conftest.l
4360         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4361           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4362             pgac_broken_flex=$pgac_candidate
4363             continue
4364           fi
4365
4366           pgac_cv_path_flex=$pgac_candidate
4367           break 2
4368         fi
4369       fi
4370     done
4371   done
4372   rm -f conftest.l lex.yy.c
4373   : ${pgac_cv_path_flex=no}
4374 fi
4375
4376 fi
4377 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4378 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4379 if test x"$pgac_cv_path_flex" = x"no"; then
4380   if test -n "$pgac_broken_flex"; then
4381     { echo "$as_me:$LINENO: WARNING:
4382 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4383 *** should get version 2.5.4 or later." >&5
4384 echo "$as_me: WARNING:
4385 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4386 *** should get version 2.5.4 or later." >&2;}
4387   fi
4388
4389   { echo "$as_me:$LINENO: WARNING:
4390 *** Without Flex you will not be able to build PostgreSQL from CVS or
4391 *** change any of the scanner definition files.  You can obtain Flex from
4392 *** a GNU mirror site.  (If you are using the official distribution of
4393 *** PostgreSQL then you do not need to worry about this because the Flex
4394 *** output is pre-generated.)" >&5
4395 echo "$as_me: WARNING:
4396 *** Without Flex you will not be able to build PostgreSQL from CVS or
4397 *** change any of the scanner definition files.  You can obtain Flex from
4398 *** a GNU mirror site.  (If you are using the official distribution of
4399 *** PostgreSQL then you do not need to worry about this because the Flex
4400 *** output is pre-generated.)" >&2;}
4401 fi
4402
4403 if test x"$pgac_cv_path_flex" = x"no"; then
4404   FLEX=
4405 else
4406   FLEX=$pgac_cv_path_flex
4407 fi
4408
4409
4410
4411
4412 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4413 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4414 LN_S=$as_ln_s
4415 if test "$LN_S" = "ln -s"; then
4416   echo "$as_me:$LINENO: result: yes" >&5
4417 echo "${ECHO_T}yes" >&6
4418 else
4419   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4420 echo "${ECHO_T}no, using $LN_S" >&6
4421 fi
4422
4423
4424 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4425 if test "${with_gnu_ld+set}" = set; then
4426   withval="$with_gnu_ld"
4427   test "$withval" = no || with_gnu_ld=yes
4428 else
4429   with_gnu_ld=no
4430 fi;
4431 ac_prog=ld
4432 if test "$GCC" = yes; then
4433   # Check if gcc -print-prog-name=ld gives a path.
4434   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4435 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4436   case $host in
4437   *-*-mingw*)
4438     # gcc leaves a trailing carriage return which upsets mingw
4439     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4440   *)
4441     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4442   esac
4443   case "$ac_prog" in
4444     # Accept absolute paths.
4445     [\\/]* | [A-Za-z]:[\\/]*)
4446       re_direlt='/[^/][^/]*/\.\./'
4447       # Canonicalize the path of ld
4448       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4449       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4450         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4451       done
4452       test -z "$LD" && LD="$ac_prog"
4453       ;;
4454   "")
4455     # If it fails, then pretend we aren't using GCC.
4456     ac_prog=ld
4457     ;;
4458   *)
4459     # If it is relative, then search for the first ld in PATH.
4460     with_gnu_ld=unknown
4461     ;;
4462   esac
4463 elif test "$with_gnu_ld" = yes; then
4464   echo "$as_me:$LINENO: checking for GNU ld" >&5
4465 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4466 else
4467   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4468 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4469 fi
4470 if test "${ac_cv_path_LD+set}" = set; then
4471   echo $ECHO_N "(cached) $ECHO_C" >&6
4472 else
4473   if test -z "$LD"; then
4474   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4475   for ac_dir in $PATH; do
4476     test -z "$ac_dir" && ac_dir=.
4477     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4478       ac_cv_path_LD="$ac_dir/$ac_prog"
4479       # Check to see if the program is GNU ld.  I'd rather use --version,
4480       # but apparently some GNU ld's only accept -v.
4481       # Break only if it was the GNU/non-GNU ld that we prefer.
4482       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4483         test "$with_gnu_ld" != no && break
4484       else
4485         test "$with_gnu_ld" != yes && break
4486       fi
4487     fi
4488   done
4489   IFS="$ac_save_ifs"
4490 else
4491   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4492 fi
4493 fi
4494
4495 LD="$ac_cv_path_LD"
4496 if test -n "$LD"; then
4497   echo "$as_me:$LINENO: result: $LD" >&5
4498 echo "${ECHO_T}$LD" >&6
4499 else
4500   echo "$as_me:$LINENO: result: no" >&5
4501 echo "${ECHO_T}no" >&6
4502 fi
4503 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4504 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4505    { (exit 1); exit 1; }; }
4506 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4507 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4508 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4509   echo $ECHO_N "(cached) $ECHO_C" >&6
4510 else
4511   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4512 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4513   ac_cv_prog_gnu_ld=yes
4514 else
4515   ac_cv_prog_gnu_ld=no
4516 fi
4517 fi
4518 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4519 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4520 with_gnu_ld=$ac_cv_prog_gnu_ld
4521
4522
4523
4524
4525 case $host_os in sysv5*)
4526   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4527 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4528 if test "${pgac_cv_prog_ld_R+set}" = set; then
4529   echo $ECHO_N "(cached) $ECHO_C" >&6
4530 else
4531
4532     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4533     cat >conftest.$ac_ext <<_ACEOF
4534 /* confdefs.h.  */
4535 _ACEOF
4536 cat confdefs.h >>conftest.$ac_ext
4537 cat >>conftest.$ac_ext <<_ACEOF
4538 /* end confdefs.h.  */
4539
4540 int
4541 main ()
4542 {
4543
4544   ;
4545   return 0;
4546 }
4547 _ACEOF
4548 rm -f conftest.$ac_objext conftest$ac_exeext
4549 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4550   (eval $ac_link) 2>conftest.er1
4551   ac_status=$?
4552   grep -v '^ *+' conftest.er1 >conftest.err
4553   rm -f conftest.er1
4554   cat conftest.err >&5
4555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4556   (exit $ac_status); } &&
4557          { ac_try='test -z "$ac_c_werror_flag"
4558                          || test ! -s conftest.err'
4559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4560   (eval $ac_try) 2>&5
4561   ac_status=$?
4562   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4563   (exit $ac_status); }; } &&
4564          { ac_try='test -s conftest$ac_exeext'
4565   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4566   (eval $ac_try) 2>&5
4567   ac_status=$?
4568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4569   (exit $ac_status); }; }; then
4570   pgac_cv_prog_ld_R=yes
4571 else
4572   echo "$as_me: failed program was:" >&5
4573 sed 's/^/| /' conftest.$ac_ext >&5
4574
4575 pgac_cv_prog_ld_R=no
4576 fi
4577 rm -f conftest.err conftest.$ac_objext \
4578       conftest$ac_exeext conftest.$ac_ext
4579     LDFLAGS=$pgac_save_LDFLAGS
4580
4581 fi
4582 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4583 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4584   ld_R_works=$pgac_cv_prog_ld_R
4585
4586 esac
4587 if test -n "$ac_tool_prefix"; then
4588   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4589 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4590 echo "$as_me:$LINENO: checking for $ac_word" >&5
4591 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4592 if test "${ac_cv_prog_RANLIB+set}" = set; then
4593   echo $ECHO_N "(cached) $ECHO_C" >&6
4594 else
4595   if test -n "$RANLIB"; then
4596   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4597 else
4598 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4599 for as_dir in $PATH
4600 do
4601   IFS=$as_save_IFS
4602   test -z "$as_dir" && as_dir=.
4603   for ac_exec_ext in '' $ac_executable_extensions; do
4604   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4605     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4606     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4607     break 2
4608   fi
4609 done
4610 done
4611
4612 fi
4613 fi
4614 RANLIB=$ac_cv_prog_RANLIB
4615 if test -n "$RANLIB"; then
4616   echo "$as_me:$LINENO: result: $RANLIB" >&5
4617 echo "${ECHO_T}$RANLIB" >&6
4618 else
4619   echo "$as_me:$LINENO: result: no" >&5
4620 echo "${ECHO_T}no" >&6
4621 fi
4622
4623 fi
4624 if test -z "$ac_cv_prog_RANLIB"; then
4625   ac_ct_RANLIB=$RANLIB
4626   # Extract the first word of "ranlib", so it can be a program name with args.
4627 set dummy ranlib; ac_word=$2
4628 echo "$as_me:$LINENO: checking for $ac_word" >&5
4629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4630 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4631   echo $ECHO_N "(cached) $ECHO_C" >&6
4632 else
4633   if test -n "$ac_ct_RANLIB"; then
4634   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4635 else
4636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4637 for as_dir in $PATH
4638 do
4639   IFS=$as_save_IFS
4640   test -z "$as_dir" && as_dir=.
4641   for ac_exec_ext in '' $ac_executable_extensions; do
4642   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4643     ac_cv_prog_ac_ct_RANLIB="ranlib"
4644     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4645     break 2
4646   fi
4647 done
4648 done
4649
4650   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4651 fi
4652 fi
4653 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4654 if test -n "$ac_ct_RANLIB"; then
4655   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4656 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4657 else
4658   echo "$as_me:$LINENO: result: no" >&5
4659 echo "${ECHO_T}no" >&6
4660 fi
4661
4662   RANLIB=$ac_ct_RANLIB
4663 else
4664   RANLIB="$ac_cv_prog_RANLIB"
4665 fi
4666
4667 # Extract the first word of "tar", so it can be a program name with args.
4668 set dummy tar; ac_word=$2
4669 echo "$as_me:$LINENO: checking for $ac_word" >&5
4670 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4671 if test "${ac_cv_path_TAR+set}" = set; then
4672   echo $ECHO_N "(cached) $ECHO_C" >&6
4673 else
4674   case $TAR in
4675   [\\/]* | ?:[\\/]*)
4676   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4677   ;;
4678   *)
4679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4680 for as_dir in $PATH
4681 do
4682   IFS=$as_save_IFS
4683   test -z "$as_dir" && as_dir=.
4684   for ac_exec_ext in '' $ac_executable_extensions; do
4685   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4686     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4687     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4688     break 2
4689   fi
4690 done
4691 done
4692
4693   ;;
4694 esac
4695 fi
4696 TAR=$ac_cv_path_TAR
4697
4698 if test -n "$TAR"; then
4699   echo "$as_me:$LINENO: result: $TAR" >&5
4700 echo "${ECHO_T}$TAR" >&6
4701 else
4702   echo "$as_me:$LINENO: result: no" >&5
4703 echo "${ECHO_T}no" >&6
4704 fi
4705
4706
4707   if test -n "$ac_tool_prefix"; then
4708   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4709 set dummy ${ac_tool_prefix}strip; ac_word=$2
4710 echo "$as_me:$LINENO: checking for $ac_word" >&5
4711 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4712 if test "${ac_cv_prog_STRIP+set}" = set; then
4713   echo $ECHO_N "(cached) $ECHO_C" >&6
4714 else
4715   if test -n "$STRIP"; then
4716   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4717 else
4718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4719 for as_dir in $PATH
4720 do
4721   IFS=$as_save_IFS
4722   test -z "$as_dir" && as_dir=.
4723   for ac_exec_ext in '' $ac_executable_extensions; do
4724   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4725     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4726     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4727     break 2
4728   fi
4729 done
4730 done
4731
4732 fi
4733 fi
4734 STRIP=$ac_cv_prog_STRIP
4735 if test -n "$STRIP"; then
4736   echo "$as_me:$LINENO: result: $STRIP" >&5
4737 echo "${ECHO_T}$STRIP" >&6
4738 else
4739   echo "$as_me:$LINENO: result: no" >&5
4740 echo "${ECHO_T}no" >&6
4741 fi
4742
4743 fi
4744 if test -z "$ac_cv_prog_STRIP"; then
4745   ac_ct_STRIP=$STRIP
4746   # Extract the first word of "strip", so it can be a program name with args.
4747 set dummy strip; ac_word=$2
4748 echo "$as_me:$LINENO: checking for $ac_word" >&5
4749 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4750 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4751   echo $ECHO_N "(cached) $ECHO_C" >&6
4752 else
4753   if test -n "$ac_ct_STRIP"; then
4754   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4755 else
4756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4757 for as_dir in $PATH
4758 do
4759   IFS=$as_save_IFS
4760   test -z "$as_dir" && as_dir=.
4761   for ac_exec_ext in '' $ac_executable_extensions; do
4762   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4763     ac_cv_prog_ac_ct_STRIP="strip"
4764     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4765     break 2
4766   fi
4767 done
4768 done
4769
4770   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4771 fi
4772 fi
4773 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4774 if test -n "$ac_ct_STRIP"; then
4775   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4776 echo "${ECHO_T}$ac_ct_STRIP" >&6
4777 else
4778   echo "$as_me:$LINENO: result: no" >&5
4779 echo "${ECHO_T}no" >&6
4780 fi
4781
4782   STRIP=$ac_ct_STRIP
4783 else
4784   STRIP="$ac_cv_prog_STRIP"
4785 fi
4786
4787
4788   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4789 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4790   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4791     STRIP_STATIC_LIB="$STRIP -x"
4792     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4793     echo "$as_me:$LINENO: result: yes" >&5
4794 echo "${ECHO_T}yes" >&6
4795   else
4796     STRIP_STATIC_LIB=:
4797     STRIP_SHARED_LIB=:
4798     echo "$as_me:$LINENO: result: no" >&5
4799 echo "${ECHO_T}no" >&6
4800   fi
4801
4802
4803
4804
4805 if test -z "$YACC"; then
4806   for ac_prog in 'bison -y'
4807 do
4808   # Extract the first word of "$ac_prog", so it can be a program name with args.
4809 set dummy $ac_prog; ac_word=$2
4810 echo "$as_me:$LINENO: checking for $ac_word" >&5
4811 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4812 if test "${ac_cv_prog_YACC+set}" = set; then
4813   echo $ECHO_N "(cached) $ECHO_C" >&6
4814 else
4815   if test -n "$YACC"; then
4816   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4817 else
4818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4819 for as_dir in $PATH
4820 do
4821   IFS=$as_save_IFS
4822   test -z "$as_dir" && as_dir=.
4823   for ac_exec_ext in '' $ac_executable_extensions; do
4824   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4825     ac_cv_prog_YACC="$ac_prog"
4826     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4827     break 2
4828   fi
4829 done
4830 done
4831
4832 fi
4833 fi
4834 YACC=$ac_cv_prog_YACC
4835 if test -n "$YACC"; then
4836   echo "$as_me:$LINENO: result: $YACC" >&5
4837 echo "${ECHO_T}$YACC" >&6
4838 else
4839   echo "$as_me:$LINENO: result: no" >&5
4840 echo "${ECHO_T}no" >&6
4841 fi
4842
4843   test -n "$YACC" && break
4844 done
4845
4846
4847   if test "$YACC"; then
4848     if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4849       { echo "$as_me:$LINENO: WARNING:
4850 *** The installed version of Bison is too old to use with PostgreSQL.
4851 *** Bison version 1.875 or later is required." >&5
4852 echo "$as_me: WARNING:
4853 *** The installed version of Bison is too old to use with PostgreSQL.
4854 *** Bison version 1.875 or later is required." >&2;}
4855       YACC=""
4856     fi
4857   fi
4858
4859   if test -z "$YACC"; then
4860     { echo "$as_me:$LINENO: WARNING:
4861 *** Without Bison you will not be able to build PostgreSQL from CVS nor
4862 *** change any of the parser definition files.  You can obtain Bison from
4863 *** a GNU mirror site.  (If you are using the official distribution of
4864 *** PostgreSQL then you do not need to worry about this, because the Bison
4865 *** output is pre-generated.)  To use a different yacc program (possible,
4866 *** but not recommended), set the environment variable YACC before running
4867 *** 'configure'." >&5
4868 echo "$as_me: WARNING:
4869 *** Without Bison you will not be able to build PostgreSQL from CVS nor
4870 *** change any of the parser definition files.  You can obtain Bison from
4871 *** a GNU mirror site.  (If you are using the official distribution of
4872 *** PostgreSQL then you do not need to worry about this, because the Bison
4873 *** output is pre-generated.)  To use a different yacc program (possible,
4874 *** but not recommended), set the environment variable YACC before running
4875 *** 'configure'." >&2;}
4876   fi
4877 fi
4878
4879
4880 # Extract the first word of "perl", so it can be a program name with args.
4881 set dummy perl; ac_word=$2
4882 echo "$as_me:$LINENO: checking for $ac_word" >&5
4883 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4884 if test "${ac_cv_path_PERL+set}" = set; then
4885   echo $ECHO_N "(cached) $ECHO_C" >&6
4886 else
4887   case $PERL in
4888   [\\/]* | ?:[\\/]*)
4889   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4890   ;;
4891   *)
4892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4893 for as_dir in $PATH
4894 do
4895   IFS=$as_save_IFS
4896   test -z "$as_dir" && as_dir=.
4897   for ac_exec_ext in '' $ac_executable_extensions; do
4898   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4899     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4900     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4901     break 2
4902   fi
4903 done
4904 done
4905
4906   ;;
4907 esac
4908 fi
4909 PERL=$ac_cv_path_PERL
4910
4911 if test -n "$PERL"; then
4912   echo "$as_me:$LINENO: result: $PERL" >&5
4913 echo "${ECHO_T}$PERL" >&6
4914 else
4915   echo "$as_me:$LINENO: result: no" >&5
4916 echo "${ECHO_T}no" >&6
4917 fi
4918
4919 if test "$with_perl" = yes; then
4920
4921 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4922 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4923 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4924 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4925 echo "${ECHO_T}$perl_archlibexp" >&6
4926 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4927 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4928 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4929 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4930 echo "${ECHO_T}$perl_privlibexp" >&6
4931 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4932 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4933 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4934 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4935 echo "${ECHO_T}$perl_useshrplib" >&6
4936
4937 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4938 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4939 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4940 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4941 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4942 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4943 echo "${ECHO_T}$perl_embed_ldflags" >&6
4944 fi
4945
4946 if test "$with_python" = yes; then
4947   # Extract the first word of "python", so it can be a program name with args.
4948 set dummy python; ac_word=$2
4949 echo "$as_me:$LINENO: checking for $ac_word" >&5
4950 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4951 if test "${ac_cv_path_PYTHON+set}" = set; then
4952   echo $ECHO_N "(cached) $ECHO_C" >&6
4953 else
4954   case $PYTHON in
4955   [\\/]* | ?:[\\/]*)
4956   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4957   ;;
4958   *)
4959   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4960 for as_dir in $PATH
4961 do
4962   IFS=$as_save_IFS
4963   test -z "$as_dir" && as_dir=.
4964   for ac_exec_ext in '' $ac_executable_extensions; do
4965   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4966     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4967     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4968     break 2
4969   fi
4970 done
4971 done
4972
4973   ;;
4974 esac
4975 fi
4976 PYTHON=$ac_cv_path_PYTHON
4977
4978 if test -n "$PYTHON"; then
4979   echo "$as_me:$LINENO: result: $PYTHON" >&5
4980 echo "${ECHO_T}$PYTHON" >&6
4981 else
4982   echo "$as_me:$LINENO: result: no" >&5
4983 echo "${ECHO_T}no" >&6
4984 fi
4985
4986 if test x"$PYTHON" = x""; then
4987   { { echo "$as_me:$LINENO: error: Python not found" >&5
4988 echo "$as_me: error: Python not found" >&2;}
4989    { (exit 1); exit 1; }; }
4990 fi
4991
4992
4993 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4994 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4995 if "${PYTHON}" 2>&- -c 'import distutils'
4996 then
4997     echo "$as_me:$LINENO: result: yes" >&5
4998 echo "${ECHO_T}yes" >&6
4999 else
5000     echo "$as_me:$LINENO: result: no" >&5
5001 echo "${ECHO_T}no" >&6
5002     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
5003 echo "$as_me: error: distutils module not found" >&2;}
5004    { (exit 1); exit 1; }; }
5005 fi
5006 echo "$as_me:$LINENO: checking Python configuration directory" >&5
5007 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
5008 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
5009 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')"`
5010 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
5011
5012 # This should be enough of a message.
5013 echo "$as_me:$LINENO: result: $python_configdir" >&5
5014 echo "${ECHO_T}$python_configdir" >&6
5015
5016
5017 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
5018 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
5019
5020 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
5021 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
5022 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
5023 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
5024
5025 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
5026 then
5027         # New way: use the official shared library
5028         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
5029         python_libspec="-L${python_libdir} -l${ldlibrary}"
5030 else
5031         # Old way: use libpython from python_configdir
5032         python_libdir="${python_configdir}"
5033         python_libspec="-L${python_libdir} -lpython${python_version}"
5034 fi
5035
5036 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
5037
5038 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
5039 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
5040
5041
5042 # threaded python is not supported on bsd's
5043 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
5044 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
5045 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
5046 if test "$pythreads" = "1"; then
5047   echo "$as_me:$LINENO: result: yes" >&5
5048 echo "${ECHO_T}yes" >&6
5049   case $host_os in
5050   openbsd*|freebsd*)
5051     { { echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
5052 echo "$as_me: error: threaded Python not supported on this platform" >&2;}
5053    { (exit 1); exit 1; }; }
5054     ;;
5055   esac
5056 else
5057   echo "$as_me:$LINENO: result: no" >&5
5058 echo "${ECHO_T}no" >&6
5059 fi
5060
5061
5062 fi
5063
5064 # Supply a numeric version string for use by 3rd party add-ons
5065 # awk -F is a regex on some platforms, and not on others, so make "." a tab
5066 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/A-Za-z.*$//' |
5067 tr '.' '        ' |
5068 $AWK '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
5069
5070 cat >>confdefs.h <<_ACEOF
5071 #define PG_VERSION_NUM $PG_VERSION_NUM
5072 _ACEOF
5073
5074
5075 ##
5076 ## Libraries
5077 ##
5078 ## Most libraries are included only if they demonstrably provide a function
5079 ## we need, but libm is an exception: always include it, because there are
5080 ## too many compilers that play cute optimization games that will break
5081 ## probes for standard functions such as pow().
5082 ##
5083
5084
5085 echo "$as_me:$LINENO: checking for main in -lm" >&5
5086 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
5087 if test "${ac_cv_lib_m_main+set}" = set; then
5088   echo $ECHO_N "(cached) $ECHO_C" >&6
5089 else
5090   ac_check_lib_save_LIBS=$LIBS
5091 LIBS="-lm  $LIBS"
5092 cat >conftest.$ac_ext <<_ACEOF
5093 /* confdefs.h.  */
5094 _ACEOF
5095 cat confdefs.h >>conftest.$ac_ext
5096 cat >>conftest.$ac_ext <<_ACEOF
5097 /* end confdefs.h.  */
5098
5099
5100 int
5101 main ()
5102 {
5103 main ();
5104   ;
5105   return 0;
5106 }
5107 _ACEOF
5108 rm -f conftest.$ac_objext conftest$ac_exeext
5109 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5110   (eval $ac_link) 2>conftest.er1
5111   ac_status=$?
5112   grep -v '^ *+' conftest.er1 >conftest.err
5113   rm -f conftest.er1
5114   cat conftest.err >&5
5115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5116   (exit $ac_status); } &&
5117          { ac_try='test -z "$ac_c_werror_flag"
5118                          || test ! -s conftest.err'
5119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5120   (eval $ac_try) 2>&5
5121   ac_status=$?
5122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5123   (exit $ac_status); }; } &&
5124          { ac_try='test -s conftest$ac_exeext'
5125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5126   (eval $ac_try) 2>&5
5127   ac_status=$?
5128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5129   (exit $ac_status); }; }; then
5130   ac_cv_lib_m_main=yes
5131 else
5132   echo "$as_me: failed program was:" >&5
5133 sed 's/^/| /' conftest.$ac_ext >&5
5134
5135 ac_cv_lib_m_main=no
5136 fi
5137 rm -f conftest.err conftest.$ac_objext \
5138       conftest$ac_exeext conftest.$ac_ext
5139 LIBS=$ac_check_lib_save_LIBS
5140 fi
5141 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
5142 echo "${ECHO_T}$ac_cv_lib_m_main" >&6
5143 if test $ac_cv_lib_m_main = yes; then
5144   cat >>confdefs.h <<_ACEOF
5145 #define HAVE_LIBM 1
5146 _ACEOF
5147
5148   LIBS="-lm $LIBS"
5149
5150 fi
5151
5152 echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
5153 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6
5154 if test "${ac_cv_search_setproctitle+set}" = set; then
5155   echo $ECHO_N "(cached) $ECHO_C" >&6
5156 else
5157   ac_func_search_save_LIBS=$LIBS
5158 ac_cv_search_setproctitle=no
5159 cat >conftest.$ac_ext <<_ACEOF
5160 /* confdefs.h.  */
5161 _ACEOF
5162 cat confdefs.h >>conftest.$ac_ext
5163 cat >>conftest.$ac_ext <<_ACEOF
5164 /* end confdefs.h.  */
5165
5166 /* Override any gcc2 internal prototype to avoid an error.  */
5167 #ifdef __cplusplus
5168 extern "C"
5169 #endif
5170 /* We use char because int might match the return type of a gcc2
5171    builtin and then its argument prototype would still apply.  */
5172 char setproctitle ();
5173 int
5174 main ()
5175 {
5176 setproctitle ();
5177   ;
5178   return 0;
5179 }
5180 _ACEOF
5181 rm -f conftest.$ac_objext conftest$ac_exeext
5182 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5183   (eval $ac_link) 2>conftest.er1
5184   ac_status=$?
5185   grep -v '^ *+' conftest.er1 >conftest.err
5186   rm -f conftest.er1
5187   cat conftest.err >&5
5188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5189   (exit $ac_status); } &&
5190          { ac_try='test -z "$ac_c_werror_flag"
5191                          || test ! -s conftest.err'
5192   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5193   (eval $ac_try) 2>&5
5194   ac_status=$?
5195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5196   (exit $ac_status); }; } &&
5197          { ac_try='test -s conftest$ac_exeext'
5198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5199   (eval $ac_try) 2>&5
5200   ac_status=$?
5201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5202   (exit $ac_status); }; }; then
5203   ac_cv_search_setproctitle="none required"
5204 else
5205   echo "$as_me: failed program was:" >&5
5206 sed 's/^/| /' conftest.$ac_ext >&5
5207
5208 fi
5209 rm -f conftest.err conftest.$ac_objext \
5210       conftest$ac_exeext conftest.$ac_ext
5211 if test "$ac_cv_search_setproctitle" = no; then
5212   for ac_lib in util; do
5213     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5214     cat >conftest.$ac_ext <<_ACEOF
5215 /* confdefs.h.  */
5216 _ACEOF
5217 cat confdefs.h >>conftest.$ac_ext
5218 cat >>conftest.$ac_ext <<_ACEOF
5219 /* end confdefs.h.  */
5220
5221 /* Override any gcc2 internal prototype to avoid an error.  */
5222 #ifdef __cplusplus
5223 extern "C"
5224 #endif
5225 /* We use char because int might match the return type of a gcc2
5226    builtin and then its argument prototype would still apply.  */
5227 char setproctitle ();
5228 int
5229 main ()
5230 {
5231 setproctitle ();
5232   ;
5233   return 0;
5234 }
5235 _ACEOF
5236 rm -f conftest.$ac_objext conftest$ac_exeext
5237 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5238   (eval $ac_link) 2>conftest.er1
5239   ac_status=$?
5240   grep -v '^ *+' conftest.er1 >conftest.err
5241   rm -f conftest.er1
5242   cat conftest.err >&5
5243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5244   (exit $ac_status); } &&
5245          { ac_try='test -z "$ac_c_werror_flag"
5246                          || test ! -s conftest.err'
5247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5248   (eval $ac_try) 2>&5
5249   ac_status=$?
5250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5251   (exit $ac_status); }; } &&
5252          { ac_try='test -s conftest$ac_exeext'
5253   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5254   (eval $ac_try) 2>&5
5255   ac_status=$?
5256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5257   (exit $ac_status); }; }; then
5258   ac_cv_search_setproctitle="-l$ac_lib"
5259 break
5260 else
5261   echo "$as_me: failed program was:" >&5
5262 sed 's/^/| /' conftest.$ac_ext >&5
5263
5264 fi
5265 rm -f conftest.err conftest.$ac_objext \
5266       conftest$ac_exeext conftest.$ac_ext
5267   done
5268 fi
5269 LIBS=$ac_func_search_save_LIBS
5270 fi
5271 echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
5272 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6
5273 if test "$ac_cv_search_setproctitle" != no; then
5274   test "$ac_cv_search_setproctitle" = "none required" || LIBS="$ac_cv_search_setproctitle $LIBS"
5275
5276 fi
5277
5278 echo "$as_me:$LINENO: checking for library containing dlopen" >&5
5279 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6
5280 if test "${ac_cv_search_dlopen+set}" = set; then
5281   echo $ECHO_N "(cached) $ECHO_C" >&6
5282 else
5283   ac_func_search_save_LIBS=$LIBS
5284 ac_cv_search_dlopen=no
5285 cat >conftest.$ac_ext <<_ACEOF
5286 /* confdefs.h.  */
5287 _ACEOF
5288 cat confdefs.h >>conftest.$ac_ext
5289 cat >>conftest.$ac_ext <<_ACEOF
5290 /* end confdefs.h.  */
5291
5292 /* Override any gcc2 internal prototype to avoid an error.  */
5293 #ifdef __cplusplus
5294 extern "C"
5295 #endif
5296 /* We use char because int might match the return type of a gcc2
5297    builtin and then its argument prototype would still apply.  */
5298 char dlopen ();
5299 int
5300 main ()
5301 {
5302 dlopen ();
5303   ;
5304   return 0;
5305 }
5306 _ACEOF
5307 rm -f conftest.$ac_objext conftest$ac_exeext
5308 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5309   (eval $ac_link) 2>conftest.er1
5310   ac_status=$?
5311   grep -v '^ *+' conftest.er1 >conftest.err
5312   rm -f conftest.er1
5313   cat conftest.err >&5
5314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5315   (exit $ac_status); } &&
5316          { ac_try='test -z "$ac_c_werror_flag"
5317                          || test ! -s conftest.err'
5318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5319   (eval $ac_try) 2>&5
5320   ac_status=$?
5321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5322   (exit $ac_status); }; } &&
5323          { ac_try='test -s conftest$ac_exeext'
5324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5325   (eval $ac_try) 2>&5
5326   ac_status=$?
5327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5328   (exit $ac_status); }; }; then
5329   ac_cv_search_dlopen="none required"
5330 else
5331   echo "$as_me: failed program was:" >&5
5332 sed 's/^/| /' conftest.$ac_ext >&5
5333
5334 fi
5335 rm -f conftest.err conftest.$ac_objext \
5336       conftest$ac_exeext conftest.$ac_ext
5337 if test "$ac_cv_search_dlopen" = no; then
5338   for ac_lib in dl; do
5339     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5340     cat >conftest.$ac_ext <<_ACEOF
5341 /* confdefs.h.  */
5342 _ACEOF
5343 cat confdefs.h >>conftest.$ac_ext
5344 cat >>conftest.$ac_ext <<_ACEOF
5345 /* end confdefs.h.  */
5346
5347 /* Override any gcc2 internal prototype to avoid an error.  */
5348 #ifdef __cplusplus
5349 extern "C"
5350 #endif
5351 /* We use char because int might match the return type of a gcc2
5352    builtin and then its argument prototype would still apply.  */
5353 char dlopen ();
5354 int
5355 main ()
5356 {
5357 dlopen ();
5358   ;
5359   return 0;
5360 }
5361 _ACEOF
5362 rm -f conftest.$ac_objext conftest$ac_exeext
5363 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5364   (eval $ac_link) 2>conftest.er1
5365   ac_status=$?
5366   grep -v '^ *+' conftest.er1 >conftest.err
5367   rm -f conftest.er1
5368   cat conftest.err >&5
5369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5370   (exit $ac_status); } &&
5371          { ac_try='test -z "$ac_c_werror_flag"
5372                          || test ! -s conftest.err'
5373   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5374   (eval $ac_try) 2>&5
5375   ac_status=$?
5376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5377   (exit $ac_status); }; } &&
5378          { ac_try='test -s conftest$ac_exeext'
5379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5380   (eval $ac_try) 2>&5
5381   ac_status=$?
5382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5383   (exit $ac_status); }; }; then
5384   ac_cv_search_dlopen="-l$ac_lib"
5385 break
5386 else
5387   echo "$as_me: failed program was:" >&5
5388 sed 's/^/| /' conftest.$ac_ext >&5
5389
5390 fi
5391 rm -f conftest.err conftest.$ac_objext \
5392       conftest$ac_exeext conftest.$ac_ext
5393   done
5394 fi
5395 LIBS=$ac_func_search_save_LIBS
5396 fi
5397 echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
5398 echo "${ECHO_T}$ac_cv_search_dlopen" >&6
5399 if test "$ac_cv_search_dlopen" != no; then
5400   test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
5401
5402 fi
5403
5404 echo "$as_me:$LINENO: checking for library containing socket" >&5
5405 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
5406 if test "${ac_cv_search_socket+set}" = set; then
5407   echo $ECHO_N "(cached) $ECHO_C" >&6
5408 else
5409   ac_func_search_save_LIBS=$LIBS
5410 ac_cv_search_socket=no
5411 cat >conftest.$ac_ext <<_ACEOF
5412 /* confdefs.h.  */
5413 _ACEOF
5414 cat confdefs.h >>conftest.$ac_ext
5415 cat >>conftest.$ac_ext <<_ACEOF
5416 /* end confdefs.h.  */
5417
5418 /* Override any gcc2 internal prototype to avoid an error.  */
5419 #ifdef __cplusplus
5420 extern "C"
5421 #endif
5422 /* We use char because int might match the return type of a gcc2
5423    builtin and then its argument prototype would still apply.  */
5424 char socket ();
5425 int
5426 main ()
5427 {
5428 socket ();
5429   ;
5430   return 0;
5431 }
5432 _ACEOF
5433 rm -f conftest.$ac_objext conftest$ac_exeext
5434 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5435   (eval $ac_link) 2>conftest.er1
5436   ac_status=$?
5437   grep -v '^ *+' conftest.er1 >conftest.err
5438   rm -f conftest.er1
5439   cat conftest.err >&5
5440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5441   (exit $ac_status); } &&
5442          { ac_try='test -z "$ac_c_werror_flag"
5443                          || test ! -s conftest.err'
5444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5445   (eval $ac_try) 2>&5
5446   ac_status=$?
5447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5448   (exit $ac_status); }; } &&
5449          { ac_try='test -s conftest$ac_exeext'
5450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5451   (eval $ac_try) 2>&5
5452   ac_status=$?
5453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5454   (exit $ac_status); }; }; then
5455   ac_cv_search_socket="none required"
5456 else
5457   echo "$as_me: failed program was:" >&5
5458 sed 's/^/| /' conftest.$ac_ext >&5
5459
5460 fi
5461 rm -f conftest.err conftest.$ac_objext \
5462       conftest$ac_exeext conftest.$ac_ext
5463 if test "$ac_cv_search_socket" = no; then
5464   for ac_lib in socket wsock32; do
5465     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5466     cat >conftest.$ac_ext <<_ACEOF
5467 /* confdefs.h.  */
5468 _ACEOF
5469 cat confdefs.h >>conftest.$ac_ext
5470 cat >>conftest.$ac_ext <<_ACEOF
5471 /* end confdefs.h.  */
5472
5473 /* Override any gcc2 internal prototype to avoid an error.  */
5474 #ifdef __cplusplus
5475 extern "C"
5476 #endif
5477 /* We use char because int might match the return type of a gcc2
5478    builtin and then its argument prototype would still apply.  */
5479 char socket ();
5480 int
5481 main ()
5482 {
5483 socket ();
5484   ;
5485   return 0;
5486 }
5487 _ACEOF
5488 rm -f conftest.$ac_objext conftest$ac_exeext
5489 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5490   (eval $ac_link) 2>conftest.er1
5491   ac_status=$?
5492   grep -v '^ *+' conftest.er1 >conftest.err
5493   rm -f conftest.er1
5494   cat conftest.err >&5
5495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5496   (exit $ac_status); } &&
5497          { ac_try='test -z "$ac_c_werror_flag"
5498                          || test ! -s conftest.err'
5499   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5500   (eval $ac_try) 2>&5
5501   ac_status=$?
5502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5503   (exit $ac_status); }; } &&
5504          { ac_try='test -s conftest$ac_exeext'
5505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5506   (eval $ac_try) 2>&5
5507   ac_status=$?
5508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5509   (exit $ac_status); }; }; then
5510   ac_cv_search_socket="-l$ac_lib"
5511 break
5512 else
5513   echo "$as_me: failed program was:" >&5
5514 sed 's/^/| /' conftest.$ac_ext >&5
5515
5516 fi
5517 rm -f conftest.err conftest.$ac_objext \
5518       conftest$ac_exeext conftest.$ac_ext
5519   done
5520 fi
5521 LIBS=$ac_func_search_save_LIBS
5522 fi
5523 echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
5524 echo "${ECHO_T}$ac_cv_search_socket" >&6
5525 if test "$ac_cv_search_socket" != no; then
5526   test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
5527
5528 fi
5529
5530 echo "$as_me:$LINENO: checking for library containing shl_load" >&5
5531 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6
5532 if test "${ac_cv_search_shl_load+set}" = set; then
5533   echo $ECHO_N "(cached) $ECHO_C" >&6
5534 else
5535   ac_func_search_save_LIBS=$LIBS
5536 ac_cv_search_shl_load=no
5537 cat >conftest.$ac_ext <<_ACEOF
5538 /* confdefs.h.  */
5539 _ACEOF
5540 cat confdefs.h >>conftest.$ac_ext
5541 cat >>conftest.$ac_ext <<_ACEOF
5542 /* end confdefs.h.  */
5543
5544 /* Override any gcc2 internal prototype to avoid an error.  */
5545 #ifdef __cplusplus
5546 extern "C"
5547 #endif
5548 /* We use char because int might match the return type of a gcc2
5549    builtin and then its argument prototype would still apply.  */
5550 char shl_load ();
5551 int
5552 main ()
5553 {
5554 shl_load ();
5555   ;
5556   return 0;
5557 }
5558 _ACEOF
5559 rm -f conftest.$ac_objext conftest$ac_exeext
5560 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5561   (eval $ac_link) 2>conftest.er1
5562   ac_status=$?
5563   grep -v '^ *+' conftest.er1 >conftest.err
5564   rm -f conftest.er1
5565   cat conftest.err >&5
5566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5567   (exit $ac_status); } &&
5568          { ac_try='test -z "$ac_c_werror_flag"
5569                          || test ! -s conftest.err'
5570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5571   (eval $ac_try) 2>&5
5572   ac_status=$?
5573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5574   (exit $ac_status); }; } &&
5575          { ac_try='test -s conftest$ac_exeext'
5576   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5577   (eval $ac_try) 2>&5
5578   ac_status=$?
5579   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5580   (exit $ac_status); }; }; then
5581   ac_cv_search_shl_load="none required"
5582 else
5583   echo "$as_me: failed program was:" >&5
5584 sed 's/^/| /' conftest.$ac_ext >&5
5585
5586 fi
5587 rm -f conftest.err conftest.$ac_objext \
5588       conftest$ac_exeext conftest.$ac_ext
5589 if test "$ac_cv_search_shl_load" = no; then
5590   for ac_lib in dld; do
5591     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5592     cat >conftest.$ac_ext <<_ACEOF
5593 /* confdefs.h.  */
5594 _ACEOF
5595 cat confdefs.h >>conftest.$ac_ext
5596 cat >>conftest.$ac_ext <<_ACEOF
5597 /* end confdefs.h.  */
5598
5599 /* Override any gcc2 internal prototype to avoid an error.  */
5600 #ifdef __cplusplus
5601 extern "C"
5602 #endif
5603 /* We use char because int might match the return type of a gcc2
5604    builtin and then its argument prototype would still apply.  */
5605 char shl_load ();
5606 int
5607 main ()
5608 {
5609 shl_load ();
5610   ;
5611   return 0;
5612 }
5613 _ACEOF
5614 rm -f conftest.$ac_objext conftest$ac_exeext
5615 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5616   (eval $ac_link) 2>conftest.er1
5617   ac_status=$?
5618   grep -v '^ *+' conftest.er1 >conftest.err
5619   rm -f conftest.er1
5620   cat conftest.err >&5
5621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5622   (exit $ac_status); } &&
5623          { ac_try='test -z "$ac_c_werror_flag"
5624                          || test ! -s conftest.err'
5625   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5626   (eval $ac_try) 2>&5
5627   ac_status=$?
5628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5629   (exit $ac_status); }; } &&
5630          { ac_try='test -s conftest$ac_exeext'
5631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5632   (eval $ac_try) 2>&5
5633   ac_status=$?
5634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5635   (exit $ac_status); }; }; then
5636   ac_cv_search_shl_load="-l$ac_lib"
5637 break
5638 else
5639   echo "$as_me: failed program was:" >&5
5640 sed 's/^/| /' conftest.$ac_ext >&5
5641
5642 fi
5643 rm -f conftest.err conftest.$ac_objext \
5644       conftest$ac_exeext conftest.$ac_ext
5645   done
5646 fi
5647 LIBS=$ac_func_search_save_LIBS
5648 fi
5649 echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
5650 echo "${ECHO_T}$ac_cv_search_shl_load" >&6
5651 if test "$ac_cv_search_shl_load" != no; then
5652   test "$ac_cv_search_shl_load" = "none required" || LIBS="$ac_cv_search_shl_load $LIBS"
5653
5654 fi
5655
5656 # We only use libld in port/dynloader/aix.c
5657 case $host_os in
5658      aix*)
5659         echo "$as_me:$LINENO: checking for library containing ldopen" >&5
5660 echo $ECHO_N "checking for library containing ldopen... $ECHO_C" >&6
5661 if test "${ac_cv_search_ldopen+set}" = set; then
5662   echo $ECHO_N "(cached) $ECHO_C" >&6
5663 else
5664   ac_func_search_save_LIBS=$LIBS
5665 ac_cv_search_ldopen=no
5666 cat >conftest.$ac_ext <<_ACEOF
5667 /* confdefs.h.  */
5668 _ACEOF
5669 cat confdefs.h >>conftest.$ac_ext
5670 cat >>conftest.$ac_ext <<_ACEOF
5671 /* end confdefs.h.  */
5672
5673 /* Override any gcc2 internal prototype to avoid an error.  */
5674 #ifdef __cplusplus
5675 extern "C"
5676 #endif
5677 /* We use char because int might match the return type of a gcc2
5678    builtin and then its argument prototype would still apply.  */
5679 char ldopen ();
5680 int
5681 main ()
5682 {
5683 ldopen ();
5684   ;
5685   return 0;
5686 }
5687 _ACEOF
5688 rm -f conftest.$ac_objext conftest$ac_exeext
5689 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5690   (eval $ac_link) 2>conftest.er1
5691   ac_status=$?
5692   grep -v '^ *+' conftest.er1 >conftest.err
5693   rm -f conftest.er1
5694   cat conftest.err >&5
5695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5696   (exit $ac_status); } &&
5697          { ac_try='test -z "$ac_c_werror_flag"
5698                          || test ! -s conftest.err'
5699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5700   (eval $ac_try) 2>&5
5701   ac_status=$?
5702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5703   (exit $ac_status); }; } &&
5704          { ac_try='test -s conftest$ac_exeext'
5705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5706   (eval $ac_try) 2>&5
5707   ac_status=$?
5708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5709   (exit $ac_status); }; }; then
5710   ac_cv_search_ldopen="none required"
5711 else
5712   echo "$as_me: failed program was:" >&5
5713 sed 's/^/| /' conftest.$ac_ext >&5
5714
5715 fi
5716 rm -f conftest.err conftest.$ac_objext \
5717       conftest$ac_exeext conftest.$ac_ext
5718 if test "$ac_cv_search_ldopen" = no; then
5719   for ac_lib in ld; do
5720     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5721     cat >conftest.$ac_ext <<_ACEOF
5722 /* confdefs.h.  */
5723 _ACEOF
5724 cat confdefs.h >>conftest.$ac_ext
5725 cat >>conftest.$ac_ext <<_ACEOF
5726 /* end confdefs.h.  */
5727
5728 /* Override any gcc2 internal prototype to avoid an error.  */
5729 #ifdef __cplusplus
5730 extern "C"
5731 #endif
5732 /* We use char because int might match the return type of a gcc2
5733    builtin and then its argument prototype would still apply.  */
5734 char ldopen ();
5735 int
5736 main ()
5737 {
5738 ldopen ();
5739   ;
5740   return 0;
5741 }
5742 _ACEOF
5743 rm -f conftest.$ac_objext conftest$ac_exeext
5744 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5745   (eval $ac_link) 2>conftest.er1
5746   ac_status=$?
5747   grep -v '^ *+' conftest.er1 >conftest.err
5748   rm -f conftest.er1
5749   cat conftest.err >&5
5750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5751   (exit $ac_status); } &&
5752          { ac_try='test -z "$ac_c_werror_flag"
5753                          || test ! -s conftest.err'
5754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5755   (eval $ac_try) 2>&5
5756   ac_status=$?
5757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5758   (exit $ac_status); }; } &&
5759          { ac_try='test -s conftest$ac_exeext'
5760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5761   (eval $ac_try) 2>&5
5762   ac_status=$?
5763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5764   (exit $ac_status); }; }; then
5765   ac_cv_search_ldopen="-l$ac_lib"
5766 break
5767 else
5768   echo "$as_me: failed program was:" >&5
5769 sed 's/^/| /' conftest.$ac_ext >&5
5770
5771 fi
5772 rm -f conftest.err conftest.$ac_objext \
5773       conftest$ac_exeext conftest.$ac_ext
5774   done
5775 fi
5776 LIBS=$ac_func_search_save_LIBS
5777 fi
5778 echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
5779 echo "${ECHO_T}$ac_cv_search_ldopen" >&6
5780 if test "$ac_cv_search_ldopen" != no; then
5781   test "$ac_cv_search_ldopen" = "none required" || LIBS="$ac_cv_search_ldopen $LIBS"
5782
5783 fi
5784
5785         ;;
5786 esac
5787 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5788 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5789 if test "${ac_cv_search_getopt_long+set}" = set; then
5790   echo $ECHO_N "(cached) $ECHO_C" >&6
5791 else
5792   ac_func_search_save_LIBS=$LIBS
5793 ac_cv_search_getopt_long=no
5794 cat >conftest.$ac_ext <<_ACEOF
5795 /* confdefs.h.  */
5796 _ACEOF
5797 cat confdefs.h >>conftest.$ac_ext
5798 cat >>conftest.$ac_ext <<_ACEOF
5799 /* end confdefs.h.  */
5800
5801 /* Override any gcc2 internal prototype to avoid an error.  */
5802 #ifdef __cplusplus
5803 extern "C"
5804 #endif
5805 /* We use char because int might match the return type of a gcc2
5806    builtin and then its argument prototype would still apply.  */
5807 char getopt_long ();
5808 int
5809 main ()
5810 {
5811 getopt_long ();
5812   ;
5813   return 0;
5814 }
5815 _ACEOF
5816 rm -f conftest.$ac_objext conftest$ac_exeext
5817 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5818   (eval $ac_link) 2>conftest.er1
5819   ac_status=$?
5820   grep -v '^ *+' conftest.er1 >conftest.err
5821   rm -f conftest.er1
5822   cat conftest.err >&5
5823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5824   (exit $ac_status); } &&
5825          { ac_try='test -z "$ac_c_werror_flag"
5826                          || test ! -s conftest.err'
5827   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5828   (eval $ac_try) 2>&5
5829   ac_status=$?
5830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5831   (exit $ac_status); }; } &&
5832          { ac_try='test -s conftest$ac_exeext'
5833   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5834   (eval $ac_try) 2>&5
5835   ac_status=$?
5836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5837   (exit $ac_status); }; }; then
5838   ac_cv_search_getopt_long="none required"
5839 else
5840   echo "$as_me: failed program was:" >&5
5841 sed 's/^/| /' conftest.$ac_ext >&5
5842
5843 fi
5844 rm -f conftest.err conftest.$ac_objext \
5845       conftest$ac_exeext conftest.$ac_ext
5846 if test "$ac_cv_search_getopt_long" = no; then
5847   for ac_lib in getopt gnugetopt; do
5848     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5849     cat >conftest.$ac_ext <<_ACEOF
5850 /* confdefs.h.  */
5851 _ACEOF
5852 cat confdefs.h >>conftest.$ac_ext
5853 cat >>conftest.$ac_ext <<_ACEOF
5854 /* end confdefs.h.  */
5855
5856 /* Override any gcc2 internal prototype to avoid an error.  */
5857 #ifdef __cplusplus
5858 extern "C"
5859 #endif
5860 /* We use char because int might match the return type of a gcc2
5861    builtin and then its argument prototype would still apply.  */
5862 char getopt_long ();
5863 int
5864 main ()
5865 {
5866 getopt_long ();
5867   ;
5868   return 0;
5869 }
5870 _ACEOF
5871 rm -f conftest.$ac_objext conftest$ac_exeext
5872 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5873   (eval $ac_link) 2>conftest.er1
5874   ac_status=$?
5875   grep -v '^ *+' conftest.er1 >conftest.err
5876   rm -f conftest.er1
5877   cat conftest.err >&5
5878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5879   (exit $ac_status); } &&
5880          { ac_try='test -z "$ac_c_werror_flag"
5881                          || test ! -s conftest.err'
5882   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5883   (eval $ac_try) 2>&5
5884   ac_status=$?
5885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5886   (exit $ac_status); }; } &&
5887          { ac_try='test -s conftest$ac_exeext'
5888   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5889   (eval $ac_try) 2>&5
5890   ac_status=$?
5891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5892   (exit $ac_status); }; }; then
5893   ac_cv_search_getopt_long="-l$ac_lib"
5894 break
5895 else
5896   echo "$as_me: failed program was:" >&5
5897 sed 's/^/| /' conftest.$ac_ext >&5
5898
5899 fi
5900 rm -f conftest.err conftest.$ac_objext \
5901       conftest$ac_exeext conftest.$ac_ext
5902   done
5903 fi
5904 LIBS=$ac_func_search_save_LIBS
5905 fi
5906 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5907 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5908 if test "$ac_cv_search_getopt_long" != no; then
5909   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5910
5911 fi
5912
5913 echo "$as_me:$LINENO: checking for library containing crypt" >&5
5914 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
5915 if test "${ac_cv_search_crypt+set}" = set; then
5916   echo $ECHO_N "(cached) $ECHO_C" >&6
5917 else
5918   ac_func_search_save_LIBS=$LIBS
5919 ac_cv_search_crypt=no
5920 cat >conftest.$ac_ext <<_ACEOF
5921 /* confdefs.h.  */
5922 _ACEOF
5923 cat confdefs.h >>conftest.$ac_ext
5924 cat >>conftest.$ac_ext <<_ACEOF
5925 /* end confdefs.h.  */
5926
5927 /* Override any gcc2 internal prototype to avoid an error.  */
5928 #ifdef __cplusplus
5929 extern "C"
5930 #endif
5931 /* We use char because int might match the return type of a gcc2
5932    builtin and then its argument prototype would still apply.  */
5933 char crypt ();
5934 int
5935 main ()
5936 {
5937 crypt ();
5938   ;
5939   return 0;
5940 }
5941 _ACEOF
5942 rm -f conftest.$ac_objext conftest$ac_exeext
5943 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5944   (eval $ac_link) 2>conftest.er1
5945   ac_status=$?
5946   grep -v '^ *+' conftest.er1 >conftest.err
5947   rm -f conftest.er1
5948   cat conftest.err >&5
5949   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5950   (exit $ac_status); } &&
5951          { ac_try='test -z "$ac_c_werror_flag"
5952                          || test ! -s conftest.err'
5953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5954   (eval $ac_try) 2>&5
5955   ac_status=$?
5956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5957   (exit $ac_status); }; } &&
5958          { ac_try='test -s conftest$ac_exeext'
5959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5960   (eval $ac_try) 2>&5
5961   ac_status=$?
5962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5963   (exit $ac_status); }; }; then
5964   ac_cv_search_crypt="none required"
5965 else
5966   echo "$as_me: failed program was:" >&5
5967 sed 's/^/| /' conftest.$ac_ext >&5
5968
5969 fi
5970 rm -f conftest.err conftest.$ac_objext \
5971       conftest$ac_exeext conftest.$ac_ext
5972 if test "$ac_cv_search_crypt" = no; then
5973   for ac_lib in crypt; do
5974     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5975     cat >conftest.$ac_ext <<_ACEOF
5976 /* confdefs.h.  */
5977 _ACEOF
5978 cat confdefs.h >>conftest.$ac_ext
5979 cat >>conftest.$ac_ext <<_ACEOF
5980 /* end confdefs.h.  */
5981
5982 /* Override any gcc2 internal prototype to avoid an error.  */
5983 #ifdef __cplusplus
5984 extern "C"
5985 #endif
5986 /* We use char because int might match the return type of a gcc2
5987    builtin and then its argument prototype would still apply.  */
5988 char crypt ();
5989 int
5990 main ()
5991 {
5992 crypt ();
5993   ;
5994   return 0;
5995 }
5996 _ACEOF
5997 rm -f conftest.$ac_objext conftest$ac_exeext
5998 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5999   (eval $ac_link) 2>conftest.er1
6000   ac_status=$?
6001   grep -v '^ *+' conftest.er1 >conftest.err
6002   rm -f conftest.er1
6003   cat conftest.err >&5
6004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6005   (exit $ac_status); } &&
6006          { ac_try='test -z "$ac_c_werror_flag"
6007                          || test ! -s conftest.err'
6008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6009   (eval $ac_try) 2>&5
6010   ac_status=$?
6011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6012   (exit $ac_status); }; } &&
6013          { ac_try='test -s conftest$ac_exeext'
6014   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6015   (eval $ac_try) 2>&5
6016   ac_status=$?
6017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6018   (exit $ac_status); }; }; then
6019   ac_cv_search_crypt="-l$ac_lib"
6020 break
6021 else
6022   echo "$as_me: failed program was:" >&5
6023 sed 's/^/| /' conftest.$ac_ext >&5
6024
6025 fi
6026 rm -f conftest.err conftest.$ac_objext \
6027       conftest$ac_exeext conftest.$ac_ext
6028   done
6029 fi
6030 LIBS=$ac_func_search_save_LIBS
6031 fi
6032 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6033 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6034 if test "$ac_cv_search_crypt" != no; then
6035   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6036
6037 fi
6038
6039 # Solaris:
6040 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6041 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6042 if test "${ac_cv_search_fdatasync+set}" = set; then
6043   echo $ECHO_N "(cached) $ECHO_C" >&6
6044 else
6045   ac_func_search_save_LIBS=$LIBS
6046 ac_cv_search_fdatasync=no
6047 cat >conftest.$ac_ext <<_ACEOF
6048 /* confdefs.h.  */
6049 _ACEOF
6050 cat confdefs.h >>conftest.$ac_ext
6051 cat >>conftest.$ac_ext <<_ACEOF
6052 /* end confdefs.h.  */
6053
6054 /* Override any gcc2 internal prototype to avoid an error.  */
6055 #ifdef __cplusplus
6056 extern "C"
6057 #endif
6058 /* We use char because int might match the return type of a gcc2
6059    builtin and then its argument prototype would still apply.  */
6060 char fdatasync ();
6061 int
6062 main ()
6063 {
6064 fdatasync ();
6065   ;
6066   return 0;
6067 }
6068 _ACEOF
6069 rm -f conftest.$ac_objext conftest$ac_exeext
6070 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6071   (eval $ac_link) 2>conftest.er1
6072   ac_status=$?
6073   grep -v '^ *+' conftest.er1 >conftest.err
6074   rm -f conftest.er1
6075   cat conftest.err >&5
6076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6077   (exit $ac_status); } &&
6078          { ac_try='test -z "$ac_c_werror_flag"
6079                          || test ! -s conftest.err'
6080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6081   (eval $ac_try) 2>&5
6082   ac_status=$?
6083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6084   (exit $ac_status); }; } &&
6085          { ac_try='test -s conftest$ac_exeext'
6086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6087   (eval $ac_try) 2>&5
6088   ac_status=$?
6089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6090   (exit $ac_status); }; }; then
6091   ac_cv_search_fdatasync="none required"
6092 else
6093   echo "$as_me: failed program was:" >&5
6094 sed 's/^/| /' conftest.$ac_ext >&5
6095
6096 fi
6097 rm -f conftest.err conftest.$ac_objext \
6098       conftest$ac_exeext conftest.$ac_ext
6099 if test "$ac_cv_search_fdatasync" = no; then
6100   for ac_lib in rt posix4; do
6101     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6102     cat >conftest.$ac_ext <<_ACEOF
6103 /* confdefs.h.  */
6104 _ACEOF
6105 cat confdefs.h >>conftest.$ac_ext
6106 cat >>conftest.$ac_ext <<_ACEOF
6107 /* end confdefs.h.  */
6108
6109 /* Override any gcc2 internal prototype to avoid an error.  */
6110 #ifdef __cplusplus
6111 extern "C"
6112 #endif
6113 /* We use char because int might match the return type of a gcc2
6114    builtin and then its argument prototype would still apply.  */
6115 char fdatasync ();
6116 int
6117 main ()
6118 {
6119 fdatasync ();
6120   ;
6121   return 0;
6122 }
6123 _ACEOF
6124 rm -f conftest.$ac_objext conftest$ac_exeext
6125 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6126   (eval $ac_link) 2>conftest.er1
6127   ac_status=$?
6128   grep -v '^ *+' conftest.er1 >conftest.err
6129   rm -f conftest.er1
6130   cat conftest.err >&5
6131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6132   (exit $ac_status); } &&
6133          { ac_try='test -z "$ac_c_werror_flag"
6134                          || test ! -s conftest.err'
6135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6136   (eval $ac_try) 2>&5
6137   ac_status=$?
6138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6139   (exit $ac_status); }; } &&
6140          { ac_try='test -s conftest$ac_exeext'
6141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6142   (eval $ac_try) 2>&5
6143   ac_status=$?
6144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6145   (exit $ac_status); }; }; then
6146   ac_cv_search_fdatasync="-l$ac_lib"
6147 break
6148 else
6149   echo "$as_me: failed program was:" >&5
6150 sed 's/^/| /' conftest.$ac_ext >&5
6151
6152 fi
6153 rm -f conftest.err conftest.$ac_objext \
6154       conftest$ac_exeext conftest.$ac_ext
6155   done
6156 fi
6157 LIBS=$ac_func_search_save_LIBS
6158 fi
6159 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6160 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6161 if test "$ac_cv_search_fdatasync" != no; then
6162   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6163
6164 fi
6165
6166 # Cygwin:
6167 echo "$as_me:$LINENO: checking for library containing shmget" >&5
6168 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6
6169 if test "${ac_cv_search_shmget+set}" = set; then
6170   echo $ECHO_N "(cached) $ECHO_C" >&6
6171 else
6172   ac_func_search_save_LIBS=$LIBS
6173 ac_cv_search_shmget=no
6174 cat >conftest.$ac_ext <<_ACEOF
6175 /* confdefs.h.  */
6176 _ACEOF
6177 cat confdefs.h >>conftest.$ac_ext
6178 cat >>conftest.$ac_ext <<_ACEOF
6179 /* end confdefs.h.  */
6180
6181 /* Override any gcc2 internal prototype to avoid an error.  */
6182 #ifdef __cplusplus
6183 extern "C"
6184 #endif
6185 /* We use char because int might match the return type of a gcc2
6186    builtin and then its argument prototype would still apply.  */
6187 char shmget ();
6188 int
6189 main ()
6190 {
6191 shmget ();
6192   ;
6193   return 0;
6194 }
6195 _ACEOF
6196 rm -f conftest.$ac_objext conftest$ac_exeext
6197 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6198   (eval $ac_link) 2>conftest.er1
6199   ac_status=$?
6200   grep -v '^ *+' conftest.er1 >conftest.err
6201   rm -f conftest.er1
6202   cat conftest.err >&5
6203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6204   (exit $ac_status); } &&
6205          { ac_try='test -z "$ac_c_werror_flag"
6206                          || test ! -s conftest.err'
6207   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6208   (eval $ac_try) 2>&5
6209   ac_status=$?
6210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6211   (exit $ac_status); }; } &&
6212          { ac_try='test -s conftest$ac_exeext'
6213   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6214   (eval $ac_try) 2>&5
6215   ac_status=$?
6216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6217   (exit $ac_status); }; }; then
6218   ac_cv_search_shmget="none required"
6219 else
6220   echo "$as_me: failed program was:" >&5
6221 sed 's/^/| /' conftest.$ac_ext >&5
6222
6223 fi
6224 rm -f conftest.err conftest.$ac_objext \
6225       conftest$ac_exeext conftest.$ac_ext
6226 if test "$ac_cv_search_shmget" = no; then
6227   for ac_lib in cygipc; do
6228     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6229     cat >conftest.$ac_ext <<_ACEOF
6230 /* confdefs.h.  */
6231 _ACEOF
6232 cat confdefs.h >>conftest.$ac_ext
6233 cat >>conftest.$ac_ext <<_ACEOF
6234 /* end confdefs.h.  */
6235
6236 /* Override any gcc2 internal prototype to avoid an error.  */
6237 #ifdef __cplusplus
6238 extern "C"
6239 #endif
6240 /* We use char because int might match the return type of a gcc2
6241    builtin and then its argument prototype would still apply.  */
6242 char shmget ();
6243 int
6244 main ()
6245 {
6246 shmget ();
6247   ;
6248   return 0;
6249 }
6250 _ACEOF
6251 rm -f conftest.$ac_objext conftest$ac_exeext
6252 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6253   (eval $ac_link) 2>conftest.er1
6254   ac_status=$?
6255   grep -v '^ *+' conftest.er1 >conftest.err
6256   rm -f conftest.er1
6257   cat conftest.err >&5
6258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6259   (exit $ac_status); } &&
6260          { ac_try='test -z "$ac_c_werror_flag"
6261                          || test ! -s conftest.err'
6262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6263   (eval $ac_try) 2>&5
6264   ac_status=$?
6265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6266   (exit $ac_status); }; } &&
6267          { ac_try='test -s conftest$ac_exeext'
6268   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6269   (eval $ac_try) 2>&5
6270   ac_status=$?
6271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6272   (exit $ac_status); }; }; then
6273   ac_cv_search_shmget="-l$ac_lib"
6274 break
6275 else
6276   echo "$as_me: failed program was:" >&5
6277 sed 's/^/| /' conftest.$ac_ext >&5
6278
6279 fi
6280 rm -f conftest.err conftest.$ac_objext \
6281       conftest$ac_exeext conftest.$ac_ext
6282   done
6283 fi
6284 LIBS=$ac_func_search_save_LIBS
6285 fi
6286 echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
6287 echo "${ECHO_T}$ac_cv_search_shmget" >&6
6288 if test "$ac_cv_search_shmget" != no; then
6289   test "$ac_cv_search_shmget" = "none required" || LIBS="$ac_cv_search_shmget $LIBS"
6290
6291 fi
6292
6293
6294 if test "$with_readline" = yes; then
6295
6296
6297 if test "${pgac_cv_check_readline+set}" = set; then
6298   echo $ECHO_N "(cached) $ECHO_C" >&6
6299 else
6300   pgac_cv_check_readline=no
6301 pgac_save_LIBS=$LIBS
6302 if test x"$with_libedit_preferred" != x"yes"
6303 then    READLINE_ORDER="-lreadline -ledit"
6304 else    READLINE_ORDER="-ledit -lreadline"
6305 fi
6306 for pgac_rllib in $READLINE_ORDER ; do
6307   echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6308 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6
6309   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6310     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6311     cat >conftest.$ac_ext <<_ACEOF
6312 /* confdefs.h.  */
6313 _ACEOF
6314 cat confdefs.h >>conftest.$ac_ext
6315 cat >>conftest.$ac_ext <<_ACEOF
6316 /* end confdefs.h.  */
6317
6318 /* Override any gcc2 internal prototype to avoid an error.  */
6319 #ifdef __cplusplus
6320 extern "C"
6321 #endif
6322 /* We use char because int might match the return type of a gcc2
6323    builtin and then its argument prototype would still apply.  */
6324 char readline ();
6325 int
6326 main ()
6327 {
6328 readline ();
6329   ;
6330   return 0;
6331 }
6332 _ACEOF
6333 rm -f conftest.$ac_objext conftest$ac_exeext
6334 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6335   (eval $ac_link) 2>conftest.er1
6336   ac_status=$?
6337   grep -v '^ *+' conftest.er1 >conftest.err
6338   rm -f conftest.er1
6339   cat conftest.err >&5
6340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6341   (exit $ac_status); } &&
6342          { ac_try='test -z "$ac_c_werror_flag"
6343                          || test ! -s conftest.err'
6344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6345   (eval $ac_try) 2>&5
6346   ac_status=$?
6347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6348   (exit $ac_status); }; } &&
6349          { ac_try='test -s conftest$ac_exeext'
6350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6351   (eval $ac_try) 2>&5
6352   ac_status=$?
6353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354   (exit $ac_status); }; }; then
6355
6356       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6357       # recognize dependent libraries; assume curses is needed if we didn't
6358       # find any dependency.
6359       case $host_os in
6360         netbsd* | openbsd* | irix*)
6361           if test x"$pgac_lib" = x"" ; then
6362             pgac_lib=" -lcurses"
6363           fi ;;
6364       esac
6365
6366       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6367       break
6368
6369 else
6370   echo "$as_me: failed program was:" >&5
6371 sed 's/^/| /' conftest.$ac_ext >&5
6372
6373 fi
6374 rm -f conftest.err conftest.$ac_objext \
6375       conftest$ac_exeext conftest.$ac_ext
6376   done
6377   if test "$pgac_cv_check_readline" != no ; then
6378     echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6379 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6380     break
6381   else
6382     echo "$as_me:$LINENO: result: no" >&5
6383 echo "${ECHO_T}no" >&6
6384   fi
6385 done
6386 LIBS=$pgac_save_LIBS
6387
6388 fi
6389
6390 if test "$pgac_cv_check_readline" != no ; then
6391   LIBS="$pgac_cv_check_readline $LIBS"
6392
6393 cat >>confdefs.h <<\_ACEOF
6394 #define HAVE_LIBREADLINE 1
6395 _ACEOF
6396
6397 fi
6398
6399
6400   if test x"$pgac_cv_check_readline" = x"no"; then
6401     { { echo "$as_me:$LINENO: error: readline library not found
6402 If you have readline already installed, see config.log for details on the
6403 failure.  It is possible the compiler isn't looking in the proper directory.
6404 Use --without-readline to disable readline support." >&5
6405 echo "$as_me: error: readline library not found
6406 If you have readline already installed, see config.log for details on the
6407 failure.  It is possible the compiler isn't looking in the proper directory.
6408 Use --without-readline to disable readline support." >&2;}
6409    { (exit 1); exit 1; }; }
6410   fi
6411 fi
6412
6413 if test "$with_zlib" = yes; then
6414
6415 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6416 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6417 if test "${ac_cv_lib_z_inflate+set}" = set; then
6418   echo $ECHO_N "(cached) $ECHO_C" >&6
6419 else
6420   ac_check_lib_save_LIBS=$LIBS
6421 LIBS="-lz  $LIBS"
6422 cat >conftest.$ac_ext <<_ACEOF
6423 /* confdefs.h.  */
6424 _ACEOF
6425 cat confdefs.h >>conftest.$ac_ext
6426 cat >>conftest.$ac_ext <<_ACEOF
6427 /* end confdefs.h.  */
6428
6429 /* Override any gcc2 internal prototype to avoid an error.  */
6430 #ifdef __cplusplus
6431 extern "C"
6432 #endif
6433 /* We use char because int might match the return type of a gcc2
6434    builtin and then its argument prototype would still apply.  */
6435 char inflate ();
6436 int
6437 main ()
6438 {
6439 inflate ();
6440   ;
6441   return 0;
6442 }
6443 _ACEOF
6444 rm -f conftest.$ac_objext conftest$ac_exeext
6445 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6446   (eval $ac_link) 2>conftest.er1
6447   ac_status=$?
6448   grep -v '^ *+' conftest.er1 >conftest.err
6449   rm -f conftest.er1
6450   cat conftest.err >&5
6451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6452   (exit $ac_status); } &&
6453          { ac_try='test -z "$ac_c_werror_flag"
6454                          || test ! -s conftest.err'
6455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6456   (eval $ac_try) 2>&5
6457   ac_status=$?
6458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6459   (exit $ac_status); }; } &&
6460          { ac_try='test -s conftest$ac_exeext'
6461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6462   (eval $ac_try) 2>&5
6463   ac_status=$?
6464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6465   (exit $ac_status); }; }; then
6466   ac_cv_lib_z_inflate=yes
6467 else
6468   echo "$as_me: failed program was:" >&5
6469 sed 's/^/| /' conftest.$ac_ext >&5
6470
6471 ac_cv_lib_z_inflate=no
6472 fi
6473 rm -f conftest.err conftest.$ac_objext \
6474       conftest$ac_exeext conftest.$ac_ext
6475 LIBS=$ac_check_lib_save_LIBS
6476 fi
6477 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6478 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6479 if test $ac_cv_lib_z_inflate = yes; then
6480   cat >>confdefs.h <<_ACEOF
6481 #define HAVE_LIBZ 1
6482 _ACEOF
6483
6484   LIBS="-lz $LIBS"
6485
6486 else
6487   { { echo "$as_me:$LINENO: error: zlib library not found
6488 If you have zlib already installed, see config.log for details on the
6489 failure.  It is possible the compiler isn't looking in the proper directory.
6490 Use --without-zlib to disable zlib support." >&5
6491 echo "$as_me: error: zlib library not found
6492 If you have zlib already installed, see config.log for details on the
6493 failure.  It is possible the compiler isn't looking in the proper directory.
6494 Use --without-zlib to disable zlib support." >&2;}
6495    { (exit 1); exit 1; }; }
6496 fi
6497
6498 fi
6499
6500 if test "$enable_spinlocks" = yes; then
6501
6502 cat >>confdefs.h <<\_ACEOF
6503 #define HAVE_SPINLOCKS 1
6504 _ACEOF
6505
6506 else
6507   { echo "$as_me:$LINENO: WARNING:
6508 *** Not using spinlocks will cause poor performance." >&5
6509 echo "$as_me: WARNING:
6510 *** Not using spinlocks will cause poor performance." >&2;}
6511 fi
6512
6513 if test "$with_krb5" = yes ; then
6514   if test "$PORTNAME" != "win32"; then
6515      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6516 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6517 if test "${ac_cv_search_com_err+set}" = set; then
6518   echo $ECHO_N "(cached) $ECHO_C" >&6
6519 else
6520   ac_func_search_save_LIBS=$LIBS
6521 ac_cv_search_com_err=no
6522 cat >conftest.$ac_ext <<_ACEOF
6523 /* confdefs.h.  */
6524 _ACEOF
6525 cat confdefs.h >>conftest.$ac_ext
6526 cat >>conftest.$ac_ext <<_ACEOF
6527 /* end confdefs.h.  */
6528
6529 /* Override any gcc2 internal prototype to avoid an error.  */
6530 #ifdef __cplusplus
6531 extern "C"
6532 #endif
6533 /* We use char because int might match the return type of a gcc2
6534    builtin and then its argument prototype would still apply.  */
6535 char com_err ();
6536 int
6537 main ()
6538 {
6539 com_err ();
6540   ;
6541   return 0;
6542 }
6543 _ACEOF
6544 rm -f conftest.$ac_objext conftest$ac_exeext
6545 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6546   (eval $ac_link) 2>conftest.er1
6547   ac_status=$?
6548   grep -v '^ *+' conftest.er1 >conftest.err
6549   rm -f conftest.er1
6550   cat conftest.err >&5
6551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6552   (exit $ac_status); } &&
6553          { ac_try='test -z "$ac_c_werror_flag"
6554                          || test ! -s conftest.err'
6555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6556   (eval $ac_try) 2>&5
6557   ac_status=$?
6558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6559   (exit $ac_status); }; } &&
6560          { ac_try='test -s conftest$ac_exeext'
6561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6562   (eval $ac_try) 2>&5
6563   ac_status=$?
6564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6565   (exit $ac_status); }; }; then
6566   ac_cv_search_com_err="none required"
6567 else
6568   echo "$as_me: failed program was:" >&5
6569 sed 's/^/| /' conftest.$ac_ext >&5
6570
6571 fi
6572 rm -f conftest.err conftest.$ac_objext \
6573       conftest$ac_exeext conftest.$ac_ext
6574 if test "$ac_cv_search_com_err" = no; then
6575   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6576     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6577     cat >conftest.$ac_ext <<_ACEOF
6578 /* confdefs.h.  */
6579 _ACEOF
6580 cat confdefs.h >>conftest.$ac_ext
6581 cat >>conftest.$ac_ext <<_ACEOF
6582 /* end confdefs.h.  */
6583
6584 /* Override any gcc2 internal prototype to avoid an error.  */
6585 #ifdef __cplusplus
6586 extern "C"
6587 #endif
6588 /* We use char because int might match the return type of a gcc2
6589    builtin and then its argument prototype would still apply.  */
6590 char com_err ();
6591 int
6592 main ()
6593 {
6594 com_err ();
6595   ;
6596   return 0;
6597 }
6598 _ACEOF
6599 rm -f conftest.$ac_objext conftest$ac_exeext
6600 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6601   (eval $ac_link) 2>conftest.er1
6602   ac_status=$?
6603   grep -v '^ *+' conftest.er1 >conftest.err
6604   rm -f conftest.er1
6605   cat conftest.err >&5
6606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6607   (exit $ac_status); } &&
6608          { ac_try='test -z "$ac_c_werror_flag"
6609                          || test ! -s conftest.err'
6610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6611   (eval $ac_try) 2>&5
6612   ac_status=$?
6613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6614   (exit $ac_status); }; } &&
6615          { ac_try='test -s conftest$ac_exeext'
6616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6617   (eval $ac_try) 2>&5
6618   ac_status=$?
6619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6620   (exit $ac_status); }; }; then
6621   ac_cv_search_com_err="-l$ac_lib"
6622 break
6623 else
6624   echo "$as_me: failed program was:" >&5
6625 sed 's/^/| /' conftest.$ac_ext >&5
6626
6627 fi
6628 rm -f conftest.err conftest.$ac_objext \
6629       conftest$ac_exeext conftest.$ac_ext
6630   done
6631 fi
6632 LIBS=$ac_func_search_save_LIBS
6633 fi
6634 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6635 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6636 if test "$ac_cv_search_com_err" != no; then
6637   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6638
6639 else
6640   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6641 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6642    { (exit 1); exit 1; }; }
6643 fi
6644
6645      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6646 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6647 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6648   echo $ECHO_N "(cached) $ECHO_C" >&6
6649 else
6650   ac_func_search_save_LIBS=$LIBS
6651 ac_cv_search_krb5_sendauth=no
6652 cat >conftest.$ac_ext <<_ACEOF
6653 /* confdefs.h.  */
6654 _ACEOF
6655 cat confdefs.h >>conftest.$ac_ext
6656 cat >>conftest.$ac_ext <<_ACEOF
6657 /* end confdefs.h.  */
6658
6659 /* Override any gcc2 internal prototype to avoid an error.  */
6660 #ifdef __cplusplus
6661 extern "C"
6662 #endif
6663 /* We use char because int might match the return type of a gcc2
6664    builtin and then its argument prototype would still apply.  */
6665 char krb5_sendauth ();
6666 int
6667 main ()
6668 {
6669 krb5_sendauth ();
6670   ;
6671   return 0;
6672 }
6673 _ACEOF
6674 rm -f conftest.$ac_objext conftest$ac_exeext
6675 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6676   (eval $ac_link) 2>conftest.er1
6677   ac_status=$?
6678   grep -v '^ *+' conftest.er1 >conftest.err
6679   rm -f conftest.er1
6680   cat conftest.err >&5
6681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6682   (exit $ac_status); } &&
6683          { ac_try='test -z "$ac_c_werror_flag"
6684                          || test ! -s conftest.err'
6685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6686   (eval $ac_try) 2>&5
6687   ac_status=$?
6688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6689   (exit $ac_status); }; } &&
6690          { ac_try='test -s conftest$ac_exeext'
6691   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6692   (eval $ac_try) 2>&5
6693   ac_status=$?
6694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6695   (exit $ac_status); }; }; then
6696   ac_cv_search_krb5_sendauth="none required"
6697 else
6698   echo "$as_me: failed program was:" >&5
6699 sed 's/^/| /' conftest.$ac_ext >&5
6700
6701 fi
6702 rm -f conftest.err conftest.$ac_objext \
6703       conftest$ac_exeext conftest.$ac_ext
6704 if test "$ac_cv_search_krb5_sendauth" = no; then
6705   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
6706     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6707     cat >conftest.$ac_ext <<_ACEOF
6708 /* confdefs.h.  */
6709 _ACEOF
6710 cat confdefs.h >>conftest.$ac_ext
6711 cat >>conftest.$ac_ext <<_ACEOF
6712 /* end confdefs.h.  */
6713
6714 /* Override any gcc2 internal prototype to avoid an error.  */
6715 #ifdef __cplusplus
6716 extern "C"
6717 #endif
6718 /* We use char because int might match the return type of a gcc2
6719    builtin and then its argument prototype would still apply.  */
6720 char krb5_sendauth ();
6721 int
6722 main ()
6723 {
6724 krb5_sendauth ();
6725   ;
6726   return 0;
6727 }
6728 _ACEOF
6729 rm -f conftest.$ac_objext conftest$ac_exeext
6730 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6731   (eval $ac_link) 2>conftest.er1
6732   ac_status=$?
6733   grep -v '^ *+' conftest.er1 >conftest.err
6734   rm -f conftest.er1
6735   cat conftest.err >&5
6736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6737   (exit $ac_status); } &&
6738          { ac_try='test -z "$ac_c_werror_flag"
6739                          || test ! -s conftest.err'
6740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6741   (eval $ac_try) 2>&5
6742   ac_status=$?
6743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6744   (exit $ac_status); }; } &&
6745          { ac_try='test -s conftest$ac_exeext'
6746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6747   (eval $ac_try) 2>&5
6748   ac_status=$?
6749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6750   (exit $ac_status); }; }; then
6751   ac_cv_search_krb5_sendauth="-l$ac_lib"
6752 break
6753 else
6754   echo "$as_me: failed program was:" >&5
6755 sed 's/^/| /' conftest.$ac_ext >&5
6756
6757 fi
6758 rm -f conftest.err conftest.$ac_objext \
6759       conftest$ac_exeext conftest.$ac_ext
6760   done
6761 fi
6762 LIBS=$ac_func_search_save_LIBS
6763 fi
6764 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
6765 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
6766 if test "$ac_cv_search_krb5_sendauth" != no; then
6767   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
6768
6769 else
6770   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
6771 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
6772    { (exit 1); exit 1; }; }
6773 fi
6774
6775   else
6776      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6777 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6778 if test "${ac_cv_search_com_err+set}" = set; then
6779   echo $ECHO_N "(cached) $ECHO_C" >&6
6780 else
6781   ac_func_search_save_LIBS=$LIBS
6782 ac_cv_search_com_err=no
6783 cat >conftest.$ac_ext <<_ACEOF
6784 /* confdefs.h.  */
6785 _ACEOF
6786 cat confdefs.h >>conftest.$ac_ext
6787 cat >>conftest.$ac_ext <<_ACEOF
6788 /* end confdefs.h.  */
6789
6790 /* Override any gcc2 internal prototype to avoid an error.  */
6791 #ifdef __cplusplus
6792 extern "C"
6793 #endif
6794 /* We use char because int might match the return type of a gcc2
6795    builtin and then its argument prototype would still apply.  */
6796 char com_err ();
6797 int
6798 main ()
6799 {
6800 com_err ();
6801   ;
6802   return 0;
6803 }
6804 _ACEOF
6805 rm -f conftest.$ac_objext conftest$ac_exeext
6806 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6807   (eval $ac_link) 2>conftest.er1
6808   ac_status=$?
6809   grep -v '^ *+' conftest.er1 >conftest.err
6810   rm -f conftest.er1
6811   cat conftest.err >&5
6812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6813   (exit $ac_status); } &&
6814          { ac_try='test -z "$ac_c_werror_flag"
6815                          || test ! -s conftest.err'
6816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6817   (eval $ac_try) 2>&5
6818   ac_status=$?
6819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6820   (exit $ac_status); }; } &&
6821          { ac_try='test -s conftest$ac_exeext'
6822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6823   (eval $ac_try) 2>&5
6824   ac_status=$?
6825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6826   (exit $ac_status); }; }; then
6827   ac_cv_search_com_err="none required"
6828 else
6829   echo "$as_me: failed program was:" >&5
6830 sed 's/^/| /' conftest.$ac_ext >&5
6831
6832 fi
6833 rm -f conftest.err conftest.$ac_objext \
6834       conftest$ac_exeext conftest.$ac_ext
6835 if test "$ac_cv_search_com_err" = no; then
6836   for ac_lib in 'comerr32 -lkrb5_32'; do
6837     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6838     cat >conftest.$ac_ext <<_ACEOF
6839 /* confdefs.h.  */
6840 _ACEOF
6841 cat confdefs.h >>conftest.$ac_ext
6842 cat >>conftest.$ac_ext <<_ACEOF
6843 /* end confdefs.h.  */
6844
6845 /* Override any gcc2 internal prototype to avoid an error.  */
6846 #ifdef __cplusplus
6847 extern "C"
6848 #endif
6849 /* We use char because int might match the return type of a gcc2
6850    builtin and then its argument prototype would still apply.  */
6851 char com_err ();
6852 int
6853 main ()
6854 {
6855 com_err ();
6856   ;
6857   return 0;
6858 }
6859 _ACEOF
6860 rm -f conftest.$ac_objext conftest$ac_exeext
6861 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6862   (eval $ac_link) 2>conftest.er1
6863   ac_status=$?
6864   grep -v '^ *+' conftest.er1 >conftest.err
6865   rm -f conftest.er1
6866   cat conftest.err >&5
6867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6868   (exit $ac_status); } &&
6869          { ac_try='test -z "$ac_c_werror_flag"
6870                          || test ! -s conftest.err'
6871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6872   (eval $ac_try) 2>&5
6873   ac_status=$?
6874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6875   (exit $ac_status); }; } &&
6876          { ac_try='test -s conftest$ac_exeext'
6877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6878   (eval $ac_try) 2>&5
6879   ac_status=$?
6880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6881   (exit $ac_status); }; }; then
6882   ac_cv_search_com_err="-l$ac_lib"
6883 break
6884 else
6885   echo "$as_me: failed program was:" >&5
6886 sed 's/^/| /' conftest.$ac_ext >&5
6887
6888 fi
6889 rm -f conftest.err conftest.$ac_objext \
6890       conftest$ac_exeext conftest.$ac_ext
6891   done
6892 fi
6893 LIBS=$ac_func_search_save_LIBS
6894 fi
6895 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6896 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6897 if test "$ac_cv_search_com_err" != no; then
6898   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6899
6900 else
6901   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6902 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6903    { (exit 1); exit 1; }; }
6904 fi
6905
6906   fi
6907 fi
6908
6909 if test "$with_openssl" = yes ; then
6910     if test "$PORTNAME" != "win32"; then
6911
6912 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
6913 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
6914 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
6915   echo $ECHO_N "(cached) $ECHO_C" >&6
6916 else
6917   ac_check_lib_save_LIBS=$LIBS
6918 LIBS="-lcrypto  $LIBS"
6919 cat >conftest.$ac_ext <<_ACEOF
6920 /* confdefs.h.  */
6921 _ACEOF
6922 cat confdefs.h >>conftest.$ac_ext
6923 cat >>conftest.$ac_ext <<_ACEOF
6924 /* end confdefs.h.  */
6925
6926 /* Override any gcc2 internal prototype to avoid an error.  */
6927 #ifdef __cplusplus
6928 extern "C"
6929 #endif
6930 /* We use char because int might match the return type of a gcc2
6931    builtin and then its argument prototype would still apply.  */
6932 char CRYPTO_new_ex_data ();
6933 int
6934 main ()
6935 {
6936 CRYPTO_new_ex_data ();
6937   ;
6938   return 0;
6939 }
6940 _ACEOF
6941 rm -f conftest.$ac_objext conftest$ac_exeext
6942 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6943   (eval $ac_link) 2>conftest.er1
6944   ac_status=$?
6945   grep -v '^ *+' conftest.er1 >conftest.err
6946   rm -f conftest.er1
6947   cat conftest.err >&5
6948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6949   (exit $ac_status); } &&
6950          { ac_try='test -z "$ac_c_werror_flag"
6951                          || test ! -s conftest.err'
6952   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6953   (eval $ac_try) 2>&5
6954   ac_status=$?
6955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6956   (exit $ac_status); }; } &&
6957          { ac_try='test -s conftest$ac_exeext'
6958   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6959   (eval $ac_try) 2>&5
6960   ac_status=$?
6961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6962   (exit $ac_status); }; }; then
6963   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
6964 else
6965   echo "$as_me: failed program was:" >&5
6966 sed 's/^/| /' conftest.$ac_ext >&5
6967
6968 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
6969 fi
6970 rm -f conftest.err conftest.$ac_objext \
6971       conftest$ac_exeext conftest.$ac_ext
6972 LIBS=$ac_check_lib_save_LIBS
6973 fi
6974 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
6975 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
6976 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
6977   cat >>confdefs.h <<_ACEOF
6978 #define HAVE_LIBCRYPTO 1
6979 _ACEOF
6980
6981   LIBS="-lcrypto $LIBS"
6982
6983 else
6984   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
6985 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
6986    { (exit 1); exit 1; }; }
6987 fi
6988
6989
6990 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
6991 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
6992 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
6993   echo $ECHO_N "(cached) $ECHO_C" >&6
6994 else
6995   ac_check_lib_save_LIBS=$LIBS
6996 LIBS="-lssl  $LIBS"
6997 cat >conftest.$ac_ext <<_ACEOF
6998 /* confdefs.h.  */
6999 _ACEOF
7000 cat confdefs.h >>conftest.$ac_ext
7001 cat >>conftest.$ac_ext <<_ACEOF
7002 /* end confdefs.h.  */
7003
7004 /* Override any gcc2 internal prototype to avoid an error.  */
7005 #ifdef __cplusplus
7006 extern "C"
7007 #endif
7008 /* We use char because int might match the return type of a gcc2
7009    builtin and then its argument prototype would still apply.  */
7010 char SSL_library_init ();
7011 int
7012 main ()
7013 {
7014 SSL_library_init ();
7015   ;
7016   return 0;
7017 }
7018 _ACEOF
7019 rm -f conftest.$ac_objext conftest$ac_exeext
7020 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7021   (eval $ac_link) 2>conftest.er1
7022   ac_status=$?
7023   grep -v '^ *+' conftest.er1 >conftest.err
7024   rm -f conftest.er1
7025   cat conftest.err >&5
7026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7027   (exit $ac_status); } &&
7028          { ac_try='test -z "$ac_c_werror_flag"
7029                          || test ! -s conftest.err'
7030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7031   (eval $ac_try) 2>&5
7032   ac_status=$?
7033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7034   (exit $ac_status); }; } &&
7035          { ac_try='test -s conftest$ac_exeext'
7036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7037   (eval $ac_try) 2>&5
7038   ac_status=$?
7039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7040   (exit $ac_status); }; }; then
7041   ac_cv_lib_ssl_SSL_library_init=yes
7042 else
7043   echo "$as_me: failed program was:" >&5
7044 sed 's/^/| /' conftest.$ac_ext >&5
7045
7046 ac_cv_lib_ssl_SSL_library_init=no
7047 fi
7048 rm -f conftest.err conftest.$ac_objext \
7049       conftest$ac_exeext conftest.$ac_ext
7050 LIBS=$ac_check_lib_save_LIBS
7051 fi
7052 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7053 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7054 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7055   cat >>confdefs.h <<_ACEOF
7056 #define HAVE_LIBSSL 1
7057 _ACEOF
7058
7059   LIBS="-lssl $LIBS"
7060
7061 else
7062   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7063 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7064    { (exit 1); exit 1; }; }
7065 fi
7066
7067   else
7068
7069 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7070 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7071 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7072   echo $ECHO_N "(cached) $ECHO_C" >&6
7073 else
7074   ac_check_lib_save_LIBS=$LIBS
7075 LIBS="-leay32  $LIBS"
7076 cat >conftest.$ac_ext <<_ACEOF
7077 /* confdefs.h.  */
7078 _ACEOF
7079 cat confdefs.h >>conftest.$ac_ext
7080 cat >>conftest.$ac_ext <<_ACEOF
7081 /* end confdefs.h.  */
7082
7083 /* Override any gcc2 internal prototype to avoid an error.  */
7084 #ifdef __cplusplus
7085 extern "C"
7086 #endif
7087 /* We use char because int might match the return type of a gcc2
7088    builtin and then its argument prototype would still apply.  */
7089 char CRYPTO_new_ex_data ();
7090 int
7091 main ()
7092 {
7093 CRYPTO_new_ex_data ();
7094   ;
7095   return 0;
7096 }
7097 _ACEOF
7098 rm -f conftest.$ac_objext conftest$ac_exeext
7099 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7100   (eval $ac_link) 2>conftest.er1
7101   ac_status=$?
7102   grep -v '^ *+' conftest.er1 >conftest.err
7103   rm -f conftest.er1
7104   cat conftest.err >&5
7105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7106   (exit $ac_status); } &&
7107          { ac_try='test -z "$ac_c_werror_flag"
7108                          || test ! -s conftest.err'
7109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7110   (eval $ac_try) 2>&5
7111   ac_status=$?
7112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7113   (exit $ac_status); }; } &&
7114          { ac_try='test -s conftest$ac_exeext'
7115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7116   (eval $ac_try) 2>&5
7117   ac_status=$?
7118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7119   (exit $ac_status); }; }; then
7120   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7121 else
7122   echo "$as_me: failed program was:" >&5
7123 sed 's/^/| /' conftest.$ac_ext >&5
7124
7125 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7126 fi
7127 rm -f conftest.err conftest.$ac_objext \
7128       conftest$ac_exeext conftest.$ac_ext
7129 LIBS=$ac_check_lib_save_LIBS
7130 fi
7131 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7132 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7133 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7134   cat >>confdefs.h <<_ACEOF
7135 #define HAVE_LIBEAY32 1
7136 _ACEOF
7137
7138   LIBS="-leay32 $LIBS"
7139
7140 else
7141   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7142 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7143    { (exit 1); exit 1; }; }
7144 fi
7145
7146
7147 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7148 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7149 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7150   echo $ECHO_N "(cached) $ECHO_C" >&6
7151 else
7152   ac_check_lib_save_LIBS=$LIBS
7153 LIBS="-lssleay32  $LIBS"
7154 cat >conftest.$ac_ext <<_ACEOF
7155 /* confdefs.h.  */
7156 _ACEOF
7157 cat confdefs.h >>conftest.$ac_ext
7158 cat >>conftest.$ac_ext <<_ACEOF
7159 /* end confdefs.h.  */
7160
7161 /* Override any gcc2 internal prototype to avoid an error.  */
7162 #ifdef __cplusplus
7163 extern "C"
7164 #endif
7165 /* We use char because int might match the return type of a gcc2
7166    builtin and then its argument prototype would still apply.  */
7167 char SSL_library_init ();
7168 int
7169 main ()
7170 {
7171 SSL_library_init ();
7172   ;
7173   return 0;
7174 }
7175 _ACEOF
7176 rm -f conftest.$ac_objext conftest$ac_exeext
7177 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7178   (eval $ac_link) 2>conftest.er1
7179   ac_status=$?
7180   grep -v '^ *+' conftest.er1 >conftest.err
7181   rm -f conftest.er1
7182   cat conftest.err >&5
7183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7184   (exit $ac_status); } &&
7185          { ac_try='test -z "$ac_c_werror_flag"
7186                          || test ! -s conftest.err'
7187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7188   (eval $ac_try) 2>&5
7189   ac_status=$?
7190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7191   (exit $ac_status); }; } &&
7192          { ac_try='test -s conftest$ac_exeext'
7193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7194   (eval $ac_try) 2>&5
7195   ac_status=$?
7196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7197   (exit $ac_status); }; }; then
7198   ac_cv_lib_ssleay32_SSL_library_init=yes
7199 else
7200   echo "$as_me: failed program was:" >&5
7201 sed 's/^/| /' conftest.$ac_ext >&5
7202
7203 ac_cv_lib_ssleay32_SSL_library_init=no
7204 fi
7205 rm -f conftest.err conftest.$ac_objext \
7206       conftest$ac_exeext conftest.$ac_ext
7207 LIBS=$ac_check_lib_save_LIBS
7208 fi
7209 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7210 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7211 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7212   cat >>confdefs.h <<_ACEOF
7213 #define HAVE_LIBSSLEAY32 1
7214 _ACEOF
7215
7216   LIBS="-lssleay32 $LIBS"
7217
7218 else
7219   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7220 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7221    { (exit 1); exit 1; }; }
7222 fi
7223
7224   fi
7225 fi
7226
7227 if test "$with_pam" = yes ; then
7228
7229 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7230 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7231 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7232   echo $ECHO_N "(cached) $ECHO_C" >&6
7233 else
7234   ac_check_lib_save_LIBS=$LIBS
7235 LIBS="-lpam  $LIBS"
7236 cat >conftest.$ac_ext <<_ACEOF
7237 /* confdefs.h.  */
7238 _ACEOF
7239 cat confdefs.h >>conftest.$ac_ext
7240 cat >>conftest.$ac_ext <<_ACEOF
7241 /* end confdefs.h.  */
7242
7243 /* Override any gcc2 internal prototype to avoid an error.  */
7244 #ifdef __cplusplus
7245 extern "C"
7246 #endif
7247 /* We use char because int might match the return type of a gcc2
7248    builtin and then its argument prototype would still apply.  */
7249 char pam_start ();
7250 int
7251 main ()
7252 {
7253 pam_start ();
7254   ;
7255   return 0;
7256 }
7257 _ACEOF
7258 rm -f conftest.$ac_objext conftest$ac_exeext
7259 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7260   (eval $ac_link) 2>conftest.er1
7261   ac_status=$?
7262   grep -v '^ *+' conftest.er1 >conftest.err
7263   rm -f conftest.er1
7264   cat conftest.err >&5
7265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7266   (exit $ac_status); } &&
7267          { ac_try='test -z "$ac_c_werror_flag"
7268                          || test ! -s conftest.err'
7269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7270   (eval $ac_try) 2>&5
7271   ac_status=$?
7272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7273   (exit $ac_status); }; } &&
7274          { ac_try='test -s conftest$ac_exeext'
7275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7276   (eval $ac_try) 2>&5
7277   ac_status=$?
7278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7279   (exit $ac_status); }; }; then
7280   ac_cv_lib_pam_pam_start=yes
7281 else
7282   echo "$as_me: failed program was:" >&5
7283 sed 's/^/| /' conftest.$ac_ext >&5
7284
7285 ac_cv_lib_pam_pam_start=no
7286 fi
7287 rm -f conftest.err conftest.$ac_objext \
7288       conftest$ac_exeext conftest.$ac_ext
7289 LIBS=$ac_check_lib_save_LIBS
7290 fi
7291 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7292 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7293 if test $ac_cv_lib_pam_pam_start = yes; then
7294   cat >>confdefs.h <<_ACEOF
7295 #define HAVE_LIBPAM 1
7296 _ACEOF
7297
7298   LIBS="-lpam $LIBS"
7299
7300 else
7301   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7302 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7303    { (exit 1); exit 1; }; }
7304 fi
7305
7306 fi
7307
7308 if test "$with_libxml" = yes ; then
7309
7310 echo "$as_me:$LINENO: checking for xmlSaveToBuffer in -lxml2" >&5
7311 echo $ECHO_N "checking for xmlSaveToBuffer in -lxml2... $ECHO_C" >&6
7312 if test "${ac_cv_lib_xml2_xmlSaveToBuffer+set}" = set; then
7313   echo $ECHO_N "(cached) $ECHO_C" >&6
7314 else
7315   ac_check_lib_save_LIBS=$LIBS
7316 LIBS="-lxml2  $LIBS"
7317 cat >conftest.$ac_ext <<_ACEOF
7318 /* confdefs.h.  */
7319 _ACEOF
7320 cat confdefs.h >>conftest.$ac_ext
7321 cat >>conftest.$ac_ext <<_ACEOF
7322 /* end confdefs.h.  */
7323
7324 /* Override any gcc2 internal prototype to avoid an error.  */
7325 #ifdef __cplusplus
7326 extern "C"
7327 #endif
7328 /* We use char because int might match the return type of a gcc2
7329    builtin and then its argument prototype would still apply.  */
7330 char xmlSaveToBuffer ();
7331 int
7332 main ()
7333 {
7334 xmlSaveToBuffer ();
7335   ;
7336   return 0;
7337 }
7338 _ACEOF
7339 rm -f conftest.$ac_objext conftest$ac_exeext
7340 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7341   (eval $ac_link) 2>conftest.er1
7342   ac_status=$?
7343   grep -v '^ *+' conftest.er1 >conftest.err
7344   rm -f conftest.er1
7345   cat conftest.err >&5
7346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7347   (exit $ac_status); } &&
7348          { ac_try='test -z "$ac_c_werror_flag"
7349                          || test ! -s conftest.err'
7350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7351   (eval $ac_try) 2>&5
7352   ac_status=$?
7353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7354   (exit $ac_status); }; } &&
7355          { ac_try='test -s conftest$ac_exeext'
7356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7357   (eval $ac_try) 2>&5
7358   ac_status=$?
7359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7360   (exit $ac_status); }; }; then
7361   ac_cv_lib_xml2_xmlSaveToBuffer=yes
7362 else
7363   echo "$as_me: failed program was:" >&5
7364 sed 's/^/| /' conftest.$ac_ext >&5
7365
7366 ac_cv_lib_xml2_xmlSaveToBuffer=no
7367 fi
7368 rm -f conftest.err conftest.$ac_objext \
7369       conftest$ac_exeext conftest.$ac_ext
7370 LIBS=$ac_check_lib_save_LIBS
7371 fi
7372 echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
7373 echo "${ECHO_T}$ac_cv_lib_xml2_xmlSaveToBuffer" >&6
7374 if test $ac_cv_lib_xml2_xmlSaveToBuffer = yes; then
7375   cat >>confdefs.h <<_ACEOF
7376 #define HAVE_LIBXML2 1
7377 _ACEOF
7378
7379   LIBS="-lxml2 $LIBS"
7380
7381 else
7382   { { echo "$as_me:$LINENO: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&5
7383 echo "$as_me: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&2;}
7384    { (exit 1); exit 1; }; }
7385 fi
7386
7387 fi
7388
7389
7390 ##
7391 ## Header files
7392 ##
7393
7394 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7395 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7396 if test "${ac_cv_header_stdc+set}" = set; then
7397   echo $ECHO_N "(cached) $ECHO_C" >&6
7398 else
7399   cat >conftest.$ac_ext <<_ACEOF
7400 /* confdefs.h.  */
7401 _ACEOF
7402 cat confdefs.h >>conftest.$ac_ext
7403 cat >>conftest.$ac_ext <<_ACEOF
7404 /* end confdefs.h.  */
7405 #include <stdlib.h>
7406 #include <stdarg.h>
7407 #include <string.h>
7408 #include <float.h>
7409
7410 int
7411 main ()
7412 {
7413
7414   ;
7415   return 0;
7416 }
7417 _ACEOF
7418 rm -f conftest.$ac_objext
7419 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7420   (eval $ac_compile) 2>conftest.er1
7421   ac_status=$?
7422   grep -v '^ *+' conftest.er1 >conftest.err
7423   rm -f conftest.er1
7424   cat conftest.err >&5
7425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7426   (exit $ac_status); } &&
7427          { ac_try='test -z "$ac_c_werror_flag"
7428                          || test ! -s conftest.err'
7429   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7430   (eval $ac_try) 2>&5
7431   ac_status=$?
7432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7433   (exit $ac_status); }; } &&
7434          { ac_try='test -s conftest.$ac_objext'
7435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7436   (eval $ac_try) 2>&5
7437   ac_status=$?
7438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7439   (exit $ac_status); }; }; then
7440   ac_cv_header_stdc=yes
7441 else
7442   echo "$as_me: failed program was:" >&5
7443 sed 's/^/| /' conftest.$ac_ext >&5
7444
7445 ac_cv_header_stdc=no
7446 fi
7447 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7448
7449 if test $ac_cv_header_stdc = yes; then
7450   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7451   cat >conftest.$ac_ext <<_ACEOF
7452 /* confdefs.h.  */
7453 _ACEOF
7454 cat confdefs.h >>conftest.$ac_ext
7455 cat >>conftest.$ac_ext <<_ACEOF
7456 /* end confdefs.h.  */
7457 #include <string.h>
7458
7459 _ACEOF
7460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7461   $EGREP "memchr" >/dev/null 2>&1; then
7462   :
7463 else
7464   ac_cv_header_stdc=no
7465 fi
7466 rm -f conftest*
7467
7468 fi
7469
7470 if test $ac_cv_header_stdc = yes; then
7471   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7472   cat >conftest.$ac_ext <<_ACEOF
7473 /* confdefs.h.  */
7474 _ACEOF
7475 cat confdefs.h >>conftest.$ac_ext
7476 cat >>conftest.$ac_ext <<_ACEOF
7477 /* end confdefs.h.  */
7478 #include <stdlib.h>
7479
7480 _ACEOF
7481 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7482   $EGREP "free" >/dev/null 2>&1; then
7483   :
7484 else
7485   ac_cv_header_stdc=no
7486 fi
7487 rm -f conftest*
7488
7489 fi
7490
7491 if test $ac_cv_header_stdc = yes; then
7492   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7493   if test "$cross_compiling" = yes; then
7494   :
7495 else
7496   cat >conftest.$ac_ext <<_ACEOF
7497 /* confdefs.h.  */
7498 _ACEOF
7499 cat confdefs.h >>conftest.$ac_ext
7500 cat >>conftest.$ac_ext <<_ACEOF
7501 /* end confdefs.h.  */
7502 #include <ctype.h>
7503 #if ((' ' & 0x0FF) == 0x020)
7504 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7505 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7506 #else
7507 # define ISLOWER(c) \
7508                    (('a' <= (c) && (c) <= 'i') \
7509                      || ('j' <= (c) && (c) <= 'r') \
7510                      || ('s' <= (c) && (c) <= 'z'))
7511 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7512 #endif
7513
7514 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7515 int
7516 main ()
7517 {
7518   int i;
7519   for (i = 0; i < 256; i++)
7520     if (XOR (islower (i), ISLOWER (i))
7521         || toupper (i) != TOUPPER (i))
7522       exit(2);
7523   exit (0);
7524 }
7525 _ACEOF
7526 rm -f conftest$ac_exeext
7527 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7528   (eval $ac_link) 2>&5
7529   ac_status=$?
7530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7531   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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); }; }; then
7537   :
7538 else
7539   echo "$as_me: program exited with status $ac_status" >&5
7540 echo "$as_me: failed program was:" >&5
7541 sed 's/^/| /' conftest.$ac_ext >&5
7542
7543 ( exit $ac_status )
7544 ac_cv_header_stdc=no
7545 fi
7546 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7547 fi
7548 fi
7549 fi
7550 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7551 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7552 if test $ac_cv_header_stdc = yes; then
7553
7554 cat >>confdefs.h <<\_ACEOF
7555 #define STDC_HEADERS 1
7556 _ACEOF
7557
7558 fi
7559
7560 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7571                   inttypes.h stdint.h unistd.h
7572 do
7573 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7574 echo "$as_me:$LINENO: checking for $ac_header" >&5
7575 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7576 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7577   echo $ECHO_N "(cached) $ECHO_C" >&6
7578 else
7579   cat >conftest.$ac_ext <<_ACEOF
7580 /* confdefs.h.  */
7581 _ACEOF
7582 cat confdefs.h >>conftest.$ac_ext
7583 cat >>conftest.$ac_ext <<_ACEOF
7584 /* end confdefs.h.  */
7585 $ac_includes_default
7586
7587 #include <$ac_header>
7588 _ACEOF
7589 rm -f conftest.$ac_objext
7590 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7591   (eval $ac_compile) 2>conftest.er1
7592   ac_status=$?
7593   grep -v '^ *+' conftest.er1 >conftest.err
7594   rm -f conftest.er1
7595   cat conftest.err >&5
7596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7597   (exit $ac_status); } &&
7598          { ac_try='test -z "$ac_c_werror_flag"
7599                          || test ! -s conftest.err'
7600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7601   (eval $ac_try) 2>&5
7602   ac_status=$?
7603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7604   (exit $ac_status); }; } &&
7605          { ac_try='test -s conftest.$ac_objext'
7606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7607   (eval $ac_try) 2>&5
7608   ac_status=$?
7609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7610   (exit $ac_status); }; }; then
7611   eval "$as_ac_Header=yes"
7612 else
7613   echo "$as_me: failed program was:" >&5
7614 sed 's/^/| /' conftest.$ac_ext >&5
7615
7616 eval "$as_ac_Header=no"
7617 fi
7618 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7619 fi
7620 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7621 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7622 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7623   cat >>confdefs.h <<_ACEOF
7624 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7625 _ACEOF
7626
7627 fi
7628
7629 done
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658 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/resource.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
7659 do
7660 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7661 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7662   echo "$as_me:$LINENO: checking for $ac_header" >&5
7663 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7664 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7665   echo $ECHO_N "(cached) $ECHO_C" >&6
7666 fi
7667 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7668 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7669 else
7670   # Is the header compilable?
7671 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7672 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7673 cat >conftest.$ac_ext <<_ACEOF
7674 /* confdefs.h.  */
7675 _ACEOF
7676 cat confdefs.h >>conftest.$ac_ext
7677 cat >>conftest.$ac_ext <<_ACEOF
7678 /* end confdefs.h.  */
7679 $ac_includes_default
7680 #include <$ac_header>
7681 _ACEOF
7682 rm -f conftest.$ac_objext
7683 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7684   (eval $ac_compile) 2>conftest.er1
7685   ac_status=$?
7686   grep -v '^ *+' conftest.er1 >conftest.err
7687   rm -f conftest.er1
7688   cat conftest.err >&5
7689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7690   (exit $ac_status); } &&
7691          { ac_try='test -z "$ac_c_werror_flag"
7692                          || test ! -s conftest.err'
7693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7694   (eval $ac_try) 2>&5
7695   ac_status=$?
7696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7697   (exit $ac_status); }; } &&
7698          { ac_try='test -s conftest.$ac_objext'
7699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7700   (eval $ac_try) 2>&5
7701   ac_status=$?
7702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7703   (exit $ac_status); }; }; then
7704   ac_header_compiler=yes
7705 else
7706   echo "$as_me: failed program was:" >&5
7707 sed 's/^/| /' conftest.$ac_ext >&5
7708
7709 ac_header_compiler=no
7710 fi
7711 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7712 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7713 echo "${ECHO_T}$ac_header_compiler" >&6
7714
7715 # Is the header present?
7716 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7717 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7718 cat >conftest.$ac_ext <<_ACEOF
7719 /* confdefs.h.  */
7720 _ACEOF
7721 cat confdefs.h >>conftest.$ac_ext
7722 cat >>conftest.$ac_ext <<_ACEOF
7723 /* end confdefs.h.  */
7724 #include <$ac_header>
7725 _ACEOF
7726 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7727   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7728   ac_status=$?
7729   grep -v '^ *+' conftest.er1 >conftest.err
7730   rm -f conftest.er1
7731   cat conftest.err >&5
7732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7733   (exit $ac_status); } >/dev/null; then
7734   if test -s conftest.err; then
7735     ac_cpp_err=$ac_c_preproc_warn_flag
7736     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7737   else
7738     ac_cpp_err=
7739   fi
7740 else
7741   ac_cpp_err=yes
7742 fi
7743 if test -z "$ac_cpp_err"; then
7744   ac_header_preproc=yes
7745 else
7746   echo "$as_me: failed program was:" >&5
7747 sed 's/^/| /' conftest.$ac_ext >&5
7748
7749   ac_header_preproc=no
7750 fi
7751 rm -f conftest.err conftest.$ac_ext
7752 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7753 echo "${ECHO_T}$ac_header_preproc" >&6
7754
7755 # So?  What about this header?
7756 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7757   yes:no: )
7758     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7759 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7760     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7761 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7762     ac_header_preproc=yes
7763     ;;
7764   no:yes:* )
7765     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7766 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7767     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7768 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7769     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7770 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7771     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7772 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7773     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7774 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7775     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7776 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7777     (
7778       cat <<\_ASBOX
7779 ## ---------------------------------------- ##
7780 ## Report this to pgsql-bugs@postgresql.org ##
7781 ## ---------------------------------------- ##
7782 _ASBOX
7783     ) |
7784       sed "s/^/$as_me: WARNING:     /" >&2
7785     ;;
7786 esac
7787 echo "$as_me:$LINENO: checking for $ac_header" >&5
7788 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7789 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7790   echo $ECHO_N "(cached) $ECHO_C" >&6
7791 else
7792   eval "$as_ac_Header=\$ac_header_preproc"
7793 fi
7794 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7795 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7796
7797 fi
7798 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7799   cat >>confdefs.h <<_ACEOF
7800 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7801 _ACEOF
7802
7803 fi
7804
7805 done
7806
7807
7808 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
7809 # netinet/in.h is included first.
7810
7811 for ac_header in netinet/in.h
7812 do
7813 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7814 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7815   echo "$as_me:$LINENO: checking for $ac_header" >&5
7816 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7817 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7818   echo $ECHO_N "(cached) $ECHO_C" >&6
7819 fi
7820 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7821 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7822 else
7823   # Is the header compilable?
7824 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7825 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7826 cat >conftest.$ac_ext <<_ACEOF
7827 /* confdefs.h.  */
7828 _ACEOF
7829 cat confdefs.h >>conftest.$ac_ext
7830 cat >>conftest.$ac_ext <<_ACEOF
7831 /* end confdefs.h.  */
7832 $ac_includes_default
7833 #include <$ac_header>
7834 _ACEOF
7835 rm -f conftest.$ac_objext
7836 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7837   (eval $ac_compile) 2>conftest.er1
7838   ac_status=$?
7839   grep -v '^ *+' conftest.er1 >conftest.err
7840   rm -f conftest.er1
7841   cat conftest.err >&5
7842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7843   (exit $ac_status); } &&
7844          { ac_try='test -z "$ac_c_werror_flag"
7845                          || test ! -s conftest.err'
7846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7847   (eval $ac_try) 2>&5
7848   ac_status=$?
7849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7850   (exit $ac_status); }; } &&
7851          { ac_try='test -s conftest.$ac_objext'
7852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7853   (eval $ac_try) 2>&5
7854   ac_status=$?
7855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7856   (exit $ac_status); }; }; then
7857   ac_header_compiler=yes
7858 else
7859   echo "$as_me: failed program was:" >&5
7860 sed 's/^/| /' conftest.$ac_ext >&5
7861
7862 ac_header_compiler=no
7863 fi
7864 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7865 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7866 echo "${ECHO_T}$ac_header_compiler" >&6
7867
7868 # Is the header present?
7869 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7870 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7871 cat >conftest.$ac_ext <<_ACEOF
7872 /* confdefs.h.  */
7873 _ACEOF
7874 cat confdefs.h >>conftest.$ac_ext
7875 cat >>conftest.$ac_ext <<_ACEOF
7876 /* end confdefs.h.  */
7877 #include <$ac_header>
7878 _ACEOF
7879 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7880   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7881   ac_status=$?
7882   grep -v '^ *+' conftest.er1 >conftest.err
7883   rm -f conftest.er1
7884   cat conftest.err >&5
7885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7886   (exit $ac_status); } >/dev/null; then
7887   if test -s conftest.err; then
7888     ac_cpp_err=$ac_c_preproc_warn_flag
7889     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7890   else
7891     ac_cpp_err=
7892   fi
7893 else
7894   ac_cpp_err=yes
7895 fi
7896 if test -z "$ac_cpp_err"; then
7897   ac_header_preproc=yes
7898 else
7899   echo "$as_me: failed program was:" >&5
7900 sed 's/^/| /' conftest.$ac_ext >&5
7901
7902   ac_header_preproc=no
7903 fi
7904 rm -f conftest.err conftest.$ac_ext
7905 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7906 echo "${ECHO_T}$ac_header_preproc" >&6
7907
7908 # So?  What about this header?
7909 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7910   yes:no: )
7911     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7912 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7913     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7914 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7915     ac_header_preproc=yes
7916     ;;
7917   no:yes:* )
7918     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7919 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7920     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7921 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7922     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7923 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7924     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7925 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7926     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7927 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7928     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7929 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7930     (
7931       cat <<\_ASBOX
7932 ## ---------------------------------------- ##
7933 ## Report this to pgsql-bugs@postgresql.org ##
7934 ## ---------------------------------------- ##
7935 _ASBOX
7936     ) |
7937       sed "s/^/$as_me: WARNING:     /" >&2
7938     ;;
7939 esac
7940 echo "$as_me:$LINENO: checking for $ac_header" >&5
7941 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7942 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7943   echo $ECHO_N "(cached) $ECHO_C" >&6
7944 else
7945   eval "$as_ac_Header=\$ac_header_preproc"
7946 fi
7947 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7948 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7949
7950 fi
7951 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7952   cat >>confdefs.h <<_ACEOF
7953 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7954 _ACEOF
7955
7956 fi
7957
7958 done
7959
7960
7961 for ac_header in netinet/tcp.h
7962 do
7963 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7964 echo "$as_me:$LINENO: checking for $ac_header" >&5
7965 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7966 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7967   echo $ECHO_N "(cached) $ECHO_C" >&6
7968 else
7969   cat >conftest.$ac_ext <<_ACEOF
7970 /* confdefs.h.  */
7971 _ACEOF
7972 cat confdefs.h >>conftest.$ac_ext
7973 cat >>conftest.$ac_ext <<_ACEOF
7974 /* end confdefs.h.  */
7975 $ac_includes_default
7976 #ifdef HAVE_NETINET_IN_H
7977 #include <netinet/in.h>
7978 #endif
7979
7980
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   eval "$as_ac_Header=yes"
8006 else
8007   echo "$as_me: failed program was:" >&5
8008 sed 's/^/| /' conftest.$ac_ext >&5
8009
8010 eval "$as_ac_Header=no"
8011 fi
8012 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8013 fi
8014 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8015 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8016 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8017   cat >>confdefs.h <<_ACEOF
8018 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8019 _ACEOF
8020
8021 fi
8022
8023 done
8024
8025
8026 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
8027
8028 for ac_header in readline/readline.h
8029 do
8030 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8031 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8032   echo "$as_me:$LINENO: checking for $ac_header" >&5
8033 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8034 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8035   echo $ECHO_N "(cached) $ECHO_C" >&6
8036 fi
8037 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8038 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8039 else
8040   # Is the header compilable?
8041 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8042 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8043 cat >conftest.$ac_ext <<_ACEOF
8044 /* confdefs.h.  */
8045 _ACEOF
8046 cat confdefs.h >>conftest.$ac_ext
8047 cat >>conftest.$ac_ext <<_ACEOF
8048 /* end confdefs.h.  */
8049 $ac_includes_default
8050 #include <$ac_header>
8051 _ACEOF
8052 rm -f conftest.$ac_objext
8053 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8054   (eval $ac_compile) 2>conftest.er1
8055   ac_status=$?
8056   grep -v '^ *+' conftest.er1 >conftest.err
8057   rm -f conftest.er1
8058   cat conftest.err >&5
8059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8060   (exit $ac_status); } &&
8061          { ac_try='test -z "$ac_c_werror_flag"
8062                          || test ! -s conftest.err'
8063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8064   (eval $ac_try) 2>&5
8065   ac_status=$?
8066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8067   (exit $ac_status); }; } &&
8068          { ac_try='test -s conftest.$ac_objext'
8069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8070   (eval $ac_try) 2>&5
8071   ac_status=$?
8072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8073   (exit $ac_status); }; }; then
8074   ac_header_compiler=yes
8075 else
8076   echo "$as_me: failed program was:" >&5
8077 sed 's/^/| /' conftest.$ac_ext >&5
8078
8079 ac_header_compiler=no
8080 fi
8081 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8082 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8083 echo "${ECHO_T}$ac_header_compiler" >&6
8084
8085 # Is the header present?
8086 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8087 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8088 cat >conftest.$ac_ext <<_ACEOF
8089 /* confdefs.h.  */
8090 _ACEOF
8091 cat confdefs.h >>conftest.$ac_ext
8092 cat >>conftest.$ac_ext <<_ACEOF
8093 /* end confdefs.h.  */
8094 #include <$ac_header>
8095 _ACEOF
8096 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8097   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8098   ac_status=$?
8099   grep -v '^ *+' conftest.er1 >conftest.err
8100   rm -f conftest.er1
8101   cat conftest.err >&5
8102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8103   (exit $ac_status); } >/dev/null; then
8104   if test -s conftest.err; then
8105     ac_cpp_err=$ac_c_preproc_warn_flag
8106     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8107   else
8108     ac_cpp_err=
8109   fi
8110 else
8111   ac_cpp_err=yes
8112 fi
8113 if test -z "$ac_cpp_err"; then
8114   ac_header_preproc=yes
8115 else
8116   echo "$as_me: failed program was:" >&5
8117 sed 's/^/| /' conftest.$ac_ext >&5
8118
8119   ac_header_preproc=no
8120 fi
8121 rm -f conftest.err conftest.$ac_ext
8122 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8123 echo "${ECHO_T}$ac_header_preproc" >&6
8124
8125 # So?  What about this header?
8126 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8127   yes:no: )
8128     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8129 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8130     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8131 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8132     ac_header_preproc=yes
8133     ;;
8134   no:yes:* )
8135     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8136 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8137     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8138 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8139     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8140 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8141     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8142 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8143     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8144 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8145     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8146 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8147     (
8148       cat <<\_ASBOX
8149 ## ---------------------------------------- ##
8150 ## Report this to pgsql-bugs@postgresql.org ##
8151 ## ---------------------------------------- ##
8152 _ASBOX
8153     ) |
8154       sed "s/^/$as_me: WARNING:     /" >&2
8155     ;;
8156 esac
8157 echo "$as_me:$LINENO: checking for $ac_header" >&5
8158 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8159 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8160   echo $ECHO_N "(cached) $ECHO_C" >&6
8161 else
8162   eval "$as_ac_Header=\$ac_header_preproc"
8163 fi
8164 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8165 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8166
8167 fi
8168 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8169   cat >>confdefs.h <<_ACEOF
8170 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8171 _ACEOF
8172
8173 else
8174
8175 for ac_header in readline.h
8176 do
8177 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8178 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8179   echo "$as_me:$LINENO: checking for $ac_header" >&5
8180 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8181 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8182   echo $ECHO_N "(cached) $ECHO_C" >&6
8183 fi
8184 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8185 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8186 else
8187   # Is the header compilable?
8188 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8189 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8190 cat >conftest.$ac_ext <<_ACEOF
8191 /* confdefs.h.  */
8192 _ACEOF
8193 cat confdefs.h >>conftest.$ac_ext
8194 cat >>conftest.$ac_ext <<_ACEOF
8195 /* end confdefs.h.  */
8196 $ac_includes_default
8197 #include <$ac_header>
8198 _ACEOF
8199 rm -f conftest.$ac_objext
8200 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8201   (eval $ac_compile) 2>conftest.er1
8202   ac_status=$?
8203   grep -v '^ *+' conftest.er1 >conftest.err
8204   rm -f conftest.er1
8205   cat conftest.err >&5
8206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8207   (exit $ac_status); } &&
8208          { ac_try='test -z "$ac_c_werror_flag"
8209                          || test ! -s conftest.err'
8210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8211   (eval $ac_try) 2>&5
8212   ac_status=$?
8213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8214   (exit $ac_status); }; } &&
8215          { ac_try='test -s conftest.$ac_objext'
8216   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8217   (eval $ac_try) 2>&5
8218   ac_status=$?
8219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220   (exit $ac_status); }; }; then
8221   ac_header_compiler=yes
8222 else
8223   echo "$as_me: failed program was:" >&5
8224 sed 's/^/| /' conftest.$ac_ext >&5
8225
8226 ac_header_compiler=no
8227 fi
8228 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8229 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8230 echo "${ECHO_T}$ac_header_compiler" >&6
8231
8232 # Is the header present?
8233 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8234 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8235 cat >conftest.$ac_ext <<_ACEOF
8236 /* confdefs.h.  */
8237 _ACEOF
8238 cat confdefs.h >>conftest.$ac_ext
8239 cat >>conftest.$ac_ext <<_ACEOF
8240 /* end confdefs.h.  */
8241 #include <$ac_header>
8242 _ACEOF
8243 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8244   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8245   ac_status=$?
8246   grep -v '^ *+' conftest.er1 >conftest.err
8247   rm -f conftest.er1
8248   cat conftest.err >&5
8249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8250   (exit $ac_status); } >/dev/null; then
8251   if test -s conftest.err; then
8252     ac_cpp_err=$ac_c_preproc_warn_flag
8253     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8254   else
8255     ac_cpp_err=
8256   fi
8257 else
8258   ac_cpp_err=yes
8259 fi
8260 if test -z "$ac_cpp_err"; then
8261   ac_header_preproc=yes
8262 else
8263   echo "$as_me: failed program was:" >&5
8264 sed 's/^/| /' conftest.$ac_ext >&5
8265
8266   ac_header_preproc=no
8267 fi
8268 rm -f conftest.err conftest.$ac_ext
8269 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8270 echo "${ECHO_T}$ac_header_preproc" >&6
8271
8272 # So?  What about this header?
8273 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8274   yes:no: )
8275     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8276 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8277     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8278 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8279     ac_header_preproc=yes
8280     ;;
8281   no:yes:* )
8282     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8283 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8284     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8285 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8286     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8287 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8288     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8289 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8290     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8291 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8292     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8293 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8294     (
8295       cat <<\_ASBOX
8296 ## ---------------------------------------- ##
8297 ## Report this to pgsql-bugs@postgresql.org ##
8298 ## ---------------------------------------- ##
8299 _ASBOX
8300     ) |
8301       sed "s/^/$as_me: WARNING:     /" >&2
8302     ;;
8303 esac
8304 echo "$as_me:$LINENO: checking for $ac_header" >&5
8305 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8306 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8307   echo $ECHO_N "(cached) $ECHO_C" >&6
8308 else
8309   eval "$as_ac_Header=\$ac_header_preproc"
8310 fi
8311 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8312 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8313
8314 fi
8315 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8316   cat >>confdefs.h <<_ACEOF
8317 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8318 _ACEOF
8319
8320 else
8321   { { echo "$as_me:$LINENO: error: readline header not found
8322 If you have readline already installed, see config.log for details on the
8323 failure.  It is possible the compiler isn't looking in the proper directory.
8324 Use --without-readline to disable readline support." >&5
8325 echo "$as_me: error: readline header not found
8326 If you have readline already installed, see config.log for details on the
8327 failure.  It is possible the compiler isn't looking in the proper directory.
8328 Use --without-readline to disable readline support." >&2;}
8329    { (exit 1); exit 1; }; }
8330 fi
8331
8332 done
8333
8334 fi
8335
8336 done
8337
8338
8339 for ac_header in readline/history.h
8340 do
8341 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8342 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8343   echo "$as_me:$LINENO: checking for $ac_header" >&5
8344 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8345 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8346   echo $ECHO_N "(cached) $ECHO_C" >&6
8347 fi
8348 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8349 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8350 else
8351   # Is the header compilable?
8352 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8353 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8354 cat >conftest.$ac_ext <<_ACEOF
8355 /* confdefs.h.  */
8356 _ACEOF
8357 cat confdefs.h >>conftest.$ac_ext
8358 cat >>conftest.$ac_ext <<_ACEOF
8359 /* end confdefs.h.  */
8360 $ac_includes_default
8361 #include <$ac_header>
8362 _ACEOF
8363 rm -f conftest.$ac_objext
8364 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8365   (eval $ac_compile) 2>conftest.er1
8366   ac_status=$?
8367   grep -v '^ *+' conftest.er1 >conftest.err
8368   rm -f conftest.er1
8369   cat conftest.err >&5
8370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8371   (exit $ac_status); } &&
8372          { ac_try='test -z "$ac_c_werror_flag"
8373                          || test ! -s conftest.err'
8374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8375   (eval $ac_try) 2>&5
8376   ac_status=$?
8377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8378   (exit $ac_status); }; } &&
8379          { ac_try='test -s conftest.$ac_objext'
8380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8381   (eval $ac_try) 2>&5
8382   ac_status=$?
8383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8384   (exit $ac_status); }; }; then
8385   ac_header_compiler=yes
8386 else
8387   echo "$as_me: failed program was:" >&5
8388 sed 's/^/| /' conftest.$ac_ext >&5
8389
8390 ac_header_compiler=no
8391 fi
8392 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8393 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8394 echo "${ECHO_T}$ac_header_compiler" >&6
8395
8396 # Is the header present?
8397 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8398 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8399 cat >conftest.$ac_ext <<_ACEOF
8400 /* confdefs.h.  */
8401 _ACEOF
8402 cat confdefs.h >>conftest.$ac_ext
8403 cat >>conftest.$ac_ext <<_ACEOF
8404 /* end confdefs.h.  */
8405 #include <$ac_header>
8406 _ACEOF
8407 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8408   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8409   ac_status=$?
8410   grep -v '^ *+' conftest.er1 >conftest.err
8411   rm -f conftest.er1
8412   cat conftest.err >&5
8413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8414   (exit $ac_status); } >/dev/null; then
8415   if test -s conftest.err; then
8416     ac_cpp_err=$ac_c_preproc_warn_flag
8417     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8418   else
8419     ac_cpp_err=
8420   fi
8421 else
8422   ac_cpp_err=yes
8423 fi
8424 if test -z "$ac_cpp_err"; then
8425   ac_header_preproc=yes
8426 else
8427   echo "$as_me: failed program was:" >&5
8428 sed 's/^/| /' conftest.$ac_ext >&5
8429
8430   ac_header_preproc=no
8431 fi
8432 rm -f conftest.err conftest.$ac_ext
8433 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8434 echo "${ECHO_T}$ac_header_preproc" >&6
8435
8436 # So?  What about this header?
8437 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8438   yes:no: )
8439     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8440 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8441     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8442 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8443     ac_header_preproc=yes
8444     ;;
8445   no:yes:* )
8446     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8447 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8448     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8449 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8450     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8451 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8452     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8453 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8454     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8455 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8456     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8457 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8458     (
8459       cat <<\_ASBOX
8460 ## ---------------------------------------- ##
8461 ## Report this to pgsql-bugs@postgresql.org ##
8462 ## ---------------------------------------- ##
8463 _ASBOX
8464     ) |
8465       sed "s/^/$as_me: WARNING:     /" >&2
8466     ;;
8467 esac
8468 echo "$as_me:$LINENO: checking for $ac_header" >&5
8469 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8470 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8471   echo $ECHO_N "(cached) $ECHO_C" >&6
8472 else
8473   eval "$as_ac_Header=\$ac_header_preproc"
8474 fi
8475 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8476 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8477
8478 fi
8479 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8480   cat >>confdefs.h <<_ACEOF
8481 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8482 _ACEOF
8483
8484 else
8485
8486 for ac_header in history.h
8487 do
8488 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8489 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8490   echo "$as_me:$LINENO: checking for $ac_header" >&5
8491 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8492 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8493   echo $ECHO_N "(cached) $ECHO_C" >&6
8494 fi
8495 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8496 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8497 else
8498   # Is the header compilable?
8499 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8500 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8501 cat >conftest.$ac_ext <<_ACEOF
8502 /* confdefs.h.  */
8503 _ACEOF
8504 cat confdefs.h >>conftest.$ac_ext
8505 cat >>conftest.$ac_ext <<_ACEOF
8506 /* end confdefs.h.  */
8507 $ac_includes_default
8508 #include <$ac_header>
8509 _ACEOF
8510 rm -f conftest.$ac_objext
8511 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8512   (eval $ac_compile) 2>conftest.er1
8513   ac_status=$?
8514   grep -v '^ *+' conftest.er1 >conftest.err
8515   rm -f conftest.er1
8516   cat conftest.err >&5
8517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8518   (exit $ac_status); } &&
8519          { ac_try='test -z "$ac_c_werror_flag"
8520                          || test ! -s conftest.err'
8521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8522   (eval $ac_try) 2>&5
8523   ac_status=$?
8524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8525   (exit $ac_status); }; } &&
8526          { ac_try='test -s conftest.$ac_objext'
8527   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8528   (eval $ac_try) 2>&5
8529   ac_status=$?
8530   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8531   (exit $ac_status); }; }; then
8532   ac_header_compiler=yes
8533 else
8534   echo "$as_me: failed program was:" >&5
8535 sed 's/^/| /' conftest.$ac_ext >&5
8536
8537 ac_header_compiler=no
8538 fi
8539 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8540 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8541 echo "${ECHO_T}$ac_header_compiler" >&6
8542
8543 # Is the header present?
8544 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8545 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8546 cat >conftest.$ac_ext <<_ACEOF
8547 /* confdefs.h.  */
8548 _ACEOF
8549 cat confdefs.h >>conftest.$ac_ext
8550 cat >>conftest.$ac_ext <<_ACEOF
8551 /* end confdefs.h.  */
8552 #include <$ac_header>
8553 _ACEOF
8554 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8555   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8556   ac_status=$?
8557   grep -v '^ *+' conftest.er1 >conftest.err
8558   rm -f conftest.er1
8559   cat conftest.err >&5
8560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8561   (exit $ac_status); } >/dev/null; then
8562   if test -s conftest.err; then
8563     ac_cpp_err=$ac_c_preproc_warn_flag
8564     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8565   else
8566     ac_cpp_err=
8567   fi
8568 else
8569   ac_cpp_err=yes
8570 fi
8571 if test -z "$ac_cpp_err"; then
8572   ac_header_preproc=yes
8573 else
8574   echo "$as_me: failed program was:" >&5
8575 sed 's/^/| /' conftest.$ac_ext >&5
8576
8577   ac_header_preproc=no
8578 fi
8579 rm -f conftest.err conftest.$ac_ext
8580 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8581 echo "${ECHO_T}$ac_header_preproc" >&6
8582
8583 # So?  What about this header?
8584 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8585   yes:no: )
8586     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8587 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8588     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8589 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8590     ac_header_preproc=yes
8591     ;;
8592   no:yes:* )
8593     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8594 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8595     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8596 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8597     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8598 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8599     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8600 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8601     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8602 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8603     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8604 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8605     (
8606       cat <<\_ASBOX
8607 ## ---------------------------------------- ##
8608 ## Report this to pgsql-bugs@postgresql.org ##
8609 ## ---------------------------------------- ##
8610 _ASBOX
8611     ) |
8612       sed "s/^/$as_me: WARNING:     /" >&2
8613     ;;
8614 esac
8615 echo "$as_me:$LINENO: checking for $ac_header" >&5
8616 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8617 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8618   echo $ECHO_N "(cached) $ECHO_C" >&6
8619 else
8620   eval "$as_ac_Header=\$ac_header_preproc"
8621 fi
8622 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8623 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8624
8625 fi
8626 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8627   cat >>confdefs.h <<_ACEOF
8628 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8629 _ACEOF
8630
8631 else
8632   { { echo "$as_me:$LINENO: error: history header not found
8633 If you have readline already installed, see config.log for details on the
8634 failure.  It is possible the compiler isn't looking in the proper directory.
8635 Use --without-readline to disable readline support." >&5
8636 echo "$as_me: error: history header not found
8637 If you have readline already installed, see config.log for details on the
8638 failure.  It is possible the compiler isn't looking in the proper directory.
8639 Use --without-readline to disable readline support." >&2;}
8640    { (exit 1); exit 1; }; }
8641 fi
8642
8643 done
8644
8645 fi
8646
8647 done
8648
8649 fi
8650
8651 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8652 # Some installations of libedit usurp /usr/include/readline/, which seems
8653 # bad practice, since in combined installations readline will have its headers
8654 # there.  We might have to resort to AC_EGREP checks to make sure we found
8655 # the proper header...
8656
8657 for ac_header in editline/readline.h
8658 do
8659 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8660 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8661   echo "$as_me:$LINENO: checking for $ac_header" >&5
8662 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8663 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8664   echo $ECHO_N "(cached) $ECHO_C" >&6
8665 fi
8666 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8667 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8668 else
8669   # Is the header compilable?
8670 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8671 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8672 cat >conftest.$ac_ext <<_ACEOF
8673 /* confdefs.h.  */
8674 _ACEOF
8675 cat confdefs.h >>conftest.$ac_ext
8676 cat >>conftest.$ac_ext <<_ACEOF
8677 /* end confdefs.h.  */
8678 $ac_includes_default
8679 #include <$ac_header>
8680 _ACEOF
8681 rm -f conftest.$ac_objext
8682 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8683   (eval $ac_compile) 2>conftest.er1
8684   ac_status=$?
8685   grep -v '^ *+' conftest.er1 >conftest.err
8686   rm -f conftest.er1
8687   cat conftest.err >&5
8688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8689   (exit $ac_status); } &&
8690          { ac_try='test -z "$ac_c_werror_flag"
8691                          || test ! -s conftest.err'
8692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8693   (eval $ac_try) 2>&5
8694   ac_status=$?
8695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8696   (exit $ac_status); }; } &&
8697          { ac_try='test -s conftest.$ac_objext'
8698   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8699   (eval $ac_try) 2>&5
8700   ac_status=$?
8701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8702   (exit $ac_status); }; }; then
8703   ac_header_compiler=yes
8704 else
8705   echo "$as_me: failed program was:" >&5
8706 sed 's/^/| /' conftest.$ac_ext >&5
8707
8708 ac_header_compiler=no
8709 fi
8710 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8711 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8712 echo "${ECHO_T}$ac_header_compiler" >&6
8713
8714 # Is the header present?
8715 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8716 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8717 cat >conftest.$ac_ext <<_ACEOF
8718 /* confdefs.h.  */
8719 _ACEOF
8720 cat confdefs.h >>conftest.$ac_ext
8721 cat >>conftest.$ac_ext <<_ACEOF
8722 /* end confdefs.h.  */
8723 #include <$ac_header>
8724 _ACEOF
8725 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8726   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8727   ac_status=$?
8728   grep -v '^ *+' conftest.er1 >conftest.err
8729   rm -f conftest.er1
8730   cat conftest.err >&5
8731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8732   (exit $ac_status); } >/dev/null; then
8733   if test -s conftest.err; then
8734     ac_cpp_err=$ac_c_preproc_warn_flag
8735     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8736   else
8737     ac_cpp_err=
8738   fi
8739 else
8740   ac_cpp_err=yes
8741 fi
8742 if test -z "$ac_cpp_err"; then
8743   ac_header_preproc=yes
8744 else
8745   echo "$as_me: failed program was:" >&5
8746 sed 's/^/| /' conftest.$ac_ext >&5
8747
8748   ac_header_preproc=no
8749 fi
8750 rm -f conftest.err conftest.$ac_ext
8751 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8752 echo "${ECHO_T}$ac_header_preproc" >&6
8753
8754 # So?  What about this header?
8755 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8756   yes:no: )
8757     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8758 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8759     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8760 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8761     ac_header_preproc=yes
8762     ;;
8763   no:yes:* )
8764     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8765 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8766     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8767 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8768     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8769 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8770     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8771 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8772     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8773 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8774     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8775 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8776     (
8777       cat <<\_ASBOX
8778 ## ---------------------------------------- ##
8779 ## Report this to pgsql-bugs@postgresql.org ##
8780 ## ---------------------------------------- ##
8781 _ASBOX
8782     ) |
8783       sed "s/^/$as_me: WARNING:     /" >&2
8784     ;;
8785 esac
8786 echo "$as_me:$LINENO: checking for $ac_header" >&5
8787 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8788 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8789   echo $ECHO_N "(cached) $ECHO_C" >&6
8790 else
8791   eval "$as_ac_Header=\$ac_header_preproc"
8792 fi
8793 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8794 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8795
8796 fi
8797 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8798   cat >>confdefs.h <<_ACEOF
8799 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8800 _ACEOF
8801
8802 else
8803
8804 for ac_header in readline.h
8805 do
8806 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8807 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8808   echo "$as_me:$LINENO: checking for $ac_header" >&5
8809 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8810 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8811   echo $ECHO_N "(cached) $ECHO_C" >&6
8812 fi
8813 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8814 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8815 else
8816   # Is the header compilable?
8817 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8818 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8819 cat >conftest.$ac_ext <<_ACEOF
8820 /* confdefs.h.  */
8821 _ACEOF
8822 cat confdefs.h >>conftest.$ac_ext
8823 cat >>conftest.$ac_ext <<_ACEOF
8824 /* end confdefs.h.  */
8825 $ac_includes_default
8826 #include <$ac_header>
8827 _ACEOF
8828 rm -f conftest.$ac_objext
8829 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8830   (eval $ac_compile) 2>conftest.er1
8831   ac_status=$?
8832   grep -v '^ *+' conftest.er1 >conftest.err
8833   rm -f conftest.er1
8834   cat conftest.err >&5
8835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8836   (exit $ac_status); } &&
8837          { ac_try='test -z "$ac_c_werror_flag"
8838                          || test ! -s conftest.err'
8839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8840   (eval $ac_try) 2>&5
8841   ac_status=$?
8842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8843   (exit $ac_status); }; } &&
8844          { ac_try='test -s conftest.$ac_objext'
8845   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8846   (eval $ac_try) 2>&5
8847   ac_status=$?
8848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8849   (exit $ac_status); }; }; then
8850   ac_header_compiler=yes
8851 else
8852   echo "$as_me: failed program was:" >&5
8853 sed 's/^/| /' conftest.$ac_ext >&5
8854
8855 ac_header_compiler=no
8856 fi
8857 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8858 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8859 echo "${ECHO_T}$ac_header_compiler" >&6
8860
8861 # Is the header present?
8862 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8863 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8864 cat >conftest.$ac_ext <<_ACEOF
8865 /* confdefs.h.  */
8866 _ACEOF
8867 cat confdefs.h >>conftest.$ac_ext
8868 cat >>conftest.$ac_ext <<_ACEOF
8869 /* end confdefs.h.  */
8870 #include <$ac_header>
8871 _ACEOF
8872 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8873   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8874   ac_status=$?
8875   grep -v '^ *+' conftest.er1 >conftest.err
8876   rm -f conftest.er1
8877   cat conftest.err >&5
8878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8879   (exit $ac_status); } >/dev/null; then
8880   if test -s conftest.err; then
8881     ac_cpp_err=$ac_c_preproc_warn_flag
8882     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8883   else
8884     ac_cpp_err=
8885   fi
8886 else
8887   ac_cpp_err=yes
8888 fi
8889 if test -z "$ac_cpp_err"; then
8890   ac_header_preproc=yes
8891 else
8892   echo "$as_me: failed program was:" >&5
8893 sed 's/^/| /' conftest.$ac_ext >&5
8894
8895   ac_header_preproc=no
8896 fi
8897 rm -f conftest.err conftest.$ac_ext
8898 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8899 echo "${ECHO_T}$ac_header_preproc" >&6
8900
8901 # So?  What about this header?
8902 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8903   yes:no: )
8904     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8905 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8906     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8907 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8908     ac_header_preproc=yes
8909     ;;
8910   no:yes:* )
8911     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8912 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8913     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8914 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8915     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8916 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8917     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8918 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8919     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8920 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8921     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8922 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8923     (
8924       cat <<\_ASBOX
8925 ## ---------------------------------------- ##
8926 ## Report this to pgsql-bugs@postgresql.org ##
8927 ## ---------------------------------------- ##
8928 _ASBOX
8929     ) |
8930       sed "s/^/$as_me: WARNING:     /" >&2
8931     ;;
8932 esac
8933 echo "$as_me:$LINENO: checking for $ac_header" >&5
8934 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8935 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8936   echo $ECHO_N "(cached) $ECHO_C" >&6
8937 else
8938   eval "$as_ac_Header=\$ac_header_preproc"
8939 fi
8940 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8941 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8942
8943 fi
8944 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8945   cat >>confdefs.h <<_ACEOF
8946 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8947 _ACEOF
8948
8949 else
8950
8951 for ac_header in readline/readline.h
8952 do
8953 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8954 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8955   echo "$as_me:$LINENO: checking for $ac_header" >&5
8956 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8957 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8958   echo $ECHO_N "(cached) $ECHO_C" >&6
8959 fi
8960 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8961 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8962 else
8963   # Is the header compilable?
8964 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8965 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8966 cat >conftest.$ac_ext <<_ACEOF
8967 /* confdefs.h.  */
8968 _ACEOF
8969 cat confdefs.h >>conftest.$ac_ext
8970 cat >>conftest.$ac_ext <<_ACEOF
8971 /* end confdefs.h.  */
8972 $ac_includes_default
8973 #include <$ac_header>
8974 _ACEOF
8975 rm -f conftest.$ac_objext
8976 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8977   (eval $ac_compile) 2>conftest.er1
8978   ac_status=$?
8979   grep -v '^ *+' conftest.er1 >conftest.err
8980   rm -f conftest.er1
8981   cat conftest.err >&5
8982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8983   (exit $ac_status); } &&
8984          { ac_try='test -z "$ac_c_werror_flag"
8985                          || test ! -s conftest.err'
8986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8987   (eval $ac_try) 2>&5
8988   ac_status=$?
8989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8990   (exit $ac_status); }; } &&
8991          { ac_try='test -s conftest.$ac_objext'
8992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8993   (eval $ac_try) 2>&5
8994   ac_status=$?
8995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8996   (exit $ac_status); }; }; then
8997   ac_header_compiler=yes
8998 else
8999   echo "$as_me: failed program was:" >&5
9000 sed 's/^/| /' conftest.$ac_ext >&5
9001
9002 ac_header_compiler=no
9003 fi
9004 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9005 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9006 echo "${ECHO_T}$ac_header_compiler" >&6
9007
9008 # Is the header present?
9009 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9010 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9011 cat >conftest.$ac_ext <<_ACEOF
9012 /* confdefs.h.  */
9013 _ACEOF
9014 cat confdefs.h >>conftest.$ac_ext
9015 cat >>conftest.$ac_ext <<_ACEOF
9016 /* end confdefs.h.  */
9017 #include <$ac_header>
9018 _ACEOF
9019 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9020   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9021   ac_status=$?
9022   grep -v '^ *+' conftest.er1 >conftest.err
9023   rm -f conftest.er1
9024   cat conftest.err >&5
9025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9026   (exit $ac_status); } >/dev/null; then
9027   if test -s conftest.err; then
9028     ac_cpp_err=$ac_c_preproc_warn_flag
9029     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9030   else
9031     ac_cpp_err=
9032   fi
9033 else
9034   ac_cpp_err=yes
9035 fi
9036 if test -z "$ac_cpp_err"; then
9037   ac_header_preproc=yes
9038 else
9039   echo "$as_me: failed program was:" >&5
9040 sed 's/^/| /' conftest.$ac_ext >&5
9041
9042   ac_header_preproc=no
9043 fi
9044 rm -f conftest.err conftest.$ac_ext
9045 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9046 echo "${ECHO_T}$ac_header_preproc" >&6
9047
9048 # So?  What about this header?
9049 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9050   yes:no: )
9051     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9052 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9053     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9054 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9055     ac_header_preproc=yes
9056     ;;
9057   no:yes:* )
9058     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9059 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9060     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9061 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9062     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9063 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9064     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9065 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9066     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9067 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9068     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9069 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9070     (
9071       cat <<\_ASBOX
9072 ## ---------------------------------------- ##
9073 ## Report this to pgsql-bugs@postgresql.org ##
9074 ## ---------------------------------------- ##
9075 _ASBOX
9076     ) |
9077       sed "s/^/$as_me: WARNING:     /" >&2
9078     ;;
9079 esac
9080 echo "$as_me:$LINENO: checking for $ac_header" >&5
9081 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9082 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9083   echo $ECHO_N "(cached) $ECHO_C" >&6
9084 else
9085   eval "$as_ac_Header=\$ac_header_preproc"
9086 fi
9087 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9088 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9089
9090 fi
9091 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9092   cat >>confdefs.h <<_ACEOF
9093 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9094 _ACEOF
9095
9096 else
9097   { { echo "$as_me:$LINENO: error: readline header not found
9098 If you have libedit already installed, see config.log for details on the
9099 failure.  It is possible the compiler isn't looking in the proper directory.
9100 Use --without-readline to disable libedit support." >&5
9101 echo "$as_me: error: readline header not found
9102 If you have libedit already installed, see config.log for details on the
9103 failure.  It is possible the compiler isn't looking in the proper directory.
9104 Use --without-readline to disable libedit support." >&2;}
9105    { (exit 1); exit 1; }; }
9106 fi
9107
9108 done
9109
9110 fi
9111
9112 done
9113
9114 fi
9115
9116 done
9117
9118 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9119 # not be there at all.  Hence, don't complain if not found.  We must check
9120 # though, since in yet other versions it is an independent header.
9121
9122 for ac_header in editline/history.h
9123 do
9124 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9125 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9126   echo "$as_me:$LINENO: checking for $ac_header" >&5
9127 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9128 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9129   echo $ECHO_N "(cached) $ECHO_C" >&6
9130 fi
9131 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9132 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9133 else
9134   # Is the header compilable?
9135 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9136 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9137 cat >conftest.$ac_ext <<_ACEOF
9138 /* confdefs.h.  */
9139 _ACEOF
9140 cat confdefs.h >>conftest.$ac_ext
9141 cat >>conftest.$ac_ext <<_ACEOF
9142 /* end confdefs.h.  */
9143 $ac_includes_default
9144 #include <$ac_header>
9145 _ACEOF
9146 rm -f conftest.$ac_objext
9147 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9148   (eval $ac_compile) 2>conftest.er1
9149   ac_status=$?
9150   grep -v '^ *+' conftest.er1 >conftest.err
9151   rm -f conftest.er1
9152   cat conftest.err >&5
9153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9154   (exit $ac_status); } &&
9155          { ac_try='test -z "$ac_c_werror_flag"
9156                          || test ! -s conftest.err'
9157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9158   (eval $ac_try) 2>&5
9159   ac_status=$?
9160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9161   (exit $ac_status); }; } &&
9162          { ac_try='test -s conftest.$ac_objext'
9163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9164   (eval $ac_try) 2>&5
9165   ac_status=$?
9166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9167   (exit $ac_status); }; }; then
9168   ac_header_compiler=yes
9169 else
9170   echo "$as_me: failed program was:" >&5
9171 sed 's/^/| /' conftest.$ac_ext >&5
9172
9173 ac_header_compiler=no
9174 fi
9175 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9176 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9177 echo "${ECHO_T}$ac_header_compiler" >&6
9178
9179 # Is the header present?
9180 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9181 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9182 cat >conftest.$ac_ext <<_ACEOF
9183 /* confdefs.h.  */
9184 _ACEOF
9185 cat confdefs.h >>conftest.$ac_ext
9186 cat >>conftest.$ac_ext <<_ACEOF
9187 /* end confdefs.h.  */
9188 #include <$ac_header>
9189 _ACEOF
9190 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9191   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9192   ac_status=$?
9193   grep -v '^ *+' conftest.er1 >conftest.err
9194   rm -f conftest.er1
9195   cat conftest.err >&5
9196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9197   (exit $ac_status); } >/dev/null; then
9198   if test -s conftest.err; then
9199     ac_cpp_err=$ac_c_preproc_warn_flag
9200     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9201   else
9202     ac_cpp_err=
9203   fi
9204 else
9205   ac_cpp_err=yes
9206 fi
9207 if test -z "$ac_cpp_err"; then
9208   ac_header_preproc=yes
9209 else
9210   echo "$as_me: failed program was:" >&5
9211 sed 's/^/| /' conftest.$ac_ext >&5
9212
9213   ac_header_preproc=no
9214 fi
9215 rm -f conftest.err conftest.$ac_ext
9216 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9217 echo "${ECHO_T}$ac_header_preproc" >&6
9218
9219 # So?  What about this header?
9220 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9221   yes:no: )
9222     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9223 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9224     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9225 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9226     ac_header_preproc=yes
9227     ;;
9228   no:yes:* )
9229     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9230 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9231     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9232 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9233     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9234 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9235     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9236 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9237     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9238 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9239     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9240 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9241     (
9242       cat <<\_ASBOX
9243 ## ---------------------------------------- ##
9244 ## Report this to pgsql-bugs@postgresql.org ##
9245 ## ---------------------------------------- ##
9246 _ASBOX
9247     ) |
9248       sed "s/^/$as_me: WARNING:     /" >&2
9249     ;;
9250 esac
9251 echo "$as_me:$LINENO: checking for $ac_header" >&5
9252 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9253 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9254   echo $ECHO_N "(cached) $ECHO_C" >&6
9255 else
9256   eval "$as_ac_Header=\$ac_header_preproc"
9257 fi
9258 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9259 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9260
9261 fi
9262 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9263   cat >>confdefs.h <<_ACEOF
9264 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9265 _ACEOF
9266
9267 else
9268
9269 for ac_header in history.h
9270 do
9271 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9272 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9273   echo "$as_me:$LINENO: checking for $ac_header" >&5
9274 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9275 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9276   echo $ECHO_N "(cached) $ECHO_C" >&6
9277 fi
9278 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9279 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9280 else
9281   # Is the header compilable?
9282 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9283 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9284 cat >conftest.$ac_ext <<_ACEOF
9285 /* confdefs.h.  */
9286 _ACEOF
9287 cat confdefs.h >>conftest.$ac_ext
9288 cat >>conftest.$ac_ext <<_ACEOF
9289 /* end confdefs.h.  */
9290 $ac_includes_default
9291 #include <$ac_header>
9292 _ACEOF
9293 rm -f conftest.$ac_objext
9294 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9295   (eval $ac_compile) 2>conftest.er1
9296   ac_status=$?
9297   grep -v '^ *+' conftest.er1 >conftest.err
9298   rm -f conftest.er1
9299   cat conftest.err >&5
9300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9301   (exit $ac_status); } &&
9302          { ac_try='test -z "$ac_c_werror_flag"
9303                          || test ! -s conftest.err'
9304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9305   (eval $ac_try) 2>&5
9306   ac_status=$?
9307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9308   (exit $ac_status); }; } &&
9309          { ac_try='test -s conftest.$ac_objext'
9310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9311   (eval $ac_try) 2>&5
9312   ac_status=$?
9313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9314   (exit $ac_status); }; }; then
9315   ac_header_compiler=yes
9316 else
9317   echo "$as_me: failed program was:" >&5
9318 sed 's/^/| /' conftest.$ac_ext >&5
9319
9320 ac_header_compiler=no
9321 fi
9322 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9323 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9324 echo "${ECHO_T}$ac_header_compiler" >&6
9325
9326 # Is the header present?
9327 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9328 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9329 cat >conftest.$ac_ext <<_ACEOF
9330 /* confdefs.h.  */
9331 _ACEOF
9332 cat confdefs.h >>conftest.$ac_ext
9333 cat >>conftest.$ac_ext <<_ACEOF
9334 /* end confdefs.h.  */
9335 #include <$ac_header>
9336 _ACEOF
9337 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9338   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9339   ac_status=$?
9340   grep -v '^ *+' conftest.er1 >conftest.err
9341   rm -f conftest.er1
9342   cat conftest.err >&5
9343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9344   (exit $ac_status); } >/dev/null; then
9345   if test -s conftest.err; then
9346     ac_cpp_err=$ac_c_preproc_warn_flag
9347     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9348   else
9349     ac_cpp_err=
9350   fi
9351 else
9352   ac_cpp_err=yes
9353 fi
9354 if test -z "$ac_cpp_err"; then
9355   ac_header_preproc=yes
9356 else
9357   echo "$as_me: failed program was:" >&5
9358 sed 's/^/| /' conftest.$ac_ext >&5
9359
9360   ac_header_preproc=no
9361 fi
9362 rm -f conftest.err conftest.$ac_ext
9363 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9364 echo "${ECHO_T}$ac_header_preproc" >&6
9365
9366 # So?  What about this header?
9367 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9368   yes:no: )
9369     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9370 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9371     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9372 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9373     ac_header_preproc=yes
9374     ;;
9375   no:yes:* )
9376     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9377 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9378     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9379 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9380     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9381 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9382     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9383 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9384     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9385 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9386     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9387 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9388     (
9389       cat <<\_ASBOX
9390 ## ---------------------------------------- ##
9391 ## Report this to pgsql-bugs@postgresql.org ##
9392 ## ---------------------------------------- ##
9393 _ASBOX
9394     ) |
9395       sed "s/^/$as_me: WARNING:     /" >&2
9396     ;;
9397 esac
9398 echo "$as_me:$LINENO: checking for $ac_header" >&5
9399 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9400 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9401   echo $ECHO_N "(cached) $ECHO_C" >&6
9402 else
9403   eval "$as_ac_Header=\$ac_header_preproc"
9404 fi
9405 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9406 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9407
9408 fi
9409 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9410   cat >>confdefs.h <<_ACEOF
9411 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9412 _ACEOF
9413
9414 else
9415
9416 for ac_header in readline/history.h
9417 do
9418 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9419 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9420   echo "$as_me:$LINENO: checking for $ac_header" >&5
9421 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9422 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9423   echo $ECHO_N "(cached) $ECHO_C" >&6
9424 fi
9425 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9426 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9427 else
9428   # Is the header compilable?
9429 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9430 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9431 cat >conftest.$ac_ext <<_ACEOF
9432 /* confdefs.h.  */
9433 _ACEOF
9434 cat confdefs.h >>conftest.$ac_ext
9435 cat >>conftest.$ac_ext <<_ACEOF
9436 /* end confdefs.h.  */
9437 $ac_includes_default
9438 #include <$ac_header>
9439 _ACEOF
9440 rm -f conftest.$ac_objext
9441 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9442   (eval $ac_compile) 2>conftest.er1
9443   ac_status=$?
9444   grep -v '^ *+' conftest.er1 >conftest.err
9445   rm -f conftest.er1
9446   cat conftest.err >&5
9447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9448   (exit $ac_status); } &&
9449          { ac_try='test -z "$ac_c_werror_flag"
9450                          || test ! -s conftest.err'
9451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9452   (eval $ac_try) 2>&5
9453   ac_status=$?
9454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9455   (exit $ac_status); }; } &&
9456          { ac_try='test -s conftest.$ac_objext'
9457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9458   (eval $ac_try) 2>&5
9459   ac_status=$?
9460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9461   (exit $ac_status); }; }; then
9462   ac_header_compiler=yes
9463 else
9464   echo "$as_me: failed program was:" >&5
9465 sed 's/^/| /' conftest.$ac_ext >&5
9466
9467 ac_header_compiler=no
9468 fi
9469 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9470 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9471 echo "${ECHO_T}$ac_header_compiler" >&6
9472
9473 # Is the header present?
9474 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9475 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9476 cat >conftest.$ac_ext <<_ACEOF
9477 /* confdefs.h.  */
9478 _ACEOF
9479 cat confdefs.h >>conftest.$ac_ext
9480 cat >>conftest.$ac_ext <<_ACEOF
9481 /* end confdefs.h.  */
9482 #include <$ac_header>
9483 _ACEOF
9484 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9485   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9486   ac_status=$?
9487   grep -v '^ *+' conftest.er1 >conftest.err
9488   rm -f conftest.er1
9489   cat conftest.err >&5
9490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9491   (exit $ac_status); } >/dev/null; then
9492   if test -s conftest.err; then
9493     ac_cpp_err=$ac_c_preproc_warn_flag
9494     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9495   else
9496     ac_cpp_err=
9497   fi
9498 else
9499   ac_cpp_err=yes
9500 fi
9501 if test -z "$ac_cpp_err"; then
9502   ac_header_preproc=yes
9503 else
9504   echo "$as_me: failed program was:" >&5
9505 sed 's/^/| /' conftest.$ac_ext >&5
9506
9507   ac_header_preproc=no
9508 fi
9509 rm -f conftest.err conftest.$ac_ext
9510 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9511 echo "${ECHO_T}$ac_header_preproc" >&6
9512
9513 # So?  What about this header?
9514 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9515   yes:no: )
9516     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9517 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9518     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9519 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9520     ac_header_preproc=yes
9521     ;;
9522   no:yes:* )
9523     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9524 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9525     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9526 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9527     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9528 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9529     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9530 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9531     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9532 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9533     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9534 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9535     (
9536       cat <<\_ASBOX
9537 ## ---------------------------------------- ##
9538 ## Report this to pgsql-bugs@postgresql.org ##
9539 ## ---------------------------------------- ##
9540 _ASBOX
9541     ) |
9542       sed "s/^/$as_me: WARNING:     /" >&2
9543     ;;
9544 esac
9545 echo "$as_me:$LINENO: checking for $ac_header" >&5
9546 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9547 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9548   echo $ECHO_N "(cached) $ECHO_C" >&6
9549 else
9550   eval "$as_ac_Header=\$ac_header_preproc"
9551 fi
9552 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9553 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9554
9555 fi
9556 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9557   cat >>confdefs.h <<_ACEOF
9558 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9559 _ACEOF
9560
9561 fi
9562
9563 done
9564
9565 fi
9566
9567 done
9568
9569 fi
9570
9571 done
9572
9573 fi
9574
9575 if test "$with_zlib" = yes; then
9576   if test "${ac_cv_header_zlib_h+set}" = set; then
9577   echo "$as_me:$LINENO: checking for zlib.h" >&5
9578 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9579 if test "${ac_cv_header_zlib_h+set}" = set; then
9580   echo $ECHO_N "(cached) $ECHO_C" >&6
9581 fi
9582 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9583 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9584 else
9585   # Is the header compilable?
9586 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9587 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9588 cat >conftest.$ac_ext <<_ACEOF
9589 /* confdefs.h.  */
9590 _ACEOF
9591 cat confdefs.h >>conftest.$ac_ext
9592 cat >>conftest.$ac_ext <<_ACEOF
9593 /* end confdefs.h.  */
9594 $ac_includes_default
9595 #include <zlib.h>
9596 _ACEOF
9597 rm -f conftest.$ac_objext
9598 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9599   (eval $ac_compile) 2>conftest.er1
9600   ac_status=$?
9601   grep -v '^ *+' conftest.er1 >conftest.err
9602   rm -f conftest.er1
9603   cat conftest.err >&5
9604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9605   (exit $ac_status); } &&
9606          { ac_try='test -z "$ac_c_werror_flag"
9607                          || test ! -s conftest.err'
9608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9609   (eval $ac_try) 2>&5
9610   ac_status=$?
9611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9612   (exit $ac_status); }; } &&
9613          { ac_try='test -s conftest.$ac_objext'
9614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9615   (eval $ac_try) 2>&5
9616   ac_status=$?
9617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9618   (exit $ac_status); }; }; then
9619   ac_header_compiler=yes
9620 else
9621   echo "$as_me: failed program was:" >&5
9622 sed 's/^/| /' conftest.$ac_ext >&5
9623
9624 ac_header_compiler=no
9625 fi
9626 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9627 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9628 echo "${ECHO_T}$ac_header_compiler" >&6
9629
9630 # Is the header present?
9631 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9632 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9633 cat >conftest.$ac_ext <<_ACEOF
9634 /* confdefs.h.  */
9635 _ACEOF
9636 cat confdefs.h >>conftest.$ac_ext
9637 cat >>conftest.$ac_ext <<_ACEOF
9638 /* end confdefs.h.  */
9639 #include <zlib.h>
9640 _ACEOF
9641 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9642   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9643   ac_status=$?
9644   grep -v '^ *+' conftest.er1 >conftest.err
9645   rm -f conftest.er1
9646   cat conftest.err >&5
9647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9648   (exit $ac_status); } >/dev/null; then
9649   if test -s conftest.err; then
9650     ac_cpp_err=$ac_c_preproc_warn_flag
9651     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9652   else
9653     ac_cpp_err=
9654   fi
9655 else
9656   ac_cpp_err=yes
9657 fi
9658 if test -z "$ac_cpp_err"; then
9659   ac_header_preproc=yes
9660 else
9661   echo "$as_me: failed program was:" >&5
9662 sed 's/^/| /' conftest.$ac_ext >&5
9663
9664   ac_header_preproc=no
9665 fi
9666 rm -f conftest.err conftest.$ac_ext
9667 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9668 echo "${ECHO_T}$ac_header_preproc" >&6
9669
9670 # So?  What about this header?
9671 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9672   yes:no: )
9673     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9674 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9675     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9676 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9677     ac_header_preproc=yes
9678     ;;
9679   no:yes:* )
9680     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9681 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9682     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9683 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9684     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9685 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9686     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9687 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9688     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9689 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9690     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9691 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9692     (
9693       cat <<\_ASBOX
9694 ## ---------------------------------------- ##
9695 ## Report this to pgsql-bugs@postgresql.org ##
9696 ## ---------------------------------------- ##
9697 _ASBOX
9698     ) |
9699       sed "s/^/$as_me: WARNING:     /" >&2
9700     ;;
9701 esac
9702 echo "$as_me:$LINENO: checking for zlib.h" >&5
9703 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9704 if test "${ac_cv_header_zlib_h+set}" = set; then
9705   echo $ECHO_N "(cached) $ECHO_C" >&6
9706 else
9707   ac_cv_header_zlib_h=$ac_header_preproc
9708 fi
9709 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9710 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9711
9712 fi
9713 if test $ac_cv_header_zlib_h = yes; then
9714   :
9715 else
9716   { { echo "$as_me:$LINENO: error: zlib header not found
9717 If you have zlib already installed, see config.log for details on the
9718 failure.  It is possible the compiler isn't looking in the proper directory.
9719 Use --without-zlib to disable zlib support." >&5
9720 echo "$as_me: error: zlib header not found
9721 If you have zlib already installed, see config.log for details on the
9722 failure.  It is possible the compiler isn't looking in the proper directory.
9723 Use --without-zlib to disable zlib support." >&2;}
9724    { (exit 1); exit 1; }; }
9725 fi
9726
9727
9728 fi
9729
9730 if test "$with_krb5" = yes ; then
9731   if test "${ac_cv_header_krb5_h+set}" = set; then
9732   echo "$as_me:$LINENO: checking for krb5.h" >&5
9733 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9734 if test "${ac_cv_header_krb5_h+set}" = set; then
9735   echo $ECHO_N "(cached) $ECHO_C" >&6
9736 fi
9737 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9738 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9739 else
9740   # Is the header compilable?
9741 echo "$as_me:$LINENO: checking krb5.h usability" >&5
9742 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
9743 cat >conftest.$ac_ext <<_ACEOF
9744 /* confdefs.h.  */
9745 _ACEOF
9746 cat confdefs.h >>conftest.$ac_ext
9747 cat >>conftest.$ac_ext <<_ACEOF
9748 /* end confdefs.h.  */
9749 $ac_includes_default
9750 #include <krb5.h>
9751 _ACEOF
9752 rm -f conftest.$ac_objext
9753 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9754   (eval $ac_compile) 2>conftest.er1
9755   ac_status=$?
9756   grep -v '^ *+' conftest.er1 >conftest.err
9757   rm -f conftest.er1
9758   cat conftest.err >&5
9759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9760   (exit $ac_status); } &&
9761          { ac_try='test -z "$ac_c_werror_flag"
9762                          || test ! -s conftest.err'
9763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9764   (eval $ac_try) 2>&5
9765   ac_status=$?
9766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9767   (exit $ac_status); }; } &&
9768          { ac_try='test -s conftest.$ac_objext'
9769   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9770   (eval $ac_try) 2>&5
9771   ac_status=$?
9772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9773   (exit $ac_status); }; }; then
9774   ac_header_compiler=yes
9775 else
9776   echo "$as_me: failed program was:" >&5
9777 sed 's/^/| /' conftest.$ac_ext >&5
9778
9779 ac_header_compiler=no
9780 fi
9781 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9782 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9783 echo "${ECHO_T}$ac_header_compiler" >&6
9784
9785 # Is the header present?
9786 echo "$as_me:$LINENO: checking krb5.h presence" >&5
9787 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
9788 cat >conftest.$ac_ext <<_ACEOF
9789 /* confdefs.h.  */
9790 _ACEOF
9791 cat confdefs.h >>conftest.$ac_ext
9792 cat >>conftest.$ac_ext <<_ACEOF
9793 /* end confdefs.h.  */
9794 #include <krb5.h>
9795 _ACEOF
9796 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9797   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9798   ac_status=$?
9799   grep -v '^ *+' conftest.er1 >conftest.err
9800   rm -f conftest.er1
9801   cat conftest.err >&5
9802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9803   (exit $ac_status); } >/dev/null; then
9804   if test -s conftest.err; then
9805     ac_cpp_err=$ac_c_preproc_warn_flag
9806     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9807   else
9808     ac_cpp_err=
9809   fi
9810 else
9811   ac_cpp_err=yes
9812 fi
9813 if test -z "$ac_cpp_err"; then
9814   ac_header_preproc=yes
9815 else
9816   echo "$as_me: failed program was:" >&5
9817 sed 's/^/| /' conftest.$ac_ext >&5
9818
9819   ac_header_preproc=no
9820 fi
9821 rm -f conftest.err conftest.$ac_ext
9822 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9823 echo "${ECHO_T}$ac_header_preproc" >&6
9824
9825 # So?  What about this header?
9826 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9827   yes:no: )
9828     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
9829 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9830     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
9831 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
9832     ac_header_preproc=yes
9833     ;;
9834   no:yes:* )
9835     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
9836 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
9837     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
9838 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
9839     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
9840 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
9841     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
9842 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9843     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
9844 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
9845     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
9846 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
9847     (
9848       cat <<\_ASBOX
9849 ## ---------------------------------------- ##
9850 ## Report this to pgsql-bugs@postgresql.org ##
9851 ## ---------------------------------------- ##
9852 _ASBOX
9853     ) |
9854       sed "s/^/$as_me: WARNING:     /" >&2
9855     ;;
9856 esac
9857 echo "$as_me:$LINENO: checking for krb5.h" >&5
9858 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9859 if test "${ac_cv_header_krb5_h+set}" = set; then
9860   echo $ECHO_N "(cached) $ECHO_C" >&6
9861 else
9862   ac_cv_header_krb5_h=$ac_header_preproc
9863 fi
9864 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9865 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9866
9867 fi
9868 if test $ac_cv_header_krb5_h = yes; then
9869   :
9870 else
9871   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
9872 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
9873    { (exit 1); exit 1; }; }
9874 fi
9875
9876
9877 fi
9878
9879 if test "$with_openssl" = yes ; then
9880   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9881   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9882 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9883 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9884   echo $ECHO_N "(cached) $ECHO_C" >&6
9885 fi
9886 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9887 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9888 else
9889   # Is the header compilable?
9890 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
9891 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
9892 cat >conftest.$ac_ext <<_ACEOF
9893 /* confdefs.h.  */
9894 _ACEOF
9895 cat confdefs.h >>conftest.$ac_ext
9896 cat >>conftest.$ac_ext <<_ACEOF
9897 /* end confdefs.h.  */
9898 $ac_includes_default
9899 #include <openssl/ssl.h>
9900 _ACEOF
9901 rm -f conftest.$ac_objext
9902 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9903   (eval $ac_compile) 2>conftest.er1
9904   ac_status=$?
9905   grep -v '^ *+' conftest.er1 >conftest.err
9906   rm -f conftest.er1
9907   cat conftest.err >&5
9908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9909   (exit $ac_status); } &&
9910          { ac_try='test -z "$ac_c_werror_flag"
9911                          || test ! -s conftest.err'
9912   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9913   (eval $ac_try) 2>&5
9914   ac_status=$?
9915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9916   (exit $ac_status); }; } &&
9917          { ac_try='test -s conftest.$ac_objext'
9918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9919   (eval $ac_try) 2>&5
9920   ac_status=$?
9921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9922   (exit $ac_status); }; }; then
9923   ac_header_compiler=yes
9924 else
9925   echo "$as_me: failed program was:" >&5
9926 sed 's/^/| /' conftest.$ac_ext >&5
9927
9928 ac_header_compiler=no
9929 fi
9930 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9931 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9932 echo "${ECHO_T}$ac_header_compiler" >&6
9933
9934 # Is the header present?
9935 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
9936 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
9937 cat >conftest.$ac_ext <<_ACEOF
9938 /* confdefs.h.  */
9939 _ACEOF
9940 cat confdefs.h >>conftest.$ac_ext
9941 cat >>conftest.$ac_ext <<_ACEOF
9942 /* end confdefs.h.  */
9943 #include <openssl/ssl.h>
9944 _ACEOF
9945 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9946   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9947   ac_status=$?
9948   grep -v '^ *+' conftest.er1 >conftest.err
9949   rm -f conftest.er1
9950   cat conftest.err >&5
9951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9952   (exit $ac_status); } >/dev/null; then
9953   if test -s conftest.err; then
9954     ac_cpp_err=$ac_c_preproc_warn_flag
9955     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9956   else
9957     ac_cpp_err=
9958   fi
9959 else
9960   ac_cpp_err=yes
9961 fi
9962 if test -z "$ac_cpp_err"; then
9963   ac_header_preproc=yes
9964 else
9965   echo "$as_me: failed program was:" >&5
9966 sed 's/^/| /' conftest.$ac_ext >&5
9967
9968   ac_header_preproc=no
9969 fi
9970 rm -f conftest.err conftest.$ac_ext
9971 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9972 echo "${ECHO_T}$ac_header_preproc" >&6
9973
9974 # So?  What about this header?
9975 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9976   yes:no: )
9977     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
9978 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9979     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
9980 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
9981     ac_header_preproc=yes
9982     ;;
9983   no:yes:* )
9984     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
9985 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
9986     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
9987 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
9988     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
9989 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
9990     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
9991 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9992     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
9993 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
9994     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
9995 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
9996     (
9997       cat <<\_ASBOX
9998 ## ---------------------------------------- ##
9999 ## Report this to pgsql-bugs@postgresql.org ##
10000 ## ---------------------------------------- ##
10001 _ASBOX
10002     ) |
10003       sed "s/^/$as_me: WARNING:     /" >&2
10004     ;;
10005 esac
10006 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10007 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10008 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10009   echo $ECHO_N "(cached) $ECHO_C" >&6
10010 else
10011   ac_cv_header_openssl_ssl_h=$ac_header_preproc
10012 fi
10013 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10014 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10015
10016 fi
10017 if test $ac_cv_header_openssl_ssl_h = yes; then
10018   :
10019 else
10020   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
10021 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
10022    { (exit 1); exit 1; }; }
10023 fi
10024
10025
10026   if test "${ac_cv_header_openssl_err_h+set}" = set; then
10027   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10028 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10029 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10030   echo $ECHO_N "(cached) $ECHO_C" >&6
10031 fi
10032 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10033 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10034 else
10035   # Is the header compilable?
10036 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
10037 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
10038 cat >conftest.$ac_ext <<_ACEOF
10039 /* confdefs.h.  */
10040 _ACEOF
10041 cat confdefs.h >>conftest.$ac_ext
10042 cat >>conftest.$ac_ext <<_ACEOF
10043 /* end confdefs.h.  */
10044 $ac_includes_default
10045 #include <openssl/err.h>
10046 _ACEOF
10047 rm -f conftest.$ac_objext
10048 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10049   (eval $ac_compile) 2>conftest.er1
10050   ac_status=$?
10051   grep -v '^ *+' conftest.er1 >conftest.err
10052   rm -f conftest.er1
10053   cat conftest.err >&5
10054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10055   (exit $ac_status); } &&
10056          { ac_try='test -z "$ac_c_werror_flag"
10057                          || test ! -s conftest.err'
10058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10059   (eval $ac_try) 2>&5
10060   ac_status=$?
10061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10062   (exit $ac_status); }; } &&
10063          { ac_try='test -s conftest.$ac_objext'
10064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10065   (eval $ac_try) 2>&5
10066   ac_status=$?
10067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10068   (exit $ac_status); }; }; then
10069   ac_header_compiler=yes
10070 else
10071   echo "$as_me: failed program was:" >&5
10072 sed 's/^/| /' conftest.$ac_ext >&5
10073
10074 ac_header_compiler=no
10075 fi
10076 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10077 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10078 echo "${ECHO_T}$ac_header_compiler" >&6
10079
10080 # Is the header present?
10081 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10082 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10083 cat >conftest.$ac_ext <<_ACEOF
10084 /* confdefs.h.  */
10085 _ACEOF
10086 cat confdefs.h >>conftest.$ac_ext
10087 cat >>conftest.$ac_ext <<_ACEOF
10088 /* end confdefs.h.  */
10089 #include <openssl/err.h>
10090 _ACEOF
10091 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10092   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10093   ac_status=$?
10094   grep -v '^ *+' conftest.er1 >conftest.err
10095   rm -f conftest.er1
10096   cat conftest.err >&5
10097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10098   (exit $ac_status); } >/dev/null; then
10099   if test -s conftest.err; then
10100     ac_cpp_err=$ac_c_preproc_warn_flag
10101     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10102   else
10103     ac_cpp_err=
10104   fi
10105 else
10106   ac_cpp_err=yes
10107 fi
10108 if test -z "$ac_cpp_err"; then
10109   ac_header_preproc=yes
10110 else
10111   echo "$as_me: failed program was:" >&5
10112 sed 's/^/| /' conftest.$ac_ext >&5
10113
10114   ac_header_preproc=no
10115 fi
10116 rm -f conftest.err conftest.$ac_ext
10117 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10118 echo "${ECHO_T}$ac_header_preproc" >&6
10119
10120 # So?  What about this header?
10121 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10122   yes:no: )
10123     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10124 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10125     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10126 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10127     ac_header_preproc=yes
10128     ;;
10129   no:yes:* )
10130     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10131 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10132     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10133 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10134     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10135 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10136     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10137 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10138     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10139 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10140     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10141 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10142     (
10143       cat <<\_ASBOX
10144 ## ---------------------------------------- ##
10145 ## Report this to pgsql-bugs@postgresql.org ##
10146 ## ---------------------------------------- ##
10147 _ASBOX
10148     ) |
10149       sed "s/^/$as_me: WARNING:     /" >&2
10150     ;;
10151 esac
10152 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10153 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10154 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10155   echo $ECHO_N "(cached) $ECHO_C" >&6
10156 else
10157   ac_cv_header_openssl_err_h=$ac_header_preproc
10158 fi
10159 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10160 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10161
10162 fi
10163 if test $ac_cv_header_openssl_err_h = yes; then
10164   :
10165 else
10166   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10167 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10168    { (exit 1); exit 1; }; }
10169 fi
10170
10171
10172 fi
10173
10174 if test "$with_pam" = yes ; then
10175
10176 for ac_header in security/pam_appl.h
10177 do
10178 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10179 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10180   echo "$as_me:$LINENO: checking for $ac_header" >&5
10181 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10182 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10183   echo $ECHO_N "(cached) $ECHO_C" >&6
10184 fi
10185 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10186 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10187 else
10188   # Is the header compilable?
10189 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10190 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10191 cat >conftest.$ac_ext <<_ACEOF
10192 /* confdefs.h.  */
10193 _ACEOF
10194 cat confdefs.h >>conftest.$ac_ext
10195 cat >>conftest.$ac_ext <<_ACEOF
10196 /* end confdefs.h.  */
10197 $ac_includes_default
10198 #include <$ac_header>
10199 _ACEOF
10200 rm -f conftest.$ac_objext
10201 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10202   (eval $ac_compile) 2>conftest.er1
10203   ac_status=$?
10204   grep -v '^ *+' conftest.er1 >conftest.err
10205   rm -f conftest.er1
10206   cat conftest.err >&5
10207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10208   (exit $ac_status); } &&
10209          { ac_try='test -z "$ac_c_werror_flag"
10210                          || test ! -s conftest.err'
10211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10212   (eval $ac_try) 2>&5
10213   ac_status=$?
10214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10215   (exit $ac_status); }; } &&
10216          { ac_try='test -s conftest.$ac_objext'
10217   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10218   (eval $ac_try) 2>&5
10219   ac_status=$?
10220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10221   (exit $ac_status); }; }; then
10222   ac_header_compiler=yes
10223 else
10224   echo "$as_me: failed program was:" >&5
10225 sed 's/^/| /' conftest.$ac_ext >&5
10226
10227 ac_header_compiler=no
10228 fi
10229 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10230 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10231 echo "${ECHO_T}$ac_header_compiler" >&6
10232
10233 # Is the header present?
10234 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10235 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10236 cat >conftest.$ac_ext <<_ACEOF
10237 /* confdefs.h.  */
10238 _ACEOF
10239 cat confdefs.h >>conftest.$ac_ext
10240 cat >>conftest.$ac_ext <<_ACEOF
10241 /* end confdefs.h.  */
10242 #include <$ac_header>
10243 _ACEOF
10244 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10245   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10246   ac_status=$?
10247   grep -v '^ *+' conftest.er1 >conftest.err
10248   rm -f conftest.er1
10249   cat conftest.err >&5
10250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10251   (exit $ac_status); } >/dev/null; then
10252   if test -s conftest.err; then
10253     ac_cpp_err=$ac_c_preproc_warn_flag
10254     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10255   else
10256     ac_cpp_err=
10257   fi
10258 else
10259   ac_cpp_err=yes
10260 fi
10261 if test -z "$ac_cpp_err"; then
10262   ac_header_preproc=yes
10263 else
10264   echo "$as_me: failed program was:" >&5
10265 sed 's/^/| /' conftest.$ac_ext >&5
10266
10267   ac_header_preproc=no
10268 fi
10269 rm -f conftest.err conftest.$ac_ext
10270 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10271 echo "${ECHO_T}$ac_header_preproc" >&6
10272
10273 # So?  What about this header?
10274 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10275   yes:no: )
10276     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10277 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10278     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10279 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10280     ac_header_preproc=yes
10281     ;;
10282   no:yes:* )
10283     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10284 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10285     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10286 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10287     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10288 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10289     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10290 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10291     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10292 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10293     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10294 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10295     (
10296       cat <<\_ASBOX
10297 ## ---------------------------------------- ##
10298 ## Report this to pgsql-bugs@postgresql.org ##
10299 ## ---------------------------------------- ##
10300 _ASBOX
10301     ) |
10302       sed "s/^/$as_me: WARNING:     /" >&2
10303     ;;
10304 esac
10305 echo "$as_me:$LINENO: checking for $ac_header" >&5
10306 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10307 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10308   echo $ECHO_N "(cached) $ECHO_C" >&6
10309 else
10310   eval "$as_ac_Header=\$ac_header_preproc"
10311 fi
10312 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10313 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10314
10315 fi
10316 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10317   cat >>confdefs.h <<_ACEOF
10318 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10319 _ACEOF
10320
10321 else
10322
10323 for ac_header in pam/pam_appl.h
10324 do
10325 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10326 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10327   echo "$as_me:$LINENO: checking for $ac_header" >&5
10328 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10329 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10330   echo $ECHO_N "(cached) $ECHO_C" >&6
10331 fi
10332 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10333 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10334 else
10335   # Is the header compilable?
10336 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10337 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10338 cat >conftest.$ac_ext <<_ACEOF
10339 /* confdefs.h.  */
10340 _ACEOF
10341 cat confdefs.h >>conftest.$ac_ext
10342 cat >>conftest.$ac_ext <<_ACEOF
10343 /* end confdefs.h.  */
10344 $ac_includes_default
10345 #include <$ac_header>
10346 _ACEOF
10347 rm -f conftest.$ac_objext
10348 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10349   (eval $ac_compile) 2>conftest.er1
10350   ac_status=$?
10351   grep -v '^ *+' conftest.er1 >conftest.err
10352   rm -f conftest.er1
10353   cat conftest.err >&5
10354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10355   (exit $ac_status); } &&
10356          { ac_try='test -z "$ac_c_werror_flag"
10357                          || test ! -s conftest.err'
10358   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10359   (eval $ac_try) 2>&5
10360   ac_status=$?
10361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10362   (exit $ac_status); }; } &&
10363          { ac_try='test -s conftest.$ac_objext'
10364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10365   (eval $ac_try) 2>&5
10366   ac_status=$?
10367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10368   (exit $ac_status); }; }; then
10369   ac_header_compiler=yes
10370 else
10371   echo "$as_me: failed program was:" >&5
10372 sed 's/^/| /' conftest.$ac_ext >&5
10373
10374 ac_header_compiler=no
10375 fi
10376 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10377 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10378 echo "${ECHO_T}$ac_header_compiler" >&6
10379
10380 # Is the header present?
10381 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10382 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10383 cat >conftest.$ac_ext <<_ACEOF
10384 /* confdefs.h.  */
10385 _ACEOF
10386 cat confdefs.h >>conftest.$ac_ext
10387 cat >>conftest.$ac_ext <<_ACEOF
10388 /* end confdefs.h.  */
10389 #include <$ac_header>
10390 _ACEOF
10391 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10392   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10393   ac_status=$?
10394   grep -v '^ *+' conftest.er1 >conftest.err
10395   rm -f conftest.er1
10396   cat conftest.err >&5
10397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10398   (exit $ac_status); } >/dev/null; then
10399   if test -s conftest.err; then
10400     ac_cpp_err=$ac_c_preproc_warn_flag
10401     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10402   else
10403     ac_cpp_err=
10404   fi
10405 else
10406   ac_cpp_err=yes
10407 fi
10408 if test -z "$ac_cpp_err"; then
10409   ac_header_preproc=yes
10410 else
10411   echo "$as_me: failed program was:" >&5
10412 sed 's/^/| /' conftest.$ac_ext >&5
10413
10414   ac_header_preproc=no
10415 fi
10416 rm -f conftest.err conftest.$ac_ext
10417 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10418 echo "${ECHO_T}$ac_header_preproc" >&6
10419
10420 # So?  What about this header?
10421 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10422   yes:no: )
10423     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10424 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10425     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10426 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10427     ac_header_preproc=yes
10428     ;;
10429   no:yes:* )
10430     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10431 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10432     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10433 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10434     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10435 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10436     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10437 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10438     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10439 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10440     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10441 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10442     (
10443       cat <<\_ASBOX
10444 ## ---------------------------------------- ##
10445 ## Report this to pgsql-bugs@postgresql.org ##
10446 ## ---------------------------------------- ##
10447 _ASBOX
10448     ) |
10449       sed "s/^/$as_me: WARNING:     /" >&2
10450     ;;
10451 esac
10452 echo "$as_me:$LINENO: checking for $ac_header" >&5
10453 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10454 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10455   echo $ECHO_N "(cached) $ECHO_C" >&6
10456 else
10457   eval "$as_ac_Header=\$ac_header_preproc"
10458 fi
10459 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10460 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10461
10462 fi
10463 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10464   cat >>confdefs.h <<_ACEOF
10465 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10466 _ACEOF
10467
10468 else
10469   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10470 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10471    { (exit 1); exit 1; }; }
10472 fi
10473
10474 done
10475
10476 fi
10477
10478 done
10479
10480 fi
10481
10482 if test "$with_libxml" = yes ; then
10483   if test "${ac_cv_header_libxml_parser_h+set}" = set; then
10484   echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
10485 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6
10486 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
10487   echo $ECHO_N "(cached) $ECHO_C" >&6
10488 fi
10489 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
10490 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6
10491 else
10492   # Is the header compilable?
10493 echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
10494 echo $ECHO_N "checking libxml/parser.h usability... $ECHO_C" >&6
10495 cat >conftest.$ac_ext <<_ACEOF
10496 /* confdefs.h.  */
10497 _ACEOF
10498 cat confdefs.h >>conftest.$ac_ext
10499 cat >>conftest.$ac_ext <<_ACEOF
10500 /* end confdefs.h.  */
10501 $ac_includes_default
10502 #include <libxml/parser.h>
10503 _ACEOF
10504 rm -f conftest.$ac_objext
10505 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10506   (eval $ac_compile) 2>conftest.er1
10507   ac_status=$?
10508   grep -v '^ *+' conftest.er1 >conftest.err
10509   rm -f conftest.er1
10510   cat conftest.err >&5
10511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10512   (exit $ac_status); } &&
10513          { ac_try='test -z "$ac_c_werror_flag"
10514                          || test ! -s conftest.err'
10515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10516   (eval $ac_try) 2>&5
10517   ac_status=$?
10518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10519   (exit $ac_status); }; } &&
10520          { ac_try='test -s conftest.$ac_objext'
10521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10522   (eval $ac_try) 2>&5
10523   ac_status=$?
10524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10525   (exit $ac_status); }; }; then
10526   ac_header_compiler=yes
10527 else
10528   echo "$as_me: failed program was:" >&5
10529 sed 's/^/| /' conftest.$ac_ext >&5
10530
10531 ac_header_compiler=no
10532 fi
10533 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10534 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10535 echo "${ECHO_T}$ac_header_compiler" >&6
10536
10537 # Is the header present?
10538 echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
10539 echo $ECHO_N "checking libxml/parser.h presence... $ECHO_C" >&6
10540 cat >conftest.$ac_ext <<_ACEOF
10541 /* confdefs.h.  */
10542 _ACEOF
10543 cat confdefs.h >>conftest.$ac_ext
10544 cat >>conftest.$ac_ext <<_ACEOF
10545 /* end confdefs.h.  */
10546 #include <libxml/parser.h>
10547 _ACEOF
10548 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10549   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10550   ac_status=$?
10551   grep -v '^ *+' conftest.er1 >conftest.err
10552   rm -f conftest.er1
10553   cat conftest.err >&5
10554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10555   (exit $ac_status); } >/dev/null; then
10556   if test -s conftest.err; then
10557     ac_cpp_err=$ac_c_preproc_warn_flag
10558     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10559   else
10560     ac_cpp_err=
10561   fi
10562 else
10563   ac_cpp_err=yes
10564 fi
10565 if test -z "$ac_cpp_err"; then
10566   ac_header_preproc=yes
10567 else
10568   echo "$as_me: failed program was:" >&5
10569 sed 's/^/| /' conftest.$ac_ext >&5
10570
10571   ac_header_preproc=no
10572 fi
10573 rm -f conftest.err conftest.$ac_ext
10574 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10575 echo "${ECHO_T}$ac_header_preproc" >&6
10576
10577 # So?  What about this header?
10578 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10579   yes:no: )
10580     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
10581 echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10582     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
10583 echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
10584     ac_header_preproc=yes
10585     ;;
10586   no:yes:* )
10587     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
10588 echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
10589     { echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
10590 echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
10591     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
10592 echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
10593     { echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
10594 echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10595     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
10596 echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
10597     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
10598 echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
10599     (
10600       cat <<\_ASBOX
10601 ## ---------------------------------------- ##
10602 ## Report this to pgsql-bugs@postgresql.org ##
10603 ## ---------------------------------------- ##
10604 _ASBOX
10605     ) |
10606       sed "s/^/$as_me: WARNING:     /" >&2
10607     ;;
10608 esac
10609 echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
10610 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6
10611 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
10612   echo $ECHO_N "(cached) $ECHO_C" >&6
10613 else
10614   ac_cv_header_libxml_parser_h=$ac_header_preproc
10615 fi
10616 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
10617 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6
10618
10619 fi
10620 if test $ac_cv_header_libxml_parser_h = yes; then
10621   :
10622 else
10623   { { echo "$as_me:$LINENO: error: header file <libxml/parser.h> is required for XML support" >&5
10624 echo "$as_me: error: header file <libxml/parser.h> is required for XML support" >&2;}
10625    { (exit 1); exit 1; }; }
10626 fi
10627
10628
10629 fi
10630
10631 if test "$with_ldap" = yes ; then
10632   if test "$PORTNAME" != "win32"; then
10633
10634 for ac_header in ldap.h
10635 do
10636 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10637 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10638   echo "$as_me:$LINENO: checking for $ac_header" >&5
10639 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10640 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10641   echo $ECHO_N "(cached) $ECHO_C" >&6
10642 fi
10643 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10644 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10645 else
10646   # Is the header compilable?
10647 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10648 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10649 cat >conftest.$ac_ext <<_ACEOF
10650 /* confdefs.h.  */
10651 _ACEOF
10652 cat confdefs.h >>conftest.$ac_ext
10653 cat >>conftest.$ac_ext <<_ACEOF
10654 /* end confdefs.h.  */
10655 $ac_includes_default
10656 #include <$ac_header>
10657 _ACEOF
10658 rm -f conftest.$ac_objext
10659 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10660   (eval $ac_compile) 2>conftest.er1
10661   ac_status=$?
10662   grep -v '^ *+' conftest.er1 >conftest.err
10663   rm -f conftest.er1
10664   cat conftest.err >&5
10665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10666   (exit $ac_status); } &&
10667          { ac_try='test -z "$ac_c_werror_flag"
10668                          || test ! -s conftest.err'
10669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10670   (eval $ac_try) 2>&5
10671   ac_status=$?
10672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10673   (exit $ac_status); }; } &&
10674          { ac_try='test -s conftest.$ac_objext'
10675   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10676   (eval $ac_try) 2>&5
10677   ac_status=$?
10678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10679   (exit $ac_status); }; }; then
10680   ac_header_compiler=yes
10681 else
10682   echo "$as_me: failed program was:" >&5
10683 sed 's/^/| /' conftest.$ac_ext >&5
10684
10685 ac_header_compiler=no
10686 fi
10687 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10688 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10689 echo "${ECHO_T}$ac_header_compiler" >&6
10690
10691 # Is the header present?
10692 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10693 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10694 cat >conftest.$ac_ext <<_ACEOF
10695 /* confdefs.h.  */
10696 _ACEOF
10697 cat confdefs.h >>conftest.$ac_ext
10698 cat >>conftest.$ac_ext <<_ACEOF
10699 /* end confdefs.h.  */
10700 #include <$ac_header>
10701 _ACEOF
10702 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10703   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10704   ac_status=$?
10705   grep -v '^ *+' conftest.er1 >conftest.err
10706   rm -f conftest.er1
10707   cat conftest.err >&5
10708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10709   (exit $ac_status); } >/dev/null; then
10710   if test -s conftest.err; then
10711     ac_cpp_err=$ac_c_preproc_warn_flag
10712     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10713   else
10714     ac_cpp_err=
10715   fi
10716 else
10717   ac_cpp_err=yes
10718 fi
10719 if test -z "$ac_cpp_err"; then
10720   ac_header_preproc=yes
10721 else
10722   echo "$as_me: failed program was:" >&5
10723 sed 's/^/| /' conftest.$ac_ext >&5
10724
10725   ac_header_preproc=no
10726 fi
10727 rm -f conftest.err conftest.$ac_ext
10728 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10729 echo "${ECHO_T}$ac_header_preproc" >&6
10730
10731 # So?  What about this header?
10732 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10733   yes:no: )
10734     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10735 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10736     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10737 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10738     ac_header_preproc=yes
10739     ;;
10740   no:yes:* )
10741     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10742 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10743     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10744 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10745     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10746 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10747     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10748 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10749     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10750 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10751     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10752 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10753     (
10754       cat <<\_ASBOX
10755 ## ---------------------------------------- ##
10756 ## Report this to pgsql-bugs@postgresql.org ##
10757 ## ---------------------------------------- ##
10758 _ASBOX
10759     ) |
10760       sed "s/^/$as_me: WARNING:     /" >&2
10761     ;;
10762 esac
10763 echo "$as_me:$LINENO: checking for $ac_header" >&5
10764 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10765 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10766   echo $ECHO_N "(cached) $ECHO_C" >&6
10767 else
10768   eval "$as_ac_Header=\$ac_header_preproc"
10769 fi
10770 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10771 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10772
10773 fi
10774 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10775   cat >>confdefs.h <<_ACEOF
10776 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10777 _ACEOF
10778
10779 else
10780   { { echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
10781 echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
10782    { (exit 1); exit 1; }; }
10783 fi
10784
10785 done
10786
10787   else
10788
10789 for ac_header in winldap.h
10790 do
10791 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10792 echo "$as_me:$LINENO: checking for $ac_header" >&5
10793 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10794 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10795   echo $ECHO_N "(cached) $ECHO_C" >&6
10796 else
10797   cat >conftest.$ac_ext <<_ACEOF
10798 /* confdefs.h.  */
10799 _ACEOF
10800 cat confdefs.h >>conftest.$ac_ext
10801 cat >>conftest.$ac_ext <<_ACEOF
10802 /* end confdefs.h.  */
10803 $ac_includes_default
10804 #include <windows.h>
10805
10806
10807 #include <$ac_header>
10808 _ACEOF
10809 rm -f conftest.$ac_objext
10810 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10811   (eval $ac_compile) 2>conftest.er1
10812   ac_status=$?
10813   grep -v '^ *+' conftest.er1 >conftest.err
10814   rm -f conftest.er1
10815   cat conftest.err >&5
10816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10817   (exit $ac_status); } &&
10818          { ac_try='test -z "$ac_c_werror_flag"
10819                          || test ! -s conftest.err'
10820   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10821   (eval $ac_try) 2>&5
10822   ac_status=$?
10823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10824   (exit $ac_status); }; } &&
10825          { ac_try='test -s conftest.$ac_objext'
10826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10827   (eval $ac_try) 2>&5
10828   ac_status=$?
10829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10830   (exit $ac_status); }; }; then
10831   eval "$as_ac_Header=yes"
10832 else
10833   echo "$as_me: failed program was:" >&5
10834 sed 's/^/| /' conftest.$ac_ext >&5
10835
10836 eval "$as_ac_Header=no"
10837 fi
10838 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10839 fi
10840 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10841 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10842 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10843   cat >>confdefs.h <<_ACEOF
10844 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10845 _ACEOF
10846
10847 else
10848   { { echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
10849 echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
10850    { (exit 1); exit 1; }; }
10851 fi
10852
10853 done
10854
10855   fi
10856 fi
10857
10858 if test "$with_bonjour" = yes ; then
10859   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10860   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10861 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10862 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10863   echo $ECHO_N "(cached) $ECHO_C" >&6
10864 fi
10865 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10866 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10867 else
10868   # Is the header compilable?
10869 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10870 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10871 cat >conftest.$ac_ext <<_ACEOF
10872 /* confdefs.h.  */
10873 _ACEOF
10874 cat confdefs.h >>conftest.$ac_ext
10875 cat >>conftest.$ac_ext <<_ACEOF
10876 /* end confdefs.h.  */
10877 $ac_includes_default
10878 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10879 _ACEOF
10880 rm -f conftest.$ac_objext
10881 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10882   (eval $ac_compile) 2>conftest.er1
10883   ac_status=$?
10884   grep -v '^ *+' conftest.er1 >conftest.err
10885   rm -f conftest.er1
10886   cat conftest.err >&5
10887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10888   (exit $ac_status); } &&
10889          { ac_try='test -z "$ac_c_werror_flag"
10890                          || test ! -s conftest.err'
10891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10892   (eval $ac_try) 2>&5
10893   ac_status=$?
10894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10895   (exit $ac_status); }; } &&
10896          { ac_try='test -s conftest.$ac_objext'
10897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10898   (eval $ac_try) 2>&5
10899   ac_status=$?
10900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10901   (exit $ac_status); }; }; then
10902   ac_header_compiler=yes
10903 else
10904   echo "$as_me: failed program was:" >&5
10905 sed 's/^/| /' conftest.$ac_ext >&5
10906
10907 ac_header_compiler=no
10908 fi
10909 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10910 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10911 echo "${ECHO_T}$ac_header_compiler" >&6
10912
10913 # Is the header present?
10914 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10915 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
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 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10923 _ACEOF
10924 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10925   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10926   ac_status=$?
10927   grep -v '^ *+' conftest.er1 >conftest.err
10928   rm -f conftest.er1
10929   cat conftest.err >&5
10930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10931   (exit $ac_status); } >/dev/null; then
10932   if test -s conftest.err; then
10933     ac_cpp_err=$ac_c_preproc_warn_flag
10934     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10935   else
10936     ac_cpp_err=
10937   fi
10938 else
10939   ac_cpp_err=yes
10940 fi
10941 if test -z "$ac_cpp_err"; then
10942   ac_header_preproc=yes
10943 else
10944   echo "$as_me: failed program was:" >&5
10945 sed 's/^/| /' conftest.$ac_ext >&5
10946
10947   ac_header_preproc=no
10948 fi
10949 rm -f conftest.err conftest.$ac_ext
10950 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10951 echo "${ECHO_T}$ac_header_preproc" >&6
10952
10953 # So?  What about this header?
10954 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10955   yes:no: )
10956     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
10957 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10958     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
10959 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
10960     ac_header_preproc=yes
10961     ;;
10962   no:yes:* )
10963     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
10964 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
10965     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
10966 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
10967     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
10968 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
10969     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
10970 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10971     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
10972 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
10973     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
10974 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
10975     (
10976       cat <<\_ASBOX
10977 ## ---------------------------------------- ##
10978 ## Report this to pgsql-bugs@postgresql.org ##
10979 ## ---------------------------------------- ##
10980 _ASBOX
10981     ) |
10982       sed "s/^/$as_me: WARNING:     /" >&2
10983     ;;
10984 esac
10985 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10986 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10987 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10988   echo $ECHO_N "(cached) $ECHO_C" >&6
10989 else
10990   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
10991 fi
10992 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10993 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10994
10995 fi
10996 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
10997   :
10998 else
10999   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
11000 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
11001    { (exit 1); exit 1; }; }
11002 fi
11003
11004
11005 fi
11006
11007
11008 ##
11009 ## Types, structures, compiler characteristics
11010 ##
11011
11012  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
11013 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11014 if test "${ac_cv_c_const+set}" = set; then
11015   echo $ECHO_N "(cached) $ECHO_C" >&6
11016 else
11017   cat >conftest.$ac_ext <<_ACEOF
11018 /* confdefs.h.  */
11019 _ACEOF
11020 cat confdefs.h >>conftest.$ac_ext
11021 cat >>conftest.$ac_ext <<_ACEOF
11022 /* end confdefs.h.  */
11023
11024 int
11025 main ()
11026 {
11027 /* FIXME: Include the comments suggested by Paul. */
11028 #ifndef __cplusplus
11029   /* Ultrix mips cc rejects this.  */
11030   typedef int charset[2];
11031   const charset x;
11032   /* SunOS 4.1.1 cc rejects this.  */
11033   char const *const *ccp;
11034   char **p;
11035   /* NEC SVR4.0.2 mips cc rejects this.  */
11036   struct point {int x, y;};
11037   static struct point const zero = {0,0};
11038   /* AIX XL C 1.02.0.0 rejects this.
11039      It does not let you subtract one const X* pointer from another in
11040      an arm of an if-expression whose if-part is not a constant
11041      expression */
11042   const char *g = "string";
11043   ccp = &g + (g ? g-g : 0);
11044   /* HPUX 7.0 cc rejects these. */
11045   ++ccp;
11046   p = (char**) ccp;
11047   ccp = (char const *const *) p;
11048   { /* SCO 3.2v4 cc rejects this.  */
11049     char *t;
11050     char const *s = 0 ? (char *) 0 : (char const *) 0;
11051
11052     *t++ = 0;
11053   }
11054   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11055     int x[] = {25, 17};
11056     const int *foo = &x[0];
11057     ++foo;
11058   }
11059   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11060     typedef const int *iptr;
11061     iptr p = 0;
11062     ++p;
11063   }
11064   { /* AIX XL C 1.02.0.0 rejects this saying
11065        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11066     struct s { int j; const int *ap[3]; };
11067     struct s *b; b->j = 5;
11068   }
11069   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11070     const int foo = 10;
11071   }
11072 #endif
11073
11074   ;
11075   return 0;
11076 }
11077 _ACEOF
11078 rm -f conftest.$ac_objext
11079 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11080   (eval $ac_compile) 2>conftest.er1
11081   ac_status=$?
11082   grep -v '^ *+' conftest.er1 >conftest.err
11083   rm -f conftest.er1
11084   cat conftest.err >&5
11085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11086   (exit $ac_status); } &&
11087          { ac_try='test -z "$ac_c_werror_flag"
11088                          || test ! -s conftest.err'
11089   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11090   (eval $ac_try) 2>&5
11091   ac_status=$?
11092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11093   (exit $ac_status); }; } &&
11094          { ac_try='test -s conftest.$ac_objext'
11095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11096   (eval $ac_try) 2>&5
11097   ac_status=$?
11098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11099   (exit $ac_status); }; }; then
11100   ac_cv_c_const=yes
11101 else
11102   echo "$as_me: failed program was:" >&5
11103 sed 's/^/| /' conftest.$ac_ext >&5
11104
11105 ac_cv_c_const=no
11106 fi
11107 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11108 fi
11109 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
11110 echo "${ECHO_T}$ac_cv_c_const" >&6
11111 if test $ac_cv_c_const = no; then
11112
11113 cat >>confdefs.h <<\_ACEOF
11114 #define const
11115 _ACEOF
11116
11117 fi
11118
11119
11120 echo "$as_me:$LINENO: checking for inline" >&5
11121 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11122 if test "${ac_cv_c_inline+set}" = set; then
11123   echo $ECHO_N "(cached) $ECHO_C" >&6
11124 else
11125   ac_cv_c_inline=no
11126 for ac_kw in inline __inline__ __inline; do
11127   cat >conftest.$ac_ext <<_ACEOF
11128 /* confdefs.h.  */
11129 _ACEOF
11130 cat confdefs.h >>conftest.$ac_ext
11131 cat >>conftest.$ac_ext <<_ACEOF
11132 /* end confdefs.h.  */
11133 #ifndef __cplusplus
11134 typedef int foo_t;
11135 static $ac_kw foo_t static_foo () {return 0; }
11136 $ac_kw int foo () {return 0; }
11137 #endif
11138
11139 _ACEOF
11140 rm -f conftest.$ac_objext
11141 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11142   (eval $ac_compile) 2>conftest.er1
11143   ac_status=$?
11144   grep -v '^ *+' conftest.er1 >conftest.err
11145   rm -f conftest.er1
11146   cat conftest.err >&5
11147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11148   (exit $ac_status); } &&
11149          { ac_try='test -z "$ac_c_werror_flag"
11150                          || test ! -s conftest.err'
11151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11152   (eval $ac_try) 2>&5
11153   ac_status=$?
11154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11155   (exit $ac_status); }; } &&
11156          { ac_try='test -s conftest.$ac_objext'
11157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11158   (eval $ac_try) 2>&5
11159   ac_status=$?
11160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11161   (exit $ac_status); }; }; then
11162   ac_cv_c_inline=$ac_kw; break
11163 else
11164   echo "$as_me: failed program was:" >&5
11165 sed 's/^/| /' conftest.$ac_ext >&5
11166
11167 fi
11168 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11169 done
11170
11171 fi
11172 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
11173 echo "${ECHO_T}$ac_cv_c_inline" >&6
11174 case $ac_cv_c_inline in
11175   inline | yes) ;;
11176   no)
11177 cat >>confdefs.h <<\_ACEOF
11178 #define inline
11179 _ACEOF
11180  ;;
11181   *)  cat >>confdefs.h <<_ACEOF
11182 #define inline $ac_cv_c_inline
11183 _ACEOF
11184  ;;
11185 esac
11186
11187 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
11188 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
11189 if test "${ac_cv_c_stringize+set}" = set; then
11190   echo $ECHO_N "(cached) $ECHO_C" >&6
11191 else
11192   cat >conftest.$ac_ext <<_ACEOF
11193 /* confdefs.h.  */
11194 _ACEOF
11195 cat confdefs.h >>conftest.$ac_ext
11196 cat >>conftest.$ac_ext <<_ACEOF
11197 /* end confdefs.h.  */
11198 #define x(y) #y
11199
11200 char *s = x(teststring);
11201 _ACEOF
11202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11203   $EGREP "#teststring" >/dev/null 2>&1; then
11204   ac_cv_c_stringize=no
11205 else
11206   ac_cv_c_stringize=yes
11207 fi
11208 rm -f conftest*
11209
11210 fi
11211 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
11212 echo "${ECHO_T}$ac_cv_c_stringize" >&6
11213 if test $ac_cv_c_stringize = yes; then
11214
11215 cat >>confdefs.h <<\_ACEOF
11216 #define HAVE_STRINGIZE 1
11217 _ACEOF
11218
11219 fi
11220
11221 echo "$as_me:$LINENO: checking for signed types" >&5
11222 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11223 if test "${pgac_cv_c_signed+set}" = set; then
11224   echo $ECHO_N "(cached) $ECHO_C" >&6
11225 else
11226   cat >conftest.$ac_ext <<_ACEOF
11227 /* confdefs.h.  */
11228 _ACEOF
11229 cat confdefs.h >>conftest.$ac_ext
11230 cat >>conftest.$ac_ext <<_ACEOF
11231 /* end confdefs.h.  */
11232
11233 int
11234 main ()
11235 {
11236 signed char c; signed short s; signed int i;
11237   ;
11238   return 0;
11239 }
11240 _ACEOF
11241 rm -f conftest.$ac_objext
11242 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11243   (eval $ac_compile) 2>conftest.er1
11244   ac_status=$?
11245   grep -v '^ *+' conftest.er1 >conftest.err
11246   rm -f conftest.er1
11247   cat conftest.err >&5
11248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11249   (exit $ac_status); } &&
11250          { ac_try='test -z "$ac_c_werror_flag"
11251                          || test ! -s conftest.err'
11252   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11253   (eval $ac_try) 2>&5
11254   ac_status=$?
11255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11256   (exit $ac_status); }; } &&
11257          { ac_try='test -s conftest.$ac_objext'
11258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11259   (eval $ac_try) 2>&5
11260   ac_status=$?
11261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11262   (exit $ac_status); }; }; then
11263   pgac_cv_c_signed=yes
11264 else
11265   echo "$as_me: failed program was:" >&5
11266 sed 's/^/| /' conftest.$ac_ext >&5
11267
11268 pgac_cv_c_signed=no
11269 fi
11270 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11271 fi
11272 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11273 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11274 if test x"$pgac_cv_c_signed" = xno ; then
11275
11276 cat >>confdefs.h <<\_ACEOF
11277 #define signed
11278 _ACEOF
11279
11280 fi
11281 echo "$as_me:$LINENO: checking for working volatile" >&5
11282 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11283 if test "${ac_cv_c_volatile+set}" = set; then
11284   echo $ECHO_N "(cached) $ECHO_C" >&6
11285 else
11286   cat >conftest.$ac_ext <<_ACEOF
11287 /* confdefs.h.  */
11288 _ACEOF
11289 cat confdefs.h >>conftest.$ac_ext
11290 cat >>conftest.$ac_ext <<_ACEOF
11291 /* end confdefs.h.  */
11292
11293 int
11294 main ()
11295 {
11296
11297 volatile int x;
11298 int * volatile y;
11299   ;
11300   return 0;
11301 }
11302 _ACEOF
11303 rm -f conftest.$ac_objext
11304 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11305   (eval $ac_compile) 2>conftest.er1
11306   ac_status=$?
11307   grep -v '^ *+' conftest.er1 >conftest.err
11308   rm -f conftest.er1
11309   cat conftest.err >&5
11310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11311   (exit $ac_status); } &&
11312          { ac_try='test -z "$ac_c_werror_flag"
11313                          || test ! -s conftest.err'
11314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11315   (eval $ac_try) 2>&5
11316   ac_status=$?
11317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11318   (exit $ac_status); }; } &&
11319          { ac_try='test -s conftest.$ac_objext'
11320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11321   (eval $ac_try) 2>&5
11322   ac_status=$?
11323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11324   (exit $ac_status); }; }; then
11325   ac_cv_c_volatile=yes
11326 else
11327   echo "$as_me: failed program was:" >&5
11328 sed 's/^/| /' conftest.$ac_ext >&5
11329
11330 ac_cv_c_volatile=no
11331 fi
11332 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11333 fi
11334 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11335 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11336 if test $ac_cv_c_volatile = no; then
11337
11338 cat >>confdefs.h <<\_ACEOF
11339 #define volatile
11340 _ACEOF
11341
11342 fi
11343
11344 echo "$as_me:$LINENO: checking for __func__" >&5
11345 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11346 if test "${pgac_cv_funcname_func_support+set}" = set; then
11347   echo $ECHO_N "(cached) $ECHO_C" >&6
11348 else
11349   cat >conftest.$ac_ext <<_ACEOF
11350 /* confdefs.h.  */
11351 _ACEOF
11352 cat confdefs.h >>conftest.$ac_ext
11353 cat >>conftest.$ac_ext <<_ACEOF
11354 /* end confdefs.h.  */
11355 #include <stdio.h>
11356 int
11357 main ()
11358 {
11359 printf("%s\n", __func__);
11360   ;
11361   return 0;
11362 }
11363 _ACEOF
11364 rm -f conftest.$ac_objext
11365 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11366   (eval $ac_compile) 2>conftest.er1
11367   ac_status=$?
11368   grep -v '^ *+' conftest.er1 >conftest.err
11369   rm -f conftest.er1
11370   cat conftest.err >&5
11371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11372   (exit $ac_status); } &&
11373          { ac_try='test -z "$ac_c_werror_flag"
11374                          || test ! -s conftest.err'
11375   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11376   (eval $ac_try) 2>&5
11377   ac_status=$?
11378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11379   (exit $ac_status); }; } &&
11380          { ac_try='test -s conftest.$ac_objext'
11381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11382   (eval $ac_try) 2>&5
11383   ac_status=$?
11384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11385   (exit $ac_status); }; }; then
11386   pgac_cv_funcname_func_support=yes
11387 else
11388   echo "$as_me: failed program was:" >&5
11389 sed 's/^/| /' conftest.$ac_ext >&5
11390
11391 pgac_cv_funcname_func_support=no
11392 fi
11393 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11394 fi
11395 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11396 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11397 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11398
11399 cat >>confdefs.h <<\_ACEOF
11400 #define HAVE_FUNCNAME__FUNC 1
11401 _ACEOF
11402
11403 else
11404 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11405 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11406 if test "${pgac_cv_funcname_function_support+set}" = set; then
11407   echo $ECHO_N "(cached) $ECHO_C" >&6
11408 else
11409   cat >conftest.$ac_ext <<_ACEOF
11410 /* confdefs.h.  */
11411 _ACEOF
11412 cat confdefs.h >>conftest.$ac_ext
11413 cat >>conftest.$ac_ext <<_ACEOF
11414 /* end confdefs.h.  */
11415 #include <stdio.h>
11416 int
11417 main ()
11418 {
11419 printf("%s\n", __FUNCTION__);
11420   ;
11421   return 0;
11422 }
11423 _ACEOF
11424 rm -f conftest.$ac_objext
11425 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11426   (eval $ac_compile) 2>conftest.er1
11427   ac_status=$?
11428   grep -v '^ *+' conftest.er1 >conftest.err
11429   rm -f conftest.er1
11430   cat conftest.err >&5
11431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11432   (exit $ac_status); } &&
11433          { ac_try='test -z "$ac_c_werror_flag"
11434                          || test ! -s conftest.err'
11435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11436   (eval $ac_try) 2>&5
11437   ac_status=$?
11438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11439   (exit $ac_status); }; } &&
11440          { ac_try='test -s conftest.$ac_objext'
11441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11442   (eval $ac_try) 2>&5
11443   ac_status=$?
11444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11445   (exit $ac_status); }; }; then
11446   pgac_cv_funcname_function_support=yes
11447 else
11448   echo "$as_me: failed program was:" >&5
11449 sed 's/^/| /' conftest.$ac_ext >&5
11450
11451 pgac_cv_funcname_function_support=no
11452 fi
11453 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11454 fi
11455 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11456 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11457 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11458
11459 cat >>confdefs.h <<\_ACEOF
11460 #define HAVE_FUNCNAME__FUNCTION 1
11461 _ACEOF
11462
11463 fi
11464 fi
11465 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11466 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11467 if test "${ac_cv_struct_tm+set}" = set; then
11468   echo $ECHO_N "(cached) $ECHO_C" >&6
11469 else
11470   cat >conftest.$ac_ext <<_ACEOF
11471 /* confdefs.h.  */
11472 _ACEOF
11473 cat confdefs.h >>conftest.$ac_ext
11474 cat >>conftest.$ac_ext <<_ACEOF
11475 /* end confdefs.h.  */
11476 #include <sys/types.h>
11477 #include <time.h>
11478
11479 int
11480 main ()
11481 {
11482 struct tm *tp; tp->tm_sec;
11483   ;
11484   return 0;
11485 }
11486 _ACEOF
11487 rm -f conftest.$ac_objext
11488 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11489   (eval $ac_compile) 2>conftest.er1
11490   ac_status=$?
11491   grep -v '^ *+' conftest.er1 >conftest.err
11492   rm -f conftest.er1
11493   cat conftest.err >&5
11494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11495   (exit $ac_status); } &&
11496          { ac_try='test -z "$ac_c_werror_flag"
11497                          || test ! -s conftest.err'
11498   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11499   (eval $ac_try) 2>&5
11500   ac_status=$?
11501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11502   (exit $ac_status); }; } &&
11503          { ac_try='test -s conftest.$ac_objext'
11504   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11505   (eval $ac_try) 2>&5
11506   ac_status=$?
11507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11508   (exit $ac_status); }; }; then
11509   ac_cv_struct_tm=time.h
11510 else
11511   echo "$as_me: failed program was:" >&5
11512 sed 's/^/| /' conftest.$ac_ext >&5
11513
11514 ac_cv_struct_tm=sys/time.h
11515 fi
11516 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11517 fi
11518 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11519 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11520 if test $ac_cv_struct_tm = sys/time.h; then
11521
11522 cat >>confdefs.h <<\_ACEOF
11523 #define TM_IN_SYS_TIME 1
11524 _ACEOF
11525
11526 fi
11527
11528 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11529 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11530 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11531   echo $ECHO_N "(cached) $ECHO_C" >&6
11532 else
11533   cat >conftest.$ac_ext <<_ACEOF
11534 /* confdefs.h.  */
11535 _ACEOF
11536 cat confdefs.h >>conftest.$ac_ext
11537 cat >>conftest.$ac_ext <<_ACEOF
11538 /* end confdefs.h.  */
11539 #include <sys/types.h>
11540 #include <$ac_cv_struct_tm>
11541
11542
11543 int
11544 main ()
11545 {
11546 static struct tm ac_aggr;
11547 if (ac_aggr.tm_zone)
11548 return 0;
11549   ;
11550   return 0;
11551 }
11552 _ACEOF
11553 rm -f conftest.$ac_objext
11554 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11555   (eval $ac_compile) 2>conftest.er1
11556   ac_status=$?
11557   grep -v '^ *+' conftest.er1 >conftest.err
11558   rm -f conftest.er1
11559   cat conftest.err >&5
11560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11561   (exit $ac_status); } &&
11562          { ac_try='test -z "$ac_c_werror_flag"
11563                          || test ! -s conftest.err'
11564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11565   (eval $ac_try) 2>&5
11566   ac_status=$?
11567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11568   (exit $ac_status); }; } &&
11569          { ac_try='test -s conftest.$ac_objext'
11570   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11571   (eval $ac_try) 2>&5
11572   ac_status=$?
11573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11574   (exit $ac_status); }; }; then
11575   ac_cv_member_struct_tm_tm_zone=yes
11576 else
11577   echo "$as_me: failed program was:" >&5
11578 sed 's/^/| /' conftest.$ac_ext >&5
11579
11580 cat >conftest.$ac_ext <<_ACEOF
11581 /* confdefs.h.  */
11582 _ACEOF
11583 cat confdefs.h >>conftest.$ac_ext
11584 cat >>conftest.$ac_ext <<_ACEOF
11585 /* end confdefs.h.  */
11586 #include <sys/types.h>
11587 #include <$ac_cv_struct_tm>
11588
11589
11590 int
11591 main ()
11592 {
11593 static struct tm ac_aggr;
11594 if (sizeof ac_aggr.tm_zone)
11595 return 0;
11596   ;
11597   return 0;
11598 }
11599 _ACEOF
11600 rm -f conftest.$ac_objext
11601 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11602   (eval $ac_compile) 2>conftest.er1
11603   ac_status=$?
11604   grep -v '^ *+' conftest.er1 >conftest.err
11605   rm -f conftest.er1
11606   cat conftest.err >&5
11607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11608   (exit $ac_status); } &&
11609          { ac_try='test -z "$ac_c_werror_flag"
11610                          || test ! -s conftest.err'
11611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11612   (eval $ac_try) 2>&5
11613   ac_status=$?
11614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11615   (exit $ac_status); }; } &&
11616          { ac_try='test -s conftest.$ac_objext'
11617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11618   (eval $ac_try) 2>&5
11619   ac_status=$?
11620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11621   (exit $ac_status); }; }; then
11622   ac_cv_member_struct_tm_tm_zone=yes
11623 else
11624   echo "$as_me: failed program was:" >&5
11625 sed 's/^/| /' conftest.$ac_ext >&5
11626
11627 ac_cv_member_struct_tm_tm_zone=no
11628 fi
11629 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11630 fi
11631 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11632 fi
11633 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11634 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11635 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11636
11637 cat >>confdefs.h <<_ACEOF
11638 #define HAVE_STRUCT_TM_TM_ZONE 1
11639 _ACEOF
11640
11641
11642 fi
11643
11644 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11645
11646 cat >>confdefs.h <<\_ACEOF
11647 #define HAVE_TM_ZONE 1
11648 _ACEOF
11649
11650 fi
11651 echo "$as_me:$LINENO: checking for tzname" >&5
11652 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11653 if test "${ac_cv_var_tzname+set}" = set; then
11654   echo $ECHO_N "(cached) $ECHO_C" >&6
11655 else
11656   cat >conftest.$ac_ext <<_ACEOF
11657 /* confdefs.h.  */
11658 _ACEOF
11659 cat confdefs.h >>conftest.$ac_ext
11660 cat >>conftest.$ac_ext <<_ACEOF
11661 /* end confdefs.h.  */
11662 #include <time.h>
11663 #ifndef tzname /* For SGI.  */
11664 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11665 #endif
11666
11667 int
11668 main ()
11669 {
11670 atoi(*tzname);
11671   ;
11672   return 0;
11673 }
11674 _ACEOF
11675 rm -f conftest.$ac_objext conftest$ac_exeext
11676 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11677   (eval $ac_link) 2>conftest.er1
11678   ac_status=$?
11679   grep -v '^ *+' conftest.er1 >conftest.err
11680   rm -f conftest.er1
11681   cat conftest.err >&5
11682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11683   (exit $ac_status); } &&
11684          { ac_try='test -z "$ac_c_werror_flag"
11685                          || test ! -s conftest.err'
11686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11687   (eval $ac_try) 2>&5
11688   ac_status=$?
11689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11690   (exit $ac_status); }; } &&
11691          { ac_try='test -s conftest$ac_exeext'
11692   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11693   (eval $ac_try) 2>&5
11694   ac_status=$?
11695   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11696   (exit $ac_status); }; }; then
11697   ac_cv_var_tzname=yes
11698 else
11699   echo "$as_me: failed program was:" >&5
11700 sed 's/^/| /' conftest.$ac_ext >&5
11701
11702 ac_cv_var_tzname=no
11703 fi
11704 rm -f conftest.err conftest.$ac_objext \
11705       conftest$ac_exeext conftest.$ac_ext
11706 fi
11707 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11708 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11709 if test $ac_cv_var_tzname = yes; then
11710
11711 cat >>confdefs.h <<\_ACEOF
11712 #define HAVE_TZNAME 1
11713 _ACEOF
11714
11715 fi
11716
11717 echo "$as_me:$LINENO: checking for union semun" >&5
11718 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11719 if test "${ac_cv_type_union_semun+set}" = set; then
11720   echo $ECHO_N "(cached) $ECHO_C" >&6
11721 else
11722   cat >conftest.$ac_ext <<_ACEOF
11723 /* confdefs.h.  */
11724 _ACEOF
11725 cat confdefs.h >>conftest.$ac_ext
11726 cat >>conftest.$ac_ext <<_ACEOF
11727 /* end confdefs.h.  */
11728 #include <sys/types.h>
11729 #include <sys/ipc.h>
11730 #include <sys/sem.h>
11731
11732 int
11733 main ()
11734 {
11735 if ((union semun *) 0)
11736   return 0;
11737 if (sizeof (union semun))
11738   return 0;
11739   ;
11740   return 0;
11741 }
11742 _ACEOF
11743 rm -f conftest.$ac_objext
11744 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11745   (eval $ac_compile) 2>conftest.er1
11746   ac_status=$?
11747   grep -v '^ *+' conftest.er1 >conftest.err
11748   rm -f conftest.er1
11749   cat conftest.err >&5
11750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11751   (exit $ac_status); } &&
11752          { ac_try='test -z "$ac_c_werror_flag"
11753                          || test ! -s conftest.err'
11754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11755   (eval $ac_try) 2>&5
11756   ac_status=$?
11757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11758   (exit $ac_status); }; } &&
11759          { ac_try='test -s conftest.$ac_objext'
11760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11761   (eval $ac_try) 2>&5
11762   ac_status=$?
11763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11764   (exit $ac_status); }; }; then
11765   ac_cv_type_union_semun=yes
11766 else
11767   echo "$as_me: failed program was:" >&5
11768 sed 's/^/| /' conftest.$ac_ext >&5
11769
11770 ac_cv_type_union_semun=no
11771 fi
11772 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11773 fi
11774 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11775 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11776 if test $ac_cv_type_union_semun = yes; then
11777
11778 cat >>confdefs.h <<_ACEOF
11779 #define HAVE_UNION_SEMUN 1
11780 _ACEOF
11781
11782
11783 fi
11784
11785 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11786 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11787 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11788   echo $ECHO_N "(cached) $ECHO_C" >&6
11789 else
11790   cat >conftest.$ac_ext <<_ACEOF
11791 /* confdefs.h.  */
11792 _ACEOF
11793 cat confdefs.h >>conftest.$ac_ext
11794 cat >>conftest.$ac_ext <<_ACEOF
11795 /* end confdefs.h.  */
11796 #include <sys/types.h>
11797 #ifdef HAVE_SYS_UN_H
11798 #include <sys/un.h>
11799 #endif
11800
11801
11802 int
11803 main ()
11804 {
11805 if ((struct sockaddr_un *) 0)
11806   return 0;
11807 if (sizeof (struct sockaddr_un))
11808   return 0;
11809   ;
11810   return 0;
11811 }
11812 _ACEOF
11813 rm -f conftest.$ac_objext
11814 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11815   (eval $ac_compile) 2>conftest.er1
11816   ac_status=$?
11817   grep -v '^ *+' conftest.er1 >conftest.err
11818   rm -f conftest.er1
11819   cat conftest.err >&5
11820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11821   (exit $ac_status); } &&
11822          { ac_try='test -z "$ac_c_werror_flag"
11823                          || test ! -s conftest.err'
11824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11825   (eval $ac_try) 2>&5
11826   ac_status=$?
11827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11828   (exit $ac_status); }; } &&
11829          { ac_try='test -s conftest.$ac_objext'
11830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11831   (eval $ac_try) 2>&5
11832   ac_status=$?
11833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11834   (exit $ac_status); }; }; then
11835   ac_cv_type_struct_sockaddr_un=yes
11836 else
11837   echo "$as_me: failed program was:" >&5
11838 sed 's/^/| /' conftest.$ac_ext >&5
11839
11840 ac_cv_type_struct_sockaddr_un=no
11841 fi
11842 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11843 fi
11844 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11845 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11846 if test $ac_cv_type_struct_sockaddr_un = yes; then
11847
11848 cat >>confdefs.h <<_ACEOF
11849 #define HAVE_STRUCT_SOCKADDR_UN 1
11850 _ACEOF
11851
11852
11853 cat >>confdefs.h <<\_ACEOF
11854 #define HAVE_UNIX_SOCKETS 1
11855 _ACEOF
11856
11857 fi
11858
11859 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11860 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11861 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11862   echo $ECHO_N "(cached) $ECHO_C" >&6
11863 else
11864   cat >conftest.$ac_ext <<_ACEOF
11865 /* confdefs.h.  */
11866 _ACEOF
11867 cat confdefs.h >>conftest.$ac_ext
11868 cat >>conftest.$ac_ext <<_ACEOF
11869 /* end confdefs.h.  */
11870 #include <sys/types.h>
11871 #ifdef HAVE_SYS_SOCKET_H
11872 #include <sys/socket.h>
11873 #endif
11874
11875
11876 int
11877 main ()
11878 {
11879 if ((struct sockaddr_storage *) 0)
11880   return 0;
11881 if (sizeof (struct sockaddr_storage))
11882   return 0;
11883   ;
11884   return 0;
11885 }
11886 _ACEOF
11887 rm -f conftest.$ac_objext
11888 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11889   (eval $ac_compile) 2>conftest.er1
11890   ac_status=$?
11891   grep -v '^ *+' conftest.er1 >conftest.err
11892   rm -f conftest.er1
11893   cat conftest.err >&5
11894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11895   (exit $ac_status); } &&
11896          { ac_try='test -z "$ac_c_werror_flag"
11897                          || test ! -s conftest.err'
11898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11899   (eval $ac_try) 2>&5
11900   ac_status=$?
11901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11902   (exit $ac_status); }; } &&
11903          { ac_try='test -s conftest.$ac_objext'
11904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11905   (eval $ac_try) 2>&5
11906   ac_status=$?
11907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11908   (exit $ac_status); }; }; then
11909   ac_cv_type_struct_sockaddr_storage=yes
11910 else
11911   echo "$as_me: failed program was:" >&5
11912 sed 's/^/| /' conftest.$ac_ext >&5
11913
11914 ac_cv_type_struct_sockaddr_storage=no
11915 fi
11916 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11917 fi
11918 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11919 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11920 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11921
11922 cat >>confdefs.h <<_ACEOF
11923 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11924 _ACEOF
11925
11926
11927 fi
11928
11929 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11930 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11931 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11932   echo $ECHO_N "(cached) $ECHO_C" >&6
11933 else
11934   cat >conftest.$ac_ext <<_ACEOF
11935 /* confdefs.h.  */
11936 _ACEOF
11937 cat confdefs.h >>conftest.$ac_ext
11938 cat >>conftest.$ac_ext <<_ACEOF
11939 /* end confdefs.h.  */
11940 #include <sys/types.h>
11941 #ifdef HAVE_SYS_SOCKET_H
11942 #include <sys/socket.h>
11943 #endif
11944
11945
11946 int
11947 main ()
11948 {
11949 static struct sockaddr_storage ac_aggr;
11950 if (ac_aggr.ss_family)
11951 return 0;
11952   ;
11953   return 0;
11954 }
11955 _ACEOF
11956 rm -f conftest.$ac_objext
11957 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11958   (eval $ac_compile) 2>conftest.er1
11959   ac_status=$?
11960   grep -v '^ *+' conftest.er1 >conftest.err
11961   rm -f conftest.er1
11962   cat conftest.err >&5
11963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11964   (exit $ac_status); } &&
11965          { ac_try='test -z "$ac_c_werror_flag"
11966                          || test ! -s conftest.err'
11967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11968   (eval $ac_try) 2>&5
11969   ac_status=$?
11970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11971   (exit $ac_status); }; } &&
11972          { ac_try='test -s conftest.$ac_objext'
11973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11974   (eval $ac_try) 2>&5
11975   ac_status=$?
11976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11977   (exit $ac_status); }; }; then
11978   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11979 else
11980   echo "$as_me: failed program was:" >&5
11981 sed 's/^/| /' conftest.$ac_ext >&5
11982
11983 cat >conftest.$ac_ext <<_ACEOF
11984 /* confdefs.h.  */
11985 _ACEOF
11986 cat confdefs.h >>conftest.$ac_ext
11987 cat >>conftest.$ac_ext <<_ACEOF
11988 /* end confdefs.h.  */
11989 #include <sys/types.h>
11990 #ifdef HAVE_SYS_SOCKET_H
11991 #include <sys/socket.h>
11992 #endif
11993
11994
11995 int
11996 main ()
11997 {
11998 static struct sockaddr_storage ac_aggr;
11999 if (sizeof ac_aggr.ss_family)
12000 return 0;
12001   ;
12002   return 0;
12003 }
12004 _ACEOF
12005 rm -f conftest.$ac_objext
12006 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12007   (eval $ac_compile) 2>conftest.er1
12008   ac_status=$?
12009   grep -v '^ *+' conftest.er1 >conftest.err
12010   rm -f conftest.er1
12011   cat conftest.err >&5
12012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12013   (exit $ac_status); } &&
12014          { ac_try='test -z "$ac_c_werror_flag"
12015                          || test ! -s conftest.err'
12016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12017   (eval $ac_try) 2>&5
12018   ac_status=$?
12019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12020   (exit $ac_status); }; } &&
12021          { ac_try='test -s conftest.$ac_objext'
12022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12023   (eval $ac_try) 2>&5
12024   ac_status=$?
12025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12026   (exit $ac_status); }; }; then
12027   ac_cv_member_struct_sockaddr_storage_ss_family=yes
12028 else
12029   echo "$as_me: failed program was:" >&5
12030 sed 's/^/| /' conftest.$ac_ext >&5
12031
12032 ac_cv_member_struct_sockaddr_storage_ss_family=no
12033 fi
12034 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12035 fi
12036 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12037 fi
12038 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
12039 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
12040 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
12041
12042 cat >>confdefs.h <<_ACEOF
12043 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12044 _ACEOF
12045
12046
12047 fi
12048 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
12049 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
12050 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
12051   echo $ECHO_N "(cached) $ECHO_C" >&6
12052 else
12053   cat >conftest.$ac_ext <<_ACEOF
12054 /* confdefs.h.  */
12055 _ACEOF
12056 cat confdefs.h >>conftest.$ac_ext
12057 cat >>conftest.$ac_ext <<_ACEOF
12058 /* end confdefs.h.  */
12059 #include <sys/types.h>
12060 #ifdef HAVE_SYS_SOCKET_H
12061 #include <sys/socket.h>
12062 #endif
12063
12064
12065 int
12066 main ()
12067 {
12068 static struct sockaddr_storage ac_aggr;
12069 if (ac_aggr.__ss_family)
12070 return 0;
12071   ;
12072   return 0;
12073 }
12074 _ACEOF
12075 rm -f conftest.$ac_objext
12076 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12077   (eval $ac_compile) 2>conftest.er1
12078   ac_status=$?
12079   grep -v '^ *+' conftest.er1 >conftest.err
12080   rm -f conftest.er1
12081   cat conftest.err >&5
12082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12083   (exit $ac_status); } &&
12084          { ac_try='test -z "$ac_c_werror_flag"
12085                          || test ! -s conftest.err'
12086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12087   (eval $ac_try) 2>&5
12088   ac_status=$?
12089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12090   (exit $ac_status); }; } &&
12091          { ac_try='test -s conftest.$ac_objext'
12092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12093   (eval $ac_try) 2>&5
12094   ac_status=$?
12095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12096   (exit $ac_status); }; }; then
12097   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12098 else
12099   echo "$as_me: failed program was:" >&5
12100 sed 's/^/| /' conftest.$ac_ext >&5
12101
12102 cat >conftest.$ac_ext <<_ACEOF
12103 /* confdefs.h.  */
12104 _ACEOF
12105 cat confdefs.h >>conftest.$ac_ext
12106 cat >>conftest.$ac_ext <<_ACEOF
12107 /* end confdefs.h.  */
12108 #include <sys/types.h>
12109 #ifdef HAVE_SYS_SOCKET_H
12110 #include <sys/socket.h>
12111 #endif
12112
12113
12114 int
12115 main ()
12116 {
12117 static struct sockaddr_storage ac_aggr;
12118 if (sizeof ac_aggr.__ss_family)
12119 return 0;
12120   ;
12121   return 0;
12122 }
12123 _ACEOF
12124 rm -f conftest.$ac_objext
12125 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12126   (eval $ac_compile) 2>conftest.er1
12127   ac_status=$?
12128   grep -v '^ *+' conftest.er1 >conftest.err
12129   rm -f conftest.er1
12130   cat conftest.err >&5
12131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12132   (exit $ac_status); } &&
12133          { ac_try='test -z "$ac_c_werror_flag"
12134                          || test ! -s conftest.err'
12135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12136   (eval $ac_try) 2>&5
12137   ac_status=$?
12138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12139   (exit $ac_status); }; } &&
12140          { ac_try='test -s conftest.$ac_objext'
12141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12142   (eval $ac_try) 2>&5
12143   ac_status=$?
12144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12145   (exit $ac_status); }; }; then
12146   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12147 else
12148   echo "$as_me: failed program was:" >&5
12149 sed 's/^/| /' conftest.$ac_ext >&5
12150
12151 ac_cv_member_struct_sockaddr_storage___ss_family=no
12152 fi
12153 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12154 fi
12155 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12156 fi
12157 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
12158 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
12159 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
12160
12161 cat >>confdefs.h <<_ACEOF
12162 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12163 _ACEOF
12164
12165
12166 fi
12167 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
12168 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
12169 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
12170   echo $ECHO_N "(cached) $ECHO_C" >&6
12171 else
12172   cat >conftest.$ac_ext <<_ACEOF
12173 /* confdefs.h.  */
12174 _ACEOF
12175 cat confdefs.h >>conftest.$ac_ext
12176 cat >>conftest.$ac_ext <<_ACEOF
12177 /* end confdefs.h.  */
12178 #include <sys/types.h>
12179 #ifdef HAVE_SYS_SOCKET_H
12180 #include <sys/socket.h>
12181 #endif
12182
12183
12184 int
12185 main ()
12186 {
12187 static struct sockaddr_storage ac_aggr;
12188 if (ac_aggr.ss_len)
12189 return 0;
12190   ;
12191   return 0;
12192 }
12193 _ACEOF
12194 rm -f conftest.$ac_objext
12195 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12196   (eval $ac_compile) 2>conftest.er1
12197   ac_status=$?
12198   grep -v '^ *+' conftest.er1 >conftest.err
12199   rm -f conftest.er1
12200   cat conftest.err >&5
12201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12202   (exit $ac_status); } &&
12203          { ac_try='test -z "$ac_c_werror_flag"
12204                          || test ! -s conftest.err'
12205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12206   (eval $ac_try) 2>&5
12207   ac_status=$?
12208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12209   (exit $ac_status); }; } &&
12210          { ac_try='test -s conftest.$ac_objext'
12211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12212   (eval $ac_try) 2>&5
12213   ac_status=$?
12214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12215   (exit $ac_status); }; }; then
12216   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12217 else
12218   echo "$as_me: failed program was:" >&5
12219 sed 's/^/| /' conftest.$ac_ext >&5
12220
12221 cat >conftest.$ac_ext <<_ACEOF
12222 /* confdefs.h.  */
12223 _ACEOF
12224 cat confdefs.h >>conftest.$ac_ext
12225 cat >>conftest.$ac_ext <<_ACEOF
12226 /* end confdefs.h.  */
12227 #include <sys/types.h>
12228 #ifdef HAVE_SYS_SOCKET_H
12229 #include <sys/socket.h>
12230 #endif
12231
12232
12233 int
12234 main ()
12235 {
12236 static struct sockaddr_storage ac_aggr;
12237 if (sizeof ac_aggr.ss_len)
12238 return 0;
12239   ;
12240   return 0;
12241 }
12242 _ACEOF
12243 rm -f conftest.$ac_objext
12244 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12245   (eval $ac_compile) 2>conftest.er1
12246   ac_status=$?
12247   grep -v '^ *+' conftest.er1 >conftest.err
12248   rm -f conftest.er1
12249   cat conftest.err >&5
12250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12251   (exit $ac_status); } &&
12252          { ac_try='test -z "$ac_c_werror_flag"
12253                          || test ! -s conftest.err'
12254   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12255   (eval $ac_try) 2>&5
12256   ac_status=$?
12257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12258   (exit $ac_status); }; } &&
12259          { ac_try='test -s conftest.$ac_objext'
12260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12261   (eval $ac_try) 2>&5
12262   ac_status=$?
12263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12264   (exit $ac_status); }; }; then
12265   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12266 else
12267   echo "$as_me: failed program was:" >&5
12268 sed 's/^/| /' conftest.$ac_ext >&5
12269
12270 ac_cv_member_struct_sockaddr_storage_ss_len=no
12271 fi
12272 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12273 fi
12274 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12275 fi
12276 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12277 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12278 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12279
12280 cat >>confdefs.h <<_ACEOF
12281 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12282 _ACEOF
12283
12284
12285 fi
12286 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12287 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12288 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12289   echo $ECHO_N "(cached) $ECHO_C" >&6
12290 else
12291   cat >conftest.$ac_ext <<_ACEOF
12292 /* confdefs.h.  */
12293 _ACEOF
12294 cat confdefs.h >>conftest.$ac_ext
12295 cat >>conftest.$ac_ext <<_ACEOF
12296 /* end confdefs.h.  */
12297 #include <sys/types.h>
12298 #ifdef HAVE_SYS_SOCKET_H
12299 #include <sys/socket.h>
12300 #endif
12301
12302
12303 int
12304 main ()
12305 {
12306 static struct sockaddr_storage ac_aggr;
12307 if (ac_aggr.__ss_len)
12308 return 0;
12309   ;
12310   return 0;
12311 }
12312 _ACEOF
12313 rm -f conftest.$ac_objext
12314 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12315   (eval $ac_compile) 2>conftest.er1
12316   ac_status=$?
12317   grep -v '^ *+' conftest.er1 >conftest.err
12318   rm -f conftest.er1
12319   cat conftest.err >&5
12320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12321   (exit $ac_status); } &&
12322          { ac_try='test -z "$ac_c_werror_flag"
12323                          || test ! -s conftest.err'
12324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12325   (eval $ac_try) 2>&5
12326   ac_status=$?
12327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12328   (exit $ac_status); }; } &&
12329          { ac_try='test -s conftest.$ac_objext'
12330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12331   (eval $ac_try) 2>&5
12332   ac_status=$?
12333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12334   (exit $ac_status); }; }; then
12335   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12336 else
12337   echo "$as_me: failed program was:" >&5
12338 sed 's/^/| /' conftest.$ac_ext >&5
12339
12340 cat >conftest.$ac_ext <<_ACEOF
12341 /* confdefs.h.  */
12342 _ACEOF
12343 cat confdefs.h >>conftest.$ac_ext
12344 cat >>conftest.$ac_ext <<_ACEOF
12345 /* end confdefs.h.  */
12346 #include <sys/types.h>
12347 #ifdef HAVE_SYS_SOCKET_H
12348 #include <sys/socket.h>
12349 #endif
12350
12351
12352 int
12353 main ()
12354 {
12355 static struct sockaddr_storage ac_aggr;
12356 if (sizeof ac_aggr.__ss_len)
12357 return 0;
12358   ;
12359   return 0;
12360 }
12361 _ACEOF
12362 rm -f conftest.$ac_objext
12363 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12364   (eval $ac_compile) 2>conftest.er1
12365   ac_status=$?
12366   grep -v '^ *+' conftest.er1 >conftest.err
12367   rm -f conftest.er1
12368   cat conftest.err >&5
12369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12370   (exit $ac_status); } &&
12371          { ac_try='test -z "$ac_c_werror_flag"
12372                          || test ! -s conftest.err'
12373   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12374   (eval $ac_try) 2>&5
12375   ac_status=$?
12376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12377   (exit $ac_status); }; } &&
12378          { ac_try='test -s conftest.$ac_objext'
12379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12380   (eval $ac_try) 2>&5
12381   ac_status=$?
12382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12383   (exit $ac_status); }; }; then
12384   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12385 else
12386   echo "$as_me: failed program was:" >&5
12387 sed 's/^/| /' conftest.$ac_ext >&5
12388
12389 ac_cv_member_struct_sockaddr_storage___ss_len=no
12390 fi
12391 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12392 fi
12393 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12394 fi
12395 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12396 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12397 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12398
12399 cat >>confdefs.h <<_ACEOF
12400 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12401 _ACEOF
12402
12403
12404 fi
12405 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12406 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12407 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12408   echo $ECHO_N "(cached) $ECHO_C" >&6
12409 else
12410   cat >conftest.$ac_ext <<_ACEOF
12411 /* confdefs.h.  */
12412 _ACEOF
12413 cat confdefs.h >>conftest.$ac_ext
12414 cat >>conftest.$ac_ext <<_ACEOF
12415 /* end confdefs.h.  */
12416 #include <sys/types.h>
12417 #ifdef HAVE_SYS_SOCKET_H
12418 #include <sys/socket.h>
12419 #endif
12420
12421
12422 int
12423 main ()
12424 {
12425 static struct sockaddr ac_aggr;
12426 if (ac_aggr.sa_len)
12427 return 0;
12428   ;
12429   return 0;
12430 }
12431 _ACEOF
12432 rm -f conftest.$ac_objext
12433 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12434   (eval $ac_compile) 2>conftest.er1
12435   ac_status=$?
12436   grep -v '^ *+' conftest.er1 >conftest.err
12437   rm -f conftest.er1
12438   cat conftest.err >&5
12439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12440   (exit $ac_status); } &&
12441          { ac_try='test -z "$ac_c_werror_flag"
12442                          || test ! -s conftest.err'
12443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12444   (eval $ac_try) 2>&5
12445   ac_status=$?
12446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12447   (exit $ac_status); }; } &&
12448          { ac_try='test -s conftest.$ac_objext'
12449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12450   (eval $ac_try) 2>&5
12451   ac_status=$?
12452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12453   (exit $ac_status); }; }; then
12454   ac_cv_member_struct_sockaddr_sa_len=yes
12455 else
12456   echo "$as_me: failed program was:" >&5
12457 sed 's/^/| /' conftest.$ac_ext >&5
12458
12459 cat >conftest.$ac_ext <<_ACEOF
12460 /* confdefs.h.  */
12461 _ACEOF
12462 cat confdefs.h >>conftest.$ac_ext
12463 cat >>conftest.$ac_ext <<_ACEOF
12464 /* end confdefs.h.  */
12465 #include <sys/types.h>
12466 #ifdef HAVE_SYS_SOCKET_H
12467 #include <sys/socket.h>
12468 #endif
12469
12470
12471 int
12472 main ()
12473 {
12474 static struct sockaddr ac_aggr;
12475 if (sizeof ac_aggr.sa_len)
12476 return 0;
12477   ;
12478   return 0;
12479 }
12480 _ACEOF
12481 rm -f conftest.$ac_objext
12482 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12483   (eval $ac_compile) 2>conftest.er1
12484   ac_status=$?
12485   grep -v '^ *+' conftest.er1 >conftest.err
12486   rm -f conftest.er1
12487   cat conftest.err >&5
12488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12489   (exit $ac_status); } &&
12490          { ac_try='test -z "$ac_c_werror_flag"
12491                          || test ! -s conftest.err'
12492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12493   (eval $ac_try) 2>&5
12494   ac_status=$?
12495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12496   (exit $ac_status); }; } &&
12497          { ac_try='test -s conftest.$ac_objext'
12498   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12499   (eval $ac_try) 2>&5
12500   ac_status=$?
12501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12502   (exit $ac_status); }; }; then
12503   ac_cv_member_struct_sockaddr_sa_len=yes
12504 else
12505   echo "$as_me: failed program was:" >&5
12506 sed 's/^/| /' conftest.$ac_ext >&5
12507
12508 ac_cv_member_struct_sockaddr_sa_len=no
12509 fi
12510 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12511 fi
12512 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12513 fi
12514 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12515 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12516 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12517
12518 cat >>confdefs.h <<_ACEOF
12519 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12520 _ACEOF
12521
12522
12523 fi
12524
12525 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12526 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12527 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12528   echo $ECHO_N "(cached) $ECHO_C" >&6
12529 else
12530   cat >conftest.$ac_ext <<_ACEOF
12531 /* confdefs.h.  */
12532 _ACEOF
12533 cat confdefs.h >>conftest.$ac_ext
12534 cat >>conftest.$ac_ext <<_ACEOF
12535 /* end confdefs.h.  */
12536 #include <sys/types.h>
12537 #include <sys/socket.h>
12538 #include <netdb.h>
12539
12540
12541 int
12542 main ()
12543 {
12544 if ((struct addrinfo *) 0)
12545   return 0;
12546 if (sizeof (struct addrinfo))
12547   return 0;
12548   ;
12549   return 0;
12550 }
12551 _ACEOF
12552 rm -f conftest.$ac_objext
12553 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12554   (eval $ac_compile) 2>conftest.er1
12555   ac_status=$?
12556   grep -v '^ *+' conftest.er1 >conftest.err
12557   rm -f conftest.er1
12558   cat conftest.err >&5
12559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12560   (exit $ac_status); } &&
12561          { ac_try='test -z "$ac_c_werror_flag"
12562                          || test ! -s conftest.err'
12563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12564   (eval $ac_try) 2>&5
12565   ac_status=$?
12566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12567   (exit $ac_status); }; } &&
12568          { ac_try='test -s conftest.$ac_objext'
12569   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12570   (eval $ac_try) 2>&5
12571   ac_status=$?
12572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12573   (exit $ac_status); }; }; then
12574   ac_cv_type_struct_addrinfo=yes
12575 else
12576   echo "$as_me: failed program was:" >&5
12577 sed 's/^/| /' conftest.$ac_ext >&5
12578
12579 ac_cv_type_struct_addrinfo=no
12580 fi
12581 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12582 fi
12583 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12584 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12585 if test $ac_cv_type_struct_addrinfo = yes; then
12586
12587 cat >>confdefs.h <<_ACEOF
12588 #define HAVE_STRUCT_ADDRINFO 1
12589 _ACEOF
12590
12591
12592 fi
12593
12594
12595 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12596 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12597 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12598   echo $ECHO_N "(cached) $ECHO_C" >&6
12599 else
12600   cat >conftest.$ac_ext <<_ACEOF
12601 /* confdefs.h.  */
12602 _ACEOF
12603 cat confdefs.h >>conftest.$ac_ext
12604 cat >>conftest.$ac_ext <<_ACEOF
12605 /* end confdefs.h.  */
12606 #include <sys/param.h>
12607 #include <sys/types.h>
12608 #include <sys/socket.h>
12609 #include <sys/ucred.h>
12610
12611 int
12612 main ()
12613 {
12614 if ((struct cmsgcred *) 0)
12615   return 0;
12616 if (sizeof (struct cmsgcred))
12617   return 0;
12618   ;
12619   return 0;
12620 }
12621 _ACEOF
12622 rm -f conftest.$ac_objext
12623 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12624   (eval $ac_compile) 2>conftest.er1
12625   ac_status=$?
12626   grep -v '^ *+' conftest.er1 >conftest.err
12627   rm -f conftest.er1
12628   cat conftest.err >&5
12629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12630   (exit $ac_status); } &&
12631          { ac_try='test -z "$ac_c_werror_flag"
12632                          || test ! -s conftest.err'
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); }; } &&
12638          { ac_try='test -s conftest.$ac_objext'
12639   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12640   (eval $ac_try) 2>&5
12641   ac_status=$?
12642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12643   (exit $ac_status); }; }; then
12644   ac_cv_type_struct_cmsgcred=yes
12645 else
12646   echo "$as_me: failed program was:" >&5
12647 sed 's/^/| /' conftest.$ac_ext >&5
12648
12649 ac_cv_type_struct_cmsgcred=no
12650 fi
12651 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12652 fi
12653 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12654 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12655 if test $ac_cv_type_struct_cmsgcred = yes; then
12656
12657 cat >>confdefs.h <<_ACEOF
12658 #define HAVE_STRUCT_CMSGCRED 1
12659 _ACEOF
12660
12661
12662 fi
12663 echo "$as_me:$LINENO: checking for struct fcred" >&5
12664 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12665 if test "${ac_cv_type_struct_fcred+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 <sys/param.h>
12675 #include <sys/types.h>
12676 #include <sys/socket.h>
12677 #include <sys/ucred.h>
12678
12679 int
12680 main ()
12681 {
12682 if ((struct fcred *) 0)
12683   return 0;
12684 if (sizeof (struct fcred))
12685   return 0;
12686   ;
12687   return 0;
12688 }
12689 _ACEOF
12690 rm -f conftest.$ac_objext
12691 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12692   (eval $ac_compile) 2>conftest.er1
12693   ac_status=$?
12694   grep -v '^ *+' conftest.er1 >conftest.err
12695   rm -f conftest.er1
12696   cat conftest.err >&5
12697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12698   (exit $ac_status); } &&
12699          { ac_try='test -z "$ac_c_werror_flag"
12700                          || test ! -s conftest.err'
12701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12702   (eval $ac_try) 2>&5
12703   ac_status=$?
12704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12705   (exit $ac_status); }; } &&
12706          { ac_try='test -s conftest.$ac_objext'
12707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12708   (eval $ac_try) 2>&5
12709   ac_status=$?
12710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12711   (exit $ac_status); }; }; then
12712   ac_cv_type_struct_fcred=yes
12713 else
12714   echo "$as_me: failed program was:" >&5
12715 sed 's/^/| /' conftest.$ac_ext >&5
12716
12717 ac_cv_type_struct_fcred=no
12718 fi
12719 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12720 fi
12721 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12722 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12723 if test $ac_cv_type_struct_fcred = yes; then
12724
12725 cat >>confdefs.h <<_ACEOF
12726 #define HAVE_STRUCT_FCRED 1
12727 _ACEOF
12728
12729
12730 fi
12731 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12732 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12733 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12734   echo $ECHO_N "(cached) $ECHO_C" >&6
12735 else
12736   cat >conftest.$ac_ext <<_ACEOF
12737 /* confdefs.h.  */
12738 _ACEOF
12739 cat confdefs.h >>conftest.$ac_ext
12740 cat >>conftest.$ac_ext <<_ACEOF
12741 /* end confdefs.h.  */
12742 #include <sys/param.h>
12743 #include <sys/types.h>
12744 #include <sys/socket.h>
12745 #include <sys/ucred.h>
12746
12747 int
12748 main ()
12749 {
12750 if ((struct sockcred *) 0)
12751   return 0;
12752 if (sizeof (struct sockcred))
12753   return 0;
12754   ;
12755   return 0;
12756 }
12757 _ACEOF
12758 rm -f conftest.$ac_objext
12759 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12760   (eval $ac_compile) 2>conftest.er1
12761   ac_status=$?
12762   grep -v '^ *+' conftest.er1 >conftest.err
12763   rm -f conftest.er1
12764   cat conftest.err >&5
12765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12766   (exit $ac_status); } &&
12767          { ac_try='test -z "$ac_c_werror_flag"
12768                          || test ! -s conftest.err'
12769   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12770   (eval $ac_try) 2>&5
12771   ac_status=$?
12772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12773   (exit $ac_status); }; } &&
12774          { ac_try='test -s conftest.$ac_objext'
12775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12776   (eval $ac_try) 2>&5
12777   ac_status=$?
12778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12779   (exit $ac_status); }; }; then
12780   ac_cv_type_struct_sockcred=yes
12781 else
12782   echo "$as_me: failed program was:" >&5
12783 sed 's/^/| /' conftest.$ac_ext >&5
12784
12785 ac_cv_type_struct_sockcred=no
12786 fi
12787 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12788 fi
12789 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12790 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12791 if test $ac_cv_type_struct_sockcred = yes; then
12792
12793 cat >>confdefs.h <<_ACEOF
12794 #define HAVE_STRUCT_SOCKCRED 1
12795 _ACEOF
12796
12797
12798 fi
12799
12800
12801 echo "$as_me:$LINENO: checking for struct option" >&5
12802 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12803 if test "${ac_cv_type_struct_option+set}" = set; then
12804   echo $ECHO_N "(cached) $ECHO_C" >&6
12805 else
12806   cat >conftest.$ac_ext <<_ACEOF
12807 /* confdefs.h.  */
12808 _ACEOF
12809 cat confdefs.h >>conftest.$ac_ext
12810 cat >>conftest.$ac_ext <<_ACEOF
12811 /* end confdefs.h.  */
12812 #ifdef HAVE_GETOPT_H
12813 #include <getopt.h>
12814 #endif
12815
12816 int
12817 main ()
12818 {
12819 if ((struct option *) 0)
12820   return 0;
12821 if (sizeof (struct option))
12822   return 0;
12823   ;
12824   return 0;
12825 }
12826 _ACEOF
12827 rm -f conftest.$ac_objext
12828 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12829   (eval $ac_compile) 2>conftest.er1
12830   ac_status=$?
12831   grep -v '^ *+' conftest.er1 >conftest.err
12832   rm -f conftest.er1
12833   cat conftest.err >&5
12834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12835   (exit $ac_status); } &&
12836          { ac_try='test -z "$ac_c_werror_flag"
12837                          || test ! -s conftest.err'
12838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12839   (eval $ac_try) 2>&5
12840   ac_status=$?
12841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12842   (exit $ac_status); }; } &&
12843          { ac_try='test -s conftest.$ac_objext'
12844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12845   (eval $ac_try) 2>&5
12846   ac_status=$?
12847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12848   (exit $ac_status); }; }; then
12849   ac_cv_type_struct_option=yes
12850 else
12851   echo "$as_me: failed program was:" >&5
12852 sed 's/^/| /' conftest.$ac_ext >&5
12853
12854 ac_cv_type_struct_option=no
12855 fi
12856 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12857 fi
12858 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12859 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12860 if test $ac_cv_type_struct_option = yes; then
12861
12862 cat >>confdefs.h <<_ACEOF
12863 #define HAVE_STRUCT_OPTION 1
12864 _ACEOF
12865
12866
12867 fi
12868
12869
12870 if test "$with_zlib" = yes; then
12871   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12872   # did not).  While we could work around the lack of z_streamp, it
12873   # seems unwise to encourage people to use such old zlib versions...
12874   echo "$as_me:$LINENO: checking for z_streamp" >&5
12875 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12876 if test "${ac_cv_type_z_streamp+set}" = set; then
12877   echo $ECHO_N "(cached) $ECHO_C" >&6
12878 else
12879   cat >conftest.$ac_ext <<_ACEOF
12880 /* confdefs.h.  */
12881 _ACEOF
12882 cat confdefs.h >>conftest.$ac_ext
12883 cat >>conftest.$ac_ext <<_ACEOF
12884 /* end confdefs.h.  */
12885 #include <zlib.h>
12886
12887 int
12888 main ()
12889 {
12890 if ((z_streamp *) 0)
12891   return 0;
12892 if (sizeof (z_streamp))
12893   return 0;
12894   ;
12895   return 0;
12896 }
12897 _ACEOF
12898 rm -f conftest.$ac_objext
12899 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12900   (eval $ac_compile) 2>conftest.er1
12901   ac_status=$?
12902   grep -v '^ *+' conftest.er1 >conftest.err
12903   rm -f conftest.er1
12904   cat conftest.err >&5
12905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12906   (exit $ac_status); } &&
12907          { ac_try='test -z "$ac_c_werror_flag"
12908                          || test ! -s conftest.err'
12909   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12910   (eval $ac_try) 2>&5
12911   ac_status=$?
12912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12913   (exit $ac_status); }; } &&
12914          { ac_try='test -s conftest.$ac_objext'
12915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12916   (eval $ac_try) 2>&5
12917   ac_status=$?
12918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12919   (exit $ac_status); }; }; then
12920   ac_cv_type_z_streamp=yes
12921 else
12922   echo "$as_me: failed program was:" >&5
12923 sed 's/^/| /' conftest.$ac_ext >&5
12924
12925 ac_cv_type_z_streamp=no
12926 fi
12927 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12928 fi
12929 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12930 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12931 if test $ac_cv_type_z_streamp = yes; then
12932   :
12933 else
12934   { { echo "$as_me:$LINENO: error: zlib version is too old
12935 Use --without-zlib to disable zlib support." >&5
12936 echo "$as_me: error: zlib version is too old
12937 Use --without-zlib to disable zlib support." >&2;}
12938    { (exit 1); exit 1; }; }
12939 fi
12940
12941 fi
12942
12943 if test "$with_krb5" = yes; then
12944 # Check for differences between MIT and Heimdal (KTH) releases
12945   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
12946 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
12947 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
12948   echo $ECHO_N "(cached) $ECHO_C" >&6
12949 else
12950   cat >conftest.$ac_ext <<_ACEOF
12951 /* confdefs.h.  */
12952 _ACEOF
12953 cat confdefs.h >>conftest.$ac_ext
12954 cat >>conftest.$ac_ext <<_ACEOF
12955 /* end confdefs.h.  */
12956 #include <krb5.h>
12957
12958 int
12959 main ()
12960 {
12961 static krb5_ticket ac_aggr;
12962 if (ac_aggr.enc_part2)
12963 return 0;
12964   ;
12965   return 0;
12966 }
12967 _ACEOF
12968 rm -f conftest.$ac_objext
12969 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12970   (eval $ac_compile) 2>conftest.er1
12971   ac_status=$?
12972   grep -v '^ *+' conftest.er1 >conftest.err
12973   rm -f conftest.er1
12974   cat conftest.err >&5
12975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12976   (exit $ac_status); } &&
12977          { ac_try='test -z "$ac_c_werror_flag"
12978                          || test ! -s conftest.err'
12979   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12980   (eval $ac_try) 2>&5
12981   ac_status=$?
12982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12983   (exit $ac_status); }; } &&
12984          { ac_try='test -s conftest.$ac_objext'
12985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12986   (eval $ac_try) 2>&5
12987   ac_status=$?
12988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12989   (exit $ac_status); }; }; then
12990   ac_cv_member_krb5_ticket_enc_part2=yes
12991 else
12992   echo "$as_me: failed program was:" >&5
12993 sed 's/^/| /' conftest.$ac_ext >&5
12994
12995 cat >conftest.$ac_ext <<_ACEOF
12996 /* confdefs.h.  */
12997 _ACEOF
12998 cat confdefs.h >>conftest.$ac_ext
12999 cat >>conftest.$ac_ext <<_ACEOF
13000 /* end confdefs.h.  */
13001 #include <krb5.h>
13002
13003 int
13004 main ()
13005 {
13006 static krb5_ticket ac_aggr;
13007 if (sizeof ac_aggr.enc_part2)
13008 return 0;
13009   ;
13010   return 0;
13011 }
13012 _ACEOF
13013 rm -f conftest.$ac_objext
13014 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13015   (eval $ac_compile) 2>conftest.er1
13016   ac_status=$?
13017   grep -v '^ *+' conftest.er1 >conftest.err
13018   rm -f conftest.er1
13019   cat conftest.err >&5
13020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13021   (exit $ac_status); } &&
13022          { ac_try='test -z "$ac_c_werror_flag"
13023                          || test ! -s conftest.err'
13024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13025   (eval $ac_try) 2>&5
13026   ac_status=$?
13027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13028   (exit $ac_status); }; } &&
13029          { ac_try='test -s conftest.$ac_objext'
13030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13031   (eval $ac_try) 2>&5
13032   ac_status=$?
13033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13034   (exit $ac_status); }; }; then
13035   ac_cv_member_krb5_ticket_enc_part2=yes
13036 else
13037   echo "$as_me: failed program was:" >&5
13038 sed 's/^/| /' conftest.$ac_ext >&5
13039
13040 ac_cv_member_krb5_ticket_enc_part2=no
13041 fi
13042 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13043 fi
13044 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13045 fi
13046 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
13047 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
13048 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
13049
13050 cat >>confdefs.h <<_ACEOF
13051 #define HAVE_KRB5_TICKET_ENC_PART2 1
13052 _ACEOF
13053
13054
13055 else
13056   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
13057 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
13058 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
13059   echo $ECHO_N "(cached) $ECHO_C" >&6
13060 else
13061   cat >conftest.$ac_ext <<_ACEOF
13062 /* confdefs.h.  */
13063 _ACEOF
13064 cat confdefs.h >>conftest.$ac_ext
13065 cat >>conftest.$ac_ext <<_ACEOF
13066 /* end confdefs.h.  */
13067 #include <krb5.h>
13068
13069 int
13070 main ()
13071 {
13072 static krb5_ticket ac_aggr;
13073 if (ac_aggr.client)
13074 return 0;
13075   ;
13076   return 0;
13077 }
13078 _ACEOF
13079 rm -f conftest.$ac_objext
13080 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13081   (eval $ac_compile) 2>conftest.er1
13082   ac_status=$?
13083   grep -v '^ *+' conftest.er1 >conftest.err
13084   rm -f conftest.er1
13085   cat conftest.err >&5
13086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13087   (exit $ac_status); } &&
13088          { ac_try='test -z "$ac_c_werror_flag"
13089                          || test ! -s conftest.err'
13090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13091   (eval $ac_try) 2>&5
13092   ac_status=$?
13093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13094   (exit $ac_status); }; } &&
13095          { ac_try='test -s conftest.$ac_objext'
13096   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13097   (eval $ac_try) 2>&5
13098   ac_status=$?
13099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13100   (exit $ac_status); }; }; then
13101   ac_cv_member_krb5_ticket_client=yes
13102 else
13103   echo "$as_me: failed program was:" >&5
13104 sed 's/^/| /' conftest.$ac_ext >&5
13105
13106 cat >conftest.$ac_ext <<_ACEOF
13107 /* confdefs.h.  */
13108 _ACEOF
13109 cat confdefs.h >>conftest.$ac_ext
13110 cat >>conftest.$ac_ext <<_ACEOF
13111 /* end confdefs.h.  */
13112 #include <krb5.h>
13113
13114 int
13115 main ()
13116 {
13117 static krb5_ticket ac_aggr;
13118 if (sizeof ac_aggr.client)
13119 return 0;
13120   ;
13121   return 0;
13122 }
13123 _ACEOF
13124 rm -f conftest.$ac_objext
13125 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13126   (eval $ac_compile) 2>conftest.er1
13127   ac_status=$?
13128   grep -v '^ *+' conftest.er1 >conftest.err
13129   rm -f conftest.er1
13130   cat conftest.err >&5
13131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13132   (exit $ac_status); } &&
13133          { ac_try='test -z "$ac_c_werror_flag"
13134                          || test ! -s conftest.err'
13135   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13136   (eval $ac_try) 2>&5
13137   ac_status=$?
13138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13139   (exit $ac_status); }; } &&
13140          { ac_try='test -s conftest.$ac_objext'
13141   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13142   (eval $ac_try) 2>&5
13143   ac_status=$?
13144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13145   (exit $ac_status); }; }; then
13146   ac_cv_member_krb5_ticket_client=yes
13147 else
13148   echo "$as_me: failed program was:" >&5
13149 sed 's/^/| /' conftest.$ac_ext >&5
13150
13151 ac_cv_member_krb5_ticket_client=no
13152 fi
13153 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13154 fi
13155 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13156 fi
13157 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
13158 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
13159 if test $ac_cv_member_krb5_ticket_client = yes; then
13160
13161 cat >>confdefs.h <<_ACEOF
13162 #define HAVE_KRB5_TICKET_CLIENT 1
13163 _ACEOF
13164
13165
13166 else
13167   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
13168 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
13169    { (exit 1); exit 1; }; }
13170 fi
13171
13172 fi
13173
13174   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
13175 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
13176 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
13177   echo $ECHO_N "(cached) $ECHO_C" >&6
13178 else
13179   cat >conftest.$ac_ext <<_ACEOF
13180 /* confdefs.h.  */
13181 _ACEOF
13182 cat confdefs.h >>conftest.$ac_ext
13183 cat >>conftest.$ac_ext <<_ACEOF
13184 /* end confdefs.h.  */
13185 #include <krb5.h>
13186
13187 int
13188 main ()
13189 {
13190 static krb5_error ac_aggr;
13191 if (ac_aggr.text.data)
13192 return 0;
13193   ;
13194   return 0;
13195 }
13196 _ACEOF
13197 rm -f conftest.$ac_objext
13198 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13199   (eval $ac_compile) 2>conftest.er1
13200   ac_status=$?
13201   grep -v '^ *+' conftest.er1 >conftest.err
13202   rm -f conftest.er1
13203   cat conftest.err >&5
13204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13205   (exit $ac_status); } &&
13206          { ac_try='test -z "$ac_c_werror_flag"
13207                          || test ! -s conftest.err'
13208   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13209   (eval $ac_try) 2>&5
13210   ac_status=$?
13211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13212   (exit $ac_status); }; } &&
13213          { ac_try='test -s conftest.$ac_objext'
13214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13215   (eval $ac_try) 2>&5
13216   ac_status=$?
13217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13218   (exit $ac_status); }; }; then
13219   ac_cv_member_krb5_error_text_data=yes
13220 else
13221   echo "$as_me: failed program was:" >&5
13222 sed 's/^/| /' conftest.$ac_ext >&5
13223
13224 cat >conftest.$ac_ext <<_ACEOF
13225 /* confdefs.h.  */
13226 _ACEOF
13227 cat confdefs.h >>conftest.$ac_ext
13228 cat >>conftest.$ac_ext <<_ACEOF
13229 /* end confdefs.h.  */
13230 #include <krb5.h>
13231
13232 int
13233 main ()
13234 {
13235 static krb5_error ac_aggr;
13236 if (sizeof ac_aggr.text.data)
13237 return 0;
13238   ;
13239   return 0;
13240 }
13241 _ACEOF
13242 rm -f conftest.$ac_objext
13243 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13244   (eval $ac_compile) 2>conftest.er1
13245   ac_status=$?
13246   grep -v '^ *+' conftest.er1 >conftest.err
13247   rm -f conftest.er1
13248   cat conftest.err >&5
13249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13250   (exit $ac_status); } &&
13251          { ac_try='test -z "$ac_c_werror_flag"
13252                          || test ! -s conftest.err'
13253   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13254   (eval $ac_try) 2>&5
13255   ac_status=$?
13256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13257   (exit $ac_status); }; } &&
13258          { ac_try='test -s conftest.$ac_objext'
13259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13260   (eval $ac_try) 2>&5
13261   ac_status=$?
13262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13263   (exit $ac_status); }; }; then
13264   ac_cv_member_krb5_error_text_data=yes
13265 else
13266   echo "$as_me: failed program was:" >&5
13267 sed 's/^/| /' conftest.$ac_ext >&5
13268
13269 ac_cv_member_krb5_error_text_data=no
13270 fi
13271 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13272 fi
13273 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13274 fi
13275 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13276 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13277 if test $ac_cv_member_krb5_error_text_data = yes; then
13278
13279 cat >>confdefs.h <<_ACEOF
13280 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13281 _ACEOF
13282
13283
13284 else
13285   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13286 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13287 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13288   echo $ECHO_N "(cached) $ECHO_C" >&6
13289 else
13290   cat >conftest.$ac_ext <<_ACEOF
13291 /* confdefs.h.  */
13292 _ACEOF
13293 cat confdefs.h >>conftest.$ac_ext
13294 cat >>conftest.$ac_ext <<_ACEOF
13295 /* end confdefs.h.  */
13296 #include <krb5.h>
13297
13298 int
13299 main ()
13300 {
13301 static krb5_error ac_aggr;
13302 if (ac_aggr.e_data)
13303 return 0;
13304   ;
13305   return 0;
13306 }
13307 _ACEOF
13308 rm -f conftest.$ac_objext
13309 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13310   (eval $ac_compile) 2>conftest.er1
13311   ac_status=$?
13312   grep -v '^ *+' conftest.er1 >conftest.err
13313   rm -f conftest.er1
13314   cat conftest.err >&5
13315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13316   (exit $ac_status); } &&
13317          { ac_try='test -z "$ac_c_werror_flag"
13318                          || test ! -s conftest.err'
13319   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13320   (eval $ac_try) 2>&5
13321   ac_status=$?
13322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13323   (exit $ac_status); }; } &&
13324          { ac_try='test -s conftest.$ac_objext'
13325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13326   (eval $ac_try) 2>&5
13327   ac_status=$?
13328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13329   (exit $ac_status); }; }; then
13330   ac_cv_member_krb5_error_e_data=yes
13331 else
13332   echo "$as_me: failed program was:" >&5
13333 sed 's/^/| /' conftest.$ac_ext >&5
13334
13335 cat >conftest.$ac_ext <<_ACEOF
13336 /* confdefs.h.  */
13337 _ACEOF
13338 cat confdefs.h >>conftest.$ac_ext
13339 cat >>conftest.$ac_ext <<_ACEOF
13340 /* end confdefs.h.  */
13341 #include <krb5.h>
13342
13343 int
13344 main ()
13345 {
13346 static krb5_error ac_aggr;
13347 if (sizeof ac_aggr.e_data)
13348 return 0;
13349   ;
13350   return 0;
13351 }
13352 _ACEOF
13353 rm -f conftest.$ac_objext
13354 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13355   (eval $ac_compile) 2>conftest.er1
13356   ac_status=$?
13357   grep -v '^ *+' conftest.er1 >conftest.err
13358   rm -f conftest.er1
13359   cat conftest.err >&5
13360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13361   (exit $ac_status); } &&
13362          { ac_try='test -z "$ac_c_werror_flag"
13363                          || test ! -s conftest.err'
13364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13365   (eval $ac_try) 2>&5
13366   ac_status=$?
13367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13368   (exit $ac_status); }; } &&
13369          { ac_try='test -s conftest.$ac_objext'
13370   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13371   (eval $ac_try) 2>&5
13372   ac_status=$?
13373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13374   (exit $ac_status); }; }; then
13375   ac_cv_member_krb5_error_e_data=yes
13376 else
13377   echo "$as_me: failed program was:" >&5
13378 sed 's/^/| /' conftest.$ac_ext >&5
13379
13380 ac_cv_member_krb5_error_e_data=no
13381 fi
13382 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13383 fi
13384 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13385 fi
13386 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13387 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13388 if test $ac_cv_member_krb5_error_e_data = yes; then
13389
13390 cat >>confdefs.h <<_ACEOF
13391 #define HAVE_KRB5_ERROR_E_DATA 1
13392 _ACEOF
13393
13394
13395 else
13396   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13397 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13398    { (exit 1); exit 1; }; }
13399 fi
13400
13401 fi
13402
13403 fi
13404
13405
13406 ##
13407 ## Functions, global variables
13408 ##
13409
13410 echo "$as_me:$LINENO: checking for int timezone" >&5
13411 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13412 if test "${pgac_cv_var_int_timezone+set}" = set; then
13413   echo $ECHO_N "(cached) $ECHO_C" >&6
13414 else
13415   cat >conftest.$ac_ext <<_ACEOF
13416 /* confdefs.h.  */
13417 _ACEOF
13418 cat confdefs.h >>conftest.$ac_ext
13419 cat >>conftest.$ac_ext <<_ACEOF
13420 /* end confdefs.h.  */
13421 #include <time.h>
13422 int res;
13423 int
13424 main ()
13425 {
13426 #ifndef __CYGWIN__
13427 res = timezone / 60;
13428 #else
13429 res = _timezone / 60;
13430 #endif
13431   ;
13432   return 0;
13433 }
13434 _ACEOF
13435 rm -f conftest.$ac_objext conftest$ac_exeext
13436 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13437   (eval $ac_link) 2>conftest.er1
13438   ac_status=$?
13439   grep -v '^ *+' conftest.er1 >conftest.err
13440   rm -f conftest.er1
13441   cat conftest.err >&5
13442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13443   (exit $ac_status); } &&
13444          { ac_try='test -z "$ac_c_werror_flag"
13445                          || test ! -s conftest.err'
13446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13447   (eval $ac_try) 2>&5
13448   ac_status=$?
13449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13450   (exit $ac_status); }; } &&
13451          { ac_try='test -s conftest$ac_exeext'
13452   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13453   (eval $ac_try) 2>&5
13454   ac_status=$?
13455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13456   (exit $ac_status); }; }; then
13457   pgac_cv_var_int_timezone=yes
13458 else
13459   echo "$as_me: failed program was:" >&5
13460 sed 's/^/| /' conftest.$ac_ext >&5
13461
13462 pgac_cv_var_int_timezone=no
13463 fi
13464 rm -f conftest.err conftest.$ac_objext \
13465       conftest$ac_exeext conftest.$ac_ext
13466 fi
13467 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13468 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13469 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13470
13471 cat >>confdefs.h <<\_ACEOF
13472 #define HAVE_INT_TIMEZONE
13473 _ACEOF
13474
13475 fi
13476 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13477 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13478  if test "${ac_cv_func_accept_return+set}" = set; then
13479   echo $ECHO_N "(cached) $ECHO_C" >&6
13480 else
13481    if test "${ac_cv_func_accept_arg1+set}" = set; then
13482   echo $ECHO_N "(cached) $ECHO_C" >&6
13483 else
13484     if test "${ac_cv_func_accept_arg2+set}" = set; then
13485   echo $ECHO_N "(cached) $ECHO_C" >&6
13486 else
13487      if test "${ac_cv_func_accept_arg3+set}" = set; then
13488   echo $ECHO_N "(cached) $ECHO_C" >&6
13489 else
13490       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13491       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13492        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13493         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
13494          cat >conftest.$ac_ext <<_ACEOF
13495 /* confdefs.h.  */
13496 _ACEOF
13497 cat confdefs.h >>conftest.$ac_ext
13498 cat >>conftest.$ac_ext <<_ACEOF
13499 /* end confdefs.h.  */
13500 #ifdef HAVE_SYS_TYPES_H
13501 #include <sys/types.h>
13502 #endif
13503 #ifdef HAVE_SYS_SOCKET_H
13504 #include <sys/socket.h>
13505 #endif
13506 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13507 int
13508 main ()
13509 {
13510
13511   ;
13512   return 0;
13513 }
13514 _ACEOF
13515 rm -f conftest.$ac_objext
13516 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13517   (eval $ac_compile) 2>conftest.er1
13518   ac_status=$?
13519   grep -v '^ *+' conftest.er1 >conftest.err
13520   rm -f conftest.er1
13521   cat conftest.err >&5
13522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13523   (exit $ac_status); } &&
13524          { ac_try='test -z "$ac_c_werror_flag"
13525                          || test ! -s conftest.err'
13526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13527   (eval $ac_try) 2>&5
13528   ac_status=$?
13529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530   (exit $ac_status); }; } &&
13531          { ac_try='test -s conftest.$ac_objext'
13532   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13533   (eval $ac_try) 2>&5
13534   ac_status=$?
13535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13536   (exit $ac_status); }; }; then
13537   ac_not_found=no; break 4
13538 else
13539   echo "$as_me: failed program was:" >&5
13540 sed 's/^/| /' conftest.$ac_ext >&5
13541
13542 ac_not_found=yes
13543 fi
13544 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13545        done
13546       done
13547      done
13548     done
13549     if test "$ac_not_found" = yes; then
13550       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13551 echo "$as_me: error: could not determine argument types" >&2;}
13552    { (exit 1); exit 1; }; }
13553     fi
13554     if test "$ac_cv_func_accept_arg3" = "void"; then
13555       ac_cv_func_accept_arg3=int
13556     fi
13557
13558 fi
13559
13560 fi
13561
13562 fi
13563
13564 fi
13565  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
13566 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13567
13568 cat >>confdefs.h <<_ACEOF
13569 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13570 _ACEOF
13571
13572
13573 cat >>confdefs.h <<_ACEOF
13574 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13575 _ACEOF
13576
13577
13578 cat >>confdefs.h <<_ACEOF
13579 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13580 _ACEOF
13581
13582
13583 cat >>confdefs.h <<_ACEOF
13584 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13585 _ACEOF
13586
13587
13588 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13589 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13590 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13591   echo $ECHO_N "(cached) $ECHO_C" >&6
13592 else
13593   cat >conftest.$ac_ext <<_ACEOF
13594 /* confdefs.h.  */
13595 _ACEOF
13596 cat confdefs.h >>conftest.$ac_ext
13597 cat >>conftest.$ac_ext <<_ACEOF
13598 /* end confdefs.h.  */
13599 #include <sys/time.h>
13600 int
13601 main ()
13602 {
13603 struct timeval *tp;
13604 struct timezone *tzp;
13605 gettimeofday(tp,tzp);
13606   ;
13607   return 0;
13608 }
13609 _ACEOF
13610 rm -f conftest.$ac_objext
13611 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13612   (eval $ac_compile) 2>conftest.er1
13613   ac_status=$?
13614   grep -v '^ *+' conftest.er1 >conftest.err
13615   rm -f conftest.er1
13616   cat conftest.err >&5
13617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13618   (exit $ac_status); } &&
13619          { ac_try='test -z "$ac_c_werror_flag"
13620                          || test ! -s conftest.err'
13621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13622   (eval $ac_try) 2>&5
13623   ac_status=$?
13624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13625   (exit $ac_status); }; } &&
13626          { ac_try='test -s conftest.$ac_objext'
13627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13628   (eval $ac_try) 2>&5
13629   ac_status=$?
13630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13631   (exit $ac_status); }; }; then
13632   pgac_cv_func_gettimeofday_1arg=no
13633 else
13634   echo "$as_me: failed program was:" >&5
13635 sed 's/^/| /' conftest.$ac_ext >&5
13636
13637 pgac_cv_func_gettimeofday_1arg=yes
13638 fi
13639 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13640 fi
13641 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13642 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13643 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13644
13645 cat >>confdefs.h <<\_ACEOF
13646 #define GETTIMEOFDAY_1ARG
13647 _ACEOF
13648
13649 fi
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673 for ac_func in cbrt dlopen fcvt fdatasync getpeereid getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13674 do
13675 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13676 echo "$as_me:$LINENO: checking for $ac_func" >&5
13677 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13678 if eval "test \"\${$as_ac_var+set}\" = set"; then
13679   echo $ECHO_N "(cached) $ECHO_C" >&6
13680 else
13681   cat >conftest.$ac_ext <<_ACEOF
13682 /* confdefs.h.  */
13683 _ACEOF
13684 cat confdefs.h >>conftest.$ac_ext
13685 cat >>conftest.$ac_ext <<_ACEOF
13686 /* end confdefs.h.  */
13687 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13688    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13689 #define $ac_func innocuous_$ac_func
13690
13691 /* System header to define __stub macros and hopefully few prototypes,
13692     which can conflict with char $ac_func (); below.
13693     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13694     <limits.h> exists even on freestanding compilers.  */
13695
13696 #ifdef __STDC__
13697 # include <limits.h>
13698 #else
13699 # include <assert.h>
13700 #endif
13701
13702 #undef $ac_func
13703
13704 /* Override any gcc2 internal prototype to avoid an error.  */
13705 #ifdef __cplusplus
13706 extern "C"
13707 {
13708 #endif
13709 /* We use char because int might match the return type of a gcc2
13710    builtin and then its argument prototype would still apply.  */
13711 char $ac_func ();
13712 /* The GNU C library defines this for functions which it implements
13713     to always fail with ENOSYS.  Some functions are actually named
13714     something starting with __ and the normal name is an alias.  */
13715 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13716 choke me
13717 #else
13718 char (*f) () = $ac_func;
13719 #endif
13720 #ifdef __cplusplus
13721 }
13722 #endif
13723
13724 int
13725 main ()
13726 {
13727 return f != $ac_func;
13728   ;
13729   return 0;
13730 }
13731 _ACEOF
13732 rm -f conftest.$ac_objext conftest$ac_exeext
13733 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13734   (eval $ac_link) 2>conftest.er1
13735   ac_status=$?
13736   grep -v '^ *+' conftest.er1 >conftest.err
13737   rm -f conftest.er1
13738   cat conftest.err >&5
13739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13740   (exit $ac_status); } &&
13741          { ac_try='test -z "$ac_c_werror_flag"
13742                          || test ! -s conftest.err'
13743   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13744   (eval $ac_try) 2>&5
13745   ac_status=$?
13746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13747   (exit $ac_status); }; } &&
13748          { ac_try='test -s conftest$ac_exeext'
13749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13750   (eval $ac_try) 2>&5
13751   ac_status=$?
13752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13753   (exit $ac_status); }; }; then
13754   eval "$as_ac_var=yes"
13755 else
13756   echo "$as_me: failed program was:" >&5
13757 sed 's/^/| /' conftest.$ac_ext >&5
13758
13759 eval "$as_ac_var=no"
13760 fi
13761 rm -f conftest.err conftest.$ac_objext \
13762       conftest$ac_exeext conftest.$ac_ext
13763 fi
13764 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13765 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13766 if test `eval echo '${'$as_ac_var'}'` = yes; then
13767   cat >>confdefs.h <<_ACEOF
13768 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13769 _ACEOF
13770
13771 fi
13772 done
13773
13774
13775 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13776 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13777 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13778   echo $ECHO_N "(cached) $ECHO_C" >&6
13779 else
13780   cat >conftest.$ac_ext <<_ACEOF
13781 /* confdefs.h.  */
13782 _ACEOF
13783 cat confdefs.h >>conftest.$ac_ext
13784 cat >>conftest.$ac_ext <<_ACEOF
13785 /* end confdefs.h.  */
13786 #include <unistd.h>
13787
13788 int
13789 main ()
13790 {
13791 #ifndef fdatasync
13792   char *p = (char *) fdatasync;
13793 #endif
13794
13795   ;
13796   return 0;
13797 }
13798 _ACEOF
13799 rm -f conftest.$ac_objext
13800 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13801   (eval $ac_compile) 2>conftest.er1
13802   ac_status=$?
13803   grep -v '^ *+' conftest.er1 >conftest.err
13804   rm -f conftest.er1
13805   cat conftest.err >&5
13806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13807   (exit $ac_status); } &&
13808          { ac_try='test -z "$ac_c_werror_flag"
13809                          || test ! -s conftest.err'
13810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13811   (eval $ac_try) 2>&5
13812   ac_status=$?
13813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13814   (exit $ac_status); }; } &&
13815          { ac_try='test -s conftest.$ac_objext'
13816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13817   (eval $ac_try) 2>&5
13818   ac_status=$?
13819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13820   (exit $ac_status); }; }; then
13821   ac_cv_have_decl_fdatasync=yes
13822 else
13823   echo "$as_me: failed program was:" >&5
13824 sed 's/^/| /' conftest.$ac_ext >&5
13825
13826 ac_cv_have_decl_fdatasync=no
13827 fi
13828 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13829 fi
13830 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13831 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13832 if test $ac_cv_have_decl_fdatasync = yes; then
13833
13834 cat >>confdefs.h <<_ACEOF
13835 #define HAVE_DECL_FDATASYNC 1
13836 _ACEOF
13837
13838
13839 else
13840   cat >>confdefs.h <<_ACEOF
13841 #define HAVE_DECL_FDATASYNC 0
13842 _ACEOF
13843
13844
13845 fi
13846
13847
13848 echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
13849 echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6
13850 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
13851   echo $ECHO_N "(cached) $ECHO_C" >&6
13852 else
13853   cat >conftest.$ac_ext <<_ACEOF
13854 /* confdefs.h.  */
13855 _ACEOF
13856 cat confdefs.h >>conftest.$ac_ext
13857 cat >>conftest.$ac_ext <<_ACEOF
13858 /* end confdefs.h.  */
13859 #include <fcntl.h>
13860
13861 int
13862 main ()
13863 {
13864 #ifndef posix_fadvise
13865   char *p = (char *) posix_fadvise;
13866 #endif
13867
13868   ;
13869   return 0;
13870 }
13871 _ACEOF
13872 rm -f conftest.$ac_objext
13873 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13874   (eval $ac_compile) 2>conftest.er1
13875   ac_status=$?
13876   grep -v '^ *+' conftest.er1 >conftest.err
13877   rm -f conftest.er1
13878   cat conftest.err >&5
13879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13880   (exit $ac_status); } &&
13881          { ac_try='test -z "$ac_c_werror_flag"
13882                          || test ! -s conftest.err'
13883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13884   (eval $ac_try) 2>&5
13885   ac_status=$?
13886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13887   (exit $ac_status); }; } &&
13888          { ac_try='test -s conftest.$ac_objext'
13889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13890   (eval $ac_try) 2>&5
13891   ac_status=$?
13892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13893   (exit $ac_status); }; }; then
13894   ac_cv_have_decl_posix_fadvise=yes
13895 else
13896   echo "$as_me: failed program was:" >&5
13897 sed 's/^/| /' conftest.$ac_ext >&5
13898
13899 ac_cv_have_decl_posix_fadvise=no
13900 fi
13901 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13902 fi
13903 echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
13904 echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6
13905 if test $ac_cv_have_decl_posix_fadvise = yes; then
13906
13907 cat >>confdefs.h <<_ACEOF
13908 #define HAVE_DECL_POSIX_FADVISE 1
13909 _ACEOF
13910
13911
13912 else
13913   cat >>confdefs.h <<_ACEOF
13914 #define HAVE_DECL_POSIX_FADVISE 0
13915 _ACEOF
13916
13917
13918 fi
13919
13920
13921 echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
13922 echo $ECHO_N "checking whether strlcpy is declared... $ECHO_C" >&6
13923 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
13924   echo $ECHO_N "(cached) $ECHO_C" >&6
13925 else
13926   cat >conftest.$ac_ext <<_ACEOF
13927 /* confdefs.h.  */
13928 _ACEOF
13929 cat confdefs.h >>conftest.$ac_ext
13930 cat >>conftest.$ac_ext <<_ACEOF
13931 /* end confdefs.h.  */
13932 $ac_includes_default
13933 int
13934 main ()
13935 {
13936 #ifndef strlcpy
13937   char *p = (char *) strlcpy;
13938 #endif
13939
13940   ;
13941   return 0;
13942 }
13943 _ACEOF
13944 rm -f conftest.$ac_objext
13945 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13946   (eval $ac_compile) 2>conftest.er1
13947   ac_status=$?
13948   grep -v '^ *+' conftest.er1 >conftest.err
13949   rm -f conftest.er1
13950   cat conftest.err >&5
13951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13952   (exit $ac_status); } &&
13953          { ac_try='test -z "$ac_c_werror_flag"
13954                          || test ! -s conftest.err'
13955   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13956   (eval $ac_try) 2>&5
13957   ac_status=$?
13958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13959   (exit $ac_status); }; } &&
13960          { ac_try='test -s conftest.$ac_objext'
13961   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13962   (eval $ac_try) 2>&5
13963   ac_status=$?
13964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13965   (exit $ac_status); }; }; then
13966   ac_cv_have_decl_strlcpy=yes
13967 else
13968   echo "$as_me: failed program was:" >&5
13969 sed 's/^/| /' conftest.$ac_ext >&5
13970
13971 ac_cv_have_decl_strlcpy=no
13972 fi
13973 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13974 fi
13975 echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
13976 echo "${ECHO_T}$ac_cv_have_decl_strlcpy" >&6
13977 if test $ac_cv_have_decl_strlcpy = yes; then
13978
13979 cat >>confdefs.h <<_ACEOF
13980 #define HAVE_DECL_STRLCPY 1
13981 _ACEOF
13982
13983
13984 else
13985   cat >>confdefs.h <<_ACEOF
13986 #define HAVE_DECL_STRLCPY 0
13987 _ACEOF
13988
13989
13990 fi
13991
13992
13993 # This is probably only present on Darwin, but may as well check always
13994 echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
13995 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6
13996 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
13997   echo $ECHO_N "(cached) $ECHO_C" >&6
13998 else
13999   cat >conftest.$ac_ext <<_ACEOF
14000 /* confdefs.h.  */
14001 _ACEOF
14002 cat confdefs.h >>conftest.$ac_ext
14003 cat >>conftest.$ac_ext <<_ACEOF
14004 /* end confdefs.h.  */
14005 #include <fcntl.h>
14006
14007 int
14008 main ()
14009 {
14010 #ifndef F_FULLFSYNC
14011   char *p = (char *) F_FULLFSYNC;
14012 #endif
14013
14014   ;
14015   return 0;
14016 }
14017 _ACEOF
14018 rm -f conftest.$ac_objext
14019 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14020   (eval $ac_compile) 2>conftest.er1
14021   ac_status=$?
14022   grep -v '^ *+' conftest.er1 >conftest.err
14023   rm -f conftest.er1
14024   cat conftest.err >&5
14025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14026   (exit $ac_status); } &&
14027          { ac_try='test -z "$ac_c_werror_flag"
14028                          || test ! -s conftest.err'
14029   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14030   (eval $ac_try) 2>&5
14031   ac_status=$?
14032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14033   (exit $ac_status); }; } &&
14034          { ac_try='test -s conftest.$ac_objext'
14035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14036   (eval $ac_try) 2>&5
14037   ac_status=$?
14038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14039   (exit $ac_status); }; }; then
14040   ac_cv_have_decl_F_FULLFSYNC=yes
14041 else
14042   echo "$as_me: failed program was:" >&5
14043 sed 's/^/| /' conftest.$ac_ext >&5
14044
14045 ac_cv_have_decl_F_FULLFSYNC=no
14046 fi
14047 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14048 fi
14049 echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
14050 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6
14051 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
14052
14053 cat >>confdefs.h <<_ACEOF
14054 #define HAVE_DECL_F_FULLFSYNC 1
14055 _ACEOF
14056
14057
14058 else
14059   cat >>confdefs.h <<_ACEOF
14060 #define HAVE_DECL_F_FULLFSYNC 0
14061 _ACEOF
14062
14063
14064 fi
14065
14066
14067
14068 HAVE_IPV6=no
14069 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
14070 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
14071 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
14072   echo $ECHO_N "(cached) $ECHO_C" >&6
14073 else
14074   cat >conftest.$ac_ext <<_ACEOF
14075 /* confdefs.h.  */
14076 _ACEOF
14077 cat confdefs.h >>conftest.$ac_ext
14078 cat >>conftest.$ac_ext <<_ACEOF
14079 /* end confdefs.h.  */
14080 $ac_includes_default
14081 #include <netinet/in.h>
14082
14083 int
14084 main ()
14085 {
14086 if ((struct sockaddr_in6 *) 0)
14087   return 0;
14088 if (sizeof (struct sockaddr_in6))
14089   return 0;
14090   ;
14091   return 0;
14092 }
14093 _ACEOF
14094 rm -f conftest.$ac_objext
14095 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14096   (eval $ac_compile) 2>conftest.er1
14097   ac_status=$?
14098   grep -v '^ *+' conftest.er1 >conftest.err
14099   rm -f conftest.er1
14100   cat conftest.err >&5
14101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14102   (exit $ac_status); } &&
14103          { ac_try='test -z "$ac_c_werror_flag"
14104                          || test ! -s conftest.err'
14105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14106   (eval $ac_try) 2>&5
14107   ac_status=$?
14108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14109   (exit $ac_status); }; } &&
14110          { ac_try='test -s conftest.$ac_objext'
14111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14112   (eval $ac_try) 2>&5
14113   ac_status=$?
14114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14115   (exit $ac_status); }; }; then
14116   ac_cv_type_struct_sockaddr_in6=yes
14117 else
14118   echo "$as_me: failed program was:" >&5
14119 sed 's/^/| /' conftest.$ac_ext >&5
14120
14121 ac_cv_type_struct_sockaddr_in6=no
14122 fi
14123 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14124 fi
14125 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
14126 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
14127 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
14128
14129 cat >>confdefs.h <<\_ACEOF
14130 #define HAVE_IPV6 1
14131 _ACEOF
14132
14133          HAVE_IPV6=yes
14134 fi
14135
14136
14137
14138 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
14139 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
14140 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
14141   echo $ECHO_N "(cached) $ECHO_C" >&6
14142 else
14143   cat >conftest.$ac_ext <<_ACEOF
14144 /* confdefs.h.  */
14145 _ACEOF
14146 cat confdefs.h >>conftest.$ac_ext
14147 cat >>conftest.$ac_ext <<_ACEOF
14148 /* end confdefs.h.  */
14149 #include <machine/vmparam.h>
14150 #include <sys/exec.h>
14151
14152 int
14153 main ()
14154 {
14155 PS_STRINGS->ps_nargvstr = 1;
14156 PS_STRINGS->ps_argvstr = "foo";
14157   ;
14158   return 0;
14159 }
14160 _ACEOF
14161 rm -f conftest.$ac_objext conftest$ac_exeext
14162 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14163   (eval $ac_link) 2>conftest.er1
14164   ac_status=$?
14165   grep -v '^ *+' conftest.er1 >conftest.err
14166   rm -f conftest.er1
14167   cat conftest.err >&5
14168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14169   (exit $ac_status); } &&
14170          { ac_try='test -z "$ac_c_werror_flag"
14171                          || test ! -s conftest.err'
14172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14173   (eval $ac_try) 2>&5
14174   ac_status=$?
14175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14176   (exit $ac_status); }; } &&
14177          { ac_try='test -s conftest$ac_exeext'
14178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14179   (eval $ac_try) 2>&5
14180   ac_status=$?
14181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14182   (exit $ac_status); }; }; then
14183   pgac_cv_var_PS_STRINGS=yes
14184 else
14185   echo "$as_me: failed program was:" >&5
14186 sed 's/^/| /' conftest.$ac_ext >&5
14187
14188 pgac_cv_var_PS_STRINGS=no
14189 fi
14190 rm -f conftest.err conftest.$ac_objext \
14191       conftest$ac_exeext conftest.$ac_ext
14192 fi
14193 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
14194 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
14195 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
14196
14197 cat >>confdefs.h <<\_ACEOF
14198 #define HAVE_PS_STRINGS
14199 _ACEOF
14200
14201 fi
14202
14203
14204 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
14205 # is missing.  Yes, there are machines that have only one.  We may
14206 # also decide to use snprintf.c if snprintf() is present but does not
14207 # have all the features we need --- see below.
14208
14209 if test "$PORTNAME" = "win32"; then
14210   # Win32 gets snprintf.c built unconditionally.
14211   #
14212   # To properly translate all NLS languages strings, we must support the
14213   # *printf() %$ format, which allows *printf() arguments to be selected
14214   # by position in the translated string.
14215   #
14216   # libintl versions < 0.13 use the native *printf() functions, and Win32
14217   # *printf() doesn't understand %$, so we must use our /port versions,
14218   # which do understand %$. libintl versions >= 0.13 include their own
14219   # *printf versions on Win32.  The libintl 0.13 release note text is:
14220   #
14221   #   C format strings with positions, as they arise when a translator
14222   #   needs to reorder a sentence, are now supported on all platforms.
14223   #   On those few platforms (NetBSD and Woe32) for which the native
14224   #   printf()/fprintf()/... functions don't support such format
14225   #   strings, replacements are provided through <libintl.h>.
14226   #
14227   # We could use libintl >= 0.13's *printf() if we were sure that we had
14228   # a litint >= 0.13 at runtime, but seeing that there is no clean way
14229   # to guarantee that, it is best to just use our own, so we are sure to
14230   # get %$ support. In include/port.h we disable the *printf() macros
14231   # that might have been defined by libintl.
14232   #
14233   # We do this unconditionally whether NLS is used or not so we are sure
14234   # that all Win32 libraries and binaries behave the same.
14235   pgac_need_repl_snprintf=yes
14236 else
14237   pgac_need_repl_snprintf=no
14238
14239 for ac_func in snprintf
14240 do
14241 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14242 echo "$as_me:$LINENO: checking for $ac_func" >&5
14243 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14244 if eval "test \"\${$as_ac_var+set}\" = set"; then
14245   echo $ECHO_N "(cached) $ECHO_C" >&6
14246 else
14247   cat >conftest.$ac_ext <<_ACEOF
14248 /* confdefs.h.  */
14249 _ACEOF
14250 cat confdefs.h >>conftest.$ac_ext
14251 cat >>conftest.$ac_ext <<_ACEOF
14252 /* end confdefs.h.  */
14253 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14254    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14255 #define $ac_func innocuous_$ac_func
14256
14257 /* System header to define __stub macros and hopefully few prototypes,
14258     which can conflict with char $ac_func (); below.
14259     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14260     <limits.h> exists even on freestanding compilers.  */
14261
14262 #ifdef __STDC__
14263 # include <limits.h>
14264 #else
14265 # include <assert.h>
14266 #endif
14267
14268 #undef $ac_func
14269
14270 /* Override any gcc2 internal prototype to avoid an error.  */
14271 #ifdef __cplusplus
14272 extern "C"
14273 {
14274 #endif
14275 /* We use char because int might match the return type of a gcc2
14276    builtin and then its argument prototype would still apply.  */
14277 char $ac_func ();
14278 /* The GNU C library defines this for functions which it implements
14279     to always fail with ENOSYS.  Some functions are actually named
14280     something starting with __ and the normal name is an alias.  */
14281 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14282 choke me
14283 #else
14284 char (*f) () = $ac_func;
14285 #endif
14286 #ifdef __cplusplus
14287 }
14288 #endif
14289
14290 int
14291 main ()
14292 {
14293 return f != $ac_func;
14294   ;
14295   return 0;
14296 }
14297 _ACEOF
14298 rm -f conftest.$ac_objext conftest$ac_exeext
14299 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14300   (eval $ac_link) 2>conftest.er1
14301   ac_status=$?
14302   grep -v '^ *+' conftest.er1 >conftest.err
14303   rm -f conftest.er1
14304   cat conftest.err >&5
14305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14306   (exit $ac_status); } &&
14307          { ac_try='test -z "$ac_c_werror_flag"
14308                          || test ! -s conftest.err'
14309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14310   (eval $ac_try) 2>&5
14311   ac_status=$?
14312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14313   (exit $ac_status); }; } &&
14314          { ac_try='test -s conftest$ac_exeext'
14315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14316   (eval $ac_try) 2>&5
14317   ac_status=$?
14318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14319   (exit $ac_status); }; }; then
14320   eval "$as_ac_var=yes"
14321 else
14322   echo "$as_me: failed program was:" >&5
14323 sed 's/^/| /' conftest.$ac_ext >&5
14324
14325 eval "$as_ac_var=no"
14326 fi
14327 rm -f conftest.err conftest.$ac_objext \
14328       conftest$ac_exeext conftest.$ac_ext
14329 fi
14330 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14331 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14332 if test `eval echo '${'$as_ac_var'}'` = yes; then
14333   cat >>confdefs.h <<_ACEOF
14334 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14335 _ACEOF
14336
14337 else
14338   pgac_need_repl_snprintf=yes
14339 fi
14340 done
14341
14342
14343 for ac_func in vsnprintf
14344 do
14345 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14346 echo "$as_me:$LINENO: checking for $ac_func" >&5
14347 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14348 if eval "test \"\${$as_ac_var+set}\" = set"; then
14349   echo $ECHO_N "(cached) $ECHO_C" >&6
14350 else
14351   cat >conftest.$ac_ext <<_ACEOF
14352 /* confdefs.h.  */
14353 _ACEOF
14354 cat confdefs.h >>conftest.$ac_ext
14355 cat >>conftest.$ac_ext <<_ACEOF
14356 /* end confdefs.h.  */
14357 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14358    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14359 #define $ac_func innocuous_$ac_func
14360
14361 /* System header to define __stub macros and hopefully few prototypes,
14362     which can conflict with char $ac_func (); below.
14363     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14364     <limits.h> exists even on freestanding compilers.  */
14365
14366 #ifdef __STDC__
14367 # include <limits.h>
14368 #else
14369 # include <assert.h>
14370 #endif
14371
14372 #undef $ac_func
14373
14374 /* Override any gcc2 internal prototype to avoid an error.  */
14375 #ifdef __cplusplus
14376 extern "C"
14377 {
14378 #endif
14379 /* We use char because int might match the return type of a gcc2
14380    builtin and then its argument prototype would still apply.  */
14381 char $ac_func ();
14382 /* The GNU C library defines this for functions which it implements
14383     to always fail with ENOSYS.  Some functions are actually named
14384     something starting with __ and the normal name is an alias.  */
14385 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14386 choke me
14387 #else
14388 char (*f) () = $ac_func;
14389 #endif
14390 #ifdef __cplusplus
14391 }
14392 #endif
14393
14394 int
14395 main ()
14396 {
14397 return f != $ac_func;
14398   ;
14399   return 0;
14400 }
14401 _ACEOF
14402 rm -f conftest.$ac_objext conftest$ac_exeext
14403 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14404   (eval $ac_link) 2>conftest.er1
14405   ac_status=$?
14406   grep -v '^ *+' conftest.er1 >conftest.err
14407   rm -f conftest.er1
14408   cat conftest.err >&5
14409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14410   (exit $ac_status); } &&
14411          { ac_try='test -z "$ac_c_werror_flag"
14412                          || test ! -s conftest.err'
14413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14414   (eval $ac_try) 2>&5
14415   ac_status=$?
14416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14417   (exit $ac_status); }; } &&
14418          { ac_try='test -s conftest$ac_exeext'
14419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14420   (eval $ac_try) 2>&5
14421   ac_status=$?
14422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14423   (exit $ac_status); }; }; then
14424   eval "$as_ac_var=yes"
14425 else
14426   echo "$as_me: failed program was:" >&5
14427 sed 's/^/| /' conftest.$ac_ext >&5
14428
14429 eval "$as_ac_var=no"
14430 fi
14431 rm -f conftest.err conftest.$ac_objext \
14432       conftest$ac_exeext conftest.$ac_ext
14433 fi
14434 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14435 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14436 if test `eval echo '${'$as_ac_var'}'` = yes; then
14437   cat >>confdefs.h <<_ACEOF
14438 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14439 _ACEOF
14440
14441 else
14442   pgac_need_repl_snprintf=yes
14443 fi
14444 done
14445
14446 fi
14447
14448
14449 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14450 # include/c.h will provide declarations.  Note this is a separate test
14451 # from whether the functions exist in the C library --- there are
14452 # systems that have the functions but don't bother to declare them :-(
14453
14454 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14455 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14456 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14457   echo $ECHO_N "(cached) $ECHO_C" >&6
14458 else
14459   cat >conftest.$ac_ext <<_ACEOF
14460 /* confdefs.h.  */
14461 _ACEOF
14462 cat confdefs.h >>conftest.$ac_ext
14463 cat >>conftest.$ac_ext <<_ACEOF
14464 /* end confdefs.h.  */
14465 $ac_includes_default
14466 int
14467 main ()
14468 {
14469 #ifndef snprintf
14470   char *p = (char *) snprintf;
14471 #endif
14472
14473   ;
14474   return 0;
14475 }
14476 _ACEOF
14477 rm -f conftest.$ac_objext
14478 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14479   (eval $ac_compile) 2>conftest.er1
14480   ac_status=$?
14481   grep -v '^ *+' conftest.er1 >conftest.err
14482   rm -f conftest.er1
14483   cat conftest.err >&5
14484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14485   (exit $ac_status); } &&
14486          { ac_try='test -z "$ac_c_werror_flag"
14487                          || test ! -s conftest.err'
14488   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14489   (eval $ac_try) 2>&5
14490   ac_status=$?
14491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14492   (exit $ac_status); }; } &&
14493          { ac_try='test -s conftest.$ac_objext'
14494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14495   (eval $ac_try) 2>&5
14496   ac_status=$?
14497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14498   (exit $ac_status); }; }; then
14499   ac_cv_have_decl_snprintf=yes
14500 else
14501   echo "$as_me: failed program was:" >&5
14502 sed 's/^/| /' conftest.$ac_ext >&5
14503
14504 ac_cv_have_decl_snprintf=no
14505 fi
14506 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14507 fi
14508 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14509 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14510 if test $ac_cv_have_decl_snprintf = yes; then
14511
14512 cat >>confdefs.h <<_ACEOF
14513 #define HAVE_DECL_SNPRINTF 1
14514 _ACEOF
14515
14516
14517 else
14518   cat >>confdefs.h <<_ACEOF
14519 #define HAVE_DECL_SNPRINTF 0
14520 _ACEOF
14521
14522
14523 fi
14524 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14525 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14526 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14527   echo $ECHO_N "(cached) $ECHO_C" >&6
14528 else
14529   cat >conftest.$ac_ext <<_ACEOF
14530 /* confdefs.h.  */
14531 _ACEOF
14532 cat confdefs.h >>conftest.$ac_ext
14533 cat >>conftest.$ac_ext <<_ACEOF
14534 /* end confdefs.h.  */
14535 $ac_includes_default
14536 int
14537 main ()
14538 {
14539 #ifndef vsnprintf
14540   char *p = (char *) vsnprintf;
14541 #endif
14542
14543   ;
14544   return 0;
14545 }
14546 _ACEOF
14547 rm -f conftest.$ac_objext
14548 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14549   (eval $ac_compile) 2>conftest.er1
14550   ac_status=$?
14551   grep -v '^ *+' conftest.er1 >conftest.err
14552   rm -f conftest.er1
14553   cat conftest.err >&5
14554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14555   (exit $ac_status); } &&
14556          { ac_try='test -z "$ac_c_werror_flag"
14557                          || test ! -s conftest.err'
14558   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14559   (eval $ac_try) 2>&5
14560   ac_status=$?
14561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14562   (exit $ac_status); }; } &&
14563          { ac_try='test -s conftest.$ac_objext'
14564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14565   (eval $ac_try) 2>&5
14566   ac_status=$?
14567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14568   (exit $ac_status); }; }; then
14569   ac_cv_have_decl_vsnprintf=yes
14570 else
14571   echo "$as_me: failed program was:" >&5
14572 sed 's/^/| /' conftest.$ac_ext >&5
14573
14574 ac_cv_have_decl_vsnprintf=no
14575 fi
14576 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14577 fi
14578 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14579 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14580 if test $ac_cv_have_decl_vsnprintf = yes; then
14581
14582 cat >>confdefs.h <<_ACEOF
14583 #define HAVE_DECL_VSNPRINTF 1
14584 _ACEOF
14585
14586
14587 else
14588   cat >>confdefs.h <<_ACEOF
14589 #define HAVE_DECL_VSNPRINTF 0
14590 _ACEOF
14591
14592
14593 fi
14594
14595
14596
14597
14598 echo "$as_me:$LINENO: checking for isinf" >&5
14599 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14600 if test "${ac_cv_func_isinf+set}" = set; then
14601   echo $ECHO_N "(cached) $ECHO_C" >&6
14602 else
14603   cat >conftest.$ac_ext <<_ACEOF
14604 /* confdefs.h.  */
14605 _ACEOF
14606 cat confdefs.h >>conftest.$ac_ext
14607 cat >>conftest.$ac_ext <<_ACEOF
14608 /* end confdefs.h.  */
14609
14610 #include <math.h>
14611 double glob_double;
14612
14613 int
14614 main ()
14615 {
14616 return isinf(glob_double) ? 0 : 1;
14617   ;
14618   return 0;
14619 }
14620 _ACEOF
14621 rm -f conftest.$ac_objext conftest$ac_exeext
14622 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14623   (eval $ac_link) 2>conftest.er1
14624   ac_status=$?
14625   grep -v '^ *+' conftest.er1 >conftest.err
14626   rm -f conftest.er1
14627   cat conftest.err >&5
14628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14629   (exit $ac_status); } &&
14630          { ac_try='test -z "$ac_c_werror_flag"
14631                          || test ! -s conftest.err'
14632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14633   (eval $ac_try) 2>&5
14634   ac_status=$?
14635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14636   (exit $ac_status); }; } &&
14637          { ac_try='test -s conftest$ac_exeext'
14638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14639   (eval $ac_try) 2>&5
14640   ac_status=$?
14641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14642   (exit $ac_status); }; }; then
14643   ac_cv_func_isinf=yes
14644 else
14645   echo "$as_me: failed program was:" >&5
14646 sed 's/^/| /' conftest.$ac_ext >&5
14647
14648 ac_cv_func_isinf=no
14649 fi
14650 rm -f conftest.err conftest.$ac_objext \
14651       conftest$ac_exeext conftest.$ac_ext
14652 fi
14653 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14654 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14655
14656 if test $ac_cv_func_isinf = yes ; then
14657
14658 cat >>confdefs.h <<\_ACEOF
14659 #define HAVE_ISINF 1
14660 _ACEOF
14661
14662 else
14663   case $LIBOBJS in
14664     "isinf.$ac_objext"   | \
14665   *" isinf.$ac_objext"   | \
14666     "isinf.$ac_objext "* | \
14667   *" isinf.$ac_objext "* ) ;;
14668   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14669 esac
14670
14671   # Look for a way to implement a substitute for isinf()
14672
14673
14674
14675
14676 for ac_func in fpclass fp_class fp_class_d class
14677 do
14678 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14679 echo "$as_me:$LINENO: checking for $ac_func" >&5
14680 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14681 if eval "test \"\${$as_ac_var+set}\" = set"; then
14682   echo $ECHO_N "(cached) $ECHO_C" >&6
14683 else
14684   cat >conftest.$ac_ext <<_ACEOF
14685 /* confdefs.h.  */
14686 _ACEOF
14687 cat confdefs.h >>conftest.$ac_ext
14688 cat >>conftest.$ac_ext <<_ACEOF
14689 /* end confdefs.h.  */
14690 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14691    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14692 #define $ac_func innocuous_$ac_func
14693
14694 /* System header to define __stub macros and hopefully few prototypes,
14695     which can conflict with char $ac_func (); below.
14696     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14697     <limits.h> exists even on freestanding compilers.  */
14698
14699 #ifdef __STDC__
14700 # include <limits.h>
14701 #else
14702 # include <assert.h>
14703 #endif
14704
14705 #undef $ac_func
14706
14707 /* Override any gcc2 internal prototype to avoid an error.  */
14708 #ifdef __cplusplus
14709 extern "C"
14710 {
14711 #endif
14712 /* We use char because int might match the return type of a gcc2
14713    builtin and then its argument prototype would still apply.  */
14714 char $ac_func ();
14715 /* The GNU C library defines this for functions which it implements
14716     to always fail with ENOSYS.  Some functions are actually named
14717     something starting with __ and the normal name is an alias.  */
14718 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14719 choke me
14720 #else
14721 char (*f) () = $ac_func;
14722 #endif
14723 #ifdef __cplusplus
14724 }
14725 #endif
14726
14727 int
14728 main ()
14729 {
14730 return f != $ac_func;
14731   ;
14732   return 0;
14733 }
14734 _ACEOF
14735 rm -f conftest.$ac_objext conftest$ac_exeext
14736 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14737   (eval $ac_link) 2>conftest.er1
14738   ac_status=$?
14739   grep -v '^ *+' conftest.er1 >conftest.err
14740   rm -f conftest.er1
14741   cat conftest.err >&5
14742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14743   (exit $ac_status); } &&
14744          { ac_try='test -z "$ac_c_werror_flag"
14745                          || test ! -s conftest.err'
14746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14747   (eval $ac_try) 2>&5
14748   ac_status=$?
14749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14750   (exit $ac_status); }; } &&
14751          { ac_try='test -s conftest$ac_exeext'
14752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14753   (eval $ac_try) 2>&5
14754   ac_status=$?
14755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14756   (exit $ac_status); }; }; then
14757   eval "$as_ac_var=yes"
14758 else
14759   echo "$as_me: failed program was:" >&5
14760 sed 's/^/| /' conftest.$ac_ext >&5
14761
14762 eval "$as_ac_var=no"
14763 fi
14764 rm -f conftest.err conftest.$ac_objext \
14765       conftest$ac_exeext conftest.$ac_ext
14766 fi
14767 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14768 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14769 if test `eval echo '${'$as_ac_var'}'` = yes; then
14770   cat >>confdefs.h <<_ACEOF
14771 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14772 _ACEOF
14773  break
14774 fi
14775 done
14776
14777 fi
14778
14779 # Some versions of libedit contain strlcpy(); so disregard that library while
14780 # checking for these standard libc functions.
14781 pgac_save_LIBS="$LIBS"
14782 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strlcpy strtol strtoul unsetenv
14799 do
14800 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14801 echo "$as_me:$LINENO: checking for $ac_func" >&5
14802 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14803 if eval "test \"\${$as_ac_var+set}\" = set"; then
14804   echo $ECHO_N "(cached) $ECHO_C" >&6
14805 else
14806   cat >conftest.$ac_ext <<_ACEOF
14807 /* confdefs.h.  */
14808 _ACEOF
14809 cat confdefs.h >>conftest.$ac_ext
14810 cat >>conftest.$ac_ext <<_ACEOF
14811 /* end confdefs.h.  */
14812 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14813    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14814 #define $ac_func innocuous_$ac_func
14815
14816 /* System header to define __stub macros and hopefully few prototypes,
14817     which can conflict with char $ac_func (); below.
14818     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14819     <limits.h> exists even on freestanding compilers.  */
14820
14821 #ifdef __STDC__
14822 # include <limits.h>
14823 #else
14824 # include <assert.h>
14825 #endif
14826
14827 #undef $ac_func
14828
14829 /* Override any gcc2 internal prototype to avoid an error.  */
14830 #ifdef __cplusplus
14831 extern "C"
14832 {
14833 #endif
14834 /* We use char because int might match the return type of a gcc2
14835    builtin and then its argument prototype would still apply.  */
14836 char $ac_func ();
14837 /* The GNU C library defines this for functions which it implements
14838     to always fail with ENOSYS.  Some functions are actually named
14839     something starting with __ and the normal name is an alias.  */
14840 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14841 choke me
14842 #else
14843 char (*f) () = $ac_func;
14844 #endif
14845 #ifdef __cplusplus
14846 }
14847 #endif
14848
14849 int
14850 main ()
14851 {
14852 return f != $ac_func;
14853   ;
14854   return 0;
14855 }
14856 _ACEOF
14857 rm -f conftest.$ac_objext conftest$ac_exeext
14858 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14859   (eval $ac_link) 2>conftest.er1
14860   ac_status=$?
14861   grep -v '^ *+' conftest.er1 >conftest.err
14862   rm -f conftest.er1
14863   cat conftest.err >&5
14864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14865   (exit $ac_status); } &&
14866          { ac_try='test -z "$ac_c_werror_flag"
14867                          || test ! -s conftest.err'
14868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14869   (eval $ac_try) 2>&5
14870   ac_status=$?
14871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14872   (exit $ac_status); }; } &&
14873          { ac_try='test -s conftest$ac_exeext'
14874   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14875   (eval $ac_try) 2>&5
14876   ac_status=$?
14877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14878   (exit $ac_status); }; }; then
14879   eval "$as_ac_var=yes"
14880 else
14881   echo "$as_me: failed program was:" >&5
14882 sed 's/^/| /' conftest.$ac_ext >&5
14883
14884 eval "$as_ac_var=no"
14885 fi
14886 rm -f conftest.err conftest.$ac_objext \
14887       conftest$ac_exeext conftest.$ac_ext
14888 fi
14889 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14890 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14891 if test `eval echo '${'$as_ac_var'}'` = yes; then
14892   cat >>confdefs.h <<_ACEOF
14893 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14894 _ACEOF
14895
14896 else
14897   case $LIBOBJS in
14898     "$ac_func.$ac_objext"   | \
14899   *" $ac_func.$ac_objext"   | \
14900     "$ac_func.$ac_objext "* | \
14901   *" $ac_func.$ac_objext "* ) ;;
14902   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14903 esac
14904
14905 fi
14906 done
14907
14908
14909
14910 LIBS="$pgac_save_LIBS"
14911
14912 # System's version of getaddrinfo(), if any, may be used only if we found
14913 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14914 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14915 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14916 # because we want to use our own getaddrinfo.c on Windows anyway.)
14917 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14918
14919 for ac_func in getaddrinfo
14920 do
14921 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14922 echo "$as_me:$LINENO: checking for $ac_func" >&5
14923 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14924 if eval "test \"\${$as_ac_var+set}\" = set"; then
14925   echo $ECHO_N "(cached) $ECHO_C" >&6
14926 else
14927   cat >conftest.$ac_ext <<_ACEOF
14928 /* confdefs.h.  */
14929 _ACEOF
14930 cat confdefs.h >>conftest.$ac_ext
14931 cat >>conftest.$ac_ext <<_ACEOF
14932 /* end confdefs.h.  */
14933 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14934    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14935 #define $ac_func innocuous_$ac_func
14936
14937 /* System header to define __stub macros and hopefully few prototypes,
14938     which can conflict with char $ac_func (); below.
14939     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14940     <limits.h> exists even on freestanding compilers.  */
14941
14942 #ifdef __STDC__
14943 # include <limits.h>
14944 #else
14945 # include <assert.h>
14946 #endif
14947
14948 #undef $ac_func
14949
14950 /* Override any gcc2 internal prototype to avoid an error.  */
14951 #ifdef __cplusplus
14952 extern "C"
14953 {
14954 #endif
14955 /* We use char because int might match the return type of a gcc2
14956    builtin and then its argument prototype would still apply.  */
14957 char $ac_func ();
14958 /* The GNU C library defines this for functions which it implements
14959     to always fail with ENOSYS.  Some functions are actually named
14960     something starting with __ and the normal name is an alias.  */
14961 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14962 choke me
14963 #else
14964 char (*f) () = $ac_func;
14965 #endif
14966 #ifdef __cplusplus
14967 }
14968 #endif
14969
14970 int
14971 main ()
14972 {
14973 return f != $ac_func;
14974   ;
14975   return 0;
14976 }
14977 _ACEOF
14978 rm -f conftest.$ac_objext conftest$ac_exeext
14979 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14980   (eval $ac_link) 2>conftest.er1
14981   ac_status=$?
14982   grep -v '^ *+' conftest.er1 >conftest.err
14983   rm -f conftest.er1
14984   cat conftest.err >&5
14985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14986   (exit $ac_status); } &&
14987          { ac_try='test -z "$ac_c_werror_flag"
14988                          || test ! -s conftest.err'
14989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14990   (eval $ac_try) 2>&5
14991   ac_status=$?
14992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14993   (exit $ac_status); }; } &&
14994          { ac_try='test -s conftest$ac_exeext'
14995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14996   (eval $ac_try) 2>&5
14997   ac_status=$?
14998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14999   (exit $ac_status); }; }; then
15000   eval "$as_ac_var=yes"
15001 else
15002   echo "$as_me: failed program was:" >&5
15003 sed 's/^/| /' conftest.$ac_ext >&5
15004
15005 eval "$as_ac_var=no"
15006 fi
15007 rm -f conftest.err conftest.$ac_objext \
15008       conftest$ac_exeext conftest.$ac_ext
15009 fi
15010 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15011 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15012 if test `eval echo '${'$as_ac_var'}'` = yes; then
15013   cat >>confdefs.h <<_ACEOF
15014 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15015 _ACEOF
15016
15017 else
15018   case $LIBOBJS in
15019     "$ac_func.$ac_objext"   | \
15020   *" $ac_func.$ac_objext"   | \
15021     "$ac_func.$ac_objext "* | \
15022   *" $ac_func.$ac_objext "* ) ;;
15023   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15024 esac
15025
15026 fi
15027 done
15028
15029
15030 else
15031   case $LIBOBJS in
15032     "getaddrinfo.$ac_objext"   | \
15033   *" getaddrinfo.$ac_objext"   | \
15034     "getaddrinfo.$ac_objext "* | \
15035   *" getaddrinfo.$ac_objext "* ) ;;
15036   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
15037 esac
15038
15039 fi
15040
15041 # similarly, use system's getopt_long() only if system provides struct option.
15042 if test x"$ac_cv_type_struct_option" = xyes ; then
15043
15044 for ac_func in getopt_long
15045 do
15046 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15047 echo "$as_me:$LINENO: checking for $ac_func" >&5
15048 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15049 if eval "test \"\${$as_ac_var+set}\" = set"; then
15050   echo $ECHO_N "(cached) $ECHO_C" >&6
15051 else
15052   cat >conftest.$ac_ext <<_ACEOF
15053 /* confdefs.h.  */
15054 _ACEOF
15055 cat confdefs.h >>conftest.$ac_ext
15056 cat >>conftest.$ac_ext <<_ACEOF
15057 /* end confdefs.h.  */
15058 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15059    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15060 #define $ac_func innocuous_$ac_func
15061
15062 /* System header to define __stub macros and hopefully few prototypes,
15063     which can conflict with char $ac_func (); below.
15064     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15065     <limits.h> exists even on freestanding compilers.  */
15066
15067 #ifdef __STDC__
15068 # include <limits.h>
15069 #else
15070 # include <assert.h>
15071 #endif
15072
15073 #undef $ac_func
15074
15075 /* Override any gcc2 internal prototype to avoid an error.  */
15076 #ifdef __cplusplus
15077 extern "C"
15078 {
15079 #endif
15080 /* We use char because int might match the return type of a gcc2
15081    builtin and then its argument prototype would still apply.  */
15082 char $ac_func ();
15083 /* The GNU C library defines this for functions which it implements
15084     to always fail with ENOSYS.  Some functions are actually named
15085     something starting with __ and the normal name is an alias.  */
15086 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15087 choke me
15088 #else
15089 char (*f) () = $ac_func;
15090 #endif
15091 #ifdef __cplusplus
15092 }
15093 #endif
15094
15095 int
15096 main ()
15097 {
15098 return f != $ac_func;
15099   ;
15100   return 0;
15101 }
15102 _ACEOF
15103 rm -f conftest.$ac_objext conftest$ac_exeext
15104 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15105   (eval $ac_link) 2>conftest.er1
15106   ac_status=$?
15107   grep -v '^ *+' conftest.er1 >conftest.err
15108   rm -f conftest.er1
15109   cat conftest.err >&5
15110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15111   (exit $ac_status); } &&
15112          { ac_try='test -z "$ac_c_werror_flag"
15113                          || test ! -s conftest.err'
15114   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15115   (eval $ac_try) 2>&5
15116   ac_status=$?
15117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15118   (exit $ac_status); }; } &&
15119          { ac_try='test -s conftest$ac_exeext'
15120   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15121   (eval $ac_try) 2>&5
15122   ac_status=$?
15123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15124   (exit $ac_status); }; }; then
15125   eval "$as_ac_var=yes"
15126 else
15127   echo "$as_me: failed program was:" >&5
15128 sed 's/^/| /' conftest.$ac_ext >&5
15129
15130 eval "$as_ac_var=no"
15131 fi
15132 rm -f conftest.err conftest.$ac_objext \
15133       conftest$ac_exeext conftest.$ac_ext
15134 fi
15135 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15136 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15137 if test `eval echo '${'$as_ac_var'}'` = yes; then
15138   cat >>confdefs.h <<_ACEOF
15139 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15140 _ACEOF
15141
15142 else
15143   case $LIBOBJS in
15144     "$ac_func.$ac_objext"   | \
15145   *" $ac_func.$ac_objext"   | \
15146     "$ac_func.$ac_objext "* | \
15147   *" $ac_func.$ac_objext "* ) ;;
15148   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15149 esac
15150
15151 fi
15152 done
15153
15154
15155 else
15156   case $LIBOBJS in
15157     "getopt_long.$ac_objext"   | \
15158   *" getopt_long.$ac_objext"   | \
15159     "getopt_long.$ac_objext "* | \
15160   *" getopt_long.$ac_objext "* ) ;;
15161   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
15162 esac
15163
15164 fi
15165
15166 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
15167 # We override the previous test that said fseeko/ftello didn't exist
15168 # OS tests are also done in include/c.h and port/fseeko.c
15169 case $host_os in bsdi*|netbsd*)
15170 ac_cv_func_fseeko=yes
15171 esac
15172
15173 # Win32 support
15174 if test "$PORTNAME" = "win32"; then
15175 case $LIBOBJS in
15176     "gettimeofday.$ac_objext"   | \
15177   *" gettimeofday.$ac_objext"   | \
15178     "gettimeofday.$ac_objext "* | \
15179   *" gettimeofday.$ac_objext "* ) ;;
15180   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
15181 esac
15182
15183 case $LIBOBJS in
15184     "kill.$ac_objext"   | \
15185   *" kill.$ac_objext"   | \
15186     "kill.$ac_objext "* | \
15187   *" kill.$ac_objext "* ) ;;
15188   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
15189 esac
15190
15191 case $LIBOBJS in
15192     "open.$ac_objext"   | \
15193   *" open.$ac_objext"   | \
15194     "open.$ac_objext "* | \
15195   *" open.$ac_objext "* ) ;;
15196   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
15197 esac
15198
15199 case $LIBOBJS in
15200     "rand.$ac_objext"   | \
15201   *" rand.$ac_objext"   | \
15202     "rand.$ac_objext "* | \
15203   *" rand.$ac_objext "* ) ;;
15204   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
15205 esac
15206
15207 case $LIBOBJS in
15208     "win32error.$ac_objext"   | \
15209   *" win32error.$ac_objext"   | \
15210     "win32error.$ac_objext "* | \
15211   *" win32error.$ac_objext "* ) ;;
15212   *) LIBOBJS="$LIBOBJS win32error.$ac_objext" ;;
15213 esac
15214
15215
15216 cat >>confdefs.h <<\_ACEOF
15217 #define HAVE_SYMLINK 1
15218 _ACEOF
15219
15220 fi
15221
15222 if test "$with_readline" = yes; then
15223   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
15224 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
15225 cat >conftest.$ac_ext <<_ACEOF
15226 /* confdefs.h.  */
15227 _ACEOF
15228 cat confdefs.h >>conftest.$ac_ext
15229 cat >>conftest.$ac_ext <<_ACEOF
15230 /* end confdefs.h.  */
15231 #include <stdio.h>
15232 #ifdef HAVE_READLINE_READLINE_H
15233 # include <readline/readline.h>
15234 #elif defined(HAVE_READLINE_H)
15235 # include <readline.h>
15236 #endif
15237
15238 int
15239 main ()
15240 {
15241 rl_completion_append_character = 'x';
15242   ;
15243   return 0;
15244 }
15245 _ACEOF
15246 rm -f conftest.$ac_objext conftest$ac_exeext
15247 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15248   (eval $ac_link) 2>conftest.er1
15249   ac_status=$?
15250   grep -v '^ *+' conftest.er1 >conftest.err
15251   rm -f conftest.er1
15252   cat conftest.err >&5
15253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15254   (exit $ac_status); } &&
15255          { ac_try='test -z "$ac_c_werror_flag"
15256                          || test ! -s conftest.err'
15257   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15258   (eval $ac_try) 2>&5
15259   ac_status=$?
15260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15261   (exit $ac_status); }; } &&
15262          { ac_try='test -s conftest$ac_exeext'
15263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15264   (eval $ac_try) 2>&5
15265   ac_status=$?
15266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15267   (exit $ac_status); }; }; then
15268   echo "$as_me:$LINENO: result: yes" >&5
15269 echo "${ECHO_T}yes" >&6
15270
15271 cat >>confdefs.h <<\_ACEOF
15272 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
15273 _ACEOF
15274
15275 else
15276   echo "$as_me: failed program was:" >&5
15277 sed 's/^/| /' conftest.$ac_ext >&5
15278
15279 echo "$as_me:$LINENO: result: no" >&5
15280 echo "${ECHO_T}no" >&6
15281 fi
15282 rm -f conftest.err conftest.$ac_objext \
15283       conftest$ac_exeext conftest.$ac_ext
15284
15285
15286 for ac_func in rl_completion_matches rl_filename_completion_function
15287 do
15288 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15289 echo "$as_me:$LINENO: checking for $ac_func" >&5
15290 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15291 if eval "test \"\${$as_ac_var+set}\" = set"; then
15292   echo $ECHO_N "(cached) $ECHO_C" >&6
15293 else
15294   cat >conftest.$ac_ext <<_ACEOF
15295 /* confdefs.h.  */
15296 _ACEOF
15297 cat confdefs.h >>conftest.$ac_ext
15298 cat >>conftest.$ac_ext <<_ACEOF
15299 /* end confdefs.h.  */
15300 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15301    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15302 #define $ac_func innocuous_$ac_func
15303
15304 /* System header to define __stub macros and hopefully few prototypes,
15305     which can conflict with char $ac_func (); below.
15306     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15307     <limits.h> exists even on freestanding compilers.  */
15308
15309 #ifdef __STDC__
15310 # include <limits.h>
15311 #else
15312 # include <assert.h>
15313 #endif
15314
15315 #undef $ac_func
15316
15317 /* Override any gcc2 internal prototype to avoid an error.  */
15318 #ifdef __cplusplus
15319 extern "C"
15320 {
15321 #endif
15322 /* We use char because int might match the return type of a gcc2
15323    builtin and then its argument prototype would still apply.  */
15324 char $ac_func ();
15325 /* The GNU C library defines this for functions which it implements
15326     to always fail with ENOSYS.  Some functions are actually named
15327     something starting with __ and the normal name is an alias.  */
15328 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15329 choke me
15330 #else
15331 char (*f) () = $ac_func;
15332 #endif
15333 #ifdef __cplusplus
15334 }
15335 #endif
15336
15337 int
15338 main ()
15339 {
15340 return f != $ac_func;
15341   ;
15342   return 0;
15343 }
15344 _ACEOF
15345 rm -f conftest.$ac_objext conftest$ac_exeext
15346 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15347   (eval $ac_link) 2>conftest.er1
15348   ac_status=$?
15349   grep -v '^ *+' conftest.er1 >conftest.err
15350   rm -f conftest.er1
15351   cat conftest.err >&5
15352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15353   (exit $ac_status); } &&
15354          { ac_try='test -z "$ac_c_werror_flag"
15355                          || test ! -s conftest.err'
15356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15357   (eval $ac_try) 2>&5
15358   ac_status=$?
15359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15360   (exit $ac_status); }; } &&
15361          { ac_try='test -s conftest$ac_exeext'
15362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15363   (eval $ac_try) 2>&5
15364   ac_status=$?
15365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15366   (exit $ac_status); }; }; then
15367   eval "$as_ac_var=yes"
15368 else
15369   echo "$as_me: failed program was:" >&5
15370 sed 's/^/| /' conftest.$ac_ext >&5
15371
15372 eval "$as_ac_var=no"
15373 fi
15374 rm -f conftest.err conftest.$ac_objext \
15375       conftest$ac_exeext conftest.$ac_ext
15376 fi
15377 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15378 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15379 if test `eval echo '${'$as_ac_var'}'` = yes; then
15380   cat >>confdefs.h <<_ACEOF
15381 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15382 _ACEOF
15383
15384 fi
15385 done
15386
15387
15388 for ac_func in replace_history_entry
15389 do
15390 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15391 echo "$as_me:$LINENO: checking for $ac_func" >&5
15392 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15393 if eval "test \"\${$as_ac_var+set}\" = set"; then
15394   echo $ECHO_N "(cached) $ECHO_C" >&6
15395 else
15396   cat >conftest.$ac_ext <<_ACEOF
15397 /* confdefs.h.  */
15398 _ACEOF
15399 cat confdefs.h >>conftest.$ac_ext
15400 cat >>conftest.$ac_ext <<_ACEOF
15401 /* end confdefs.h.  */
15402 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15403    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15404 #define $ac_func innocuous_$ac_func
15405
15406 /* System header to define __stub macros and hopefully few prototypes,
15407     which can conflict with char $ac_func (); below.
15408     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15409     <limits.h> exists even on freestanding compilers.  */
15410
15411 #ifdef __STDC__
15412 # include <limits.h>
15413 #else
15414 # include <assert.h>
15415 #endif
15416
15417 #undef $ac_func
15418
15419 /* Override any gcc2 internal prototype to avoid an error.  */
15420 #ifdef __cplusplus
15421 extern "C"
15422 {
15423 #endif
15424 /* We use char because int might match the return type of a gcc2
15425    builtin and then its argument prototype would still apply.  */
15426 char $ac_func ();
15427 /* The GNU C library defines this for functions which it implements
15428     to always fail with ENOSYS.  Some functions are actually named
15429     something starting with __ and the normal name is an alias.  */
15430 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15431 choke me
15432 #else
15433 char (*f) () = $ac_func;
15434 #endif
15435 #ifdef __cplusplus
15436 }
15437 #endif
15438
15439 int
15440 main ()
15441 {
15442 return f != $ac_func;
15443   ;
15444   return 0;
15445 }
15446 _ACEOF
15447 rm -f conftest.$ac_objext conftest$ac_exeext
15448 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15449   (eval $ac_link) 2>conftest.er1
15450   ac_status=$?
15451   grep -v '^ *+' conftest.er1 >conftest.err
15452   rm -f conftest.er1
15453   cat conftest.err >&5
15454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15455   (exit $ac_status); } &&
15456          { ac_try='test -z "$ac_c_werror_flag"
15457                          || test ! -s conftest.err'
15458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15459   (eval $ac_try) 2>&5
15460   ac_status=$?
15461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15462   (exit $ac_status); }; } &&
15463          { ac_try='test -s conftest$ac_exeext'
15464   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15465   (eval $ac_try) 2>&5
15466   ac_status=$?
15467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15468   (exit $ac_status); }; }; then
15469   eval "$as_ac_var=yes"
15470 else
15471   echo "$as_me: failed program was:" >&5
15472 sed 's/^/| /' conftest.$ac_ext >&5
15473
15474 eval "$as_ac_var=no"
15475 fi
15476 rm -f conftest.err conftest.$ac_objext \
15477       conftest$ac_exeext conftest.$ac_ext
15478 fi
15479 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15480 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15481 if test `eval echo '${'$as_ac_var'}'` = yes; then
15482   cat >>confdefs.h <<_ACEOF
15483 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15484 _ACEOF
15485
15486 fi
15487 done
15488
15489 fi
15490
15491
15492 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15493 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15494 cat >conftest.$ac_ext <<_ACEOF
15495 /* confdefs.h.  */
15496 _ACEOF
15497 cat confdefs.h >>conftest.$ac_ext
15498 cat >>conftest.$ac_ext <<_ACEOF
15499 /* end confdefs.h.  */
15500 #include <setjmp.h>
15501 int
15502 main ()
15503 {
15504 sigjmp_buf x; sigsetjmp(x, 1);
15505   ;
15506   return 0;
15507 }
15508 _ACEOF
15509 rm -f conftest.$ac_objext conftest$ac_exeext
15510 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15511   (eval $ac_link) 2>conftest.er1
15512   ac_status=$?
15513   grep -v '^ *+' conftest.er1 >conftest.err
15514   rm -f conftest.er1
15515   cat conftest.err >&5
15516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15517   (exit $ac_status); } &&
15518          { ac_try='test -z "$ac_c_werror_flag"
15519                          || test ! -s conftest.err'
15520   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15521   (eval $ac_try) 2>&5
15522   ac_status=$?
15523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15524   (exit $ac_status); }; } &&
15525          { ac_try='test -s conftest$ac_exeext'
15526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15527   (eval $ac_try) 2>&5
15528   ac_status=$?
15529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15530   (exit $ac_status); }; }; then
15531
15532 cat >>confdefs.h <<\_ACEOF
15533 #define HAVE_SIGSETJMP 1
15534 _ACEOF
15535
15536 echo "$as_me:$LINENO: result: yes" >&5
15537 echo "${ECHO_T}yes" >&6
15538 else
15539   echo "$as_me: failed program was:" >&5
15540 sed 's/^/| /' conftest.$ac_ext >&5
15541
15542 echo "$as_me:$LINENO: result: no" >&5
15543 echo "${ECHO_T}no" >&6
15544 fi
15545 rm -f conftest.err conftest.$ac_objext \
15546       conftest$ac_exeext conftest.$ac_ext
15547
15548 echo "$as_me:$LINENO: checking for syslog" >&5
15549 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15550 if test "${ac_cv_func_syslog+set}" = set; then
15551   echo $ECHO_N "(cached) $ECHO_C" >&6
15552 else
15553   cat >conftest.$ac_ext <<_ACEOF
15554 /* confdefs.h.  */
15555 _ACEOF
15556 cat confdefs.h >>conftest.$ac_ext
15557 cat >>conftest.$ac_ext <<_ACEOF
15558 /* end confdefs.h.  */
15559 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15560    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15561 #define syslog innocuous_syslog
15562
15563 /* System header to define __stub macros and hopefully few prototypes,
15564     which can conflict with char syslog (); below.
15565     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15566     <limits.h> exists even on freestanding compilers.  */
15567
15568 #ifdef __STDC__
15569 # include <limits.h>
15570 #else
15571 # include <assert.h>
15572 #endif
15573
15574 #undef syslog
15575
15576 /* Override any gcc2 internal prototype to avoid an error.  */
15577 #ifdef __cplusplus
15578 extern "C"
15579 {
15580 #endif
15581 /* We use char because int might match the return type of a gcc2
15582    builtin and then its argument prototype would still apply.  */
15583 char syslog ();
15584 /* The GNU C library defines this for functions which it implements
15585     to always fail with ENOSYS.  Some functions are actually named
15586     something starting with __ and the normal name is an alias.  */
15587 #if defined (__stub_syslog) || defined (__stub___syslog)
15588 choke me
15589 #else
15590 char (*f) () = syslog;
15591 #endif
15592 #ifdef __cplusplus
15593 }
15594 #endif
15595
15596 int
15597 main ()
15598 {
15599 return f != syslog;
15600   ;
15601   return 0;
15602 }
15603 _ACEOF
15604 rm -f conftest.$ac_objext conftest$ac_exeext
15605 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15606   (eval $ac_link) 2>conftest.er1
15607   ac_status=$?
15608   grep -v '^ *+' conftest.er1 >conftest.err
15609   rm -f conftest.er1
15610   cat conftest.err >&5
15611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15612   (exit $ac_status); } &&
15613          { ac_try='test -z "$ac_c_werror_flag"
15614                          || test ! -s conftest.err'
15615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15616   (eval $ac_try) 2>&5
15617   ac_status=$?
15618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15619   (exit $ac_status); }; } &&
15620          { ac_try='test -s conftest$ac_exeext'
15621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15622   (eval $ac_try) 2>&5
15623   ac_status=$?
15624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15625   (exit $ac_status); }; }; then
15626   ac_cv_func_syslog=yes
15627 else
15628   echo "$as_me: failed program was:" >&5
15629 sed 's/^/| /' conftest.$ac_ext >&5
15630
15631 ac_cv_func_syslog=no
15632 fi
15633 rm -f conftest.err conftest.$ac_objext \
15634       conftest$ac_exeext conftest.$ac_ext
15635 fi
15636 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15637 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15638 if test $ac_cv_func_syslog = yes; then
15639   if test "${ac_cv_header_syslog_h+set}" = set; then
15640   echo "$as_me:$LINENO: checking for syslog.h" >&5
15641 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15642 if test "${ac_cv_header_syslog_h+set}" = set; then
15643   echo $ECHO_N "(cached) $ECHO_C" >&6
15644 fi
15645 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15646 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15647 else
15648   # Is the header compilable?
15649 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15650 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15651 cat >conftest.$ac_ext <<_ACEOF
15652 /* confdefs.h.  */
15653 _ACEOF
15654 cat confdefs.h >>conftest.$ac_ext
15655 cat >>conftest.$ac_ext <<_ACEOF
15656 /* end confdefs.h.  */
15657 $ac_includes_default
15658 #include <syslog.h>
15659 _ACEOF
15660 rm -f conftest.$ac_objext
15661 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15662   (eval $ac_compile) 2>conftest.er1
15663   ac_status=$?
15664   grep -v '^ *+' conftest.er1 >conftest.err
15665   rm -f conftest.er1
15666   cat conftest.err >&5
15667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15668   (exit $ac_status); } &&
15669          { ac_try='test -z "$ac_c_werror_flag"
15670                          || test ! -s conftest.err'
15671   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15672   (eval $ac_try) 2>&5
15673   ac_status=$?
15674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15675   (exit $ac_status); }; } &&
15676          { ac_try='test -s conftest.$ac_objext'
15677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15678   (eval $ac_try) 2>&5
15679   ac_status=$?
15680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15681   (exit $ac_status); }; }; then
15682   ac_header_compiler=yes
15683 else
15684   echo "$as_me: failed program was:" >&5
15685 sed 's/^/| /' conftest.$ac_ext >&5
15686
15687 ac_header_compiler=no
15688 fi
15689 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15690 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15691 echo "${ECHO_T}$ac_header_compiler" >&6
15692
15693 # Is the header present?
15694 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15695 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15696 cat >conftest.$ac_ext <<_ACEOF
15697 /* confdefs.h.  */
15698 _ACEOF
15699 cat confdefs.h >>conftest.$ac_ext
15700 cat >>conftest.$ac_ext <<_ACEOF
15701 /* end confdefs.h.  */
15702 #include <syslog.h>
15703 _ACEOF
15704 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15705   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15706   ac_status=$?
15707   grep -v '^ *+' conftest.er1 >conftest.err
15708   rm -f conftest.er1
15709   cat conftest.err >&5
15710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15711   (exit $ac_status); } >/dev/null; then
15712   if test -s conftest.err; then
15713     ac_cpp_err=$ac_c_preproc_warn_flag
15714     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15715   else
15716     ac_cpp_err=
15717   fi
15718 else
15719   ac_cpp_err=yes
15720 fi
15721 if test -z "$ac_cpp_err"; then
15722   ac_header_preproc=yes
15723 else
15724   echo "$as_me: failed program was:" >&5
15725 sed 's/^/| /' conftest.$ac_ext >&5
15726
15727   ac_header_preproc=no
15728 fi
15729 rm -f conftest.err conftest.$ac_ext
15730 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15731 echo "${ECHO_T}$ac_header_preproc" >&6
15732
15733 # So?  What about this header?
15734 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15735   yes:no: )
15736     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15737 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15738     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15739 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15740     ac_header_preproc=yes
15741     ;;
15742   no:yes:* )
15743     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15744 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15745     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15746 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15747     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15748 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15749     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15750 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15751     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15752 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15753     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15754 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15755     (
15756       cat <<\_ASBOX
15757 ## ---------------------------------------- ##
15758 ## Report this to pgsql-bugs@postgresql.org ##
15759 ## ---------------------------------------- ##
15760 _ASBOX
15761     ) |
15762       sed "s/^/$as_me: WARNING:     /" >&2
15763     ;;
15764 esac
15765 echo "$as_me:$LINENO: checking for syslog.h" >&5
15766 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15767 if test "${ac_cv_header_syslog_h+set}" = set; then
15768   echo $ECHO_N "(cached) $ECHO_C" >&6
15769 else
15770   ac_cv_header_syslog_h=$ac_header_preproc
15771 fi
15772 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15773 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15774
15775 fi
15776 if test $ac_cv_header_syslog_h = yes; then
15777
15778 cat >>confdefs.h <<\_ACEOF
15779 #define HAVE_SYSLOG 1
15780 _ACEOF
15781
15782 fi
15783
15784
15785 fi
15786
15787
15788 echo "$as_me:$LINENO: checking for optreset" >&5
15789 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15790 if test "${pgac_cv_var_int_optreset+set}" = set; then
15791   echo $ECHO_N "(cached) $ECHO_C" >&6
15792 else
15793   cat >conftest.$ac_ext <<_ACEOF
15794 /* confdefs.h.  */
15795 _ACEOF
15796 cat confdefs.h >>conftest.$ac_ext
15797 cat >>conftest.$ac_ext <<_ACEOF
15798 /* end confdefs.h.  */
15799 #include <unistd.h>
15800 int
15801 main ()
15802 {
15803 extern int optreset; optreset = 1;
15804   ;
15805   return 0;
15806 }
15807 _ACEOF
15808 rm -f conftest.$ac_objext conftest$ac_exeext
15809 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15810   (eval $ac_link) 2>conftest.er1
15811   ac_status=$?
15812   grep -v '^ *+' conftest.er1 >conftest.err
15813   rm -f conftest.er1
15814   cat conftest.err >&5
15815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15816   (exit $ac_status); } &&
15817          { ac_try='test -z "$ac_c_werror_flag"
15818                          || test ! -s conftest.err'
15819   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15820   (eval $ac_try) 2>&5
15821   ac_status=$?
15822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15823   (exit $ac_status); }; } &&
15824          { ac_try='test -s conftest$ac_exeext'
15825   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15826   (eval $ac_try) 2>&5
15827   ac_status=$?
15828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15829   (exit $ac_status); }; }; then
15830   pgac_cv_var_int_optreset=yes
15831 else
15832   echo "$as_me: failed program was:" >&5
15833 sed 's/^/| /' conftest.$ac_ext >&5
15834
15835 pgac_cv_var_int_optreset=no
15836 fi
15837 rm -f conftest.err conftest.$ac_objext \
15838       conftest$ac_exeext conftest.$ac_ext
15839 fi
15840 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15841 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15842 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15843
15844 cat >>confdefs.h <<\_ACEOF
15845 #define HAVE_INT_OPTRESET 1
15846 _ACEOF
15847
15848 fi
15849
15850
15851
15852 for ac_func in strtoll strtoq
15853 do
15854 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15855 echo "$as_me:$LINENO: checking for $ac_func" >&5
15856 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15857 if eval "test \"\${$as_ac_var+set}\" = set"; then
15858   echo $ECHO_N "(cached) $ECHO_C" >&6
15859 else
15860   cat >conftest.$ac_ext <<_ACEOF
15861 /* confdefs.h.  */
15862 _ACEOF
15863 cat confdefs.h >>conftest.$ac_ext
15864 cat >>conftest.$ac_ext <<_ACEOF
15865 /* end confdefs.h.  */
15866 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15867    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15868 #define $ac_func innocuous_$ac_func
15869
15870 /* System header to define __stub macros and hopefully few prototypes,
15871     which can conflict with char $ac_func (); below.
15872     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15873     <limits.h> exists even on freestanding compilers.  */
15874
15875 #ifdef __STDC__
15876 # include <limits.h>
15877 #else
15878 # include <assert.h>
15879 #endif
15880
15881 #undef $ac_func
15882
15883 /* Override any gcc2 internal prototype to avoid an error.  */
15884 #ifdef __cplusplus
15885 extern "C"
15886 {
15887 #endif
15888 /* We use char because int might match the return type of a gcc2
15889    builtin and then its argument prototype would still apply.  */
15890 char $ac_func ();
15891 /* The GNU C library defines this for functions which it implements
15892     to always fail with ENOSYS.  Some functions are actually named
15893     something starting with __ and the normal name is an alias.  */
15894 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15895 choke me
15896 #else
15897 char (*f) () = $ac_func;
15898 #endif
15899 #ifdef __cplusplus
15900 }
15901 #endif
15902
15903 int
15904 main ()
15905 {
15906 return f != $ac_func;
15907   ;
15908   return 0;
15909 }
15910 _ACEOF
15911 rm -f conftest.$ac_objext conftest$ac_exeext
15912 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15913   (eval $ac_link) 2>conftest.er1
15914   ac_status=$?
15915   grep -v '^ *+' conftest.er1 >conftest.err
15916   rm -f conftest.er1
15917   cat conftest.err >&5
15918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15919   (exit $ac_status); } &&
15920          { ac_try='test -z "$ac_c_werror_flag"
15921                          || test ! -s conftest.err'
15922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15923   (eval $ac_try) 2>&5
15924   ac_status=$?
15925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15926   (exit $ac_status); }; } &&
15927          { ac_try='test -s conftest$ac_exeext'
15928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15929   (eval $ac_try) 2>&5
15930   ac_status=$?
15931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15932   (exit $ac_status); }; }; then
15933   eval "$as_ac_var=yes"
15934 else
15935   echo "$as_me: failed program was:" >&5
15936 sed 's/^/| /' conftest.$ac_ext >&5
15937
15938 eval "$as_ac_var=no"
15939 fi
15940 rm -f conftest.err conftest.$ac_objext \
15941       conftest$ac_exeext conftest.$ac_ext
15942 fi
15943 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15944 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15945 if test `eval echo '${'$as_ac_var'}'` = yes; then
15946   cat >>confdefs.h <<_ACEOF
15947 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15948 _ACEOF
15949  break
15950 fi
15951 done
15952
15953
15954
15955 for ac_func in strtoull strtouq
15956 do
15957 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15958 echo "$as_me:$LINENO: checking for $ac_func" >&5
15959 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15960 if eval "test \"\${$as_ac_var+set}\" = set"; then
15961   echo $ECHO_N "(cached) $ECHO_C" >&6
15962 else
15963   cat >conftest.$ac_ext <<_ACEOF
15964 /* confdefs.h.  */
15965 _ACEOF
15966 cat confdefs.h >>conftest.$ac_ext
15967 cat >>conftest.$ac_ext <<_ACEOF
15968 /* end confdefs.h.  */
15969 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15970    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15971 #define $ac_func innocuous_$ac_func
15972
15973 /* System header to define __stub macros and hopefully few prototypes,
15974     which can conflict with char $ac_func (); below.
15975     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15976     <limits.h> exists even on freestanding compilers.  */
15977
15978 #ifdef __STDC__
15979 # include <limits.h>
15980 #else
15981 # include <assert.h>
15982 #endif
15983
15984 #undef $ac_func
15985
15986 /* Override any gcc2 internal prototype to avoid an error.  */
15987 #ifdef __cplusplus
15988 extern "C"
15989 {
15990 #endif
15991 /* We use char because int might match the return type of a gcc2
15992    builtin and then its argument prototype would still apply.  */
15993 char $ac_func ();
15994 /* The GNU C library defines this for functions which it implements
15995     to always fail with ENOSYS.  Some functions are actually named
15996     something starting with __ and the normal name is an alias.  */
15997 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15998 choke me
15999 #else
16000 char (*f) () = $ac_func;
16001 #endif
16002 #ifdef __cplusplus
16003 }
16004 #endif
16005
16006 int
16007 main ()
16008 {
16009 return f != $ac_func;
16010   ;
16011   return 0;
16012 }
16013 _ACEOF
16014 rm -f conftest.$ac_objext conftest$ac_exeext
16015 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16016   (eval $ac_link) 2>conftest.er1
16017   ac_status=$?
16018   grep -v '^ *+' conftest.er1 >conftest.err
16019   rm -f conftest.er1
16020   cat conftest.err >&5
16021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16022   (exit $ac_status); } &&
16023          { ac_try='test -z "$ac_c_werror_flag"
16024                          || test ! -s conftest.err'
16025   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16026   (eval $ac_try) 2>&5
16027   ac_status=$?
16028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16029   (exit $ac_status); }; } &&
16030          { ac_try='test -s conftest$ac_exeext'
16031   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16032   (eval $ac_try) 2>&5
16033   ac_status=$?
16034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16035   (exit $ac_status); }; }; then
16036   eval "$as_ac_var=yes"
16037 else
16038   echo "$as_me: failed program was:" >&5
16039 sed 's/^/| /' conftest.$ac_ext >&5
16040
16041 eval "$as_ac_var=no"
16042 fi
16043 rm -f conftest.err conftest.$ac_objext \
16044       conftest$ac_exeext conftest.$ac_ext
16045 fi
16046 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16047 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16048 if test `eval echo '${'$as_ac_var'}'` = yes; then
16049   cat >>confdefs.h <<_ACEOF
16050 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16051 _ACEOF
16052  break
16053 fi
16054 done
16055
16056
16057 # Check for one of atexit() or on_exit()
16058
16059 for ac_func in atexit
16060 do
16061 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16062 echo "$as_me:$LINENO: checking for $ac_func" >&5
16063 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16064 if eval "test \"\${$as_ac_var+set}\" = set"; then
16065   echo $ECHO_N "(cached) $ECHO_C" >&6
16066 else
16067   cat >conftest.$ac_ext <<_ACEOF
16068 /* confdefs.h.  */
16069 _ACEOF
16070 cat confdefs.h >>conftest.$ac_ext
16071 cat >>conftest.$ac_ext <<_ACEOF
16072 /* end confdefs.h.  */
16073 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16074    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16075 #define $ac_func innocuous_$ac_func
16076
16077 /* System header to define __stub macros and hopefully few prototypes,
16078     which can conflict with char $ac_func (); below.
16079     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16080     <limits.h> exists even on freestanding compilers.  */
16081
16082 #ifdef __STDC__
16083 # include <limits.h>
16084 #else
16085 # include <assert.h>
16086 #endif
16087
16088 #undef $ac_func
16089
16090 /* Override any gcc2 internal prototype to avoid an error.  */
16091 #ifdef __cplusplus
16092 extern "C"
16093 {
16094 #endif
16095 /* We use char because int might match the return type of a gcc2
16096    builtin and then its argument prototype would still apply.  */
16097 char $ac_func ();
16098 /* The GNU C library defines this for functions which it implements
16099     to always fail with ENOSYS.  Some functions are actually named
16100     something starting with __ and the normal name is an alias.  */
16101 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16102 choke me
16103 #else
16104 char (*f) () = $ac_func;
16105 #endif
16106 #ifdef __cplusplus
16107 }
16108 #endif
16109
16110 int
16111 main ()
16112 {
16113 return f != $ac_func;
16114   ;
16115   return 0;
16116 }
16117 _ACEOF
16118 rm -f conftest.$ac_objext conftest$ac_exeext
16119 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16120   (eval $ac_link) 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_exeext'
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   eval "$as_ac_var=yes"
16141 else
16142   echo "$as_me: failed program was:" >&5
16143 sed 's/^/| /' conftest.$ac_ext >&5
16144
16145 eval "$as_ac_var=no"
16146 fi
16147 rm -f conftest.err conftest.$ac_objext \
16148       conftest$ac_exeext conftest.$ac_ext
16149 fi
16150 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16151 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16152 if test `eval echo '${'$as_ac_var'}'` = yes; then
16153   cat >>confdefs.h <<_ACEOF
16154 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16155 _ACEOF
16156
16157 else
16158
16159 for ac_func in on_exit
16160 do
16161 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16162 echo "$as_me:$LINENO: checking for $ac_func" >&5
16163 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16164 if eval "test \"\${$as_ac_var+set}\" = set"; then
16165   echo $ECHO_N "(cached) $ECHO_C" >&6
16166 else
16167   cat >conftest.$ac_ext <<_ACEOF
16168 /* confdefs.h.  */
16169 _ACEOF
16170 cat confdefs.h >>conftest.$ac_ext
16171 cat >>conftest.$ac_ext <<_ACEOF
16172 /* end confdefs.h.  */
16173 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16174    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16175 #define $ac_func innocuous_$ac_func
16176
16177 /* System header to define __stub macros and hopefully few prototypes,
16178     which can conflict with char $ac_func (); below.
16179     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16180     <limits.h> exists even on freestanding compilers.  */
16181
16182 #ifdef __STDC__
16183 # include <limits.h>
16184 #else
16185 # include <assert.h>
16186 #endif
16187
16188 #undef $ac_func
16189
16190 /* Override any gcc2 internal prototype to avoid an error.  */
16191 #ifdef __cplusplus
16192 extern "C"
16193 {
16194 #endif
16195 /* We use char because int might match the return type of a gcc2
16196    builtin and then its argument prototype would still apply.  */
16197 char $ac_func ();
16198 /* The GNU C library defines this for functions which it implements
16199     to always fail with ENOSYS.  Some functions are actually named
16200     something starting with __ and the normal name is an alias.  */
16201 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16202 choke me
16203 #else
16204 char (*f) () = $ac_func;
16205 #endif
16206 #ifdef __cplusplus
16207 }
16208 #endif
16209
16210 int
16211 main ()
16212 {
16213 return f != $ac_func;
16214   ;
16215   return 0;
16216 }
16217 _ACEOF
16218 rm -f conftest.$ac_objext conftest$ac_exeext
16219 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16220   (eval $ac_link) 2>conftest.er1
16221   ac_status=$?
16222   grep -v '^ *+' conftest.er1 >conftest.err
16223   rm -f conftest.er1
16224   cat conftest.err >&5
16225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16226   (exit $ac_status); } &&
16227          { ac_try='test -z "$ac_c_werror_flag"
16228                          || test ! -s conftest.err'
16229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16230   (eval $ac_try) 2>&5
16231   ac_status=$?
16232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16233   (exit $ac_status); }; } &&
16234          { ac_try='test -s conftest$ac_exeext'
16235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16236   (eval $ac_try) 2>&5
16237   ac_status=$?
16238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16239   (exit $ac_status); }; }; then
16240   eval "$as_ac_var=yes"
16241 else
16242   echo "$as_me: failed program was:" >&5
16243 sed 's/^/| /' conftest.$ac_ext >&5
16244
16245 eval "$as_ac_var=no"
16246 fi
16247 rm -f conftest.err conftest.$ac_objext \
16248       conftest$ac_exeext conftest.$ac_ext
16249 fi
16250 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16251 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16252 if test `eval echo '${'$as_ac_var'}'` = yes; then
16253   cat >>confdefs.h <<_ACEOF
16254 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16255 _ACEOF
16256
16257 else
16258   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
16259 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
16260    { (exit 1); exit 1; }; }
16261 fi
16262 done
16263
16264 fi
16265 done
16266
16267
16268 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16269 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16270 if test "${ac_cv_sys_largefile_source+set}" = set; then
16271   echo $ECHO_N "(cached) $ECHO_C" >&6
16272 else
16273   while :; do
16274   ac_cv_sys_largefile_source=no
16275   cat >conftest.$ac_ext <<_ACEOF
16276 /* confdefs.h.  */
16277 _ACEOF
16278 cat confdefs.h >>conftest.$ac_ext
16279 cat >>conftest.$ac_ext <<_ACEOF
16280 /* end confdefs.h.  */
16281 #include <stdio.h>
16282 int
16283 main ()
16284 {
16285 return !fseeko;
16286   ;
16287   return 0;
16288 }
16289 _ACEOF
16290 rm -f conftest.$ac_objext
16291 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16292   (eval $ac_compile) 2>conftest.er1
16293   ac_status=$?
16294   grep -v '^ *+' conftest.er1 >conftest.err
16295   rm -f conftest.er1
16296   cat conftest.err >&5
16297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16298   (exit $ac_status); } &&
16299          { ac_try='test -z "$ac_c_werror_flag"
16300                          || test ! -s conftest.err'
16301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16302   (eval $ac_try) 2>&5
16303   ac_status=$?
16304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16305   (exit $ac_status); }; } &&
16306          { ac_try='test -s conftest.$ac_objext'
16307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16308   (eval $ac_try) 2>&5
16309   ac_status=$?
16310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16311   (exit $ac_status); }; }; then
16312   break
16313 else
16314   echo "$as_me: failed program was:" >&5
16315 sed 's/^/| /' conftest.$ac_ext >&5
16316
16317 fi
16318 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16319   cat >conftest.$ac_ext <<_ACEOF
16320 /* confdefs.h.  */
16321 _ACEOF
16322 cat confdefs.h >>conftest.$ac_ext
16323 cat >>conftest.$ac_ext <<_ACEOF
16324 /* end confdefs.h.  */
16325 #define _LARGEFILE_SOURCE 1
16326 #include <stdio.h>
16327 int
16328 main ()
16329 {
16330 return !fseeko;
16331   ;
16332   return 0;
16333 }
16334 _ACEOF
16335 rm -f conftest.$ac_objext
16336 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16337   (eval $ac_compile) 2>conftest.er1
16338   ac_status=$?
16339   grep -v '^ *+' conftest.er1 >conftest.err
16340   rm -f conftest.er1
16341   cat conftest.err >&5
16342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16343   (exit $ac_status); } &&
16344          { ac_try='test -z "$ac_c_werror_flag"
16345                          || test ! -s conftest.err'
16346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16347   (eval $ac_try) 2>&5
16348   ac_status=$?
16349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16350   (exit $ac_status); }; } &&
16351          { ac_try='test -s conftest.$ac_objext'
16352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16353   (eval $ac_try) 2>&5
16354   ac_status=$?
16355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16356   (exit $ac_status); }; }; then
16357   ac_cv_sys_largefile_source=1; break
16358 else
16359   echo "$as_me: failed program was:" >&5
16360 sed 's/^/| /' conftest.$ac_ext >&5
16361
16362 fi
16363 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16364   break
16365 done
16366 fi
16367 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16368 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16369 if test "$ac_cv_sys_largefile_source" != no; then
16370
16371 cat >>confdefs.h <<_ACEOF
16372 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16373 _ACEOF
16374
16375 fi
16376 rm -f conftest*
16377
16378 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16379 # in glibc 2.1.3, but that breaks too many other things.
16380 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16381 echo "$as_me:$LINENO: checking for fseeko" >&5
16382 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16383 if test "${ac_cv_func_fseeko+set}" = set; then
16384   echo $ECHO_N "(cached) $ECHO_C" >&6
16385 else
16386   cat >conftest.$ac_ext <<_ACEOF
16387 /* confdefs.h.  */
16388 _ACEOF
16389 cat confdefs.h >>conftest.$ac_ext
16390 cat >>conftest.$ac_ext <<_ACEOF
16391 /* end confdefs.h.  */
16392 #include <stdio.h>
16393 int
16394 main ()
16395 {
16396 return fseeko && fseeko (stdin, 0, 0);
16397   ;
16398   return 0;
16399 }
16400 _ACEOF
16401 rm -f conftest.$ac_objext conftest$ac_exeext
16402 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16403   (eval $ac_link) 2>conftest.er1
16404   ac_status=$?
16405   grep -v '^ *+' conftest.er1 >conftest.err
16406   rm -f conftest.er1
16407   cat conftest.err >&5
16408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16409   (exit $ac_status); } &&
16410          { ac_try='test -z "$ac_c_werror_flag"
16411                          || test ! -s conftest.err'
16412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16413   (eval $ac_try) 2>&5
16414   ac_status=$?
16415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16416   (exit $ac_status); }; } &&
16417          { ac_try='test -s conftest$ac_exeext'
16418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16419   (eval $ac_try) 2>&5
16420   ac_status=$?
16421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16422   (exit $ac_status); }; }; then
16423   ac_cv_func_fseeko=yes
16424 else
16425   echo "$as_me: failed program was:" >&5
16426 sed 's/^/| /' conftest.$ac_ext >&5
16427
16428 ac_cv_func_fseeko=no
16429 fi
16430 rm -f conftest.err conftest.$ac_objext \
16431       conftest$ac_exeext conftest.$ac_ext
16432 fi
16433 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16434 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16435 if test $ac_cv_func_fseeko = yes; then
16436
16437 cat >>confdefs.h <<\_ACEOF
16438 #define HAVE_FSEEKO 1
16439 _ACEOF
16440
16441 fi
16442
16443
16444 #
16445 # Pthreads
16446 #
16447 # For each platform, we need to know about any special compile and link
16448 # libraries, and whether the normal C function names are thread-safe.
16449 # See the comment at the top of src/port/thread.c for more information.
16450 #
16451 if test "$enable_thread_safety" = yes; then
16452
16453
16454
16455
16456 ac_ext=c
16457 ac_cpp='$CPP $CPPFLAGS'
16458 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16459 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16460 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16461
16462 acx_pthread_ok=no
16463
16464 # We used to check for pthread.h first, but this fails if pthread.h
16465 # requires special compiler flags (e.g. on True64 or Sequent).
16466 # It gets checked for in the link test anyway.
16467
16468 # First of all, check if the user has set any of the PTHREAD_LIBS,
16469 # etcetera environment variables, and if threads linking works using
16470 # them:
16471 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16472         save_CFLAGS="$CFLAGS"
16473         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16474         save_LIBS="$LIBS"
16475         LIBS="$PTHREAD_LIBS $LIBS"
16476         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16477 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16478         cat >conftest.$ac_ext <<_ACEOF
16479 /* confdefs.h.  */
16480 _ACEOF
16481 cat confdefs.h >>conftest.$ac_ext
16482 cat >>conftest.$ac_ext <<_ACEOF
16483 /* end confdefs.h.  */
16484
16485 /* Override any gcc2 internal prototype to avoid an error.  */
16486 #ifdef __cplusplus
16487 extern "C"
16488 #endif
16489 /* We use char because int might match the return type of a gcc2
16490    builtin and then its argument prototype would still apply.  */
16491 char pthread_join ();
16492 int
16493 main ()
16494 {
16495 pthread_join ();
16496   ;
16497   return 0;
16498 }
16499 _ACEOF
16500 rm -f conftest.$ac_objext conftest$ac_exeext
16501 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16502   (eval $ac_link) 2>conftest.er1
16503   ac_status=$?
16504   grep -v '^ *+' conftest.er1 >conftest.err
16505   rm -f conftest.er1
16506   cat conftest.err >&5
16507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16508   (exit $ac_status); } &&
16509          { ac_try='test -z "$ac_c_werror_flag"
16510                          || test ! -s conftest.err'
16511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16512   (eval $ac_try) 2>&5
16513   ac_status=$?
16514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16515   (exit $ac_status); }; } &&
16516          { ac_try='test -s conftest$ac_exeext'
16517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16518   (eval $ac_try) 2>&5
16519   ac_status=$?
16520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16521   (exit $ac_status); }; }; then
16522   acx_pthread_ok=yes
16523 else
16524   echo "$as_me: failed program was:" >&5
16525 sed 's/^/| /' conftest.$ac_ext >&5
16526
16527 fi
16528 rm -f conftest.err conftest.$ac_objext \
16529       conftest$ac_exeext conftest.$ac_ext
16530         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16531 echo "${ECHO_T}$acx_pthread_ok" >&6
16532         if test x"$acx_pthread_ok" = xno; then
16533                 PTHREAD_LIBS=""
16534                 PTHREAD_CFLAGS=""
16535         fi
16536         LIBS="$save_LIBS"
16537         CFLAGS="$save_CFLAGS"
16538 fi
16539
16540 # We must check for the threads library under a number of different
16541 # names; the ordering is very important because some systems
16542 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16543 # libraries is broken (non-POSIX).
16544
16545 # Create a list of thread flags to try.  Items starting with a "-" are
16546 # C compiler flags, and other items are library names, except for "none"
16547 # which indicates that we try without any flags at all, and "pthread-config"
16548 # which is a program returning the flags for the Pth emulation library.
16549
16550 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16551
16552 # The ordering *is* (sometimes) important.  Some notes on the
16553 # individual items follow:
16554
16555 # pthreads: AIX (must check this before -lpthread)
16556 # none: in case threads are in libc; should be tried before -Kthread and
16557 #       other compiler flags to prevent continual compiler warnings
16558 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16559 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16560 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16561 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16562 # -pthreads: Solaris/gcc
16563 # -mthreads: Mingw32/gcc, Lynx/gcc
16564 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16565 #      doesn't hurt to check since this sometimes defines pthreads too;
16566 #      also defines -D_REENTRANT)
16567 # pthread: Linux, etcetera
16568 # --thread-safe: KAI C++
16569 # pthread-config: use pthread-config program (for GNU Pth library)
16570
16571 case "${host_cpu}-${host_os}" in
16572         *solaris*)
16573
16574         # On Solaris (at least, for some versions), libc contains stubbed
16575         # (non-functional) versions of the pthreads routines, so link-based
16576         # tests will erroneously succeed.  (We need to link with -pthread or
16577         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16578         # a function called by this macro, so we could check for that, but
16579         # who knows whether they'll stub that too in a future libc.)  So,
16580         # we'll just look for -pthreads and -lpthread first:
16581
16582         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16583         ;;
16584 esac
16585
16586 if test x"$acx_pthread_ok" = xno; then
16587 for flag in $acx_pthread_flags; do
16588
16589         tryPTHREAD_CFLAGS=""
16590         tryPTHREAD_LIBS=""
16591         case $flag in
16592                 none)
16593                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16594 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16595                 ;;
16596
16597                 -*)
16598                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16599 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16600                 tryPTHREAD_CFLAGS="$flag"
16601                 ;;
16602
16603                 pthread-config)
16604                 # skip this if we already have flags defined, for PostgreSQL
16605                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16606                 # Extract the first word of "pthread-config", so it can be a program name with args.
16607 set dummy pthread-config; ac_word=$2
16608 echo "$as_me:$LINENO: checking for $ac_word" >&5
16609 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16610 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16611   echo $ECHO_N "(cached) $ECHO_C" >&6
16612 else
16613   if test -n "$acx_pthread_config"; then
16614   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16615 else
16616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16617 for as_dir in $PATH
16618 do
16619   IFS=$as_save_IFS
16620   test -z "$as_dir" && as_dir=.
16621   for ac_exec_ext in '' $ac_executable_extensions; do
16622   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16623     ac_cv_prog_acx_pthread_config="yes"
16624     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16625     break 2
16626   fi
16627 done
16628 done
16629
16630   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16631 fi
16632 fi
16633 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16634 if test -n "$acx_pthread_config"; then
16635   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16636 echo "${ECHO_T}$acx_pthread_config" >&6
16637 else
16638   echo "$as_me:$LINENO: result: no" >&5
16639 echo "${ECHO_T}no" >&6
16640 fi
16641
16642                 if test x"$acx_pthread_config" = xno; then continue; fi
16643                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16644                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16645                 ;;
16646
16647                 *)
16648                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16649 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16650                 tryPTHREAD_LIBS="-l$flag"
16651                 ;;
16652         esac
16653
16654         save_LIBS="$LIBS"
16655         save_CFLAGS="$CFLAGS"
16656         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16657         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16658
16659         # Check for various functions.  We must include pthread.h,
16660         # since some functions may be macros.  (On the Sequent, we
16661         # need a special flag -Kthread to make this header compile.)
16662         # We check for pthread_join because it is in -lpthread on IRIX
16663         # while pthread_create is in libc.  We check for pthread_attr_init
16664         # due to DEC craziness with -lpthreads.  We check for
16665         # pthread_cleanup_push because it is one of the few pthread
16666         # functions on Solaris that doesn't have a non-functional libc stub.
16667         # We try pthread_create on general principles.
16668         cat >conftest.$ac_ext <<_ACEOF
16669 /* confdefs.h.  */
16670 _ACEOF
16671 cat confdefs.h >>conftest.$ac_ext
16672 cat >>conftest.$ac_ext <<_ACEOF
16673 /* end confdefs.h.  */
16674 #include <pthread.h>
16675 int
16676 main ()
16677 {
16678 pthread_t th; pthread_join(th, 0);
16679                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16680                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16681   ;
16682   return 0;
16683 }
16684 _ACEOF
16685 rm -f conftest.$ac_objext conftest$ac_exeext
16686 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16687   (eval $ac_link) 2>conftest.er1
16688   ac_status=$?
16689   grep -v '^ *+' conftest.er1 >conftest.err
16690   rm -f conftest.er1
16691   cat conftest.err >&5
16692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16693   (exit $ac_status); } &&
16694          { ac_try='test -z "$ac_c_werror_flag"
16695                          || test ! -s conftest.err'
16696   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16697   (eval $ac_try) 2>&5
16698   ac_status=$?
16699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16700   (exit $ac_status); }; } &&
16701          { ac_try='test -s conftest$ac_exeext'
16702   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16703   (eval $ac_try) 2>&5
16704   ac_status=$?
16705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16706   (exit $ac_status); }; }; then
16707   acx_pthread_ok=yes
16708 else
16709   echo "$as_me: failed program was:" >&5
16710 sed 's/^/| /' conftest.$ac_ext >&5
16711
16712 acx_pthread_ok=no
16713 fi
16714 rm -f conftest.err conftest.$ac_objext \
16715       conftest$ac_exeext conftest.$ac_ext
16716
16717         if test "x$acx_pthread_ok" = xyes; then
16718             # Don't use options that are ignored by the compiler.
16719             # We find them by checking stderror.
16720             cat >conftest.$ac_ext <<_ACEOF
16721 int
16722 main (int argc, char **argv)
16723 {
16724   (void) argc;
16725   (void) argv;
16726   return 0;
16727 }
16728 _ACEOF
16729             rm -f conftest.$ac_objext conftest$ac_exeext
16730             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16731                 # we continue with more flags because Linux needs -lpthread
16732                 # for libpq builds on PostgreSQL.  The test above only
16733                 # tests for building binaries, not shared libraries.
16734                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16735                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16736             else   acx_pthread_ok=no
16737             fi
16738         fi
16739
16740         LIBS="$save_LIBS"
16741         CFLAGS="$save_CFLAGS"
16742
16743         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16744 echo "${ECHO_T}$acx_pthread_ok" >&6
16745 done
16746 fi
16747
16748 # Various other checks:
16749 if test "x$acx_pthread_ok" = xyes; then
16750         save_LIBS="$LIBS"
16751         LIBS="$PTHREAD_LIBS $LIBS"
16752         save_CFLAGS="$CFLAGS"
16753         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16754
16755         # Detect AIX lossage: threads are created detached by default
16756         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16757         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16758 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16759         cat >conftest.$ac_ext <<_ACEOF
16760 /* confdefs.h.  */
16761 _ACEOF
16762 cat confdefs.h >>conftest.$ac_ext
16763 cat >>conftest.$ac_ext <<_ACEOF
16764 /* end confdefs.h.  */
16765 #include <pthread.h>
16766 int
16767 main ()
16768 {
16769 int attr=PTHREAD_CREATE_JOINABLE;
16770   ;
16771   return 0;
16772 }
16773 _ACEOF
16774 rm -f conftest.$ac_objext conftest$ac_exeext
16775 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16776   (eval $ac_link) 2>conftest.er1
16777   ac_status=$?
16778   grep -v '^ *+' conftest.er1 >conftest.err
16779   rm -f conftest.er1
16780   cat conftest.err >&5
16781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16782   (exit $ac_status); } &&
16783          { ac_try='test -z "$ac_c_werror_flag"
16784                          || test ! -s conftest.err'
16785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16786   (eval $ac_try) 2>&5
16787   ac_status=$?
16788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16789   (exit $ac_status); }; } &&
16790          { ac_try='test -s conftest$ac_exeext'
16791   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16792   (eval $ac_try) 2>&5
16793   ac_status=$?
16794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16795   (exit $ac_status); }; }; then
16796   ok=PTHREAD_CREATE_JOINABLE
16797 else
16798   echo "$as_me: failed program was:" >&5
16799 sed 's/^/| /' conftest.$ac_ext >&5
16800
16801 ok=unknown
16802 fi
16803 rm -f conftest.err conftest.$ac_objext \
16804       conftest$ac_exeext conftest.$ac_ext
16805         if test x"$ok" = xunknown; then
16806                 cat >conftest.$ac_ext <<_ACEOF
16807 /* confdefs.h.  */
16808 _ACEOF
16809 cat confdefs.h >>conftest.$ac_ext
16810 cat >>conftest.$ac_ext <<_ACEOF
16811 /* end confdefs.h.  */
16812 #include <pthread.h>
16813 int
16814 main ()
16815 {
16816 int attr=PTHREAD_CREATE_UNDETACHED;
16817   ;
16818   return 0;
16819 }
16820 _ACEOF
16821 rm -f conftest.$ac_objext conftest$ac_exeext
16822 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16823   (eval $ac_link) 2>conftest.er1
16824   ac_status=$?
16825   grep -v '^ *+' conftest.er1 >conftest.err
16826   rm -f conftest.er1
16827   cat conftest.err >&5
16828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16829   (exit $ac_status); } &&
16830          { ac_try='test -z "$ac_c_werror_flag"
16831                          || test ! -s conftest.err'
16832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16833   (eval $ac_try) 2>&5
16834   ac_status=$?
16835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16836   (exit $ac_status); }; } &&
16837          { ac_try='test -s conftest$ac_exeext'
16838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16839   (eval $ac_try) 2>&5
16840   ac_status=$?
16841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16842   (exit $ac_status); }; }; then
16843   ok=PTHREAD_CREATE_UNDETACHED
16844 else
16845   echo "$as_me: failed program was:" >&5
16846 sed 's/^/| /' conftest.$ac_ext >&5
16847
16848 ok=unknown
16849 fi
16850 rm -f conftest.err conftest.$ac_objext \
16851       conftest$ac_exeext conftest.$ac_ext
16852         fi
16853         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16854
16855 cat >>confdefs.h <<\_ACEOF
16856 #define PTHREAD_CREATE_JOINABLE $ok
16857 _ACEOF
16858
16859         fi
16860         echo "$as_me:$LINENO: result: ${ok}" >&5
16861 echo "${ECHO_T}${ok}" >&6
16862         if test x"$ok" = xunknown; then
16863                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16864 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16865         fi
16866
16867         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16868 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16869         flag=no
16870 # We always add these in PostgreSQL
16871 #       case "${host_cpu}-${host_os}" in
16872 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16873 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16874 #       esac
16875         echo "$as_me:$LINENO: result: ${flag}" >&5
16876 echo "${ECHO_T}${flag}" >&6
16877         if test "x$flag" != xno; then
16878                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16879         fi
16880
16881         LIBS="$save_LIBS"
16882         CFLAGS="$save_CFLAGS"
16883
16884 # Supporting cc_r would require a special CC in all places that
16885 # use libpq, and that is ugly, so we don't do it.  Users can still
16886 # define their compiler as cc_r to do thread builds of everything.
16887         # More AIX lossage: must compile with cc_r
16888         # Extract the first word of "cc_r", so it can be a program name with args.
16889 set dummy cc_r; ac_word=$2
16890 echo "$as_me:$LINENO: checking for $ac_word" >&5
16891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16892 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16893   echo $ECHO_N "(cached) $ECHO_C" >&6
16894 else
16895   if test -n "$PTHREAD_CC"; then
16896   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16897 else
16898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16899 for as_dir in $PATH
16900 do
16901   IFS=$as_save_IFS
16902   test -z "$as_dir" && as_dir=.
16903   for ac_exec_ext in '' $ac_executable_extensions; do
16904   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16905     ac_cv_prog_PTHREAD_CC="cc_r"
16906     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16907     break 2
16908   fi
16909 done
16910 done
16911
16912   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16913 fi
16914 fi
16915 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16916 if test -n "$PTHREAD_CC"; then
16917   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16918 echo "${ECHO_T}$PTHREAD_CC" >&6
16919 else
16920   echo "$as_me:$LINENO: result: no" >&5
16921 echo "${ECHO_T}no" >&6
16922 fi
16923
16924 else
16925         PTHREAD_CC="$CC"
16926 fi
16927
16928
16929
16930
16931
16932 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16933 if test x"$acx_pthread_ok" = xyes; then
16934
16935 cat >>confdefs.h <<\_ACEOF
16936 #define HAVE_PTHREAD 1
16937 _ACEOF
16938
16939         :
16940 else
16941         acx_pthread_ok=no
16942
16943 fi
16944 ac_ext=c
16945 ac_cpp='$CPP $CPPFLAGS'
16946 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16947 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16948 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16949
16950         # set thread flags
16951
16952 # Some platforms use these, so just defineed them.  They can't hurt if they
16953 # are not supported.
16954 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16955
16956
16957 # At this point, we don't want to muck with the compiler name for threading.
16958 # Let's see who fails, perhaps AIX.  2004-04-23
16959 if test "$PTHREAD_CC" != "$CC"; then
16960 { { echo "$as_me:$LINENO: error:
16961 PostgreSQL does not support platforms that require a special compiler
16962 for thread safety." >&5
16963 echo "$as_me: error:
16964 PostgreSQL does not support platforms that require a special compiler
16965 for thread safety." >&2;}
16966    { (exit 1); exit 1; }; }
16967 fi
16968
16969 if test "$THREAD_SUPPORT" = no; then
16970 { { echo "$as_me:$LINENO: error: cannot enable threads on this platform
16971 This platform is known to not support thread-safe programs.  For details,
16972 compile and run src/bin/pg_thread_test." >&5
16973 echo "$as_me: error: cannot enable threads on this platform
16974 This platform is known to not support thread-safe programs.  For details,
16975 compile and run src/bin/pg_thread_test." >&2;}
16976    { (exit 1); exit 1; }; }
16977 fi
16978
16979 # Check for *_r functions
16980 _CFLAGS="$CFLAGS"
16981 _LIBS="$LIBS"
16982 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16983 LIBS="$LIBS $PTHREAD_LIBS"
16984
16985 if test "${ac_cv_header_pthread_h+set}" = set; then
16986   echo "$as_me:$LINENO: checking for pthread.h" >&5
16987 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16988 if test "${ac_cv_header_pthread_h+set}" = set; then
16989   echo $ECHO_N "(cached) $ECHO_C" >&6
16990 fi
16991 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16992 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16993 else
16994   # Is the header compilable?
16995 echo "$as_me:$LINENO: checking pthread.h usability" >&5
16996 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
16997 cat >conftest.$ac_ext <<_ACEOF
16998 /* confdefs.h.  */
16999 _ACEOF
17000 cat confdefs.h >>conftest.$ac_ext
17001 cat >>conftest.$ac_ext <<_ACEOF
17002 /* end confdefs.h.  */
17003 $ac_includes_default
17004 #include <pthread.h>
17005 _ACEOF
17006 rm -f conftest.$ac_objext
17007 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17008   (eval $ac_compile) 2>conftest.er1
17009   ac_status=$?
17010   grep -v '^ *+' conftest.er1 >conftest.err
17011   rm -f conftest.er1
17012   cat conftest.err >&5
17013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17014   (exit $ac_status); } &&
17015          { ac_try='test -z "$ac_c_werror_flag"
17016                          || test ! -s conftest.err'
17017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17018   (eval $ac_try) 2>&5
17019   ac_status=$?
17020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17021   (exit $ac_status); }; } &&
17022          { ac_try='test -s conftest.$ac_objext'
17023   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17024   (eval $ac_try) 2>&5
17025   ac_status=$?
17026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17027   (exit $ac_status); }; }; then
17028   ac_header_compiler=yes
17029 else
17030   echo "$as_me: failed program was:" >&5
17031 sed 's/^/| /' conftest.$ac_ext >&5
17032
17033 ac_header_compiler=no
17034 fi
17035 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17036 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17037 echo "${ECHO_T}$ac_header_compiler" >&6
17038
17039 # Is the header present?
17040 echo "$as_me:$LINENO: checking pthread.h presence" >&5
17041 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
17042 cat >conftest.$ac_ext <<_ACEOF
17043 /* confdefs.h.  */
17044 _ACEOF
17045 cat confdefs.h >>conftest.$ac_ext
17046 cat >>conftest.$ac_ext <<_ACEOF
17047 /* end confdefs.h.  */
17048 #include <pthread.h>
17049 _ACEOF
17050 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17051   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17052   ac_status=$?
17053   grep -v '^ *+' conftest.er1 >conftest.err
17054   rm -f conftest.er1
17055   cat conftest.err >&5
17056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17057   (exit $ac_status); } >/dev/null; then
17058   if test -s conftest.err; then
17059     ac_cpp_err=$ac_c_preproc_warn_flag
17060     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17061   else
17062     ac_cpp_err=
17063   fi
17064 else
17065   ac_cpp_err=yes
17066 fi
17067 if test -z "$ac_cpp_err"; then
17068   ac_header_preproc=yes
17069 else
17070   echo "$as_me: failed program was:" >&5
17071 sed 's/^/| /' conftest.$ac_ext >&5
17072
17073   ac_header_preproc=no
17074 fi
17075 rm -f conftest.err conftest.$ac_ext
17076 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17077 echo "${ECHO_T}$ac_header_preproc" >&6
17078
17079 # So?  What about this header?
17080 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17081   yes:no: )
17082     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
17083 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17084     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
17085 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
17086     ac_header_preproc=yes
17087     ;;
17088   no:yes:* )
17089     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
17090 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
17091     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
17092 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
17093     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
17094 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
17095     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
17096 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17097     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
17098 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
17099     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
17100 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
17101     (
17102       cat <<\_ASBOX
17103 ## ---------------------------------------- ##
17104 ## Report this to pgsql-bugs@postgresql.org ##
17105 ## ---------------------------------------- ##
17106 _ASBOX
17107     ) |
17108       sed "s/^/$as_me: WARNING:     /" >&2
17109     ;;
17110 esac
17111 echo "$as_me:$LINENO: checking for pthread.h" >&5
17112 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
17113 if test "${ac_cv_header_pthread_h+set}" = set; then
17114   echo $ECHO_N "(cached) $ECHO_C" >&6
17115 else
17116   ac_cv_header_pthread_h=$ac_header_preproc
17117 fi
17118 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
17119 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
17120
17121 fi
17122 if test $ac_cv_header_pthread_h = yes; then
17123   :
17124 else
17125   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
17126 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
17127    { (exit 1); exit 1; }; }
17128 fi
17129
17130
17131
17132
17133
17134
17135 for ac_func in strerror_r getpwuid_r gethostbyname_r
17136 do
17137 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17138 echo "$as_me:$LINENO: checking for $ac_func" >&5
17139 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17140 if eval "test \"\${$as_ac_var+set}\" = set"; then
17141   echo $ECHO_N "(cached) $ECHO_C" >&6
17142 else
17143   cat >conftest.$ac_ext <<_ACEOF
17144 /* confdefs.h.  */
17145 _ACEOF
17146 cat confdefs.h >>conftest.$ac_ext
17147 cat >>conftest.$ac_ext <<_ACEOF
17148 /* end confdefs.h.  */
17149 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17150    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17151 #define $ac_func innocuous_$ac_func
17152
17153 /* System header to define __stub macros and hopefully few prototypes,
17154     which can conflict with char $ac_func (); below.
17155     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17156     <limits.h> exists even on freestanding compilers.  */
17157
17158 #ifdef __STDC__
17159 # include <limits.h>
17160 #else
17161 # include <assert.h>
17162 #endif
17163
17164 #undef $ac_func
17165
17166 /* Override any gcc2 internal prototype to avoid an error.  */
17167 #ifdef __cplusplus
17168 extern "C"
17169 {
17170 #endif
17171 /* We use char because int might match the return type of a gcc2
17172    builtin and then its argument prototype would still apply.  */
17173 char $ac_func ();
17174 /* The GNU C library defines this for functions which it implements
17175     to always fail with ENOSYS.  Some functions are actually named
17176     something starting with __ and the normal name is an alias.  */
17177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17178 choke me
17179 #else
17180 char (*f) () = $ac_func;
17181 #endif
17182 #ifdef __cplusplus
17183 }
17184 #endif
17185
17186 int
17187 main ()
17188 {
17189 return f != $ac_func;
17190   ;
17191   return 0;
17192 }
17193 _ACEOF
17194 rm -f conftest.$ac_objext conftest$ac_exeext
17195 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17196   (eval $ac_link) 2>conftest.er1
17197   ac_status=$?
17198   grep -v '^ *+' conftest.er1 >conftest.err
17199   rm -f conftest.er1
17200   cat conftest.err >&5
17201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17202   (exit $ac_status); } &&
17203          { ac_try='test -z "$ac_c_werror_flag"
17204                          || test ! -s conftest.err'
17205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17206   (eval $ac_try) 2>&5
17207   ac_status=$?
17208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17209   (exit $ac_status); }; } &&
17210          { ac_try='test -s conftest$ac_exeext'
17211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17212   (eval $ac_try) 2>&5
17213   ac_status=$?
17214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17215   (exit $ac_status); }; }; then
17216   eval "$as_ac_var=yes"
17217 else
17218   echo "$as_me: failed program was:" >&5
17219 sed 's/^/| /' conftest.$ac_ext >&5
17220
17221 eval "$as_ac_var=no"
17222 fi
17223 rm -f conftest.err conftest.$ac_objext \
17224       conftest$ac_exeext conftest.$ac_ext
17225 fi
17226 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17227 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17228 if test `eval echo '${'$as_ac_var'}'` = yes; then
17229   cat >>confdefs.h <<_ACEOF
17230 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17231 _ACEOF
17232
17233 fi
17234 done
17235
17236
17237 # Do test here with the proper thread flags
17238 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
17239 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
17240 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
17241   echo $ECHO_N "(cached) $ECHO_C" >&6
17242 else
17243   cat >conftest.$ac_ext <<_ACEOF
17244 /* confdefs.h.  */
17245 _ACEOF
17246 cat confdefs.h >>conftest.$ac_ext
17247 cat >>conftest.$ac_ext <<_ACEOF
17248 /* end confdefs.h.  */
17249 #include <sys/types.h>
17250 #include <pwd.h>
17251 int
17252 main ()
17253 {
17254 uid_t uid;
17255 struct passwd *space;
17256 char *buf;
17257 size_t bufsize;
17258 struct passwd **result;
17259 getpwuid_r(uid, space, buf, bufsize, result);
17260   ;
17261   return 0;
17262 }
17263 _ACEOF
17264 rm -f conftest.$ac_objext
17265 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17266   (eval $ac_compile) 2>conftest.er1
17267   ac_status=$?
17268   grep -v '^ *+' conftest.er1 >conftest.err
17269   rm -f conftest.er1
17270   cat conftest.err >&5
17271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17272   (exit $ac_status); } &&
17273          { ac_try='test -z "$ac_c_werror_flag"
17274                          || test ! -s conftest.err'
17275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17276   (eval $ac_try) 2>&5
17277   ac_status=$?
17278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17279   (exit $ac_status); }; } &&
17280          { ac_try='test -s conftest.$ac_objext'
17281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17282   (eval $ac_try) 2>&5
17283   ac_status=$?
17284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17285   (exit $ac_status); }; }; then
17286   pgac_func_getpwuid_r_5arg=yes
17287 else
17288   echo "$as_me: failed program was:" >&5
17289 sed 's/^/| /' conftest.$ac_ext >&5
17290
17291 pgac_func_getpwuid_r_5arg=no
17292 fi
17293 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17294 fi
17295 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
17296 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
17297 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
17298
17299 cat >>confdefs.h <<\_ACEOF
17300 #define GETPWUID_R_5ARG
17301 _ACEOF
17302
17303 fi
17304
17305 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
17306 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
17307 if test "${pgac_func_strerror_r_int+set}" = set; then
17308   echo $ECHO_N "(cached) $ECHO_C" >&6
17309 else
17310   cat >conftest.$ac_ext <<_ACEOF
17311 /* confdefs.h.  */
17312 _ACEOF
17313 cat confdefs.h >>conftest.$ac_ext
17314 cat >>conftest.$ac_ext <<_ACEOF
17315 /* end confdefs.h.  */
17316 #include <string.h>
17317 int
17318 main ()
17319 {
17320 #ifndef _AIX
17321 int strerror_r(int, char *, size_t);
17322 #else
17323 /* Older AIX has 'int' for the third argument so we don't test the args. */
17324 int strerror_r();
17325 #endif
17326   ;
17327   return 0;
17328 }
17329 _ACEOF
17330 rm -f conftest.$ac_objext
17331 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17332   (eval $ac_compile) 2>conftest.er1
17333   ac_status=$?
17334   grep -v '^ *+' conftest.er1 >conftest.err
17335   rm -f conftest.er1
17336   cat conftest.err >&5
17337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17338   (exit $ac_status); } &&
17339          { ac_try='test -z "$ac_c_werror_flag"
17340                          || test ! -s conftest.err'
17341   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17342   (eval $ac_try) 2>&5
17343   ac_status=$?
17344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17345   (exit $ac_status); }; } &&
17346          { ac_try='test -s conftest.$ac_objext'
17347   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17348   (eval $ac_try) 2>&5
17349   ac_status=$?
17350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17351   (exit $ac_status); }; }; then
17352   pgac_func_strerror_r_int=yes
17353 else
17354   echo "$as_me: failed program was:" >&5
17355 sed 's/^/| /' conftest.$ac_ext >&5
17356
17357 pgac_func_strerror_r_int=no
17358 fi
17359 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17360 fi
17361 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17362 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17363 if test x"$pgac_func_strerror_r_int" = xyes ; then
17364
17365 cat >>confdefs.h <<\_ACEOF
17366 #define STRERROR_R_INT
17367 _ACEOF
17368
17369 fi
17370
17371
17372 CFLAGS="$_CFLAGS"
17373 LIBS="$_LIBS"
17374
17375 else
17376 # do not use values from template file
17377 PTHREAD_CFLAGS=
17378 PTHREAD_LIBS=
17379 fi
17380
17381
17382
17383
17384
17385 # We can test for libldap_r only after we know PTHREAD_LIBS
17386 if test "$with_ldap" = yes ; then
17387   _LIBS="$LIBS"
17388   if test "$PORTNAME" != "win32"; then
17389
17390 echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
17391 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6
17392 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
17393   echo $ECHO_N "(cached) $ECHO_C" >&6
17394 else
17395   ac_check_lib_save_LIBS=$LIBS
17396 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
17397 cat >conftest.$ac_ext <<_ACEOF
17398 /* confdefs.h.  */
17399 _ACEOF
17400 cat confdefs.h >>conftest.$ac_ext
17401 cat >>conftest.$ac_ext <<_ACEOF
17402 /* end confdefs.h.  */
17403
17404 /* Override any gcc2 internal prototype to avoid an error.  */
17405 #ifdef __cplusplus
17406 extern "C"
17407 #endif
17408 /* We use char because int might match the return type of a gcc2
17409    builtin and then its argument prototype would still apply.  */
17410 char ldap_bind ();
17411 int
17412 main ()
17413 {
17414 ldap_bind ();
17415   ;
17416   return 0;
17417 }
17418 _ACEOF
17419 rm -f conftest.$ac_objext conftest$ac_exeext
17420 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17421   (eval $ac_link) 2>conftest.er1
17422   ac_status=$?
17423   grep -v '^ *+' conftest.er1 >conftest.err
17424   rm -f conftest.er1
17425   cat conftest.err >&5
17426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17427   (exit $ac_status); } &&
17428          { ac_try='test -z "$ac_c_werror_flag"
17429                          || test ! -s conftest.err'
17430   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17431   (eval $ac_try) 2>&5
17432   ac_status=$?
17433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17434   (exit $ac_status); }; } &&
17435          { ac_try='test -s conftest$ac_exeext'
17436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17437   (eval $ac_try) 2>&5
17438   ac_status=$?
17439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17440   (exit $ac_status); }; }; then
17441   ac_cv_lib_ldap_ldap_bind=yes
17442 else
17443   echo "$as_me: failed program was:" >&5
17444 sed 's/^/| /' conftest.$ac_ext >&5
17445
17446 ac_cv_lib_ldap_ldap_bind=no
17447 fi
17448 rm -f conftest.err conftest.$ac_objext \
17449       conftest$ac_exeext conftest.$ac_ext
17450 LIBS=$ac_check_lib_save_LIBS
17451 fi
17452 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
17453 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6
17454 if test $ac_cv_lib_ldap_ldap_bind = yes; then
17455   cat >>confdefs.h <<_ACEOF
17456 #define HAVE_LIBLDAP 1
17457 _ACEOF
17458
17459   LIBS="-lldap $LIBS"
17460
17461 else
17462   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
17463 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
17464    { (exit 1); exit 1; }; }
17465 fi
17466
17467     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
17468     if test "$enable_thread_safety" = yes; then
17469       # on some platforms ldap_r fails to link without PTHREAD_LIBS
17470
17471 echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
17472 echo $ECHO_N "checking for ldap_simple_bind in -lldap_r... $ECHO_C" >&6
17473 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
17474   echo $ECHO_N "(cached) $ECHO_C" >&6
17475 else
17476   ac_check_lib_save_LIBS=$LIBS
17477 LIBS="-lldap_r $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
17478 cat >conftest.$ac_ext <<_ACEOF
17479 /* confdefs.h.  */
17480 _ACEOF
17481 cat confdefs.h >>conftest.$ac_ext
17482 cat >>conftest.$ac_ext <<_ACEOF
17483 /* end confdefs.h.  */
17484
17485 /* Override any gcc2 internal prototype to avoid an error.  */
17486 #ifdef __cplusplus
17487 extern "C"
17488 #endif
17489 /* We use char because int might match the return type of a gcc2
17490    builtin and then its argument prototype would still apply.  */
17491 char ldap_simple_bind ();
17492 int
17493 main ()
17494 {
17495 ldap_simple_bind ();
17496   ;
17497   return 0;
17498 }
17499 _ACEOF
17500 rm -f conftest.$ac_objext conftest$ac_exeext
17501 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17502   (eval $ac_link) 2>conftest.er1
17503   ac_status=$?
17504   grep -v '^ *+' conftest.er1 >conftest.err
17505   rm -f conftest.er1
17506   cat conftest.err >&5
17507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17508   (exit $ac_status); } &&
17509          { ac_try='test -z "$ac_c_werror_flag"
17510                          || test ! -s conftest.err'
17511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17512   (eval $ac_try) 2>&5
17513   ac_status=$?
17514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17515   (exit $ac_status); }; } &&
17516          { ac_try='test -s conftest$ac_exeext'
17517   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17518   (eval $ac_try) 2>&5
17519   ac_status=$?
17520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17521   (exit $ac_status); }; }; then
17522   ac_cv_lib_ldap_r_ldap_simple_bind=yes
17523 else
17524   echo "$as_me: failed program was:" >&5
17525 sed 's/^/| /' conftest.$ac_ext >&5
17526
17527 ac_cv_lib_ldap_r_ldap_simple_bind=no
17528 fi
17529 rm -f conftest.err conftest.$ac_objext \
17530       conftest$ac_exeext conftest.$ac_ext
17531 LIBS=$ac_check_lib_save_LIBS
17532 fi
17533 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
17534 echo "${ECHO_T}$ac_cv_lib_ldap_r_ldap_simple_bind" >&6
17535 if test $ac_cv_lib_ldap_r_ldap_simple_bind = yes; then
17536   cat >>confdefs.h <<_ACEOF
17537 #define HAVE_LIBLDAP_R 1
17538 _ACEOF
17539
17540   LIBS="-lldap_r $LIBS"
17541
17542 else
17543   { { echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
17544 echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
17545    { (exit 1); exit 1; }; }
17546 fi
17547
17548       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
17549     else
17550       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
17551     fi
17552   else
17553
17554 echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
17555 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6
17556 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
17557   echo $ECHO_N "(cached) $ECHO_C" >&6
17558 else
17559   ac_check_lib_save_LIBS=$LIBS
17560 LIBS="-lwldap32  $LIBS"
17561 cat >conftest.$ac_ext <<_ACEOF
17562 /* confdefs.h.  */
17563 _ACEOF
17564 cat confdefs.h >>conftest.$ac_ext
17565 cat >>conftest.$ac_ext <<_ACEOF
17566 /* end confdefs.h.  */
17567
17568 /* Override any gcc2 internal prototype to avoid an error.  */
17569 #ifdef __cplusplus
17570 extern "C"
17571 #endif
17572 /* We use char because int might match the return type of a gcc2
17573    builtin and then its argument prototype would still apply.  */
17574 char ldap_bind ();
17575 int
17576 main ()
17577 {
17578 ldap_bind ();
17579   ;
17580   return 0;
17581 }
17582 _ACEOF
17583 rm -f conftest.$ac_objext conftest$ac_exeext
17584 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17585   (eval $ac_link) 2>conftest.er1
17586   ac_status=$?
17587   grep -v '^ *+' conftest.er1 >conftest.err
17588   rm -f conftest.er1
17589   cat conftest.err >&5
17590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17591   (exit $ac_status); } &&
17592          { ac_try='test -z "$ac_c_werror_flag"
17593                          || test ! -s conftest.err'
17594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17595   (eval $ac_try) 2>&5
17596   ac_status=$?
17597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17598   (exit $ac_status); }; } &&
17599          { ac_try='test -s conftest$ac_exeext'
17600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17601   (eval $ac_try) 2>&5
17602   ac_status=$?
17603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17604   (exit $ac_status); }; }; then
17605   ac_cv_lib_wldap32_ldap_bind=yes
17606 else
17607   echo "$as_me: failed program was:" >&5
17608 sed 's/^/| /' conftest.$ac_ext >&5
17609
17610 ac_cv_lib_wldap32_ldap_bind=no
17611 fi
17612 rm -f conftest.err conftest.$ac_objext \
17613       conftest$ac_exeext conftest.$ac_ext
17614 LIBS=$ac_check_lib_save_LIBS
17615 fi
17616 echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
17617 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6
17618 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
17619   cat >>confdefs.h <<_ACEOF
17620 #define HAVE_LIBWLDAP32 1
17621 _ACEOF
17622
17623   LIBS="-lwldap32 $LIBS"
17624
17625 else
17626   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
17627 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
17628    { (exit 1); exit 1; }; }
17629 fi
17630
17631     LDAP_LIBS_FE="-lwldap32"
17632     LDAP_LIBS_BE="-lwldap32"
17633   fi
17634   LIBS="$_LIBS"
17635 fi
17636
17637
17638
17639
17640 # This test makes sure that run tests work at all.  Sometimes a shared
17641 # library is found by the linker, but the runtime linker can't find it.
17642 # This check should come after all modifications of compiler or linker
17643 # variables, and before any other run tests.
17644 echo "$as_me:$LINENO: checking test program" >&5
17645 echo $ECHO_N "checking test program... $ECHO_C" >&6
17646 if test "$cross_compiling" = yes; then
17647   echo "$as_me:$LINENO: result: cross-compiling" >&5
17648 echo "${ECHO_T}cross-compiling" >&6
17649 else
17650   cat >conftest.$ac_ext <<_ACEOF
17651 /* confdefs.h.  */
17652 _ACEOF
17653 cat confdefs.h >>conftest.$ac_ext
17654 cat >>conftest.$ac_ext <<_ACEOF
17655 /* end confdefs.h.  */
17656 int main() { return 0; }
17657 _ACEOF
17658 rm -f conftest$ac_exeext
17659 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17660   (eval $ac_link) 2>&5
17661   ac_status=$?
17662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17663   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17665   (eval $ac_try) 2>&5
17666   ac_status=$?
17667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17668   (exit $ac_status); }; }; then
17669   echo "$as_me:$LINENO: result: ok" >&5
17670 echo "${ECHO_T}ok" >&6
17671 else
17672   echo "$as_me: program exited with status $ac_status" >&5
17673 echo "$as_me: failed program was:" >&5
17674 sed 's/^/| /' conftest.$ac_ext >&5
17675
17676 ( exit $ac_status )
17677 echo "$as_me:$LINENO: result: failed" >&5
17678 echo "${ECHO_T}failed" >&6
17679 { { echo "$as_me:$LINENO: error:
17680 Could not execute a simple test program.  This may be a problem
17681 related to locating shared libraries.  Check the file 'config.log'
17682 for the exact reason." >&5
17683 echo "$as_me: error:
17684 Could not execute a simple test program.  This may be a problem
17685 related to locating shared libraries.  Check the file 'config.log'
17686 for the exact reason." >&2;}
17687    { (exit 1); exit 1; }; }
17688 fi
17689 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17690 fi
17691
17692 # --------------------
17693 # Run tests below here
17694 # --------------------
17695
17696 # Force use of our snprintf if system's doesn't do arg control
17697 # See comment above at snprintf test for details.
17698 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
17699   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17700 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17701 if test "${pgac_cv_printf_arg_control+set}" = set; then
17702   echo $ECHO_N "(cached) $ECHO_C" >&6
17703 else
17704   if test "$cross_compiling" = yes; then
17705   pgac_cv_printf_arg_control=cross
17706 else
17707   cat >conftest.$ac_ext <<_ACEOF
17708 /* confdefs.h.  */
17709 _ACEOF
17710 cat confdefs.h >>conftest.$ac_ext
17711 cat >>conftest.$ac_ext <<_ACEOF
17712 /* end confdefs.h.  */
17713 #include <stdio.h>
17714 #include <string.h>
17715
17716 int main()
17717 {
17718   char buf[100];
17719
17720   /* can it swap arguments? */
17721   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17722   if (strcmp(buf, "4 3") != 0)
17723     return 1;
17724   return 0;
17725 }
17726 _ACEOF
17727 rm -f conftest$ac_exeext
17728 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17729   (eval $ac_link) 2>&5
17730   ac_status=$?
17731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17732   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17733   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17734   (eval $ac_try) 2>&5
17735   ac_status=$?
17736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17737   (exit $ac_status); }; }; then
17738   pgac_cv_printf_arg_control=yes
17739 else
17740   echo "$as_me: program exited with status $ac_status" >&5
17741 echo "$as_me: failed program was:" >&5
17742 sed 's/^/| /' conftest.$ac_ext >&5
17743
17744 ( exit $ac_status )
17745 pgac_cv_printf_arg_control=no
17746 fi
17747 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17748 fi
17749
17750 fi
17751 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17752 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17753
17754   if test $pgac_cv_printf_arg_control != yes ; then
17755     pgac_need_repl_snprintf=yes
17756   fi
17757 fi
17758
17759
17760
17761 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17762 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17763 if test "${pgac_cv_type_long_int_64+set}" = set; then
17764   echo $ECHO_N "(cached) $ECHO_C" >&6
17765 else
17766   if test "$cross_compiling" = yes; then
17767   # If cross-compiling, check the size reported by the compiler and
17768 # trust that the arithmetic works.
17769 cat >conftest.$ac_ext <<_ACEOF
17770 /* confdefs.h.  */
17771 _ACEOF
17772 cat confdefs.h >>conftest.$ac_ext
17773 cat >>conftest.$ac_ext <<_ACEOF
17774 /* end confdefs.h.  */
17775
17776 int
17777 main ()
17778 {
17779 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17780 test_array [0] = 0
17781
17782   ;
17783   return 0;
17784 }
17785 _ACEOF
17786 rm -f conftest.$ac_objext
17787 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17788   (eval $ac_compile) 2>conftest.er1
17789   ac_status=$?
17790   grep -v '^ *+' conftest.er1 >conftest.err
17791   rm -f conftest.er1
17792   cat conftest.err >&5
17793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17794   (exit $ac_status); } &&
17795          { ac_try='test -z "$ac_c_werror_flag"
17796                          || test ! -s conftest.err'
17797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17798   (eval $ac_try) 2>&5
17799   ac_status=$?
17800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17801   (exit $ac_status); }; } &&
17802          { ac_try='test -s conftest.$ac_objext'
17803   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17804   (eval $ac_try) 2>&5
17805   ac_status=$?
17806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17807   (exit $ac_status); }; }; then
17808   pgac_cv_type_long_int_64=yes
17809 else
17810   echo "$as_me: failed program was:" >&5
17811 sed 's/^/| /' conftest.$ac_ext >&5
17812
17813 pgac_cv_type_long_int_64=no
17814 fi
17815 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17816 else
17817   cat >conftest.$ac_ext <<_ACEOF
17818 /* confdefs.h.  */
17819 _ACEOF
17820 cat confdefs.h >>conftest.$ac_ext
17821 cat >>conftest.$ac_ext <<_ACEOF
17822 /* end confdefs.h.  */
17823 typedef long int ac_int64;
17824
17825 /*
17826  * These are globals to discourage the compiler from folding all the
17827  * arithmetic tests down to compile-time constants.
17828  */
17829 ac_int64 a = 20000001;
17830 ac_int64 b = 40000005;
17831
17832 int does_int64_work()
17833 {
17834   ac_int64 c,d;
17835
17836   if (sizeof(ac_int64) != 8)
17837     return 0;                   /* definitely not the right size */
17838
17839   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17840   c = a * b;
17841   d = (c + b) / b;
17842   if (d != a+1)
17843     return 0;
17844   return 1;
17845 }
17846 main() {
17847   exit(! does_int64_work());
17848 }
17849 _ACEOF
17850 rm -f conftest$ac_exeext
17851 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17852   (eval $ac_link) 2>&5
17853   ac_status=$?
17854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17855   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17856   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17857   (eval $ac_try) 2>&5
17858   ac_status=$?
17859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17860   (exit $ac_status); }; }; then
17861   pgac_cv_type_long_int_64=yes
17862 else
17863   echo "$as_me: program exited with status $ac_status" >&5
17864 echo "$as_me: failed program was:" >&5
17865 sed 's/^/| /' conftest.$ac_ext >&5
17866
17867 ( exit $ac_status )
17868 pgac_cv_type_long_int_64=no
17869 fi
17870 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17871 fi
17872 fi
17873 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
17874 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
17875
17876 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17877 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17878
17879 cat >>confdefs.h <<\_ACEOF
17880 #define HAVE_LONG_INT_64
17881 _ACEOF
17882
17883 fi
17884
17885
17886 if test x"$HAVE_LONG_INT_64" = x"no" ; then
17887   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
17888 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
17889 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
17890   echo $ECHO_N "(cached) $ECHO_C" >&6
17891 else
17892   if test "$cross_compiling" = yes; then
17893   # If cross-compiling, check the size reported by the compiler and
17894 # trust that the arithmetic works.
17895 cat >conftest.$ac_ext <<_ACEOF
17896 /* confdefs.h.  */
17897 _ACEOF
17898 cat confdefs.h >>conftest.$ac_ext
17899 cat >>conftest.$ac_ext <<_ACEOF
17900 /* end confdefs.h.  */
17901
17902 int
17903 main ()
17904 {
17905 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17906 test_array [0] = 0
17907
17908   ;
17909   return 0;
17910 }
17911 _ACEOF
17912 rm -f conftest.$ac_objext
17913 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17914   (eval $ac_compile) 2>conftest.er1
17915   ac_status=$?
17916   grep -v '^ *+' conftest.er1 >conftest.err
17917   rm -f conftest.er1
17918   cat conftest.err >&5
17919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17920   (exit $ac_status); } &&
17921          { ac_try='test -z "$ac_c_werror_flag"
17922                          || test ! -s conftest.err'
17923   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17924   (eval $ac_try) 2>&5
17925   ac_status=$?
17926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17927   (exit $ac_status); }; } &&
17928          { ac_try='test -s conftest.$ac_objext'
17929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17930   (eval $ac_try) 2>&5
17931   ac_status=$?
17932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17933   (exit $ac_status); }; }; then
17934   pgac_cv_type_long_long_int_64=yes
17935 else
17936   echo "$as_me: failed program was:" >&5
17937 sed 's/^/| /' conftest.$ac_ext >&5
17938
17939 pgac_cv_type_long_long_int_64=no
17940 fi
17941 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17942 else
17943   cat >conftest.$ac_ext <<_ACEOF
17944 /* confdefs.h.  */
17945 _ACEOF
17946 cat confdefs.h >>conftest.$ac_ext
17947 cat >>conftest.$ac_ext <<_ACEOF
17948 /* end confdefs.h.  */
17949 typedef long long int ac_int64;
17950
17951 /*
17952  * These are globals to discourage the compiler from folding all the
17953  * arithmetic tests down to compile-time constants.
17954  */
17955 ac_int64 a = 20000001;
17956 ac_int64 b = 40000005;
17957
17958 int does_int64_work()
17959 {
17960   ac_int64 c,d;
17961
17962   if (sizeof(ac_int64) != 8)
17963     return 0;                   /* definitely not the right size */
17964
17965   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17966   c = a * b;
17967   d = (c + b) / b;
17968   if (d != a+1)
17969     return 0;
17970   return 1;
17971 }
17972 main() {
17973   exit(! does_int64_work());
17974 }
17975 _ACEOF
17976 rm -f conftest$ac_exeext
17977 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17978   (eval $ac_link) 2>&5
17979   ac_status=$?
17980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17981   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17983   (eval $ac_try) 2>&5
17984   ac_status=$?
17985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17986   (exit $ac_status); }; }; then
17987   pgac_cv_type_long_long_int_64=yes
17988 else
17989   echo "$as_me: program exited with status $ac_status" >&5
17990 echo "$as_me: failed program was:" >&5
17991 sed 's/^/| /' conftest.$ac_ext >&5
17992
17993 ( exit $ac_status )
17994 pgac_cv_type_long_long_int_64=no
17995 fi
17996 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17997 fi
17998 fi
17999 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
18000 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
18001
18002 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
18003 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
18004
18005 cat >>confdefs.h <<\_ACEOF
18006 #define HAVE_LONG_LONG_INT_64
18007 _ACEOF
18008
18009 fi
18010
18011 fi
18012
18013
18014
18015 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
18016   cat >conftest.$ac_ext <<_ACEOF
18017 /* confdefs.h.  */
18018 _ACEOF
18019 cat confdefs.h >>conftest.$ac_ext
18020 cat >>conftest.$ac_ext <<_ACEOF
18021 /* end confdefs.h.  */
18022
18023 #define INT64CONST(x)  x##LL
18024 long long int foo = INT64CONST(0x1234567890123456);
18025
18026 int
18027 main ()
18028 {
18029
18030   ;
18031   return 0;
18032 }
18033 _ACEOF
18034 rm -f conftest.$ac_objext
18035 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18036   (eval $ac_compile) 2>conftest.er1
18037   ac_status=$?
18038   grep -v '^ *+' conftest.er1 >conftest.err
18039   rm -f conftest.er1
18040   cat conftest.err >&5
18041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18042   (exit $ac_status); } &&
18043          { ac_try='test -z "$ac_c_werror_flag"
18044                          || test ! -s conftest.err'
18045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18046   (eval $ac_try) 2>&5
18047   ac_status=$?
18048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18049   (exit $ac_status); }; } &&
18050          { ac_try='test -s conftest.$ac_objext'
18051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18052   (eval $ac_try) 2>&5
18053   ac_status=$?
18054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18055   (exit $ac_status); }; }; then
18056
18057 cat >>confdefs.h <<\_ACEOF
18058 #define HAVE_LL_CONSTANTS 1
18059 _ACEOF
18060
18061 else
18062   echo "$as_me: failed program was:" >&5
18063 sed 's/^/| /' conftest.$ac_ext >&5
18064
18065 fi
18066 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18067 fi
18068
18069
18070 # If we found "long int" is 64 bits, assume snprintf handles it.  If
18071 # we found we need to use "long long int", better check.  We cope with
18072 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
18073 # work, fall back to our own snprintf emulation (which we know uses %lld).
18074
18075 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
18076   if test $pgac_need_repl_snprintf = no; then
18077     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
18078 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
18079 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
18080   echo $ECHO_N "(cached) $ECHO_C" >&6
18081 else
18082   for pgac_format in '%lld' '%qd' '%I64d'; do
18083 if test "$cross_compiling" = yes; then
18084   pgac_cv_snprintf_long_long_int_format=cross; break
18085 else
18086   cat >conftest.$ac_ext <<_ACEOF
18087 /* confdefs.h.  */
18088 _ACEOF
18089 cat confdefs.h >>conftest.$ac_ext
18090 cat >>conftest.$ac_ext <<_ACEOF
18091 /* end confdefs.h.  */
18092 #include <stdio.h>
18093 typedef long long int ac_int64;
18094 #define INT64_FORMAT "$pgac_format"
18095
18096 ac_int64 a = 20000001;
18097 ac_int64 b = 40000005;
18098
18099 int does_int64_snprintf_work()
18100 {
18101   ac_int64 c;
18102   char buf[100];
18103
18104   if (sizeof(ac_int64) != 8)
18105     return 0;                   /* doesn't look like the right size */
18106
18107   c = a * b;
18108   snprintf(buf, 100, INT64_FORMAT, c);
18109   if (strcmp(buf, "800000140000005") != 0)
18110     return 0;                   /* either multiply or snprintf is busted */
18111   return 1;
18112 }
18113 main() {
18114   exit(! does_int64_snprintf_work());
18115 }
18116 _ACEOF
18117 rm -f conftest$ac_exeext
18118 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18119   (eval $ac_link) 2>&5
18120   ac_status=$?
18121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18122   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18124   (eval $ac_try) 2>&5
18125   ac_status=$?
18126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18127   (exit $ac_status); }; }; then
18128   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
18129 else
18130   echo "$as_me: program exited with status $ac_status" >&5
18131 echo "$as_me: failed program was:" >&5
18132 sed 's/^/| /' conftest.$ac_ext >&5
18133
18134 fi
18135 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18136 fi
18137 done
18138 fi
18139
18140 LONG_LONG_INT_FORMAT=''
18141
18142 case $pgac_cv_snprintf_long_long_int_format in
18143   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
18144 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
18145   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
18146 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
18147          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
18148   *)     echo "$as_me:$LINENO: result: none" >&5
18149 echo "${ECHO_T}none" >&6;;
18150 esac
18151     if test "$LONG_LONG_INT_FORMAT" = ""; then
18152       # Force usage of our own snprintf, since system snprintf is broken
18153       pgac_need_repl_snprintf=yes
18154       LONG_LONG_INT_FORMAT='%lld'
18155     fi
18156   else
18157     # Here if we previously decided we needed to use our own snprintf
18158     LONG_LONG_INT_FORMAT='%lld'
18159   fi
18160   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
18161   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
18162   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
18163 else
18164   # Here if we are not using 'long long int' at all
18165   INT64_FORMAT='"%ld"'
18166   UINT64_FORMAT='"%lu"'
18167 fi
18168
18169
18170 cat >>confdefs.h <<_ACEOF
18171 #define INT64_FORMAT $INT64_FORMAT
18172 _ACEOF
18173
18174
18175
18176 cat >>confdefs.h <<_ACEOF
18177 #define UINT64_FORMAT $UINT64_FORMAT
18178 _ACEOF
18179
18180
18181 # Now we have checked all the reasons to replace snprintf
18182 if test $pgac_need_repl_snprintf = yes; then
18183
18184 cat >>confdefs.h <<\_ACEOF
18185 #define USE_REPL_SNPRINTF 1
18186 _ACEOF
18187
18188   case $LIBOBJS in
18189     "snprintf.$ac_objext"   | \
18190   *" snprintf.$ac_objext"   | \
18191     "snprintf.$ac_objext "* | \
18192   *" snprintf.$ac_objext "* ) ;;
18193   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
18194 esac
18195
18196 fi
18197
18198 # Need a #define for the size of Datum (unsigned long)
18199 echo "$as_me:$LINENO: checking for unsigned long" >&5
18200 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
18201 if test "${ac_cv_type_unsigned_long+set}" = set; then
18202   echo $ECHO_N "(cached) $ECHO_C" >&6
18203 else
18204   cat >conftest.$ac_ext <<_ACEOF
18205 /* confdefs.h.  */
18206 _ACEOF
18207 cat confdefs.h >>conftest.$ac_ext
18208 cat >>conftest.$ac_ext <<_ACEOF
18209 /* end confdefs.h.  */
18210 $ac_includes_default
18211 int
18212 main ()
18213 {
18214 if ((unsigned long *) 0)
18215   return 0;
18216 if (sizeof (unsigned long))
18217   return 0;
18218   ;
18219   return 0;
18220 }
18221 _ACEOF
18222 rm -f conftest.$ac_objext
18223 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18224   (eval $ac_compile) 2>conftest.er1
18225   ac_status=$?
18226   grep -v '^ *+' conftest.er1 >conftest.err
18227   rm -f conftest.er1
18228   cat conftest.err >&5
18229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18230   (exit $ac_status); } &&
18231          { ac_try='test -z "$ac_c_werror_flag"
18232                          || test ! -s conftest.err'
18233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18234   (eval $ac_try) 2>&5
18235   ac_status=$?
18236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18237   (exit $ac_status); }; } &&
18238          { ac_try='test -s conftest.$ac_objext'
18239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18240   (eval $ac_try) 2>&5
18241   ac_status=$?
18242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18243   (exit $ac_status); }; }; then
18244   ac_cv_type_unsigned_long=yes
18245 else
18246   echo "$as_me: failed program was:" >&5
18247 sed 's/^/| /' conftest.$ac_ext >&5
18248
18249 ac_cv_type_unsigned_long=no
18250 fi
18251 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18252 fi
18253 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
18254 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
18255
18256 echo "$as_me:$LINENO: checking size of unsigned long" >&5
18257 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
18258 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
18259   echo $ECHO_N "(cached) $ECHO_C" >&6
18260 else
18261   if test "$ac_cv_type_unsigned_long" = yes; then
18262   # The cast to unsigned long works around a bug in the HP C Compiler
18263   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18264   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18265   # This bug is HP SR number 8606223364.
18266   if test "$cross_compiling" = yes; then
18267   # Depending upon the size, compute the lo and hi bounds.
18268 cat >conftest.$ac_ext <<_ACEOF
18269 /* confdefs.h.  */
18270 _ACEOF
18271 cat confdefs.h >>conftest.$ac_ext
18272 cat >>conftest.$ac_ext <<_ACEOF
18273 /* end confdefs.h.  */
18274 $ac_includes_default
18275 int
18276 main ()
18277 {
18278 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
18279 test_array [0] = 0
18280
18281   ;
18282   return 0;
18283 }
18284 _ACEOF
18285 rm -f conftest.$ac_objext
18286 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18287   (eval $ac_compile) 2>conftest.er1
18288   ac_status=$?
18289   grep -v '^ *+' conftest.er1 >conftest.err
18290   rm -f conftest.er1
18291   cat conftest.err >&5
18292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18293   (exit $ac_status); } &&
18294          { ac_try='test -z "$ac_c_werror_flag"
18295                          || test ! -s conftest.err'
18296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18297   (eval $ac_try) 2>&5
18298   ac_status=$?
18299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18300   (exit $ac_status); }; } &&
18301          { ac_try='test -s conftest.$ac_objext'
18302   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18303   (eval $ac_try) 2>&5
18304   ac_status=$?
18305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18306   (exit $ac_status); }; }; then
18307   ac_lo=0 ac_mid=0
18308   while :; do
18309     cat >conftest.$ac_ext <<_ACEOF
18310 /* confdefs.h.  */
18311 _ACEOF
18312 cat confdefs.h >>conftest.$ac_ext
18313 cat >>conftest.$ac_ext <<_ACEOF
18314 /* end confdefs.h.  */
18315 $ac_includes_default
18316 int
18317 main ()
18318 {
18319 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18320 test_array [0] = 0
18321
18322   ;
18323   return 0;
18324 }
18325 _ACEOF
18326 rm -f conftest.$ac_objext
18327 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18328   (eval $ac_compile) 2>conftest.er1
18329   ac_status=$?
18330   grep -v '^ *+' conftest.er1 >conftest.err
18331   rm -f conftest.er1
18332   cat conftest.err >&5
18333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18334   (exit $ac_status); } &&
18335          { ac_try='test -z "$ac_c_werror_flag"
18336                          || test ! -s conftest.err'
18337   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18338   (eval $ac_try) 2>&5
18339   ac_status=$?
18340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18341   (exit $ac_status); }; } &&
18342          { ac_try='test -s conftest.$ac_objext'
18343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18344   (eval $ac_try) 2>&5
18345   ac_status=$?
18346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18347   (exit $ac_status); }; }; then
18348   ac_hi=$ac_mid; break
18349 else
18350   echo "$as_me: failed program was:" >&5
18351 sed 's/^/| /' conftest.$ac_ext >&5
18352
18353 ac_lo=`expr $ac_mid + 1`
18354                     if test $ac_lo -le $ac_mid; then
18355                       ac_lo= ac_hi=
18356                       break
18357                     fi
18358                     ac_mid=`expr 2 '*' $ac_mid + 1`
18359 fi
18360 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18361   done
18362 else
18363   echo "$as_me: failed program was:" >&5
18364 sed 's/^/| /' conftest.$ac_ext >&5
18365
18366 cat >conftest.$ac_ext <<_ACEOF
18367 /* confdefs.h.  */
18368 _ACEOF
18369 cat confdefs.h >>conftest.$ac_ext
18370 cat >>conftest.$ac_ext <<_ACEOF
18371 /* end confdefs.h.  */
18372 $ac_includes_default
18373 int
18374 main ()
18375 {
18376 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
18377 test_array [0] = 0
18378
18379   ;
18380   return 0;
18381 }
18382 _ACEOF
18383 rm -f conftest.$ac_objext
18384 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18385   (eval $ac_compile) 2>conftest.er1
18386   ac_status=$?
18387   grep -v '^ *+' conftest.er1 >conftest.err
18388   rm -f conftest.er1
18389   cat conftest.err >&5
18390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18391   (exit $ac_status); } &&
18392          { ac_try='test -z "$ac_c_werror_flag"
18393                          || test ! -s conftest.err'
18394   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18395   (eval $ac_try) 2>&5
18396   ac_status=$?
18397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18398   (exit $ac_status); }; } &&
18399          { ac_try='test -s conftest.$ac_objext'
18400   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18401   (eval $ac_try) 2>&5
18402   ac_status=$?
18403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18404   (exit $ac_status); }; }; then
18405   ac_hi=-1 ac_mid=-1
18406   while :; do
18407     cat >conftest.$ac_ext <<_ACEOF
18408 /* confdefs.h.  */
18409 _ACEOF
18410 cat confdefs.h >>conftest.$ac_ext
18411 cat >>conftest.$ac_ext <<_ACEOF
18412 /* end confdefs.h.  */
18413 $ac_includes_default
18414 int
18415 main ()
18416 {
18417 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
18418 test_array [0] = 0
18419
18420   ;
18421   return 0;
18422 }
18423 _ACEOF
18424 rm -f conftest.$ac_objext
18425 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18426   (eval $ac_compile) 2>conftest.er1
18427   ac_status=$?
18428   grep -v '^ *+' conftest.er1 >conftest.err
18429   rm -f conftest.er1
18430   cat conftest.err >&5
18431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18432   (exit $ac_status); } &&
18433          { ac_try='test -z "$ac_c_werror_flag"
18434                          || test ! -s conftest.err'
18435   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18436   (eval $ac_try) 2>&5
18437   ac_status=$?
18438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18439   (exit $ac_status); }; } &&
18440          { ac_try='test -s conftest.$ac_objext'
18441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18442   (eval $ac_try) 2>&5
18443   ac_status=$?
18444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18445   (exit $ac_status); }; }; then
18446   ac_lo=$ac_mid; break
18447 else
18448   echo "$as_me: failed program was:" >&5
18449 sed 's/^/| /' conftest.$ac_ext >&5
18450
18451 ac_hi=`expr '(' $ac_mid ')' - 1`
18452                        if test $ac_mid -le $ac_hi; then
18453                          ac_lo= ac_hi=
18454                          break
18455                        fi
18456                        ac_mid=`expr 2 '*' $ac_mid`
18457 fi
18458 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18459   done
18460 else
18461   echo "$as_me: failed program was:" >&5
18462 sed 's/^/| /' conftest.$ac_ext >&5
18463
18464 ac_lo= ac_hi=
18465 fi
18466 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18467 fi
18468 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18469 # Binary search between lo and hi bounds.
18470 while test "x$ac_lo" != "x$ac_hi"; do
18471   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18472   cat >conftest.$ac_ext <<_ACEOF
18473 /* confdefs.h.  */
18474 _ACEOF
18475 cat confdefs.h >>conftest.$ac_ext
18476 cat >>conftest.$ac_ext <<_ACEOF
18477 /* end confdefs.h.  */
18478 $ac_includes_default
18479 int
18480 main ()
18481 {
18482 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18483 test_array [0] = 0
18484
18485   ;
18486   return 0;
18487 }
18488 _ACEOF
18489 rm -f conftest.$ac_objext
18490 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18491   (eval $ac_compile) 2>conftest.er1
18492   ac_status=$?
18493   grep -v '^ *+' conftest.er1 >conftest.err
18494   rm -f conftest.er1
18495   cat conftest.err >&5
18496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18497   (exit $ac_status); } &&
18498          { ac_try='test -z "$ac_c_werror_flag"
18499                          || test ! -s conftest.err'
18500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18501   (eval $ac_try) 2>&5
18502   ac_status=$?
18503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18504   (exit $ac_status); }; } &&
18505          { ac_try='test -s conftest.$ac_objext'
18506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18507   (eval $ac_try) 2>&5
18508   ac_status=$?
18509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18510   (exit $ac_status); }; }; then
18511   ac_hi=$ac_mid
18512 else
18513   echo "$as_me: failed program was:" >&5
18514 sed 's/^/| /' conftest.$ac_ext >&5
18515
18516 ac_lo=`expr '(' $ac_mid ')' + 1`
18517 fi
18518 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18519 done
18520 case $ac_lo in
18521 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
18522 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18523 See \`config.log' for more details." >&5
18524 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18525 See \`config.log' for more details." >&2;}
18526    { (exit 1); exit 1; }; } ;;
18527 esac
18528 else
18529   if test "$cross_compiling" = yes; then
18530   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18531 See \`config.log' for more details." >&5
18532 echo "$as_me: error: cannot run test program while cross compiling
18533 See \`config.log' for more details." >&2;}
18534    { (exit 1); exit 1; }; }
18535 else
18536   cat >conftest.$ac_ext <<_ACEOF
18537 /* confdefs.h.  */
18538 _ACEOF
18539 cat confdefs.h >>conftest.$ac_ext
18540 cat >>conftest.$ac_ext <<_ACEOF
18541 /* end confdefs.h.  */
18542 $ac_includes_default
18543 long longval () { return (long) (sizeof (unsigned long)); }
18544 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
18545 #include <stdio.h>
18546 #include <stdlib.h>
18547 int
18548 main ()
18549 {
18550
18551   FILE *f = fopen ("conftest.val", "w");
18552   if (! f)
18553     exit (1);
18554   if (((long) (sizeof (unsigned long))) < 0)
18555     {
18556       long i = longval ();
18557       if (i != ((long) (sizeof (unsigned long))))
18558         exit (1);
18559       fprintf (f, "%ld\n", i);
18560     }
18561   else
18562     {
18563       unsigned long i = ulongval ();
18564       if (i != ((long) (sizeof (unsigned long))))
18565         exit (1);
18566       fprintf (f, "%lu\n", i);
18567     }
18568   exit (ferror (f) || fclose (f) != 0);
18569
18570   ;
18571   return 0;
18572 }
18573 _ACEOF
18574 rm -f conftest$ac_exeext
18575 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18576   (eval $ac_link) 2>&5
18577   ac_status=$?
18578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18579   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18581   (eval $ac_try) 2>&5
18582   ac_status=$?
18583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18584   (exit $ac_status); }; }; then
18585   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18586 else
18587   echo "$as_me: program exited with status $ac_status" >&5
18588 echo "$as_me: failed program was:" >&5
18589 sed 's/^/| /' conftest.$ac_ext >&5
18590
18591 ( exit $ac_status )
18592 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18593 See \`config.log' for more details." >&5
18594 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18595 See \`config.log' for more details." >&2;}
18596    { (exit 1); exit 1; }; }
18597 fi
18598 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18599 fi
18600 fi
18601 rm -f conftest.val
18602 else
18603   ac_cv_sizeof_unsigned_long=0
18604 fi
18605 fi
18606 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18607 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18608 cat >>confdefs.h <<_ACEOF
18609 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18610 _ACEOF
18611
18612
18613
18614 # And one for the size of size_t (enables tweaks for > 32bit address space)
18615 echo "$as_me:$LINENO: checking for size_t" >&5
18616 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18617 if test "${ac_cv_type_size_t+set}" = set; then
18618   echo $ECHO_N "(cached) $ECHO_C" >&6
18619 else
18620   cat >conftest.$ac_ext <<_ACEOF
18621 /* confdefs.h.  */
18622 _ACEOF
18623 cat confdefs.h >>conftest.$ac_ext
18624 cat >>conftest.$ac_ext <<_ACEOF
18625 /* end confdefs.h.  */
18626 $ac_includes_default
18627 int
18628 main ()
18629 {
18630 if ((size_t *) 0)
18631   return 0;
18632 if (sizeof (size_t))
18633   return 0;
18634   ;
18635   return 0;
18636 }
18637 _ACEOF
18638 rm -f conftest.$ac_objext
18639 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18640   (eval $ac_compile) 2>conftest.er1
18641   ac_status=$?
18642   grep -v '^ *+' conftest.er1 >conftest.err
18643   rm -f conftest.er1
18644   cat conftest.err >&5
18645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18646   (exit $ac_status); } &&
18647          { ac_try='test -z "$ac_c_werror_flag"
18648                          || test ! -s conftest.err'
18649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18650   (eval $ac_try) 2>&5
18651   ac_status=$?
18652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18653   (exit $ac_status); }; } &&
18654          { ac_try='test -s conftest.$ac_objext'
18655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18656   (eval $ac_try) 2>&5
18657   ac_status=$?
18658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18659   (exit $ac_status); }; }; then
18660   ac_cv_type_size_t=yes
18661 else
18662   echo "$as_me: failed program was:" >&5
18663 sed 's/^/| /' conftest.$ac_ext >&5
18664
18665 ac_cv_type_size_t=no
18666 fi
18667 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18668 fi
18669 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18670 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18671
18672 echo "$as_me:$LINENO: checking size of size_t" >&5
18673 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18674 if test "${ac_cv_sizeof_size_t+set}" = set; then
18675   echo $ECHO_N "(cached) $ECHO_C" >&6
18676 else
18677   if test "$ac_cv_type_size_t" = yes; then
18678   # The cast to unsigned long works around a bug in the HP C Compiler
18679   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18680   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18681   # This bug is HP SR number 8606223364.
18682   if test "$cross_compiling" = yes; then
18683   # Depending upon the size, compute the lo and hi bounds.
18684 cat >conftest.$ac_ext <<_ACEOF
18685 /* confdefs.h.  */
18686 _ACEOF
18687 cat confdefs.h >>conftest.$ac_ext
18688 cat >>conftest.$ac_ext <<_ACEOF
18689 /* end confdefs.h.  */
18690 $ac_includes_default
18691 int
18692 main ()
18693 {
18694 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18695 test_array [0] = 0
18696
18697   ;
18698   return 0;
18699 }
18700 _ACEOF
18701 rm -f conftest.$ac_objext
18702 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18703   (eval $ac_compile) 2>conftest.er1
18704   ac_status=$?
18705   grep -v '^ *+' conftest.er1 >conftest.err
18706   rm -f conftest.er1
18707   cat conftest.err >&5
18708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18709   (exit $ac_status); } &&
18710          { ac_try='test -z "$ac_c_werror_flag"
18711                          || test ! -s conftest.err'
18712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18713   (eval $ac_try) 2>&5
18714   ac_status=$?
18715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18716   (exit $ac_status); }; } &&
18717          { ac_try='test -s conftest.$ac_objext'
18718   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18719   (eval $ac_try) 2>&5
18720   ac_status=$?
18721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18722   (exit $ac_status); }; }; then
18723   ac_lo=0 ac_mid=0
18724   while :; do
18725     cat >conftest.$ac_ext <<_ACEOF
18726 /* confdefs.h.  */
18727 _ACEOF
18728 cat confdefs.h >>conftest.$ac_ext
18729 cat >>conftest.$ac_ext <<_ACEOF
18730 /* end confdefs.h.  */
18731 $ac_includes_default
18732 int
18733 main ()
18734 {
18735 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18736 test_array [0] = 0
18737
18738   ;
18739   return 0;
18740 }
18741 _ACEOF
18742 rm -f conftest.$ac_objext
18743 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18744   (eval $ac_compile) 2>conftest.er1
18745   ac_status=$?
18746   grep -v '^ *+' conftest.er1 >conftest.err
18747   rm -f conftest.er1
18748   cat conftest.err >&5
18749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18750   (exit $ac_status); } &&
18751          { ac_try='test -z "$ac_c_werror_flag"
18752                          || test ! -s conftest.err'
18753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18754   (eval $ac_try) 2>&5
18755   ac_status=$?
18756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18757   (exit $ac_status); }; } &&
18758          { ac_try='test -s conftest.$ac_objext'
18759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18760   (eval $ac_try) 2>&5
18761   ac_status=$?
18762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18763   (exit $ac_status); }; }; then
18764   ac_hi=$ac_mid; break
18765 else
18766   echo "$as_me: failed program was:" >&5
18767 sed 's/^/| /' conftest.$ac_ext >&5
18768
18769 ac_lo=`expr $ac_mid + 1`
18770                     if test $ac_lo -le $ac_mid; then
18771                       ac_lo= ac_hi=
18772                       break
18773                     fi
18774                     ac_mid=`expr 2 '*' $ac_mid + 1`
18775 fi
18776 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18777   done
18778 else
18779   echo "$as_me: failed program was:" >&5
18780 sed 's/^/| /' conftest.$ac_ext >&5
18781
18782 cat >conftest.$ac_ext <<_ACEOF
18783 /* confdefs.h.  */
18784 _ACEOF
18785 cat confdefs.h >>conftest.$ac_ext
18786 cat >>conftest.$ac_ext <<_ACEOF
18787 /* end confdefs.h.  */
18788 $ac_includes_default
18789 int
18790 main ()
18791 {
18792 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18793 test_array [0] = 0
18794
18795   ;
18796   return 0;
18797 }
18798 _ACEOF
18799 rm -f conftest.$ac_objext
18800 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18801   (eval $ac_compile) 2>conftest.er1
18802   ac_status=$?
18803   grep -v '^ *+' conftest.er1 >conftest.err
18804   rm -f conftest.er1
18805   cat conftest.err >&5
18806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18807   (exit $ac_status); } &&
18808          { ac_try='test -z "$ac_c_werror_flag"
18809                          || test ! -s conftest.err'
18810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18811   (eval $ac_try) 2>&5
18812   ac_status=$?
18813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18814   (exit $ac_status); }; } &&
18815          { ac_try='test -s conftest.$ac_objext'
18816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18817   (eval $ac_try) 2>&5
18818   ac_status=$?
18819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18820   (exit $ac_status); }; }; then
18821   ac_hi=-1 ac_mid=-1
18822   while :; do
18823     cat >conftest.$ac_ext <<_ACEOF
18824 /* confdefs.h.  */
18825 _ACEOF
18826 cat confdefs.h >>conftest.$ac_ext
18827 cat >>conftest.$ac_ext <<_ACEOF
18828 /* end confdefs.h.  */
18829 $ac_includes_default
18830 int
18831 main ()
18832 {
18833 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18834 test_array [0] = 0
18835
18836   ;
18837   return 0;
18838 }
18839 _ACEOF
18840 rm -f conftest.$ac_objext
18841 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18842   (eval $ac_compile) 2>conftest.er1
18843   ac_status=$?
18844   grep -v '^ *+' conftest.er1 >conftest.err
18845   rm -f conftest.er1
18846   cat conftest.err >&5
18847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18848   (exit $ac_status); } &&
18849          { ac_try='test -z "$ac_c_werror_flag"
18850                          || test ! -s conftest.err'
18851   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18852   (eval $ac_try) 2>&5
18853   ac_status=$?
18854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18855   (exit $ac_status); }; } &&
18856          { ac_try='test -s conftest.$ac_objext'
18857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18858   (eval $ac_try) 2>&5
18859   ac_status=$?
18860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18861   (exit $ac_status); }; }; then
18862   ac_lo=$ac_mid; break
18863 else
18864   echo "$as_me: failed program was:" >&5
18865 sed 's/^/| /' conftest.$ac_ext >&5
18866
18867 ac_hi=`expr '(' $ac_mid ')' - 1`
18868                        if test $ac_mid -le $ac_hi; then
18869                          ac_lo= ac_hi=
18870                          break
18871                        fi
18872                        ac_mid=`expr 2 '*' $ac_mid`
18873 fi
18874 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18875   done
18876 else
18877   echo "$as_me: failed program was:" >&5
18878 sed 's/^/| /' conftest.$ac_ext >&5
18879
18880 ac_lo= ac_hi=
18881 fi
18882 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18883 fi
18884 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18885 # Binary search between lo and hi bounds.
18886 while test "x$ac_lo" != "x$ac_hi"; do
18887   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18888   cat >conftest.$ac_ext <<_ACEOF
18889 /* confdefs.h.  */
18890 _ACEOF
18891 cat confdefs.h >>conftest.$ac_ext
18892 cat >>conftest.$ac_ext <<_ACEOF
18893 /* end confdefs.h.  */
18894 $ac_includes_default
18895 int
18896 main ()
18897 {
18898 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18899 test_array [0] = 0
18900
18901   ;
18902   return 0;
18903 }
18904 _ACEOF
18905 rm -f conftest.$ac_objext
18906 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18907   (eval $ac_compile) 2>conftest.er1
18908   ac_status=$?
18909   grep -v '^ *+' conftest.er1 >conftest.err
18910   rm -f conftest.er1
18911   cat conftest.err >&5
18912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18913   (exit $ac_status); } &&
18914          { ac_try='test -z "$ac_c_werror_flag"
18915                          || test ! -s conftest.err'
18916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18917   (eval $ac_try) 2>&5
18918   ac_status=$?
18919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18920   (exit $ac_status); }; } &&
18921          { ac_try='test -s conftest.$ac_objext'
18922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18923   (eval $ac_try) 2>&5
18924   ac_status=$?
18925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18926   (exit $ac_status); }; }; then
18927   ac_hi=$ac_mid
18928 else
18929   echo "$as_me: failed program was:" >&5
18930 sed 's/^/| /' conftest.$ac_ext >&5
18931
18932 ac_lo=`expr '(' $ac_mid ')' + 1`
18933 fi
18934 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18935 done
18936 case $ac_lo in
18937 ?*) ac_cv_sizeof_size_t=$ac_lo;;
18938 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18939 See \`config.log' for more details." >&5
18940 echo "$as_me: error: cannot compute sizeof (size_t), 77
18941 See \`config.log' for more details." >&2;}
18942    { (exit 1); exit 1; }; } ;;
18943 esac
18944 else
18945   if test "$cross_compiling" = yes; then
18946   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18947 See \`config.log' for more details." >&5
18948 echo "$as_me: error: cannot run test program while cross compiling
18949 See \`config.log' for more details." >&2;}
18950    { (exit 1); exit 1; }; }
18951 else
18952   cat >conftest.$ac_ext <<_ACEOF
18953 /* confdefs.h.  */
18954 _ACEOF
18955 cat confdefs.h >>conftest.$ac_ext
18956 cat >>conftest.$ac_ext <<_ACEOF
18957 /* end confdefs.h.  */
18958 $ac_includes_default
18959 long longval () { return (long) (sizeof (size_t)); }
18960 unsigned long ulongval () { return (long) (sizeof (size_t)); }
18961 #include <stdio.h>
18962 #include <stdlib.h>
18963 int
18964 main ()
18965 {
18966
18967   FILE *f = fopen ("conftest.val", "w");
18968   if (! f)
18969     exit (1);
18970   if (((long) (sizeof (size_t))) < 0)
18971     {
18972       long i = longval ();
18973       if (i != ((long) (sizeof (size_t))))
18974         exit (1);
18975       fprintf (f, "%ld\n", i);
18976     }
18977   else
18978     {
18979       unsigned long i = ulongval ();
18980       if (i != ((long) (sizeof (size_t))))
18981         exit (1);
18982       fprintf (f, "%lu\n", i);
18983     }
18984   exit (ferror (f) || fclose (f) != 0);
18985
18986   ;
18987   return 0;
18988 }
18989 _ACEOF
18990 rm -f conftest$ac_exeext
18991 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18992   (eval $ac_link) 2>&5
18993   ac_status=$?
18994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18995   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18997   (eval $ac_try) 2>&5
18998   ac_status=$?
18999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19000   (exit $ac_status); }; }; then
19001   ac_cv_sizeof_size_t=`cat conftest.val`
19002 else
19003   echo "$as_me: program exited with status $ac_status" >&5
19004 echo "$as_me: failed program was:" >&5
19005 sed 's/^/| /' conftest.$ac_ext >&5
19006
19007 ( exit $ac_status )
19008 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
19009 See \`config.log' for more details." >&5
19010 echo "$as_me: error: cannot compute sizeof (size_t), 77
19011 See \`config.log' for more details." >&2;}
19012    { (exit 1); exit 1; }; }
19013 fi
19014 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19015 fi
19016 fi
19017 rm -f conftest.val
19018 else
19019   ac_cv_sizeof_size_t=0
19020 fi
19021 fi
19022 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
19023 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
19024 cat >>confdefs.h <<_ACEOF
19025 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
19026 _ACEOF
19027
19028
19029
19030 # Determine memory alignment requirements for the basic C data types.
19031
19032 echo "$as_me:$LINENO: checking for short" >&5
19033 echo $ECHO_N "checking for short... $ECHO_C" >&6
19034 if test "${ac_cv_type_short+set}" = set; then
19035   echo $ECHO_N "(cached) $ECHO_C" >&6
19036 else
19037   cat >conftest.$ac_ext <<_ACEOF
19038 /* confdefs.h.  */
19039 _ACEOF
19040 cat confdefs.h >>conftest.$ac_ext
19041 cat >>conftest.$ac_ext <<_ACEOF
19042 /* end confdefs.h.  */
19043 $ac_includes_default
19044 int
19045 main ()
19046 {
19047 if ((short *) 0)
19048   return 0;
19049 if (sizeof (short))
19050   return 0;
19051   ;
19052   return 0;
19053 }
19054 _ACEOF
19055 rm -f conftest.$ac_objext
19056 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19057   (eval $ac_compile) 2>conftest.er1
19058   ac_status=$?
19059   grep -v '^ *+' conftest.er1 >conftest.err
19060   rm -f conftest.er1
19061   cat conftest.err >&5
19062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19063   (exit $ac_status); } &&
19064          { ac_try='test -z "$ac_c_werror_flag"
19065                          || test ! -s conftest.err'
19066   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19067   (eval $ac_try) 2>&5
19068   ac_status=$?
19069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19070   (exit $ac_status); }; } &&
19071          { ac_try='test -s conftest.$ac_objext'
19072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19073   (eval $ac_try) 2>&5
19074   ac_status=$?
19075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19076   (exit $ac_status); }; }; then
19077   ac_cv_type_short=yes
19078 else
19079   echo "$as_me: failed program was:" >&5
19080 sed 's/^/| /' conftest.$ac_ext >&5
19081
19082 ac_cv_type_short=no
19083 fi
19084 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19085 fi
19086 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
19087 echo "${ECHO_T}$ac_cv_type_short" >&6
19088
19089 echo "$as_me:$LINENO: checking alignment of short" >&5
19090 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
19091 if test "${pgac_cv_alignof_short+set}" = set; then
19092   echo $ECHO_N "(cached) $ECHO_C" >&6
19093 else
19094   if test "$ac_cv_type_short" = yes; then
19095   if test "$cross_compiling" = yes; then
19096   # Depending upon the size, compute the lo and hi bounds.
19097 cat >conftest.$ac_ext <<_ACEOF
19098 /* confdefs.h.  */
19099 _ACEOF
19100 cat confdefs.h >>conftest.$ac_ext
19101 cat >>conftest.$ac_ext <<_ACEOF
19102 /* end confdefs.h.  */
19103 $ac_includes_default
19104 struct { char filler; short field; } pgac_struct;
19105 int
19106 main ()
19107 {
19108 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19109 test_array [0] = 0
19110
19111   ;
19112   return 0;
19113 }
19114 _ACEOF
19115 rm -f conftest.$ac_objext
19116 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19117   (eval $ac_compile) 2>conftest.er1
19118   ac_status=$?
19119   grep -v '^ *+' conftest.er1 >conftest.err
19120   rm -f conftest.er1
19121   cat conftest.err >&5
19122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19123   (exit $ac_status); } &&
19124          { ac_try='test -z "$ac_c_werror_flag"
19125                          || test ! -s conftest.err'
19126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19127   (eval $ac_try) 2>&5
19128   ac_status=$?
19129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19130   (exit $ac_status); }; } &&
19131          { ac_try='test -s conftest.$ac_objext'
19132   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19133   (eval $ac_try) 2>&5
19134   ac_status=$?
19135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19136   (exit $ac_status); }; }; then
19137   ac_lo=0 ac_mid=0
19138   while :; do
19139     cat >conftest.$ac_ext <<_ACEOF
19140 /* confdefs.h.  */
19141 _ACEOF
19142 cat confdefs.h >>conftest.$ac_ext
19143 cat >>conftest.$ac_ext <<_ACEOF
19144 /* end confdefs.h.  */
19145 $ac_includes_default
19146 struct { char filler; short field; } pgac_struct;
19147 int
19148 main ()
19149 {
19150 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19151 test_array [0] = 0
19152
19153   ;
19154   return 0;
19155 }
19156 _ACEOF
19157 rm -f conftest.$ac_objext
19158 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19159   (eval $ac_compile) 2>conftest.er1
19160   ac_status=$?
19161   grep -v '^ *+' conftest.er1 >conftest.err
19162   rm -f conftest.er1
19163   cat conftest.err >&5
19164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19165   (exit $ac_status); } &&
19166          { ac_try='test -z "$ac_c_werror_flag"
19167                          || test ! -s conftest.err'
19168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19169   (eval $ac_try) 2>&5
19170   ac_status=$?
19171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19172   (exit $ac_status); }; } &&
19173          { ac_try='test -s conftest.$ac_objext'
19174   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19175   (eval $ac_try) 2>&5
19176   ac_status=$?
19177   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19178   (exit $ac_status); }; }; then
19179   ac_hi=$ac_mid; break
19180 else
19181   echo "$as_me: failed program was:" >&5
19182 sed 's/^/| /' conftest.$ac_ext >&5
19183
19184 ac_lo=`expr $ac_mid + 1`
19185                     if test $ac_lo -le $ac_mid; then
19186                       ac_lo= ac_hi=
19187                       break
19188                     fi
19189                     ac_mid=`expr 2 '*' $ac_mid + 1`
19190 fi
19191 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19192   done
19193 else
19194   echo "$as_me: failed program was:" >&5
19195 sed 's/^/| /' conftest.$ac_ext >&5
19196
19197 cat >conftest.$ac_ext <<_ACEOF
19198 /* confdefs.h.  */
19199 _ACEOF
19200 cat confdefs.h >>conftest.$ac_ext
19201 cat >>conftest.$ac_ext <<_ACEOF
19202 /* end confdefs.h.  */
19203 $ac_includes_default
19204 struct { char filler; short field; } pgac_struct;
19205 int
19206 main ()
19207 {
19208 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19209 test_array [0] = 0
19210
19211   ;
19212   return 0;
19213 }
19214 _ACEOF
19215 rm -f conftest.$ac_objext
19216 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19217   (eval $ac_compile) 2>conftest.er1
19218   ac_status=$?
19219   grep -v '^ *+' conftest.er1 >conftest.err
19220   rm -f conftest.er1
19221   cat conftest.err >&5
19222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19223   (exit $ac_status); } &&
19224          { ac_try='test -z "$ac_c_werror_flag"
19225                          || test ! -s conftest.err'
19226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19227   (eval $ac_try) 2>&5
19228   ac_status=$?
19229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19230   (exit $ac_status); }; } &&
19231          { ac_try='test -s conftest.$ac_objext'
19232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19233   (eval $ac_try) 2>&5
19234   ac_status=$?
19235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19236   (exit $ac_status); }; }; then
19237   ac_hi=-1 ac_mid=-1
19238   while :; do
19239     cat >conftest.$ac_ext <<_ACEOF
19240 /* confdefs.h.  */
19241 _ACEOF
19242 cat confdefs.h >>conftest.$ac_ext
19243 cat >>conftest.$ac_ext <<_ACEOF
19244 /* end confdefs.h.  */
19245 $ac_includes_default
19246 struct { char filler; short field; } pgac_struct;
19247 int
19248 main ()
19249 {
19250 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19251 test_array [0] = 0
19252
19253   ;
19254   return 0;
19255 }
19256 _ACEOF
19257 rm -f conftest.$ac_objext
19258 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19259   (eval $ac_compile) 2>conftest.er1
19260   ac_status=$?
19261   grep -v '^ *+' conftest.er1 >conftest.err
19262   rm -f conftest.er1
19263   cat conftest.err >&5
19264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19265   (exit $ac_status); } &&
19266          { ac_try='test -z "$ac_c_werror_flag"
19267                          || test ! -s conftest.err'
19268   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19269   (eval $ac_try) 2>&5
19270   ac_status=$?
19271   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19272   (exit $ac_status); }; } &&
19273          { ac_try='test -s conftest.$ac_objext'
19274   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19275   (eval $ac_try) 2>&5
19276   ac_status=$?
19277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19278   (exit $ac_status); }; }; then
19279   ac_lo=$ac_mid; break
19280 else
19281   echo "$as_me: failed program was:" >&5
19282 sed 's/^/| /' conftest.$ac_ext >&5
19283
19284 ac_hi=`expr '(' $ac_mid ')' - 1`
19285                        if test $ac_mid -le $ac_hi; then
19286                          ac_lo= ac_hi=
19287                          break
19288                        fi
19289                        ac_mid=`expr 2 '*' $ac_mid`
19290 fi
19291 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19292   done
19293 else
19294   echo "$as_me: failed program was:" >&5
19295 sed 's/^/| /' conftest.$ac_ext >&5
19296
19297 ac_lo= ac_hi=
19298 fi
19299 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19300 fi
19301 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19302 # Binary search between lo and hi bounds.
19303 while test "x$ac_lo" != "x$ac_hi"; do
19304   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19305   cat >conftest.$ac_ext <<_ACEOF
19306 /* confdefs.h.  */
19307 _ACEOF
19308 cat confdefs.h >>conftest.$ac_ext
19309 cat >>conftest.$ac_ext <<_ACEOF
19310 /* end confdefs.h.  */
19311 $ac_includes_default
19312 struct { char filler; short field; } pgac_struct;
19313 int
19314 main ()
19315 {
19316 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19317 test_array [0] = 0
19318
19319   ;
19320   return 0;
19321 }
19322 _ACEOF
19323 rm -f conftest.$ac_objext
19324 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19325   (eval $ac_compile) 2>conftest.er1
19326   ac_status=$?
19327   grep -v '^ *+' conftest.er1 >conftest.err
19328   rm -f conftest.er1
19329   cat conftest.err >&5
19330   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19331   (exit $ac_status); } &&
19332          { ac_try='test -z "$ac_c_werror_flag"
19333                          || test ! -s conftest.err'
19334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19335   (eval $ac_try) 2>&5
19336   ac_status=$?
19337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19338   (exit $ac_status); }; } &&
19339          { ac_try='test -s conftest.$ac_objext'
19340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19341   (eval $ac_try) 2>&5
19342   ac_status=$?
19343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19344   (exit $ac_status); }; }; then
19345   ac_hi=$ac_mid
19346 else
19347   echo "$as_me: failed program was:" >&5
19348 sed 's/^/| /' conftest.$ac_ext >&5
19349
19350 ac_lo=`expr '(' $ac_mid ')' + 1`
19351 fi
19352 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19353 done
19354 case $ac_lo in
19355 ?*) pgac_cv_alignof_short=$ac_lo;;
19356 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19357 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19358    { (exit 1); exit 1; }; } ;;
19359 esac
19360 else
19361   if test "$cross_compiling" = yes; then
19362   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19363 See \`config.log' for more details." >&5
19364 echo "$as_me: error: cannot run test program while cross compiling
19365 See \`config.log' for more details." >&2;}
19366    { (exit 1); exit 1; }; }
19367 else
19368   cat >conftest.$ac_ext <<_ACEOF
19369 /* confdefs.h.  */
19370 _ACEOF
19371 cat confdefs.h >>conftest.$ac_ext
19372 cat >>conftest.$ac_ext <<_ACEOF
19373 /* end confdefs.h.  */
19374 $ac_includes_default
19375 struct { char filler; short field; } pgac_struct;
19376 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19377 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19378 #include <stdio.h>
19379 #include <stdlib.h>
19380 int
19381 main ()
19382 {
19383
19384   FILE *f = fopen ("conftest.val", "w");
19385   if (! f)
19386     exit (1);
19387   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19388     {
19389       long i = longval ();
19390       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19391         exit (1);
19392       fprintf (f, "%ld\n", i);
19393     }
19394   else
19395     {
19396       unsigned long i = ulongval ();
19397       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19398         exit (1);
19399       fprintf (f, "%lu\n", i);
19400     }
19401   exit (ferror (f) || fclose (f) != 0);
19402
19403   ;
19404   return 0;
19405 }
19406 _ACEOF
19407 rm -f conftest$ac_exeext
19408 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19409   (eval $ac_link) 2>&5
19410   ac_status=$?
19411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19412   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19414   (eval $ac_try) 2>&5
19415   ac_status=$?
19416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19417   (exit $ac_status); }; }; then
19418   pgac_cv_alignof_short=`cat conftest.val`
19419 else
19420   echo "$as_me: program exited with status $ac_status" >&5
19421 echo "$as_me: failed program was:" >&5
19422 sed 's/^/| /' conftest.$ac_ext >&5
19423
19424 ( exit $ac_status )
19425 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19426 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19427    { (exit 1); exit 1; }; }
19428 fi
19429 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19430 fi
19431 fi
19432 rm -f conftest.val
19433 else
19434   pgac_cv_alignof_short=0
19435 fi
19436 fi
19437 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
19438 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
19439 cat >>confdefs.h <<_ACEOF
19440 #define ALIGNOF_SHORT $pgac_cv_alignof_short
19441 _ACEOF
19442
19443
19444 echo "$as_me:$LINENO: checking for int" >&5
19445 echo $ECHO_N "checking for int... $ECHO_C" >&6
19446 if test "${ac_cv_type_int+set}" = set; then
19447   echo $ECHO_N "(cached) $ECHO_C" >&6
19448 else
19449   cat >conftest.$ac_ext <<_ACEOF
19450 /* confdefs.h.  */
19451 _ACEOF
19452 cat confdefs.h >>conftest.$ac_ext
19453 cat >>conftest.$ac_ext <<_ACEOF
19454 /* end confdefs.h.  */
19455 $ac_includes_default
19456 int
19457 main ()
19458 {
19459 if ((int *) 0)
19460   return 0;
19461 if (sizeof (int))
19462   return 0;
19463   ;
19464   return 0;
19465 }
19466 _ACEOF
19467 rm -f conftest.$ac_objext
19468 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19469   (eval $ac_compile) 2>conftest.er1
19470   ac_status=$?
19471   grep -v '^ *+' conftest.er1 >conftest.err
19472   rm -f conftest.er1
19473   cat conftest.err >&5
19474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19475   (exit $ac_status); } &&
19476          { ac_try='test -z "$ac_c_werror_flag"
19477                          || test ! -s conftest.err'
19478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19479   (eval $ac_try) 2>&5
19480   ac_status=$?
19481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19482   (exit $ac_status); }; } &&
19483          { ac_try='test -s conftest.$ac_objext'
19484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19485   (eval $ac_try) 2>&5
19486   ac_status=$?
19487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19488   (exit $ac_status); }; }; then
19489   ac_cv_type_int=yes
19490 else
19491   echo "$as_me: failed program was:" >&5
19492 sed 's/^/| /' conftest.$ac_ext >&5
19493
19494 ac_cv_type_int=no
19495 fi
19496 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19497 fi
19498 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
19499 echo "${ECHO_T}$ac_cv_type_int" >&6
19500
19501 echo "$as_me:$LINENO: checking alignment of int" >&5
19502 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
19503 if test "${pgac_cv_alignof_int+set}" = set; then
19504   echo $ECHO_N "(cached) $ECHO_C" >&6
19505 else
19506   if test "$ac_cv_type_int" = yes; then
19507   if test "$cross_compiling" = yes; then
19508   # Depending upon the size, compute the lo and hi bounds.
19509 cat >conftest.$ac_ext <<_ACEOF
19510 /* confdefs.h.  */
19511 _ACEOF
19512 cat confdefs.h >>conftest.$ac_ext
19513 cat >>conftest.$ac_ext <<_ACEOF
19514 /* end confdefs.h.  */
19515 $ac_includes_default
19516 struct { char filler; int field; } pgac_struct;
19517 int
19518 main ()
19519 {
19520 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19521 test_array [0] = 0
19522
19523   ;
19524   return 0;
19525 }
19526 _ACEOF
19527 rm -f conftest.$ac_objext
19528 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19529   (eval $ac_compile) 2>conftest.er1
19530   ac_status=$?
19531   grep -v '^ *+' conftest.er1 >conftest.err
19532   rm -f conftest.er1
19533   cat conftest.err >&5
19534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19535   (exit $ac_status); } &&
19536          { ac_try='test -z "$ac_c_werror_flag"
19537                          || test ! -s conftest.err'
19538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19539   (eval $ac_try) 2>&5
19540   ac_status=$?
19541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19542   (exit $ac_status); }; } &&
19543          { ac_try='test -s conftest.$ac_objext'
19544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19545   (eval $ac_try) 2>&5
19546   ac_status=$?
19547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19548   (exit $ac_status); }; }; then
19549   ac_lo=0 ac_mid=0
19550   while :; do
19551     cat >conftest.$ac_ext <<_ACEOF
19552 /* confdefs.h.  */
19553 _ACEOF
19554 cat confdefs.h >>conftest.$ac_ext
19555 cat >>conftest.$ac_ext <<_ACEOF
19556 /* end confdefs.h.  */
19557 $ac_includes_default
19558 struct { char filler; int field; } pgac_struct;
19559 int
19560 main ()
19561 {
19562 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19563 test_array [0] = 0
19564
19565   ;
19566   return 0;
19567 }
19568 _ACEOF
19569 rm -f conftest.$ac_objext
19570 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19571   (eval $ac_compile) 2>conftest.er1
19572   ac_status=$?
19573   grep -v '^ *+' conftest.er1 >conftest.err
19574   rm -f conftest.er1
19575   cat conftest.err >&5
19576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19577   (exit $ac_status); } &&
19578          { ac_try='test -z "$ac_c_werror_flag"
19579                          || test ! -s conftest.err'
19580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19581   (eval $ac_try) 2>&5
19582   ac_status=$?
19583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19584   (exit $ac_status); }; } &&
19585          { ac_try='test -s conftest.$ac_objext'
19586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19587   (eval $ac_try) 2>&5
19588   ac_status=$?
19589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19590   (exit $ac_status); }; }; then
19591   ac_hi=$ac_mid; break
19592 else
19593   echo "$as_me: failed program was:" >&5
19594 sed 's/^/| /' conftest.$ac_ext >&5
19595
19596 ac_lo=`expr $ac_mid + 1`
19597                     if test $ac_lo -le $ac_mid; then
19598                       ac_lo= ac_hi=
19599                       break
19600                     fi
19601                     ac_mid=`expr 2 '*' $ac_mid + 1`
19602 fi
19603 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19604   done
19605 else
19606   echo "$as_me: failed program was:" >&5
19607 sed 's/^/| /' conftest.$ac_ext >&5
19608
19609 cat >conftest.$ac_ext <<_ACEOF
19610 /* confdefs.h.  */
19611 _ACEOF
19612 cat confdefs.h >>conftest.$ac_ext
19613 cat >>conftest.$ac_ext <<_ACEOF
19614 /* end confdefs.h.  */
19615 $ac_includes_default
19616 struct { char filler; int field; } pgac_struct;
19617 int
19618 main ()
19619 {
19620 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19621 test_array [0] = 0
19622
19623   ;
19624   return 0;
19625 }
19626 _ACEOF
19627 rm -f conftest.$ac_objext
19628 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19629   (eval $ac_compile) 2>conftest.er1
19630   ac_status=$?
19631   grep -v '^ *+' conftest.er1 >conftest.err
19632   rm -f conftest.er1
19633   cat conftest.err >&5
19634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19635   (exit $ac_status); } &&
19636          { ac_try='test -z "$ac_c_werror_flag"
19637                          || test ! -s conftest.err'
19638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19639   (eval $ac_try) 2>&5
19640   ac_status=$?
19641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19642   (exit $ac_status); }; } &&
19643          { ac_try='test -s conftest.$ac_objext'
19644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19645   (eval $ac_try) 2>&5
19646   ac_status=$?
19647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19648   (exit $ac_status); }; }; then
19649   ac_hi=-1 ac_mid=-1
19650   while :; do
19651     cat >conftest.$ac_ext <<_ACEOF
19652 /* confdefs.h.  */
19653 _ACEOF
19654 cat confdefs.h >>conftest.$ac_ext
19655 cat >>conftest.$ac_ext <<_ACEOF
19656 /* end confdefs.h.  */
19657 $ac_includes_default
19658 struct { char filler; int field; } pgac_struct;
19659 int
19660 main ()
19661 {
19662 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19663 test_array [0] = 0
19664
19665   ;
19666   return 0;
19667 }
19668 _ACEOF
19669 rm -f conftest.$ac_objext
19670 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19671   (eval $ac_compile) 2>conftest.er1
19672   ac_status=$?
19673   grep -v '^ *+' conftest.er1 >conftest.err
19674   rm -f conftest.er1
19675   cat conftest.err >&5
19676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19677   (exit $ac_status); } &&
19678          { ac_try='test -z "$ac_c_werror_flag"
19679                          || test ! -s conftest.err'
19680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19681   (eval $ac_try) 2>&5
19682   ac_status=$?
19683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19684   (exit $ac_status); }; } &&
19685          { ac_try='test -s conftest.$ac_objext'
19686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19687   (eval $ac_try) 2>&5
19688   ac_status=$?
19689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19690   (exit $ac_status); }; }; then
19691   ac_lo=$ac_mid; break
19692 else
19693   echo "$as_me: failed program was:" >&5
19694 sed 's/^/| /' conftest.$ac_ext >&5
19695
19696 ac_hi=`expr '(' $ac_mid ')' - 1`
19697                        if test $ac_mid -le $ac_hi; then
19698                          ac_lo= ac_hi=
19699                          break
19700                        fi
19701                        ac_mid=`expr 2 '*' $ac_mid`
19702 fi
19703 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19704   done
19705 else
19706   echo "$as_me: failed program was:" >&5
19707 sed 's/^/| /' conftest.$ac_ext >&5
19708
19709 ac_lo= ac_hi=
19710 fi
19711 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19712 fi
19713 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19714 # Binary search between lo and hi bounds.
19715 while test "x$ac_lo" != "x$ac_hi"; do
19716   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19717   cat >conftest.$ac_ext <<_ACEOF
19718 /* confdefs.h.  */
19719 _ACEOF
19720 cat confdefs.h >>conftest.$ac_ext
19721 cat >>conftest.$ac_ext <<_ACEOF
19722 /* end confdefs.h.  */
19723 $ac_includes_default
19724 struct { char filler; int field; } pgac_struct;
19725 int
19726 main ()
19727 {
19728 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19729 test_array [0] = 0
19730
19731   ;
19732   return 0;
19733 }
19734 _ACEOF
19735 rm -f conftest.$ac_objext
19736 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19737   (eval $ac_compile) 2>conftest.er1
19738   ac_status=$?
19739   grep -v '^ *+' conftest.er1 >conftest.err
19740   rm -f conftest.er1
19741   cat conftest.err >&5
19742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19743   (exit $ac_status); } &&
19744          { ac_try='test -z "$ac_c_werror_flag"
19745                          || test ! -s conftest.err'
19746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19747   (eval $ac_try) 2>&5
19748   ac_status=$?
19749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19750   (exit $ac_status); }; } &&
19751          { ac_try='test -s conftest.$ac_objext'
19752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19753   (eval $ac_try) 2>&5
19754   ac_status=$?
19755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19756   (exit $ac_status); }; }; then
19757   ac_hi=$ac_mid
19758 else
19759   echo "$as_me: failed program was:" >&5
19760 sed 's/^/| /' conftest.$ac_ext >&5
19761
19762 ac_lo=`expr '(' $ac_mid ')' + 1`
19763 fi
19764 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19765 done
19766 case $ac_lo in
19767 ?*) pgac_cv_alignof_int=$ac_lo;;
19768 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19769 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19770    { (exit 1); exit 1; }; } ;;
19771 esac
19772 else
19773   if test "$cross_compiling" = yes; then
19774   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19775 See \`config.log' for more details." >&5
19776 echo "$as_me: error: cannot run test program while cross compiling
19777 See \`config.log' for more details." >&2;}
19778    { (exit 1); exit 1; }; }
19779 else
19780   cat >conftest.$ac_ext <<_ACEOF
19781 /* confdefs.h.  */
19782 _ACEOF
19783 cat confdefs.h >>conftest.$ac_ext
19784 cat >>conftest.$ac_ext <<_ACEOF
19785 /* end confdefs.h.  */
19786 $ac_includes_default
19787 struct { char filler; int field; } pgac_struct;
19788 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19789 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19790 #include <stdio.h>
19791 #include <stdlib.h>
19792 int
19793 main ()
19794 {
19795
19796   FILE *f = fopen ("conftest.val", "w");
19797   if (! f)
19798     exit (1);
19799   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19800     {
19801       long i = longval ();
19802       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19803         exit (1);
19804       fprintf (f, "%ld\n", i);
19805     }
19806   else
19807     {
19808       unsigned long i = ulongval ();
19809       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19810         exit (1);
19811       fprintf (f, "%lu\n", i);
19812     }
19813   exit (ferror (f) || fclose (f) != 0);
19814
19815   ;
19816   return 0;
19817 }
19818 _ACEOF
19819 rm -f conftest$ac_exeext
19820 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19821   (eval $ac_link) 2>&5
19822   ac_status=$?
19823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19824   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19825   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19826   (eval $ac_try) 2>&5
19827   ac_status=$?
19828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19829   (exit $ac_status); }; }; then
19830   pgac_cv_alignof_int=`cat conftest.val`
19831 else
19832   echo "$as_me: program exited with status $ac_status" >&5
19833 echo "$as_me: failed program was:" >&5
19834 sed 's/^/| /' conftest.$ac_ext >&5
19835
19836 ( exit $ac_status )
19837 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19838 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19839    { (exit 1); exit 1; }; }
19840 fi
19841 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19842 fi
19843 fi
19844 rm -f conftest.val
19845 else
19846   pgac_cv_alignof_int=0
19847 fi
19848 fi
19849 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19850 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19851 cat >>confdefs.h <<_ACEOF
19852 #define ALIGNOF_INT $pgac_cv_alignof_int
19853 _ACEOF
19854
19855
19856 echo "$as_me:$LINENO: checking for long" >&5
19857 echo $ECHO_N "checking for long... $ECHO_C" >&6
19858 if test "${ac_cv_type_long+set}" = set; then
19859   echo $ECHO_N "(cached) $ECHO_C" >&6
19860 else
19861   cat >conftest.$ac_ext <<_ACEOF
19862 /* confdefs.h.  */
19863 _ACEOF
19864 cat confdefs.h >>conftest.$ac_ext
19865 cat >>conftest.$ac_ext <<_ACEOF
19866 /* end confdefs.h.  */
19867 $ac_includes_default
19868 int
19869 main ()
19870 {
19871 if ((long *) 0)
19872   return 0;
19873 if (sizeof (long))
19874   return 0;
19875   ;
19876   return 0;
19877 }
19878 _ACEOF
19879 rm -f conftest.$ac_objext
19880 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19881   (eval $ac_compile) 2>conftest.er1
19882   ac_status=$?
19883   grep -v '^ *+' conftest.er1 >conftest.err
19884   rm -f conftest.er1
19885   cat conftest.err >&5
19886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19887   (exit $ac_status); } &&
19888          { ac_try='test -z "$ac_c_werror_flag"
19889                          || test ! -s conftest.err'
19890   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19891   (eval $ac_try) 2>&5
19892   ac_status=$?
19893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19894   (exit $ac_status); }; } &&
19895          { ac_try='test -s conftest.$ac_objext'
19896   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19897   (eval $ac_try) 2>&5
19898   ac_status=$?
19899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19900   (exit $ac_status); }; }; then
19901   ac_cv_type_long=yes
19902 else
19903   echo "$as_me: failed program was:" >&5
19904 sed 's/^/| /' conftest.$ac_ext >&5
19905
19906 ac_cv_type_long=no
19907 fi
19908 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19909 fi
19910 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
19911 echo "${ECHO_T}$ac_cv_type_long" >&6
19912
19913 echo "$as_me:$LINENO: checking alignment of long" >&5
19914 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
19915 if test "${pgac_cv_alignof_long+set}" = set; then
19916   echo $ECHO_N "(cached) $ECHO_C" >&6
19917 else
19918   if test "$ac_cv_type_long" = yes; then
19919   if test "$cross_compiling" = yes; then
19920   # Depending upon the size, compute the lo and hi bounds.
19921 cat >conftest.$ac_ext <<_ACEOF
19922 /* confdefs.h.  */
19923 _ACEOF
19924 cat confdefs.h >>conftest.$ac_ext
19925 cat >>conftest.$ac_ext <<_ACEOF
19926 /* end confdefs.h.  */
19927 $ac_includes_default
19928 struct { char filler; long field; } pgac_struct;
19929 int
19930 main ()
19931 {
19932 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19933 test_array [0] = 0
19934
19935   ;
19936   return 0;
19937 }
19938 _ACEOF
19939 rm -f conftest.$ac_objext
19940 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19941   (eval $ac_compile) 2>conftest.er1
19942   ac_status=$?
19943   grep -v '^ *+' conftest.er1 >conftest.err
19944   rm -f conftest.er1
19945   cat conftest.err >&5
19946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19947   (exit $ac_status); } &&
19948          { ac_try='test -z "$ac_c_werror_flag"
19949                          || test ! -s conftest.err'
19950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19951   (eval $ac_try) 2>&5
19952   ac_status=$?
19953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19954   (exit $ac_status); }; } &&
19955          { ac_try='test -s conftest.$ac_objext'
19956   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19957   (eval $ac_try) 2>&5
19958   ac_status=$?
19959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19960   (exit $ac_status); }; }; then
19961   ac_lo=0 ac_mid=0
19962   while :; do
19963     cat >conftest.$ac_ext <<_ACEOF
19964 /* confdefs.h.  */
19965 _ACEOF
19966 cat confdefs.h >>conftest.$ac_ext
19967 cat >>conftest.$ac_ext <<_ACEOF
19968 /* end confdefs.h.  */
19969 $ac_includes_default
19970 struct { char filler; long field; } pgac_struct;
19971 int
19972 main ()
19973 {
19974 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19975 test_array [0] = 0
19976
19977   ;
19978   return 0;
19979 }
19980 _ACEOF
19981 rm -f conftest.$ac_objext
19982 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19983   (eval $ac_compile) 2>conftest.er1
19984   ac_status=$?
19985   grep -v '^ *+' conftest.er1 >conftest.err
19986   rm -f conftest.er1
19987   cat conftest.err >&5
19988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19989   (exit $ac_status); } &&
19990          { ac_try='test -z "$ac_c_werror_flag"
19991                          || test ! -s conftest.err'
19992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19993   (eval $ac_try) 2>&5
19994   ac_status=$?
19995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19996   (exit $ac_status); }; } &&
19997          { ac_try='test -s conftest.$ac_objext'
19998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19999   (eval $ac_try) 2>&5
20000   ac_status=$?
20001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20002   (exit $ac_status); }; }; then
20003   ac_hi=$ac_mid; break
20004 else
20005   echo "$as_me: failed program was:" >&5
20006 sed 's/^/| /' conftest.$ac_ext >&5
20007
20008 ac_lo=`expr $ac_mid + 1`
20009                     if test $ac_lo -le $ac_mid; then
20010                       ac_lo= ac_hi=
20011                       break
20012                     fi
20013                     ac_mid=`expr 2 '*' $ac_mid + 1`
20014 fi
20015 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20016   done
20017 else
20018   echo "$as_me: failed program was:" >&5
20019 sed 's/^/| /' conftest.$ac_ext >&5
20020
20021 cat >conftest.$ac_ext <<_ACEOF
20022 /* confdefs.h.  */
20023 _ACEOF
20024 cat confdefs.h >>conftest.$ac_ext
20025 cat >>conftest.$ac_ext <<_ACEOF
20026 /* end confdefs.h.  */
20027 $ac_includes_default
20028 struct { char filler; long field; } pgac_struct;
20029 int
20030 main ()
20031 {
20032 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20033 test_array [0] = 0
20034
20035   ;
20036   return 0;
20037 }
20038 _ACEOF
20039 rm -f conftest.$ac_objext
20040 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20041   (eval $ac_compile) 2>conftest.er1
20042   ac_status=$?
20043   grep -v '^ *+' conftest.er1 >conftest.err
20044   rm -f conftest.er1
20045   cat conftest.err >&5
20046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20047   (exit $ac_status); } &&
20048          { ac_try='test -z "$ac_c_werror_flag"
20049                          || test ! -s conftest.err'
20050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20051   (eval $ac_try) 2>&5
20052   ac_status=$?
20053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20054   (exit $ac_status); }; } &&
20055          { ac_try='test -s conftest.$ac_objext'
20056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20057   (eval $ac_try) 2>&5
20058   ac_status=$?
20059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20060   (exit $ac_status); }; }; then
20061   ac_hi=-1 ac_mid=-1
20062   while :; do
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 struct { char filler; long field; } pgac_struct;
20071 int
20072 main ()
20073 {
20074 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20075 test_array [0] = 0
20076
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_lo=$ac_mid; break
20104 else
20105   echo "$as_me: failed program was:" >&5
20106 sed 's/^/| /' conftest.$ac_ext >&5
20107
20108 ac_hi=`expr '(' $ac_mid ')' - 1`
20109                        if test $ac_mid -le $ac_hi; then
20110                          ac_lo= ac_hi=
20111                          break
20112                        fi
20113                        ac_mid=`expr 2 '*' $ac_mid`
20114 fi
20115 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20116   done
20117 else
20118   echo "$as_me: failed program was:" >&5
20119 sed 's/^/| /' conftest.$ac_ext >&5
20120
20121 ac_lo= ac_hi=
20122 fi
20123 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20124 fi
20125 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20126 # Binary search between lo and hi bounds.
20127 while test "x$ac_lo" != "x$ac_hi"; do
20128   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20129   cat >conftest.$ac_ext <<_ACEOF
20130 /* confdefs.h.  */
20131 _ACEOF
20132 cat confdefs.h >>conftest.$ac_ext
20133 cat >>conftest.$ac_ext <<_ACEOF
20134 /* end confdefs.h.  */
20135 $ac_includes_default
20136 struct { char filler; long field; } pgac_struct;
20137 int
20138 main ()
20139 {
20140 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20141 test_array [0] = 0
20142
20143   ;
20144   return 0;
20145 }
20146 _ACEOF
20147 rm -f conftest.$ac_objext
20148 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20149   (eval $ac_compile) 2>conftest.er1
20150   ac_status=$?
20151   grep -v '^ *+' conftest.er1 >conftest.err
20152   rm -f conftest.er1
20153   cat conftest.err >&5
20154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20155   (exit $ac_status); } &&
20156          { ac_try='test -z "$ac_c_werror_flag"
20157                          || test ! -s conftest.err'
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); }; } &&
20163          { ac_try='test -s conftest.$ac_objext'
20164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20165   (eval $ac_try) 2>&5
20166   ac_status=$?
20167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20168   (exit $ac_status); }; }; then
20169   ac_hi=$ac_mid
20170 else
20171   echo "$as_me: failed program was:" >&5
20172 sed 's/^/| /' conftest.$ac_ext >&5
20173
20174 ac_lo=`expr '(' $ac_mid ')' + 1`
20175 fi
20176 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20177 done
20178 case $ac_lo in
20179 ?*) pgac_cv_alignof_long=$ac_lo;;
20180 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
20181 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
20182    { (exit 1); exit 1; }; } ;;
20183 esac
20184 else
20185   if test "$cross_compiling" = yes; then
20186   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20187 See \`config.log' for more details." >&5
20188 echo "$as_me: error: cannot run test program while cross compiling
20189 See \`config.log' for more details." >&2;}
20190    { (exit 1); exit 1; }; }
20191 else
20192   cat >conftest.$ac_ext <<_ACEOF
20193 /* confdefs.h.  */
20194 _ACEOF
20195 cat confdefs.h >>conftest.$ac_ext
20196 cat >>conftest.$ac_ext <<_ACEOF
20197 /* end confdefs.h.  */
20198 $ac_includes_default
20199 struct { char filler; long field; } pgac_struct;
20200 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20201 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20202 #include <stdio.h>
20203 #include <stdlib.h>
20204 int
20205 main ()
20206 {
20207
20208   FILE *f = fopen ("conftest.val", "w");
20209   if (! f)
20210     exit (1);
20211   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20212     {
20213       long i = longval ();
20214       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20215         exit (1);
20216       fprintf (f, "%ld\n", i);
20217     }
20218   else
20219     {
20220       unsigned long i = ulongval ();
20221       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20222         exit (1);
20223       fprintf (f, "%lu\n", i);
20224     }
20225   exit (ferror (f) || fclose (f) != 0);
20226
20227   ;
20228   return 0;
20229 }
20230 _ACEOF
20231 rm -f conftest$ac_exeext
20232 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20233   (eval $ac_link) 2>&5
20234   ac_status=$?
20235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20236   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20238   (eval $ac_try) 2>&5
20239   ac_status=$?
20240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20241   (exit $ac_status); }; }; then
20242   pgac_cv_alignof_long=`cat conftest.val`
20243 else
20244   echo "$as_me: program exited with status $ac_status" >&5
20245 echo "$as_me: failed program was:" >&5
20246 sed 's/^/| /' conftest.$ac_ext >&5
20247
20248 ( exit $ac_status )
20249 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
20250 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
20251    { (exit 1); exit 1; }; }
20252 fi
20253 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20254 fi
20255 fi
20256 rm -f conftest.val
20257 else
20258   pgac_cv_alignof_long=0
20259 fi
20260 fi
20261 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
20262 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
20263 cat >>confdefs.h <<_ACEOF
20264 #define ALIGNOF_LONG $pgac_cv_alignof_long
20265 _ACEOF
20266
20267
20268 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
20269   echo "$as_me:$LINENO: checking for long long int" >&5
20270 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
20271 if test "${ac_cv_type_long_long_int+set}" = set; then
20272   echo $ECHO_N "(cached) $ECHO_C" >&6
20273 else
20274   cat >conftest.$ac_ext <<_ACEOF
20275 /* confdefs.h.  */
20276 _ACEOF
20277 cat confdefs.h >>conftest.$ac_ext
20278 cat >>conftest.$ac_ext <<_ACEOF
20279 /* end confdefs.h.  */
20280 $ac_includes_default
20281 int
20282 main ()
20283 {
20284 if ((long long int *) 0)
20285   return 0;
20286 if (sizeof (long long int))
20287   return 0;
20288   ;
20289   return 0;
20290 }
20291 _ACEOF
20292 rm -f conftest.$ac_objext
20293 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20294   (eval $ac_compile) 2>conftest.er1
20295   ac_status=$?
20296   grep -v '^ *+' conftest.er1 >conftest.err
20297   rm -f conftest.er1
20298   cat conftest.err >&5
20299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20300   (exit $ac_status); } &&
20301          { ac_try='test -z "$ac_c_werror_flag"
20302                          || test ! -s conftest.err'
20303   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20304   (eval $ac_try) 2>&5
20305   ac_status=$?
20306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20307   (exit $ac_status); }; } &&
20308          { ac_try='test -s conftest.$ac_objext'
20309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20310   (eval $ac_try) 2>&5
20311   ac_status=$?
20312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20313   (exit $ac_status); }; }; then
20314   ac_cv_type_long_long_int=yes
20315 else
20316   echo "$as_me: failed program was:" >&5
20317 sed 's/^/| /' conftest.$ac_ext >&5
20318
20319 ac_cv_type_long_long_int=no
20320 fi
20321 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20322 fi
20323 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
20324 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
20325
20326 echo "$as_me:$LINENO: checking alignment of long long int" >&5
20327 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
20328 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
20329   echo $ECHO_N "(cached) $ECHO_C" >&6
20330 else
20331   if test "$ac_cv_type_long_long_int" = yes; then
20332   if test "$cross_compiling" = yes; then
20333   # Depending upon the size, compute the lo and hi bounds.
20334 cat >conftest.$ac_ext <<_ACEOF
20335 /* confdefs.h.  */
20336 _ACEOF
20337 cat confdefs.h >>conftest.$ac_ext
20338 cat >>conftest.$ac_ext <<_ACEOF
20339 /* end confdefs.h.  */
20340 $ac_includes_default
20341 struct { char filler; long long int field; } pgac_struct;
20342 int
20343 main ()
20344 {
20345 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20346 test_array [0] = 0
20347
20348   ;
20349   return 0;
20350 }
20351 _ACEOF
20352 rm -f conftest.$ac_objext
20353 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20354   (eval $ac_compile) 2>conftest.er1
20355   ac_status=$?
20356   grep -v '^ *+' conftest.er1 >conftest.err
20357   rm -f conftest.er1
20358   cat conftest.err >&5
20359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20360   (exit $ac_status); } &&
20361          { ac_try='test -z "$ac_c_werror_flag"
20362                          || test ! -s conftest.err'
20363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20364   (eval $ac_try) 2>&5
20365   ac_status=$?
20366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20367   (exit $ac_status); }; } &&
20368          { ac_try='test -s conftest.$ac_objext'
20369   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20370   (eval $ac_try) 2>&5
20371   ac_status=$?
20372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20373   (exit $ac_status); }; }; then
20374   ac_lo=0 ac_mid=0
20375   while :; do
20376     cat >conftest.$ac_ext <<_ACEOF
20377 /* confdefs.h.  */
20378 _ACEOF
20379 cat confdefs.h >>conftest.$ac_ext
20380 cat >>conftest.$ac_ext <<_ACEOF
20381 /* end confdefs.h.  */
20382 $ac_includes_default
20383 struct { char filler; long long int field; } pgac_struct;
20384 int
20385 main ()
20386 {
20387 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20388 test_array [0] = 0
20389
20390   ;
20391   return 0;
20392 }
20393 _ACEOF
20394 rm -f conftest.$ac_objext
20395 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20396   (eval $ac_compile) 2>conftest.er1
20397   ac_status=$?
20398   grep -v '^ *+' conftest.er1 >conftest.err
20399   rm -f conftest.er1
20400   cat conftest.err >&5
20401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20402   (exit $ac_status); } &&
20403          { ac_try='test -z "$ac_c_werror_flag"
20404                          || test ! -s conftest.err'
20405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20406   (eval $ac_try) 2>&5
20407   ac_status=$?
20408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20409   (exit $ac_status); }; } &&
20410          { ac_try='test -s conftest.$ac_objext'
20411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20412   (eval $ac_try) 2>&5
20413   ac_status=$?
20414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20415   (exit $ac_status); }; }; then
20416   ac_hi=$ac_mid; break
20417 else
20418   echo "$as_me: failed program was:" >&5
20419 sed 's/^/| /' conftest.$ac_ext >&5
20420
20421 ac_lo=`expr $ac_mid + 1`
20422                     if test $ac_lo -le $ac_mid; then
20423                       ac_lo= ac_hi=
20424                       break
20425                     fi
20426                     ac_mid=`expr 2 '*' $ac_mid + 1`
20427 fi
20428 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20429   done
20430 else
20431   echo "$as_me: failed program was:" >&5
20432 sed 's/^/| /' conftest.$ac_ext >&5
20433
20434 cat >conftest.$ac_ext <<_ACEOF
20435 /* confdefs.h.  */
20436 _ACEOF
20437 cat confdefs.h >>conftest.$ac_ext
20438 cat >>conftest.$ac_ext <<_ACEOF
20439 /* end confdefs.h.  */
20440 $ac_includes_default
20441 struct { char filler; long long int field; } pgac_struct;
20442 int
20443 main ()
20444 {
20445 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20446 test_array [0] = 0
20447
20448   ;
20449   return 0;
20450 }
20451 _ACEOF
20452 rm -f conftest.$ac_objext
20453 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20454   (eval $ac_compile) 2>conftest.er1
20455   ac_status=$?
20456   grep -v '^ *+' conftest.er1 >conftest.err
20457   rm -f conftest.er1
20458   cat conftest.err >&5
20459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20460   (exit $ac_status); } &&
20461          { ac_try='test -z "$ac_c_werror_flag"
20462                          || test ! -s conftest.err'
20463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20464   (eval $ac_try) 2>&5
20465   ac_status=$?
20466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20467   (exit $ac_status); }; } &&
20468          { ac_try='test -s conftest.$ac_objext'
20469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20470   (eval $ac_try) 2>&5
20471   ac_status=$?
20472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20473   (exit $ac_status); }; }; then
20474   ac_hi=-1 ac_mid=-1
20475   while :; do
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 struct { char filler; long long int field; } pgac_struct;
20484 int
20485 main ()
20486 {
20487 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20488 test_array [0] = 0
20489
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_lo=$ac_mid; break
20517 else
20518   echo "$as_me: failed program was:" >&5
20519 sed 's/^/| /' conftest.$ac_ext >&5
20520
20521 ac_hi=`expr '(' $ac_mid ')' - 1`
20522                        if test $ac_mid -le $ac_hi; then
20523                          ac_lo= ac_hi=
20524                          break
20525                        fi
20526                        ac_mid=`expr 2 '*' $ac_mid`
20527 fi
20528 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20529   done
20530 else
20531   echo "$as_me: failed program was:" >&5
20532 sed 's/^/| /' conftest.$ac_ext >&5
20533
20534 ac_lo= ac_hi=
20535 fi
20536 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20537 fi
20538 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20539 # Binary search between lo and hi bounds.
20540 while test "x$ac_lo" != "x$ac_hi"; do
20541   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20542   cat >conftest.$ac_ext <<_ACEOF
20543 /* confdefs.h.  */
20544 _ACEOF
20545 cat confdefs.h >>conftest.$ac_ext
20546 cat >>conftest.$ac_ext <<_ACEOF
20547 /* end confdefs.h.  */
20548 $ac_includes_default
20549 struct { char filler; long long int field; } pgac_struct;
20550 int
20551 main ()
20552 {
20553 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20554 test_array [0] = 0
20555
20556   ;
20557   return 0;
20558 }
20559 _ACEOF
20560 rm -f conftest.$ac_objext
20561 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20562   (eval $ac_compile) 2>conftest.er1
20563   ac_status=$?
20564   grep -v '^ *+' conftest.er1 >conftest.err
20565   rm -f conftest.er1
20566   cat conftest.err >&5
20567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20568   (exit $ac_status); } &&
20569          { ac_try='test -z "$ac_c_werror_flag"
20570                          || test ! -s conftest.err'
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); }; } &&
20576          { ac_try='test -s conftest.$ac_objext'
20577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20578   (eval $ac_try) 2>&5
20579   ac_status=$?
20580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20581   (exit $ac_status); }; }; then
20582   ac_hi=$ac_mid
20583 else
20584   echo "$as_me: failed program was:" >&5
20585 sed 's/^/| /' conftest.$ac_ext >&5
20586
20587 ac_lo=`expr '(' $ac_mid ')' + 1`
20588 fi
20589 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20590 done
20591 case $ac_lo in
20592 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20593 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20594 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20595    { (exit 1); exit 1; }; } ;;
20596 esac
20597 else
20598   if test "$cross_compiling" = yes; then
20599   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20600 See \`config.log' for more details." >&5
20601 echo "$as_me: error: cannot run test program while cross compiling
20602 See \`config.log' for more details." >&2;}
20603    { (exit 1); exit 1; }; }
20604 else
20605   cat >conftest.$ac_ext <<_ACEOF
20606 /* confdefs.h.  */
20607 _ACEOF
20608 cat confdefs.h >>conftest.$ac_ext
20609 cat >>conftest.$ac_ext <<_ACEOF
20610 /* end confdefs.h.  */
20611 $ac_includes_default
20612 struct { char filler; long long int field; } pgac_struct;
20613 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20614 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20615 #include <stdio.h>
20616 #include <stdlib.h>
20617 int
20618 main ()
20619 {
20620
20621   FILE *f = fopen ("conftest.val", "w");
20622   if (! f)
20623     exit (1);
20624   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20625     {
20626       long i = longval ();
20627       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20628         exit (1);
20629       fprintf (f, "%ld\n", i);
20630     }
20631   else
20632     {
20633       unsigned long i = ulongval ();
20634       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20635         exit (1);
20636       fprintf (f, "%lu\n", i);
20637     }
20638   exit (ferror (f) || fclose (f) != 0);
20639
20640   ;
20641   return 0;
20642 }
20643 _ACEOF
20644 rm -f conftest$ac_exeext
20645 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20646   (eval $ac_link) 2>&5
20647   ac_status=$?
20648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20649   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20650   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20651   (eval $ac_try) 2>&5
20652   ac_status=$?
20653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20654   (exit $ac_status); }; }; then
20655   pgac_cv_alignof_long_long_int=`cat conftest.val`
20656 else
20657   echo "$as_me: program exited with status $ac_status" >&5
20658 echo "$as_me: failed program was:" >&5
20659 sed 's/^/| /' conftest.$ac_ext >&5
20660
20661 ( exit $ac_status )
20662 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20663 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20664    { (exit 1); exit 1; }; }
20665 fi
20666 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20667 fi
20668 fi
20669 rm -f conftest.val
20670 else
20671   pgac_cv_alignof_long_long_int=0
20672 fi
20673 fi
20674 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20675 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20676 cat >>confdefs.h <<_ACEOF
20677 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20678 _ACEOF
20679
20680
20681 fi
20682 echo "$as_me:$LINENO: checking for double" >&5
20683 echo $ECHO_N "checking for double... $ECHO_C" >&6
20684 if test "${ac_cv_type_double+set}" = set; then
20685   echo $ECHO_N "(cached) $ECHO_C" >&6
20686 else
20687   cat >conftest.$ac_ext <<_ACEOF
20688 /* confdefs.h.  */
20689 _ACEOF
20690 cat confdefs.h >>conftest.$ac_ext
20691 cat >>conftest.$ac_ext <<_ACEOF
20692 /* end confdefs.h.  */
20693 $ac_includes_default
20694 int
20695 main ()
20696 {
20697 if ((double *) 0)
20698   return 0;
20699 if (sizeof (double))
20700   return 0;
20701   ;
20702   return 0;
20703 }
20704 _ACEOF
20705 rm -f conftest.$ac_objext
20706 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20707   (eval $ac_compile) 2>conftest.er1
20708   ac_status=$?
20709   grep -v '^ *+' conftest.er1 >conftest.err
20710   rm -f conftest.er1
20711   cat conftest.err >&5
20712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20713   (exit $ac_status); } &&
20714          { ac_try='test -z "$ac_c_werror_flag"
20715                          || test ! -s conftest.err'
20716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20717   (eval $ac_try) 2>&5
20718   ac_status=$?
20719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20720   (exit $ac_status); }; } &&
20721          { ac_try='test -s conftest.$ac_objext'
20722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20723   (eval $ac_try) 2>&5
20724   ac_status=$?
20725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20726   (exit $ac_status); }; }; then
20727   ac_cv_type_double=yes
20728 else
20729   echo "$as_me: failed program was:" >&5
20730 sed 's/^/| /' conftest.$ac_ext >&5
20731
20732 ac_cv_type_double=no
20733 fi
20734 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20735 fi
20736 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20737 echo "${ECHO_T}$ac_cv_type_double" >&6
20738
20739 echo "$as_me:$LINENO: checking alignment of double" >&5
20740 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20741 if test "${pgac_cv_alignof_double+set}" = set; then
20742   echo $ECHO_N "(cached) $ECHO_C" >&6
20743 else
20744   if test "$ac_cv_type_double" = yes; then
20745   if test "$cross_compiling" = yes; then
20746   # Depending upon the size, compute the lo and hi bounds.
20747 cat >conftest.$ac_ext <<_ACEOF
20748 /* confdefs.h.  */
20749 _ACEOF
20750 cat confdefs.h >>conftest.$ac_ext
20751 cat >>conftest.$ac_ext <<_ACEOF
20752 /* end confdefs.h.  */
20753 $ac_includes_default
20754 struct { char filler; double field; } pgac_struct;
20755 int
20756 main ()
20757 {
20758 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20759 test_array [0] = 0
20760
20761   ;
20762   return 0;
20763 }
20764 _ACEOF
20765 rm -f conftest.$ac_objext
20766 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20767   (eval $ac_compile) 2>conftest.er1
20768   ac_status=$?
20769   grep -v '^ *+' conftest.er1 >conftest.err
20770   rm -f conftest.er1
20771   cat conftest.err >&5
20772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20773   (exit $ac_status); } &&
20774          { ac_try='test -z "$ac_c_werror_flag"
20775                          || test ! -s conftest.err'
20776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20777   (eval $ac_try) 2>&5
20778   ac_status=$?
20779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20780   (exit $ac_status); }; } &&
20781          { ac_try='test -s conftest.$ac_objext'
20782   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20783   (eval $ac_try) 2>&5
20784   ac_status=$?
20785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20786   (exit $ac_status); }; }; then
20787   ac_lo=0 ac_mid=0
20788   while :; do
20789     cat >conftest.$ac_ext <<_ACEOF
20790 /* confdefs.h.  */
20791 _ACEOF
20792 cat confdefs.h >>conftest.$ac_ext
20793 cat >>conftest.$ac_ext <<_ACEOF
20794 /* end confdefs.h.  */
20795 $ac_includes_default
20796 struct { char filler; double field; } pgac_struct;
20797 int
20798 main ()
20799 {
20800 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20801 test_array [0] = 0
20802
20803   ;
20804   return 0;
20805 }
20806 _ACEOF
20807 rm -f conftest.$ac_objext
20808 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20809   (eval $ac_compile) 2>conftest.er1
20810   ac_status=$?
20811   grep -v '^ *+' conftest.er1 >conftest.err
20812   rm -f conftest.er1
20813   cat conftest.err >&5
20814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20815   (exit $ac_status); } &&
20816          { ac_try='test -z "$ac_c_werror_flag"
20817                          || test ! -s conftest.err'
20818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20819   (eval $ac_try) 2>&5
20820   ac_status=$?
20821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20822   (exit $ac_status); }; } &&
20823          { ac_try='test -s conftest.$ac_objext'
20824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20825   (eval $ac_try) 2>&5
20826   ac_status=$?
20827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20828   (exit $ac_status); }; }; then
20829   ac_hi=$ac_mid; break
20830 else
20831   echo "$as_me: failed program was:" >&5
20832 sed 's/^/| /' conftest.$ac_ext >&5
20833
20834 ac_lo=`expr $ac_mid + 1`
20835                     if test $ac_lo -le $ac_mid; then
20836                       ac_lo= ac_hi=
20837                       break
20838                     fi
20839                     ac_mid=`expr 2 '*' $ac_mid + 1`
20840 fi
20841 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20842   done
20843 else
20844   echo "$as_me: failed program was:" >&5
20845 sed 's/^/| /' conftest.$ac_ext >&5
20846
20847 cat >conftest.$ac_ext <<_ACEOF
20848 /* confdefs.h.  */
20849 _ACEOF
20850 cat confdefs.h >>conftest.$ac_ext
20851 cat >>conftest.$ac_ext <<_ACEOF
20852 /* end confdefs.h.  */
20853 $ac_includes_default
20854 struct { char filler; double field; } pgac_struct;
20855 int
20856 main ()
20857 {
20858 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20859 test_array [0] = 0
20860
20861   ;
20862   return 0;
20863 }
20864 _ACEOF
20865 rm -f conftest.$ac_objext
20866 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20867   (eval $ac_compile) 2>conftest.er1
20868   ac_status=$?
20869   grep -v '^ *+' conftest.er1 >conftest.err
20870   rm -f conftest.er1
20871   cat conftest.err >&5
20872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20873   (exit $ac_status); } &&
20874          { ac_try='test -z "$ac_c_werror_flag"
20875                          || test ! -s conftest.err'
20876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20877   (eval $ac_try) 2>&5
20878   ac_status=$?
20879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20880   (exit $ac_status); }; } &&
20881          { ac_try='test -s conftest.$ac_objext'
20882   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20883   (eval $ac_try) 2>&5
20884   ac_status=$?
20885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20886   (exit $ac_status); }; }; then
20887   ac_hi=-1 ac_mid=-1
20888   while :; do
20889     cat >conftest.$ac_ext <<_ACEOF
20890 /* confdefs.h.  */
20891 _ACEOF
20892 cat confdefs.h >>conftest.$ac_ext
20893 cat >>conftest.$ac_ext <<_ACEOF
20894 /* end confdefs.h.  */
20895 $ac_includes_default
20896 struct { char filler; double field; } pgac_struct;
20897 int
20898 main ()
20899 {
20900 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20901 test_array [0] = 0
20902
20903   ;
20904   return 0;
20905 }
20906 _ACEOF
20907 rm -f conftest.$ac_objext
20908 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20909   (eval $ac_compile) 2>conftest.er1
20910   ac_status=$?
20911   grep -v '^ *+' conftest.er1 >conftest.err
20912   rm -f conftest.er1
20913   cat conftest.err >&5
20914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20915   (exit $ac_status); } &&
20916          { ac_try='test -z "$ac_c_werror_flag"
20917                          || test ! -s conftest.err'
20918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20919   (eval $ac_try) 2>&5
20920   ac_status=$?
20921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20922   (exit $ac_status); }; } &&
20923          { ac_try='test -s conftest.$ac_objext'
20924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20925   (eval $ac_try) 2>&5
20926   ac_status=$?
20927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20928   (exit $ac_status); }; }; then
20929   ac_lo=$ac_mid; break
20930 else
20931   echo "$as_me: failed program was:" >&5
20932 sed 's/^/| /' conftest.$ac_ext >&5
20933
20934 ac_hi=`expr '(' $ac_mid ')' - 1`
20935                        if test $ac_mid -le $ac_hi; then
20936                          ac_lo= ac_hi=
20937                          break
20938                        fi
20939                        ac_mid=`expr 2 '*' $ac_mid`
20940 fi
20941 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20942   done
20943 else
20944   echo "$as_me: failed program was:" >&5
20945 sed 's/^/| /' conftest.$ac_ext >&5
20946
20947 ac_lo= ac_hi=
20948 fi
20949 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20950 fi
20951 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20952 # Binary search between lo and hi bounds.
20953 while test "x$ac_lo" != "x$ac_hi"; do
20954   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20955   cat >conftest.$ac_ext <<_ACEOF
20956 /* confdefs.h.  */
20957 _ACEOF
20958 cat confdefs.h >>conftest.$ac_ext
20959 cat >>conftest.$ac_ext <<_ACEOF
20960 /* end confdefs.h.  */
20961 $ac_includes_default
20962 struct { char filler; double field; } pgac_struct;
20963 int
20964 main ()
20965 {
20966 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20967 test_array [0] = 0
20968
20969   ;
20970   return 0;
20971 }
20972 _ACEOF
20973 rm -f conftest.$ac_objext
20974 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20975   (eval $ac_compile) 2>conftest.er1
20976   ac_status=$?
20977   grep -v '^ *+' conftest.er1 >conftest.err
20978   rm -f conftest.er1
20979   cat conftest.err >&5
20980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20981   (exit $ac_status); } &&
20982          { ac_try='test -z "$ac_c_werror_flag"
20983                          || test ! -s conftest.err'
20984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20985   (eval $ac_try) 2>&5
20986   ac_status=$?
20987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20988   (exit $ac_status); }; } &&
20989          { ac_try='test -s conftest.$ac_objext'
20990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20991   (eval $ac_try) 2>&5
20992   ac_status=$?
20993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20994   (exit $ac_status); }; }; then
20995   ac_hi=$ac_mid
20996 else
20997   echo "$as_me: failed program was:" >&5
20998 sed 's/^/| /' conftest.$ac_ext >&5
20999
21000 ac_lo=`expr '(' $ac_mid ')' + 1`
21001 fi
21002 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21003 done
21004 case $ac_lo in
21005 ?*) pgac_cv_alignof_double=$ac_lo;;
21006 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
21007 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
21008    { (exit 1); exit 1; }; } ;;
21009 esac
21010 else
21011   if test "$cross_compiling" = yes; then
21012   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
21013 See \`config.log' for more details." >&5
21014 echo "$as_me: error: cannot run test program while cross compiling
21015 See \`config.log' for more details." >&2;}
21016    { (exit 1); exit 1; }; }
21017 else
21018   cat >conftest.$ac_ext <<_ACEOF
21019 /* confdefs.h.  */
21020 _ACEOF
21021 cat confdefs.h >>conftest.$ac_ext
21022 cat >>conftest.$ac_ext <<_ACEOF
21023 /* end confdefs.h.  */
21024 $ac_includes_default
21025 struct { char filler; double field; } pgac_struct;
21026 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
21027 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
21028 #include <stdio.h>
21029 #include <stdlib.h>
21030 int
21031 main ()
21032 {
21033
21034   FILE *f = fopen ("conftest.val", "w");
21035   if (! f)
21036     exit (1);
21037   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
21038     {
21039       long i = longval ();
21040       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
21041         exit (1);
21042       fprintf (f, "%ld\n", i);
21043     }
21044   else
21045     {
21046       unsigned long i = ulongval ();
21047       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
21048         exit (1);
21049       fprintf (f, "%lu\n", i);
21050     }
21051   exit (ferror (f) || fclose (f) != 0);
21052
21053   ;
21054   return 0;
21055 }
21056 _ACEOF
21057 rm -f conftest$ac_exeext
21058 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21059   (eval $ac_link) 2>&5
21060   ac_status=$?
21061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21062   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21064   (eval $ac_try) 2>&5
21065   ac_status=$?
21066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21067   (exit $ac_status); }; }; then
21068   pgac_cv_alignof_double=`cat conftest.val`
21069 else
21070   echo "$as_me: program exited with status $ac_status" >&5
21071 echo "$as_me: failed program was:" >&5
21072 sed 's/^/| /' conftest.$ac_ext >&5
21073
21074 ( exit $ac_status )
21075 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
21076 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
21077    { (exit 1); exit 1; }; }
21078 fi
21079 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21080 fi
21081 fi
21082 rm -f conftest.val
21083 else
21084   pgac_cv_alignof_double=0
21085 fi
21086 fi
21087 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
21088 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
21089 cat >>confdefs.h <<_ACEOF
21090 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
21091 _ACEOF
21092
21093
21094
21095 # Compute maximum alignment of any basic type.
21096 # We assume long's alignment is at least as strong as char, short, or int;
21097 # but we must check long long (if it exists) and double.
21098
21099 MAX_ALIGNOF=$pgac_cv_alignof_long
21100 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
21101   MAX_ALIGNOF=$pgac_cv_alignof_double
21102 fi
21103 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
21104   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
21105 fi
21106
21107 cat >>confdefs.h <<_ACEOF
21108 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
21109 _ACEOF
21110
21111
21112
21113 # Some platforms predefine the types int8, int16, etc.  Only check
21114 # a (hopefully) representative subset.
21115 echo "$as_me:$LINENO: checking for int8" >&5
21116 echo $ECHO_N "checking for int8... $ECHO_C" >&6
21117 if test "${ac_cv_type_int8+set}" = set; then
21118   echo $ECHO_N "(cached) $ECHO_C" >&6
21119 else
21120   cat >conftest.$ac_ext <<_ACEOF
21121 /* confdefs.h.  */
21122 _ACEOF
21123 cat confdefs.h >>conftest.$ac_ext
21124 cat >>conftest.$ac_ext <<_ACEOF
21125 /* end confdefs.h.  */
21126 #include <stdio.h>
21127 #ifdef HAVE_SUPPORTDEFS_H
21128 #include <SupportDefs.h>
21129 #endif
21130
21131 int
21132 main ()
21133 {
21134 if ((int8 *) 0)
21135   return 0;
21136 if (sizeof (int8))
21137   return 0;
21138   ;
21139   return 0;
21140 }
21141 _ACEOF
21142 rm -f conftest.$ac_objext
21143 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21144   (eval $ac_compile) 2>conftest.er1
21145   ac_status=$?
21146   grep -v '^ *+' conftest.er1 >conftest.err
21147   rm -f conftest.er1
21148   cat conftest.err >&5
21149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21150   (exit $ac_status); } &&
21151          { ac_try='test -z "$ac_c_werror_flag"
21152                          || test ! -s conftest.err'
21153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21154   (eval $ac_try) 2>&5
21155   ac_status=$?
21156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21157   (exit $ac_status); }; } &&
21158          { ac_try='test -s conftest.$ac_objext'
21159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21160   (eval $ac_try) 2>&5
21161   ac_status=$?
21162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21163   (exit $ac_status); }; }; then
21164   ac_cv_type_int8=yes
21165 else
21166   echo "$as_me: failed program was:" >&5
21167 sed 's/^/| /' conftest.$ac_ext >&5
21168
21169 ac_cv_type_int8=no
21170 fi
21171 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21172 fi
21173 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
21174 echo "${ECHO_T}$ac_cv_type_int8" >&6
21175 if test $ac_cv_type_int8 = yes; then
21176
21177 cat >>confdefs.h <<_ACEOF
21178 #define HAVE_INT8 1
21179 _ACEOF
21180
21181
21182 fi
21183 echo "$as_me:$LINENO: checking for uint8" >&5
21184 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
21185 if test "${ac_cv_type_uint8+set}" = set; then
21186   echo $ECHO_N "(cached) $ECHO_C" >&6
21187 else
21188   cat >conftest.$ac_ext <<_ACEOF
21189 /* confdefs.h.  */
21190 _ACEOF
21191 cat confdefs.h >>conftest.$ac_ext
21192 cat >>conftest.$ac_ext <<_ACEOF
21193 /* end confdefs.h.  */
21194 #include <stdio.h>
21195 #ifdef HAVE_SUPPORTDEFS_H
21196 #include <SupportDefs.h>
21197 #endif
21198
21199 int
21200 main ()
21201 {
21202 if ((uint8 *) 0)
21203   return 0;
21204 if (sizeof (uint8))
21205   return 0;
21206   ;
21207   return 0;
21208 }
21209 _ACEOF
21210 rm -f conftest.$ac_objext
21211 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21212   (eval $ac_compile) 2>conftest.er1
21213   ac_status=$?
21214   grep -v '^ *+' conftest.er1 >conftest.err
21215   rm -f conftest.er1
21216   cat conftest.err >&5
21217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21218   (exit $ac_status); } &&
21219          { ac_try='test -z "$ac_c_werror_flag"
21220                          || test ! -s conftest.err'
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); }; } &&
21226          { ac_try='test -s conftest.$ac_objext'
21227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21228   (eval $ac_try) 2>&5
21229   ac_status=$?
21230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21231   (exit $ac_status); }; }; then
21232   ac_cv_type_uint8=yes
21233 else
21234   echo "$as_me: failed program was:" >&5
21235 sed 's/^/| /' conftest.$ac_ext >&5
21236
21237 ac_cv_type_uint8=no
21238 fi
21239 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21240 fi
21241 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
21242 echo "${ECHO_T}$ac_cv_type_uint8" >&6
21243 if test $ac_cv_type_uint8 = yes; then
21244
21245 cat >>confdefs.h <<_ACEOF
21246 #define HAVE_UINT8 1
21247 _ACEOF
21248
21249
21250 fi
21251 echo "$as_me:$LINENO: checking for int64" >&5
21252 echo $ECHO_N "checking for int64... $ECHO_C" >&6
21253 if test "${ac_cv_type_int64+set}" = set; then
21254   echo $ECHO_N "(cached) $ECHO_C" >&6
21255 else
21256   cat >conftest.$ac_ext <<_ACEOF
21257 /* confdefs.h.  */
21258 _ACEOF
21259 cat confdefs.h >>conftest.$ac_ext
21260 cat >>conftest.$ac_ext <<_ACEOF
21261 /* end confdefs.h.  */
21262 #include <stdio.h>
21263 #ifdef HAVE_SUPPORTDEFS_H
21264 #include <SupportDefs.h>
21265 #endif
21266
21267 int
21268 main ()
21269 {
21270 if ((int64 *) 0)
21271   return 0;
21272 if (sizeof (int64))
21273   return 0;
21274   ;
21275   return 0;
21276 }
21277 _ACEOF
21278 rm -f conftest.$ac_objext
21279 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21280   (eval $ac_compile) 2>conftest.er1
21281   ac_status=$?
21282   grep -v '^ *+' conftest.er1 >conftest.err
21283   rm -f conftest.er1
21284   cat conftest.err >&5
21285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21286   (exit $ac_status); } &&
21287          { ac_try='test -z "$ac_c_werror_flag"
21288                          || test ! -s conftest.err'
21289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21290   (eval $ac_try) 2>&5
21291   ac_status=$?
21292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21293   (exit $ac_status); }; } &&
21294          { ac_try='test -s conftest.$ac_objext'
21295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21296   (eval $ac_try) 2>&5
21297   ac_status=$?
21298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21299   (exit $ac_status); }; }; then
21300   ac_cv_type_int64=yes
21301 else
21302   echo "$as_me: failed program was:" >&5
21303 sed 's/^/| /' conftest.$ac_ext >&5
21304
21305 ac_cv_type_int64=no
21306 fi
21307 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21308 fi
21309 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
21310 echo "${ECHO_T}$ac_cv_type_int64" >&6
21311 if test $ac_cv_type_int64 = yes; then
21312
21313 cat >>confdefs.h <<_ACEOF
21314 #define HAVE_INT64 1
21315 _ACEOF
21316
21317
21318 fi
21319 echo "$as_me:$LINENO: checking for uint64" >&5
21320 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
21321 if test "${ac_cv_type_uint64+set}" = set; then
21322   echo $ECHO_N "(cached) $ECHO_C" >&6
21323 else
21324   cat >conftest.$ac_ext <<_ACEOF
21325 /* confdefs.h.  */
21326 _ACEOF
21327 cat confdefs.h >>conftest.$ac_ext
21328 cat >>conftest.$ac_ext <<_ACEOF
21329 /* end confdefs.h.  */
21330 #include <stdio.h>
21331 #ifdef HAVE_SUPPORTDEFS_H
21332 #include <SupportDefs.h>
21333 #endif
21334
21335 int
21336 main ()
21337 {
21338 if ((uint64 *) 0)
21339   return 0;
21340 if (sizeof (uint64))
21341   return 0;
21342   ;
21343   return 0;
21344 }
21345 _ACEOF
21346 rm -f conftest.$ac_objext
21347 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21348   (eval $ac_compile) 2>conftest.er1
21349   ac_status=$?
21350   grep -v '^ *+' conftest.er1 >conftest.err
21351   rm -f conftest.er1
21352   cat conftest.err >&5
21353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21354   (exit $ac_status); } &&
21355          { ac_try='test -z "$ac_c_werror_flag"
21356                          || test ! -s conftest.err'
21357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21358   (eval $ac_try) 2>&5
21359   ac_status=$?
21360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21361   (exit $ac_status); }; } &&
21362          { ac_try='test -s conftest.$ac_objext'
21363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21364   (eval $ac_try) 2>&5
21365   ac_status=$?
21366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21367   (exit $ac_status); }; }; then
21368   ac_cv_type_uint64=yes
21369 else
21370   echo "$as_me: failed program was:" >&5
21371 sed 's/^/| /' conftest.$ac_ext >&5
21372
21373 ac_cv_type_uint64=no
21374 fi
21375 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21376 fi
21377 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
21378 echo "${ECHO_T}$ac_cv_type_uint64" >&6
21379 if test $ac_cv_type_uint64 = yes; then
21380
21381 cat >>confdefs.h <<_ACEOF
21382 #define HAVE_UINT64 1
21383 _ACEOF
21384
21385
21386 fi
21387
21388
21389 # We also check for sig_atomic_t, which *should* be defined per ANSI
21390 # C, but is missing on some old platforms.
21391 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
21392 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
21393 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
21394   echo $ECHO_N "(cached) $ECHO_C" >&6
21395 else
21396   cat >conftest.$ac_ext <<_ACEOF
21397 /* confdefs.h.  */
21398 _ACEOF
21399 cat confdefs.h >>conftest.$ac_ext
21400 cat >>conftest.$ac_ext <<_ACEOF
21401 /* end confdefs.h.  */
21402 #include <signal.h>
21403
21404 int
21405 main ()
21406 {
21407 if ((sig_atomic_t *) 0)
21408   return 0;
21409 if (sizeof (sig_atomic_t))
21410   return 0;
21411   ;
21412   return 0;
21413 }
21414 _ACEOF
21415 rm -f conftest.$ac_objext
21416 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21417   (eval $ac_compile) 2>conftest.er1
21418   ac_status=$?
21419   grep -v '^ *+' conftest.er1 >conftest.err
21420   rm -f conftest.er1
21421   cat conftest.err >&5
21422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21423   (exit $ac_status); } &&
21424          { ac_try='test -z "$ac_c_werror_flag"
21425                          || test ! -s conftest.err'
21426   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21427   (eval $ac_try) 2>&5
21428   ac_status=$?
21429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21430   (exit $ac_status); }; } &&
21431          { ac_try='test -s conftest.$ac_objext'
21432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21433   (eval $ac_try) 2>&5
21434   ac_status=$?
21435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21436   (exit $ac_status); }; }; then
21437   ac_cv_type_sig_atomic_t=yes
21438 else
21439   echo "$as_me: failed program was:" >&5
21440 sed 's/^/| /' conftest.$ac_ext >&5
21441
21442 ac_cv_type_sig_atomic_t=no
21443 fi
21444 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21445 fi
21446 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
21447 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
21448 if test $ac_cv_type_sig_atomic_t = yes; then
21449
21450 cat >>confdefs.h <<_ACEOF
21451 #define HAVE_SIG_ATOMIC_T 1
21452 _ACEOF
21453
21454
21455 fi
21456
21457
21458
21459 if test x"$template" != x"win32"
21460 then
21461 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
21462 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
21463 if test "${pgac_cv_func_posix_signals+set}" = set; then
21464   echo $ECHO_N "(cached) $ECHO_C" >&6
21465 else
21466   cat >conftest.$ac_ext <<_ACEOF
21467 /* confdefs.h.  */
21468 _ACEOF
21469 cat confdefs.h >>conftest.$ac_ext
21470 cat >>conftest.$ac_ext <<_ACEOF
21471 /* end confdefs.h.  */
21472 #include <signal.h>
21473
21474 int
21475 main ()
21476 {
21477 struct sigaction act, oact;
21478 sigemptyset(&act.sa_mask);
21479 act.sa_flags = SA_RESTART;
21480 sigaction(0, &act, &oact);
21481   ;
21482   return 0;
21483 }
21484 _ACEOF
21485 rm -f conftest.$ac_objext conftest$ac_exeext
21486 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21487   (eval $ac_link) 2>conftest.er1
21488   ac_status=$?
21489   grep -v '^ *+' conftest.er1 >conftest.err
21490   rm -f conftest.er1
21491   cat conftest.err >&5
21492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21493   (exit $ac_status); } &&
21494          { ac_try='test -z "$ac_c_werror_flag"
21495                          || test ! -s conftest.err'
21496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21497   (eval $ac_try) 2>&5
21498   ac_status=$?
21499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21500   (exit $ac_status); }; } &&
21501          { ac_try='test -s conftest$ac_exeext'
21502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21503   (eval $ac_try) 2>&5
21504   ac_status=$?
21505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21506   (exit $ac_status); }; }; then
21507   pgac_cv_func_posix_signals=yes
21508 else
21509   echo "$as_me: failed program was:" >&5
21510 sed 's/^/| /' conftest.$ac_ext >&5
21511
21512 pgac_cv_func_posix_signals=no
21513 fi
21514 rm -f conftest.err conftest.$ac_objext \
21515       conftest$ac_exeext conftest.$ac_ext
21516 fi
21517 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
21518 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
21519 if test x"$pgac_cv_func_posix_signals" = xyes ; then
21520
21521 cat >>confdefs.h <<\_ACEOF
21522 #define HAVE_POSIX_SIGNALS
21523 _ACEOF
21524
21525 fi
21526 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
21527
21528 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
21529   { { echo "$as_me:$LINENO: error:
21530 Thread-safety requires POSIX signals, which are not supported by this
21531 operating system." >&5
21532 echo "$as_me: error:
21533 Thread-safety requires POSIX signals, which are not supported by this
21534 operating system." >&2;}
21535    { (exit 1); exit 1; }; }
21536 fi
21537 fi
21538
21539 if test $ac_cv_func_fseeko = yes; then
21540 # Check whether --enable-largefile or --disable-largefile was given.
21541 if test "${enable_largefile+set}" = set; then
21542   enableval="$enable_largefile"
21543
21544 fi;
21545 if test "$enable_largefile" != no; then
21546
21547   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
21548 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
21549 if test "${ac_cv_sys_largefile_CC+set}" = set; then
21550   echo $ECHO_N "(cached) $ECHO_C" >&6
21551 else
21552   ac_cv_sys_largefile_CC=no
21553      if test "$GCC" != yes; then
21554        ac_save_CC=$CC
21555        while :; do
21556          # IRIX 6.2 and later do not support large files by default,
21557          # so use the C compiler's -n32 option if that helps.
21558          cat >conftest.$ac_ext <<_ACEOF
21559 /* confdefs.h.  */
21560 _ACEOF
21561 cat confdefs.h >>conftest.$ac_ext
21562 cat >>conftest.$ac_ext <<_ACEOF
21563 /* end confdefs.h.  */
21564 #include <sys/types.h>
21565  /* Check that off_t can represent 2**63 - 1 correctly.
21566     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21567     since some C++ compilers masquerading as C compilers
21568     incorrectly reject 9223372036854775807.  */
21569 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21570   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21571                        && LARGE_OFF_T % 2147483647 == 1)
21572                       ? 1 : -1];
21573 int
21574 main ()
21575 {
21576
21577   ;
21578   return 0;
21579 }
21580 _ACEOF
21581          rm -f conftest.$ac_objext
21582 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21583   (eval $ac_compile) 2>conftest.er1
21584   ac_status=$?
21585   grep -v '^ *+' conftest.er1 >conftest.err
21586   rm -f conftest.er1
21587   cat conftest.err >&5
21588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21589   (exit $ac_status); } &&
21590          { ac_try='test -z "$ac_c_werror_flag"
21591                          || test ! -s conftest.err'
21592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21593   (eval $ac_try) 2>&5
21594   ac_status=$?
21595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21596   (exit $ac_status); }; } &&
21597          { ac_try='test -s conftest.$ac_objext'
21598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21599   (eval $ac_try) 2>&5
21600   ac_status=$?
21601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21602   (exit $ac_status); }; }; then
21603   break
21604 else
21605   echo "$as_me: failed program was:" >&5
21606 sed 's/^/| /' conftest.$ac_ext >&5
21607
21608 fi
21609 rm -f conftest.err conftest.$ac_objext
21610          CC="$CC -n32"
21611          rm -f conftest.$ac_objext
21612 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21613   (eval $ac_compile) 2>conftest.er1
21614   ac_status=$?
21615   grep -v '^ *+' conftest.er1 >conftest.err
21616   rm -f conftest.er1
21617   cat conftest.err >&5
21618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21619   (exit $ac_status); } &&
21620          { ac_try='test -z "$ac_c_werror_flag"
21621                          || test ! -s conftest.err'
21622   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21623   (eval $ac_try) 2>&5
21624   ac_status=$?
21625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21626   (exit $ac_status); }; } &&
21627          { ac_try='test -s conftest.$ac_objext'
21628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21629   (eval $ac_try) 2>&5
21630   ac_status=$?
21631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21632   (exit $ac_status); }; }; then
21633   ac_cv_sys_largefile_CC=' -n32'; break
21634 else
21635   echo "$as_me: failed program was:" >&5
21636 sed 's/^/| /' conftest.$ac_ext >&5
21637
21638 fi
21639 rm -f conftest.err conftest.$ac_objext
21640          break
21641        done
21642        CC=$ac_save_CC
21643        rm -f conftest.$ac_ext
21644     fi
21645 fi
21646 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21647 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21648   if test "$ac_cv_sys_largefile_CC" != no; then
21649     CC=$CC$ac_cv_sys_largefile_CC
21650   fi
21651
21652   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21653 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21654 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21655   echo $ECHO_N "(cached) $ECHO_C" >&6
21656 else
21657   while :; do
21658   ac_cv_sys_file_offset_bits=no
21659   cat >conftest.$ac_ext <<_ACEOF
21660 /* confdefs.h.  */
21661 _ACEOF
21662 cat confdefs.h >>conftest.$ac_ext
21663 cat >>conftest.$ac_ext <<_ACEOF
21664 /* end confdefs.h.  */
21665 #include <sys/types.h>
21666  /* Check that off_t can represent 2**63 - 1 correctly.
21667     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21668     since some C++ compilers masquerading as C compilers
21669     incorrectly reject 9223372036854775807.  */
21670 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21671   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21672                        && LARGE_OFF_T % 2147483647 == 1)
21673                       ? 1 : -1];
21674 int
21675 main ()
21676 {
21677
21678   ;
21679   return 0;
21680 }
21681 _ACEOF
21682 rm -f conftest.$ac_objext
21683 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21684   (eval $ac_compile) 2>conftest.er1
21685   ac_status=$?
21686   grep -v '^ *+' conftest.er1 >conftest.err
21687   rm -f conftest.er1
21688   cat conftest.err >&5
21689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21690   (exit $ac_status); } &&
21691          { ac_try='test -z "$ac_c_werror_flag"
21692                          || test ! -s conftest.err'
21693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21694   (eval $ac_try) 2>&5
21695   ac_status=$?
21696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21697   (exit $ac_status); }; } &&
21698          { ac_try='test -s conftest.$ac_objext'
21699   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21700   (eval $ac_try) 2>&5
21701   ac_status=$?
21702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21703   (exit $ac_status); }; }; then
21704   break
21705 else
21706   echo "$as_me: failed program was:" >&5
21707 sed 's/^/| /' conftest.$ac_ext >&5
21708
21709 fi
21710 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21711   cat >conftest.$ac_ext <<_ACEOF
21712 /* confdefs.h.  */
21713 _ACEOF
21714 cat confdefs.h >>conftest.$ac_ext
21715 cat >>conftest.$ac_ext <<_ACEOF
21716 /* end confdefs.h.  */
21717 #define _FILE_OFFSET_BITS 64
21718 #include <sys/types.h>
21719  /* Check that off_t can represent 2**63 - 1 correctly.
21720     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21721     since some C++ compilers masquerading as C compilers
21722     incorrectly reject 9223372036854775807.  */
21723 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21724   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21725                        && LARGE_OFF_T % 2147483647 == 1)
21726                       ? 1 : -1];
21727 int
21728 main ()
21729 {
21730
21731   ;
21732   return 0;
21733 }
21734 _ACEOF
21735 rm -f conftest.$ac_objext
21736 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21737   (eval $ac_compile) 2>conftest.er1
21738   ac_status=$?
21739   grep -v '^ *+' conftest.er1 >conftest.err
21740   rm -f conftest.er1
21741   cat conftest.err >&5
21742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21743   (exit $ac_status); } &&
21744          { ac_try='test -z "$ac_c_werror_flag"
21745                          || test ! -s conftest.err'
21746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21747   (eval $ac_try) 2>&5
21748   ac_status=$?
21749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21750   (exit $ac_status); }; } &&
21751          { ac_try='test -s conftest.$ac_objext'
21752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21753   (eval $ac_try) 2>&5
21754   ac_status=$?
21755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21756   (exit $ac_status); }; }; then
21757   ac_cv_sys_file_offset_bits=64; break
21758 else
21759   echo "$as_me: failed program was:" >&5
21760 sed 's/^/| /' conftest.$ac_ext >&5
21761
21762 fi
21763 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21764   break
21765 done
21766 fi
21767 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21768 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21769 if test "$ac_cv_sys_file_offset_bits" != no; then
21770
21771 cat >>confdefs.h <<_ACEOF
21772 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21773 _ACEOF
21774
21775 fi
21776 rm -f conftest*
21777   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21778 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21779 if test "${ac_cv_sys_large_files+set}" = set; then
21780   echo $ECHO_N "(cached) $ECHO_C" >&6
21781 else
21782   while :; do
21783   ac_cv_sys_large_files=no
21784   cat >conftest.$ac_ext <<_ACEOF
21785 /* confdefs.h.  */
21786 _ACEOF
21787 cat confdefs.h >>conftest.$ac_ext
21788 cat >>conftest.$ac_ext <<_ACEOF
21789 /* end confdefs.h.  */
21790 #include <sys/types.h>
21791  /* Check that off_t can represent 2**63 - 1 correctly.
21792     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21793     since some C++ compilers masquerading as C compilers
21794     incorrectly reject 9223372036854775807.  */
21795 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21796   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21797                        && LARGE_OFF_T % 2147483647 == 1)
21798                       ? 1 : -1];
21799 int
21800 main ()
21801 {
21802
21803   ;
21804   return 0;
21805 }
21806 _ACEOF
21807 rm -f conftest.$ac_objext
21808 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21809   (eval $ac_compile) 2>conftest.er1
21810   ac_status=$?
21811   grep -v '^ *+' conftest.er1 >conftest.err
21812   rm -f conftest.er1
21813   cat conftest.err >&5
21814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21815   (exit $ac_status); } &&
21816          { ac_try='test -z "$ac_c_werror_flag"
21817                          || test ! -s conftest.err'
21818   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21819   (eval $ac_try) 2>&5
21820   ac_status=$?
21821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21822   (exit $ac_status); }; } &&
21823          { ac_try='test -s conftest.$ac_objext'
21824   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21825   (eval $ac_try) 2>&5
21826   ac_status=$?
21827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21828   (exit $ac_status); }; }; then
21829   break
21830 else
21831   echo "$as_me: failed program was:" >&5
21832 sed 's/^/| /' conftest.$ac_ext >&5
21833
21834 fi
21835 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21836   cat >conftest.$ac_ext <<_ACEOF
21837 /* confdefs.h.  */
21838 _ACEOF
21839 cat confdefs.h >>conftest.$ac_ext
21840 cat >>conftest.$ac_ext <<_ACEOF
21841 /* end confdefs.h.  */
21842 #define _LARGE_FILES 1
21843 #include <sys/types.h>
21844  /* Check that off_t can represent 2**63 - 1 correctly.
21845     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21846     since some C++ compilers masquerading as C compilers
21847     incorrectly reject 9223372036854775807.  */
21848 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21849   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21850                        && LARGE_OFF_T % 2147483647 == 1)
21851                       ? 1 : -1];
21852 int
21853 main ()
21854 {
21855
21856   ;
21857   return 0;
21858 }
21859 _ACEOF
21860 rm -f conftest.$ac_objext
21861 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21862   (eval $ac_compile) 2>conftest.er1
21863   ac_status=$?
21864   grep -v '^ *+' conftest.er1 >conftest.err
21865   rm -f conftest.er1
21866   cat conftest.err >&5
21867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21868   (exit $ac_status); } &&
21869          { ac_try='test -z "$ac_c_werror_flag"
21870                          || test ! -s conftest.err'
21871   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21872   (eval $ac_try) 2>&5
21873   ac_status=$?
21874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21875   (exit $ac_status); }; } &&
21876          { ac_try='test -s conftest.$ac_objext'
21877   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21878   (eval $ac_try) 2>&5
21879   ac_status=$?
21880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21881   (exit $ac_status); }; }; then
21882   ac_cv_sys_large_files=1; break
21883 else
21884   echo "$as_me: failed program was:" >&5
21885 sed 's/^/| /' conftest.$ac_ext >&5
21886
21887 fi
21888 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21889   break
21890 done
21891 fi
21892 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
21893 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
21894 if test "$ac_cv_sys_large_files" != no; then
21895
21896 cat >>confdefs.h <<_ACEOF
21897 #define _LARGE_FILES $ac_cv_sys_large_files
21898 _ACEOF
21899
21900 fi
21901 rm -f conftest*
21902 fi
21903
21904 fi
21905
21906 # SunOS doesn't handle negative byte comparisons properly with +/- return
21907 echo "$as_me:$LINENO: checking for working memcmp" >&5
21908 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
21909 if test "${ac_cv_func_memcmp_working+set}" = set; then
21910   echo $ECHO_N "(cached) $ECHO_C" >&6
21911 else
21912   if test "$cross_compiling" = yes; then
21913   ac_cv_func_memcmp_working=no
21914 else
21915   cat >conftest.$ac_ext <<_ACEOF
21916 /* confdefs.h.  */
21917 _ACEOF
21918 cat confdefs.h >>conftest.$ac_ext
21919 cat >>conftest.$ac_ext <<_ACEOF
21920 /* end confdefs.h.  */
21921 $ac_includes_default
21922 int
21923 main ()
21924 {
21925
21926   /* Some versions of memcmp are not 8-bit clean.  */
21927   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21928   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
21929     exit (1);
21930
21931   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
21932      or more and with at least one buffer not starting on a 4-byte boundary.
21933      William Lewis provided this test program.   */
21934   {
21935     char foo[21];
21936     char bar[21];
21937     int i;
21938     for (i = 0; i < 4; i++)
21939       {
21940         char *a = foo + i;
21941         char *b = bar + i;
21942         strcpy (a, "--------01111111");
21943         strcpy (b, "--------10000000");
21944         if (memcmp (a, b, 16) >= 0)
21945           exit (1);
21946       }
21947     exit (0);
21948   }
21949
21950   ;
21951   return 0;
21952 }
21953 _ACEOF
21954 rm -f conftest$ac_exeext
21955 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21956   (eval $ac_link) 2>&5
21957   ac_status=$?
21958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21959   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21961   (eval $ac_try) 2>&5
21962   ac_status=$?
21963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21964   (exit $ac_status); }; }; then
21965   ac_cv_func_memcmp_working=yes
21966 else
21967   echo "$as_me: program exited with status $ac_status" >&5
21968 echo "$as_me: failed program was:" >&5
21969 sed 's/^/| /' conftest.$ac_ext >&5
21970
21971 ( exit $ac_status )
21972 ac_cv_func_memcmp_working=no
21973 fi
21974 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21975 fi
21976 fi
21977 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21978 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21979 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21980     "memcmp.$ac_objext"   | \
21981   *" memcmp.$ac_objext"   | \
21982     "memcmp.$ac_objext "* | \
21983   *" memcmp.$ac_objext "* ) ;;
21984   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21985 esac
21986
21987
21988
21989
21990 # Select semaphore implementation type.
21991 if test "$PORTNAME" != "win32"; then
21992   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21993
21994 cat >>confdefs.h <<\_ACEOF
21995 #define USE_NAMED_POSIX_SEMAPHORES 1
21996 _ACEOF
21997
21998     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21999   else
22000     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
22001
22002 cat >>confdefs.h <<\_ACEOF
22003 #define USE_UNNAMED_POSIX_SEMAPHORES 1
22004 _ACEOF
22005
22006       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
22007     else
22008
22009 cat >>confdefs.h <<\_ACEOF
22010 #define USE_SYSV_SEMAPHORES 1
22011 _ACEOF
22012
22013       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
22014     fi
22015   fi
22016 else
22017
22018 cat >>confdefs.h <<\_ACEOF
22019 #define USE_WIN32_SEMAPHORES 1
22020 _ACEOF
22021
22022   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
22023 fi
22024
22025
22026 # Select shared-memory implementation type.
22027
22028 cat >>confdefs.h <<\_ACEOF
22029 #define USE_SYSV_SHARED_MEMORY 1
22030 _ACEOF
22031
22032 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
22033
22034
22035 # If not set in template file, set bytes to use libc memset()
22036 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
22037   MEMSET_LOOP_LIMIT=1024
22038 fi
22039
22040 cat >>confdefs.h <<_ACEOF
22041 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
22042 _ACEOF
22043
22044
22045
22046 if test "$enable_nls" = yes ; then
22047
22048   echo "$as_me:$LINENO: checking for library containing gettext" >&5
22049 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
22050 if test "${ac_cv_search_gettext+set}" = set; then
22051   echo $ECHO_N "(cached) $ECHO_C" >&6
22052 else
22053   ac_func_search_save_LIBS=$LIBS
22054 ac_cv_search_gettext=no
22055 cat >conftest.$ac_ext <<_ACEOF
22056 /* confdefs.h.  */
22057 _ACEOF
22058 cat confdefs.h >>conftest.$ac_ext
22059 cat >>conftest.$ac_ext <<_ACEOF
22060 /* end confdefs.h.  */
22061
22062 /* Override any gcc2 internal prototype to avoid an error.  */
22063 #ifdef __cplusplus
22064 extern "C"
22065 #endif
22066 /* We use char because int might match the return type of a gcc2
22067    builtin and then its argument prototype would still apply.  */
22068 char gettext ();
22069 int
22070 main ()
22071 {
22072 gettext ();
22073   ;
22074   return 0;
22075 }
22076 _ACEOF
22077 rm -f conftest.$ac_objext conftest$ac_exeext
22078 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22079   (eval $ac_link) 2>conftest.er1
22080   ac_status=$?
22081   grep -v '^ *+' conftest.er1 >conftest.err
22082   rm -f conftest.er1
22083   cat conftest.err >&5
22084   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22085   (exit $ac_status); } &&
22086          { ac_try='test -z "$ac_c_werror_flag"
22087                          || test ! -s conftest.err'
22088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22089   (eval $ac_try) 2>&5
22090   ac_status=$?
22091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22092   (exit $ac_status); }; } &&
22093          { ac_try='test -s conftest$ac_exeext'
22094   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22095   (eval $ac_try) 2>&5
22096   ac_status=$?
22097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22098   (exit $ac_status); }; }; then
22099   ac_cv_search_gettext="none required"
22100 else
22101   echo "$as_me: failed program was:" >&5
22102 sed 's/^/| /' conftest.$ac_ext >&5
22103
22104 fi
22105 rm -f conftest.err conftest.$ac_objext \
22106       conftest$ac_exeext conftest.$ac_ext
22107 if test "$ac_cv_search_gettext" = no; then
22108   for ac_lib in intl; do
22109     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22110     cat >conftest.$ac_ext <<_ACEOF
22111 /* confdefs.h.  */
22112 _ACEOF
22113 cat confdefs.h >>conftest.$ac_ext
22114 cat >>conftest.$ac_ext <<_ACEOF
22115 /* end confdefs.h.  */
22116
22117 /* Override any gcc2 internal prototype to avoid an error.  */
22118 #ifdef __cplusplus
22119 extern "C"
22120 #endif
22121 /* We use char because int might match the return type of a gcc2
22122    builtin and then its argument prototype would still apply.  */
22123 char gettext ();
22124 int
22125 main ()
22126 {
22127 gettext ();
22128   ;
22129   return 0;
22130 }
22131 _ACEOF
22132 rm -f conftest.$ac_objext conftest$ac_exeext
22133 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22134   (eval $ac_link) 2>conftest.er1
22135   ac_status=$?
22136   grep -v '^ *+' conftest.er1 >conftest.err
22137   rm -f conftest.er1
22138   cat conftest.err >&5
22139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22140   (exit $ac_status); } &&
22141          { ac_try='test -z "$ac_c_werror_flag"
22142                          || test ! -s conftest.err'
22143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22144   (eval $ac_try) 2>&5
22145   ac_status=$?
22146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22147   (exit $ac_status); }; } &&
22148          { ac_try='test -s conftest$ac_exeext'
22149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22150   (eval $ac_try) 2>&5
22151   ac_status=$?
22152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22153   (exit $ac_status); }; }; then
22154   ac_cv_search_gettext="-l$ac_lib"
22155 break
22156 else
22157   echo "$as_me: failed program was:" >&5
22158 sed 's/^/| /' conftest.$ac_ext >&5
22159
22160 fi
22161 rm -f conftest.err conftest.$ac_objext \
22162       conftest$ac_exeext conftest.$ac_ext
22163   done
22164 fi
22165 LIBS=$ac_func_search_save_LIBS
22166 fi
22167 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
22168 echo "${ECHO_T}$ac_cv_search_gettext" >&6
22169 if test "$ac_cv_search_gettext" != no; then
22170   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
22171
22172 else
22173   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
22174 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
22175    { (exit 1); exit 1; }; }
22176 fi
22177
22178   if test "${ac_cv_header_libintl_h+set}" = set; then
22179   echo "$as_me:$LINENO: checking for libintl.h" >&5
22180 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
22181 if test "${ac_cv_header_libintl_h+set}" = set; then
22182   echo $ECHO_N "(cached) $ECHO_C" >&6
22183 fi
22184 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
22185 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
22186 else
22187   # Is the header compilable?
22188 echo "$as_me:$LINENO: checking libintl.h usability" >&5
22189 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
22190 cat >conftest.$ac_ext <<_ACEOF
22191 /* confdefs.h.  */
22192 _ACEOF
22193 cat confdefs.h >>conftest.$ac_ext
22194 cat >>conftest.$ac_ext <<_ACEOF
22195 /* end confdefs.h.  */
22196 $ac_includes_default
22197 #include <libintl.h>
22198 _ACEOF
22199 rm -f conftest.$ac_objext
22200 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22201   (eval $ac_compile) 2>conftest.er1
22202   ac_status=$?
22203   grep -v '^ *+' conftest.er1 >conftest.err
22204   rm -f conftest.er1
22205   cat conftest.err >&5
22206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22207   (exit $ac_status); } &&
22208          { ac_try='test -z "$ac_c_werror_flag"
22209                          || test ! -s conftest.err'
22210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22211   (eval $ac_try) 2>&5
22212   ac_status=$?
22213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22214   (exit $ac_status); }; } &&
22215          { ac_try='test -s conftest.$ac_objext'
22216   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22217   (eval $ac_try) 2>&5
22218   ac_status=$?
22219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22220   (exit $ac_status); }; }; then
22221   ac_header_compiler=yes
22222 else
22223   echo "$as_me: failed program was:" >&5
22224 sed 's/^/| /' conftest.$ac_ext >&5
22225
22226 ac_header_compiler=no
22227 fi
22228 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22229 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22230 echo "${ECHO_T}$ac_header_compiler" >&6
22231
22232 # Is the header present?
22233 echo "$as_me:$LINENO: checking libintl.h presence" >&5
22234 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
22235 cat >conftest.$ac_ext <<_ACEOF
22236 /* confdefs.h.  */
22237 _ACEOF
22238 cat confdefs.h >>conftest.$ac_ext
22239 cat >>conftest.$ac_ext <<_ACEOF
22240 /* end confdefs.h.  */
22241 #include <libintl.h>
22242 _ACEOF
22243 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22244   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22245   ac_status=$?
22246   grep -v '^ *+' conftest.er1 >conftest.err
22247   rm -f conftest.er1
22248   cat conftest.err >&5
22249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22250   (exit $ac_status); } >/dev/null; then
22251   if test -s conftest.err; then
22252     ac_cpp_err=$ac_c_preproc_warn_flag
22253     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22254   else
22255     ac_cpp_err=
22256   fi
22257 else
22258   ac_cpp_err=yes
22259 fi
22260 if test -z "$ac_cpp_err"; then
22261   ac_header_preproc=yes
22262 else
22263   echo "$as_me: failed program was:" >&5
22264 sed 's/^/| /' conftest.$ac_ext >&5
22265
22266   ac_header_preproc=no
22267 fi
22268 rm -f conftest.err conftest.$ac_ext
22269 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22270 echo "${ECHO_T}$ac_header_preproc" >&6
22271
22272 # So?  What about this header?
22273 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22274   yes:no: )
22275     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22276 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22277     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
22278 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
22279     ac_header_preproc=yes
22280     ;;
22281   no:yes:* )
22282     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
22283 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
22284     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
22285 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
22286     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
22287 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
22288     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
22289 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22290     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
22291 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
22292     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
22293 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
22294     (
22295       cat <<\_ASBOX
22296 ## ---------------------------------------- ##
22297 ## Report this to pgsql-bugs@postgresql.org ##
22298 ## ---------------------------------------- ##
22299 _ASBOX
22300     ) |
22301       sed "s/^/$as_me: WARNING:     /" >&2
22302     ;;
22303 esac
22304 echo "$as_me:$LINENO: checking for libintl.h" >&5
22305 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
22306 if test "${ac_cv_header_libintl_h+set}" = set; then
22307   echo $ECHO_N "(cached) $ECHO_C" >&6
22308 else
22309   ac_cv_header_libintl_h=$ac_header_preproc
22310 fi
22311 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
22312 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
22313
22314 fi
22315 if test $ac_cv_header_libintl_h = yes; then
22316   :
22317 else
22318   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
22319 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
22320    { (exit 1); exit 1; }; }
22321 fi
22322
22323
22324   for ac_prog in msgfmt
22325 do
22326   # Extract the first word of "$ac_prog", so it can be a program name with args.
22327 set dummy $ac_prog; ac_word=$2
22328 echo "$as_me:$LINENO: checking for $ac_word" >&5
22329 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22330 if test "${ac_cv_prog_MSGFMT+set}" = set; then
22331   echo $ECHO_N "(cached) $ECHO_C" >&6
22332 else
22333   if test -n "$MSGFMT"; then
22334   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
22335 else
22336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22337 for as_dir in $PATH
22338 do
22339   IFS=$as_save_IFS
22340   test -z "$as_dir" && as_dir=.
22341   for ac_exec_ext in '' $ac_executable_extensions; do
22342   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22343     ac_cv_prog_MSGFMT="$ac_prog"
22344     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22345     break 2
22346   fi
22347 done
22348 done
22349
22350 fi
22351 fi
22352 MSGFMT=$ac_cv_prog_MSGFMT
22353 if test -n "$MSGFMT"; then
22354   echo "$as_me:$LINENO: result: $MSGFMT" >&5
22355 echo "${ECHO_T}$MSGFMT" >&6
22356 else
22357   echo "$as_me:$LINENO: result: no" >&5
22358 echo "${ECHO_T}no" >&6
22359 fi
22360
22361   test -n "$MSGFMT" && break
22362 done
22363
22364   if test -z "$MSGFMT"; then
22365     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
22366 echo "$as_me: error: msgfmt is required for NLS" >&2;}
22367    { (exit 1); exit 1; }; }
22368   fi
22369   for ac_prog in msgmerge
22370 do
22371   # Extract the first word of "$ac_prog", so it can be a program name with args.
22372 set dummy $ac_prog; ac_word=$2
22373 echo "$as_me:$LINENO: checking for $ac_word" >&5
22374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22375 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
22376   echo $ECHO_N "(cached) $ECHO_C" >&6
22377 else
22378   if test -n "$MSGMERGE"; then
22379   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
22380 else
22381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22382 for as_dir in $PATH
22383 do
22384   IFS=$as_save_IFS
22385   test -z "$as_dir" && as_dir=.
22386   for ac_exec_ext in '' $ac_executable_extensions; do
22387   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22388     ac_cv_prog_MSGMERGE="$ac_prog"
22389     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22390     break 2
22391   fi
22392 done
22393 done
22394
22395 fi
22396 fi
22397 MSGMERGE=$ac_cv_prog_MSGMERGE
22398 if test -n "$MSGMERGE"; then
22399   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
22400 echo "${ECHO_T}$MSGMERGE" >&6
22401 else
22402   echo "$as_me:$LINENO: result: no" >&5
22403 echo "${ECHO_T}no" >&6
22404 fi
22405
22406   test -n "$MSGMERGE" && break
22407 done
22408
22409   for ac_prog in xgettext
22410 do
22411   # Extract the first word of "$ac_prog", so it can be a program name with args.
22412 set dummy $ac_prog; ac_word=$2
22413 echo "$as_me:$LINENO: checking for $ac_word" >&5
22414 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22415 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
22416   echo $ECHO_N "(cached) $ECHO_C" >&6
22417 else
22418   if test -n "$XGETTEXT"; then
22419   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
22420 else
22421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22422 for as_dir in $PATH
22423 do
22424   IFS=$as_save_IFS
22425   test -z "$as_dir" && as_dir=.
22426   for ac_exec_ext in '' $ac_executable_extensions; do
22427   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22428     ac_cv_prog_XGETTEXT="$ac_prog"
22429     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22430     break 2
22431   fi
22432 done
22433 done
22434
22435 fi
22436 fi
22437 XGETTEXT=$ac_cv_prog_XGETTEXT
22438 if test -n "$XGETTEXT"; then
22439   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
22440 echo "${ECHO_T}$XGETTEXT" >&6
22441 else
22442   echo "$as_me:$LINENO: result: no" >&5
22443 echo "${ECHO_T}no" >&6
22444 fi
22445
22446   test -n "$XGETTEXT" && break
22447 done
22448
22449
22450   # Note: share/locale is always the default, independent of $datadir
22451   localedir='${prefix}/share/locale'
22452
22453
22454 fi
22455
22456 # Check for Tcl configuration script tclConfig.sh
22457 if test "$with_tcl" = yes; then
22458     for ac_prog in tclsh tcl
22459 do
22460   # Extract the first word of "$ac_prog", so it can be a program name with args.
22461 set dummy $ac_prog; ac_word=$2
22462 echo "$as_me:$LINENO: checking for $ac_word" >&5
22463 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22464 if test "${ac_cv_path_TCLSH+set}" = set; then
22465   echo $ECHO_N "(cached) $ECHO_C" >&6
22466 else
22467   case $TCLSH in
22468   [\\/]* | ?:[\\/]*)
22469   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
22470   ;;
22471   *)
22472   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22473 for as_dir in $PATH
22474 do
22475   IFS=$as_save_IFS
22476   test -z "$as_dir" && as_dir=.
22477   for ac_exec_ext in '' $ac_executable_extensions; do
22478   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22479     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
22480     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22481     break 2
22482   fi
22483 done
22484 done
22485
22486   ;;
22487 esac
22488 fi
22489 TCLSH=$ac_cv_path_TCLSH
22490
22491 if test -n "$TCLSH"; then
22492   echo "$as_me:$LINENO: result: $TCLSH" >&5
22493 echo "${ECHO_T}$TCLSH" >&6
22494 else
22495   echo "$as_me:$LINENO: result: no" >&5
22496 echo "${ECHO_T}no" >&6
22497 fi
22498
22499   test -n "$TCLSH" && break
22500 done
22501
22502 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
22503 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
22504 # Let user override test
22505 if test -z "$TCL_CONFIG_SH"; then
22506     pgac_test_dirs="$with_tclconfig"
22507
22508     set X $pgac_test_dirs; shift
22509     if test $# -eq 0; then
22510         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
22511 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
22512    { (exit 1); exit 1; }; }
22513         set X `echo 'puts $auto_path' | $TCLSH`; shift
22514     fi
22515
22516     for pgac_dir do
22517         if test -r "$pgac_dir/tclConfig.sh"; then
22518             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
22519             break
22520         fi
22521     done
22522 fi
22523
22524 if test -z "$TCL_CONFIG_SH"; then
22525     echo "$as_me:$LINENO: result: no" >&5
22526 echo "${ECHO_T}no" >&6
22527     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
22528 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
22529    { (exit 1); exit 1; }; }
22530 else
22531     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
22532 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
22533 fi
22534
22535
22536
22537     . "$TCL_CONFIG_SH"
22538 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
22539 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
22540 eval TCL_LIBS=\"$TCL_LIBS\"
22541 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
22542 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
22543
22544         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
22545     ac_save_CPPFLAGS=$CPPFLAGS
22546     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
22547     if test "${ac_cv_header_tcl_h+set}" = set; then
22548   echo "$as_me:$LINENO: checking for tcl.h" >&5
22549 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22550 if test "${ac_cv_header_tcl_h+set}" = set; then
22551   echo $ECHO_N "(cached) $ECHO_C" >&6
22552 fi
22553 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22554 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22555 else
22556   # Is the header compilable?
22557 echo "$as_me:$LINENO: checking tcl.h usability" >&5
22558 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
22559 cat >conftest.$ac_ext <<_ACEOF
22560 /* confdefs.h.  */
22561 _ACEOF
22562 cat confdefs.h >>conftest.$ac_ext
22563 cat >>conftest.$ac_ext <<_ACEOF
22564 /* end confdefs.h.  */
22565 $ac_includes_default
22566 #include <tcl.h>
22567 _ACEOF
22568 rm -f conftest.$ac_objext
22569 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22570   (eval $ac_compile) 2>conftest.er1
22571   ac_status=$?
22572   grep -v '^ *+' conftest.er1 >conftest.err
22573   rm -f conftest.er1
22574   cat conftest.err >&5
22575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22576   (exit $ac_status); } &&
22577          { ac_try='test -z "$ac_c_werror_flag"
22578                          || test ! -s conftest.err'
22579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22580   (eval $ac_try) 2>&5
22581   ac_status=$?
22582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22583   (exit $ac_status); }; } &&
22584          { ac_try='test -s conftest.$ac_objext'
22585   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22586   (eval $ac_try) 2>&5
22587   ac_status=$?
22588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22589   (exit $ac_status); }; }; then
22590   ac_header_compiler=yes
22591 else
22592   echo "$as_me: failed program was:" >&5
22593 sed 's/^/| /' conftest.$ac_ext >&5
22594
22595 ac_header_compiler=no
22596 fi
22597 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22598 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22599 echo "${ECHO_T}$ac_header_compiler" >&6
22600
22601 # Is the header present?
22602 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22603 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22604 cat >conftest.$ac_ext <<_ACEOF
22605 /* confdefs.h.  */
22606 _ACEOF
22607 cat confdefs.h >>conftest.$ac_ext
22608 cat >>conftest.$ac_ext <<_ACEOF
22609 /* end confdefs.h.  */
22610 #include <tcl.h>
22611 _ACEOF
22612 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22613   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22614   ac_status=$?
22615   grep -v '^ *+' conftest.er1 >conftest.err
22616   rm -f conftest.er1
22617   cat conftest.err >&5
22618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22619   (exit $ac_status); } >/dev/null; then
22620   if test -s conftest.err; then
22621     ac_cpp_err=$ac_c_preproc_warn_flag
22622     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22623   else
22624     ac_cpp_err=
22625   fi
22626 else
22627   ac_cpp_err=yes
22628 fi
22629 if test -z "$ac_cpp_err"; then
22630   ac_header_preproc=yes
22631 else
22632   echo "$as_me: failed program was:" >&5
22633 sed 's/^/| /' conftest.$ac_ext >&5
22634
22635   ac_header_preproc=no
22636 fi
22637 rm -f conftest.err conftest.$ac_ext
22638 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22639 echo "${ECHO_T}$ac_header_preproc" >&6
22640
22641 # So?  What about this header?
22642 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22643   yes:no: )
22644     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22645 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22646     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22647 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22648     ac_header_preproc=yes
22649     ;;
22650   no:yes:* )
22651     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22652 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22653     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22654 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22655     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22656 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22657     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22658 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22659     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22660 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22661     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22662 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22663     (
22664       cat <<\_ASBOX
22665 ## ---------------------------------------- ##
22666 ## Report this to pgsql-bugs@postgresql.org ##
22667 ## ---------------------------------------- ##
22668 _ASBOX
22669     ) |
22670       sed "s/^/$as_me: WARNING:     /" >&2
22671     ;;
22672 esac
22673 echo "$as_me:$LINENO: checking for tcl.h" >&5
22674 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22675 if test "${ac_cv_header_tcl_h+set}" = set; then
22676   echo $ECHO_N "(cached) $ECHO_C" >&6
22677 else
22678   ac_cv_header_tcl_h=$ac_header_preproc
22679 fi
22680 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22681 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22682
22683 fi
22684 if test $ac_cv_header_tcl_h = yes; then
22685   :
22686 else
22687   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22688 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22689    { (exit 1); exit 1; }; }
22690 fi
22691
22692
22693     CPPFLAGS=$ac_save_CPPFLAGS
22694 fi
22695
22696 #
22697 # Check for DocBook and tools
22698 #
22699 for ac_prog in onsgmls nsgmls
22700 do
22701   # Extract the first word of "$ac_prog", so it can be a program name with args.
22702 set dummy $ac_prog; ac_word=$2
22703 echo "$as_me:$LINENO: checking for $ac_word" >&5
22704 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22705 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22706   echo $ECHO_N "(cached) $ECHO_C" >&6
22707 else
22708   if test -n "$NSGMLS"; then
22709   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22710 else
22711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22712 for as_dir in $PATH
22713 do
22714   IFS=$as_save_IFS
22715   test -z "$as_dir" && as_dir=.
22716   for ac_exec_ext in '' $ac_executable_extensions; do
22717   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22718     ac_cv_prog_NSGMLS="$ac_prog"
22719     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22720     break 2
22721   fi
22722 done
22723 done
22724
22725 fi
22726 fi
22727 NSGMLS=$ac_cv_prog_NSGMLS
22728 if test -n "$NSGMLS"; then
22729   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22730 echo "${ECHO_T}$NSGMLS" >&6
22731 else
22732   echo "$as_me:$LINENO: result: no" >&5
22733 echo "${ECHO_T}no" >&6
22734 fi
22735
22736   test -n "$NSGMLS" && break
22737 done
22738
22739 for ac_prog in openjade jade
22740 do
22741   # Extract the first word of "$ac_prog", so it can be a program name with args.
22742 set dummy $ac_prog; ac_word=$2
22743 echo "$as_me:$LINENO: checking for $ac_word" >&5
22744 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22745 if test "${ac_cv_prog_JADE+set}" = set; then
22746   echo $ECHO_N "(cached) $ECHO_C" >&6
22747 else
22748   if test -n "$JADE"; then
22749   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22750 else
22751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22752 for as_dir in $PATH
22753 do
22754   IFS=$as_save_IFS
22755   test -z "$as_dir" && as_dir=.
22756   for ac_exec_ext in '' $ac_executable_extensions; do
22757   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22758     ac_cv_prog_JADE="$ac_prog"
22759     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22760     break 2
22761   fi
22762 done
22763 done
22764
22765 fi
22766 fi
22767 JADE=$ac_cv_prog_JADE
22768 if test -n "$JADE"; then
22769   echo "$as_me:$LINENO: result: $JADE" >&5
22770 echo "${ECHO_T}$JADE" >&6
22771 else
22772   echo "$as_me:$LINENO: result: no" >&5
22773 echo "${ECHO_T}no" >&6
22774 fi
22775
22776   test -n "$JADE" && break
22777 done
22778
22779
22780 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22781 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22782 if test "${pgac_cv_check_docbook+set}" = set; then
22783   echo $ECHO_N "(cached) $ECHO_C" >&6
22784 else
22785   cat >conftest.sgml <<EOF
22786 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22787 <book>
22788  <title>test</title>
22789  <chapter>
22790   <title>random</title>
22791    <sect1>
22792     <title>testsect</title>
22793     <para>text</para>
22794   </sect1>
22795  </chapter>
22796 </book>
22797 EOF
22798
22799 pgac_cv_check_docbook=no
22800
22801 if test -n "$NSGMLS"; then
22802   $NSGMLS -s conftest.sgml 1>&5 2>&1
22803   if test $? -eq 0; then
22804     pgac_cv_check_docbook=yes
22805   fi
22806 fi
22807 rm -f conftest.sgml
22808 fi
22809 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22810 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22811
22812 have_docbook=$pgac_cv_check_docbook
22813
22814
22815 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22816 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22817 if test "${pgac_cv_path_stylesheets+set}" = set; then
22818   echo $ECHO_N "(cached) $ECHO_C" >&6
22819 else
22820   if test -n "$DOCBOOKSTYLE"; then
22821   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22822 else
22823   for pgac_prefix in /usr /usr/local /opt; do
22824     for pgac_infix in share lib; do
22825       for pgac_postfix in \
22826         sgml/stylesheets/nwalsh-modular \
22827         sgml/stylesheets/docbook \
22828                 sgml/docbook-dsssl \
22829         sgml/docbook/dsssl/modular \
22830         sgml/docbook/stylesheet/dsssl/modular \
22831         sgml/docbook/dsssl-stylesheets
22832       do
22833         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22834         if test -r "$pgac_candidate/html/docbook.dsl" \
22835            && test -r "$pgac_candidate/print/docbook.dsl"
22836         then
22837           pgac_cv_path_stylesheets=$pgac_candidate
22838           break 3
22839         fi
22840       done
22841     done
22842   done
22843 fi
22844 fi
22845
22846 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22847
22848 if test -n "$DOCBOOKSTYLE"; then
22849   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22850 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22851 else
22852   echo "$as_me:$LINENO: result: no" >&5
22853 echo "${ECHO_T}no" >&6
22854 fi
22855 if test -n "$DOCBOOKSTYLE"; then
22856   for ac_prog in collateindex.pl
22857 do
22858   # Extract the first word of "$ac_prog", so it can be a program name with args.
22859 set dummy $ac_prog; ac_word=$2
22860 echo "$as_me:$LINENO: checking for $ac_word" >&5
22861 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22862 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22863   echo $ECHO_N "(cached) $ECHO_C" >&6
22864 else
22865   case $COLLATEINDEX in
22866   [\\/]* | ?:[\\/]*)
22867   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22868   ;;
22869   *)
22870   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22871 for as_dir in $DOCBOOKSTYLE/bin $PATH
22872 do
22873   IFS=$as_save_IFS
22874   test -z "$as_dir" && as_dir=.
22875   for ac_exec_ext in '' $ac_executable_extensions; do
22876   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22877     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22878     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22879     break 2
22880   fi
22881 done
22882 done
22883
22884   ;;
22885 esac
22886 fi
22887 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22888
22889 if test -n "$COLLATEINDEX"; then
22890   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22891 echo "${ECHO_T}$COLLATEINDEX" >&6
22892 else
22893   echo "$as_me:$LINENO: result: no" >&5
22894 echo "${ECHO_T}no" >&6
22895 fi
22896
22897   test -n "$COLLATEINDEX" && break
22898 done
22899
22900 else
22901   for ac_prog in collateindex.pl
22902 do
22903   # Extract the first word of "$ac_prog", so it can be a program name with args.
22904 set dummy $ac_prog; ac_word=$2
22905 echo "$as_me:$LINENO: checking for $ac_word" >&5
22906 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22907 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22908   echo $ECHO_N "(cached) $ECHO_C" >&6
22909 else
22910   case $COLLATEINDEX in
22911   [\\/]* | ?:[\\/]*)
22912   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22913   ;;
22914   *)
22915   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22916 for as_dir in $PATH
22917 do
22918   IFS=$as_save_IFS
22919   test -z "$as_dir" && as_dir=.
22920   for ac_exec_ext in '' $ac_executable_extensions; do
22921   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22922     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22923     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22924     break 2
22925   fi
22926 done
22927 done
22928
22929   ;;
22930 esac
22931 fi
22932 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22933
22934 if test -n "$COLLATEINDEX"; then
22935   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22936 echo "${ECHO_T}$COLLATEINDEX" >&6
22937 else
22938   echo "$as_me:$LINENO: result: no" >&5
22939 echo "${ECHO_T}no" >&6
22940 fi
22941
22942   test -n "$COLLATEINDEX" && break
22943 done
22944
22945 fi
22946 for ac_prog in sgmlspl
22947 do
22948   # Extract the first word of "$ac_prog", so it can be a program name with args.
22949 set dummy $ac_prog; ac_word=$2
22950 echo "$as_me:$LINENO: checking for $ac_word" >&5
22951 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22952 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
22953   echo $ECHO_N "(cached) $ECHO_C" >&6
22954 else
22955   if test -n "$SGMLSPL"; then
22956   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
22957 else
22958 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22959 for as_dir in $PATH
22960 do
22961   IFS=$as_save_IFS
22962   test -z "$as_dir" && as_dir=.
22963   for ac_exec_ext in '' $ac_executable_extensions; do
22964   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22965     ac_cv_prog_SGMLSPL="$ac_prog"
22966     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22967     break 2
22968   fi
22969 done
22970 done
22971
22972 fi
22973 fi
22974 SGMLSPL=$ac_cv_prog_SGMLSPL
22975 if test -n "$SGMLSPL"; then
22976   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22977 echo "${ECHO_T}$SGMLSPL" >&6
22978 else
22979   echo "$as_me:$LINENO: result: no" >&5
22980 echo "${ECHO_T}no" >&6
22981 fi
22982
22983   test -n "$SGMLSPL" && break
22984 done
22985
22986
22987 # Thread testing
22988
22989 # We have to run the thread test near the end so we have all our symbols
22990 # defined.  Cross compiling throws a warning.
22991 #
22992 if test "$enable_thread_safety_force" = yes; then
22993 if test x"$template" != x"win32"
22994 then
22995   { echo "$as_me:$LINENO: WARNING:
22996 *** Skipping thread test program.  --enable-thread-safety-force was used.
22997 *** Run the program in src/test/thread on the your machine and add proper
22998 *** locking function calls to your applications to guarantee thread safety.
22999 " >&5
23000 echo "$as_me: WARNING:
23001 *** Skipping thread test program.  --enable-thread-safety-force was used.
23002 *** Run the program in src/test/thread on the your machine and add proper
23003 *** locking function calls to your applications to guarantee thread safety.
23004 " >&2;}
23005 else
23006 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
23007 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
23008 fi
23009 elif test "$enable_thread_safety" = yes; then
23010 if test x"$template" != x"win32"
23011 then
23012 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
23013 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
23014
23015 _CFLAGS="$CFLAGS"
23016 _LIBS="$LIBS"
23017 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
23018 LIBS="$LIBS $PTHREAD_LIBS"
23019 if test "$cross_compiling" = yes; then
23020   echo "$as_me:$LINENO: result: maybe" >&5
23021 echo "${ECHO_T}maybe" >&6
23022   { echo "$as_me:$LINENO: WARNING:
23023 *** Skipping thread test program because of cross-compile build.
23024 *** Run the program in src/test/thread on the target machine.
23025 " >&5
23026 echo "$as_me: WARNING:
23027 *** Skipping thread test program because of cross-compile build.
23028 *** Run the program in src/test/thread on the target machine.
23029 " >&2;}
23030 else
23031   cat >conftest.$ac_ext <<_ACEOF
23032 /* confdefs.h.  */
23033 _ACEOF
23034 cat confdefs.h >>conftest.$ac_ext
23035 cat >>conftest.$ac_ext <<_ACEOF
23036 /* end confdefs.h.  */
23037 #include "$srcdir/src/test/thread/thread_test.c"
23038 _ACEOF
23039 rm -f conftest$ac_exeext
23040 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23041   (eval $ac_link) 2>&5
23042   ac_status=$?
23043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23044   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23046   (eval $ac_try) 2>&5
23047   ac_status=$?
23048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23049   (exit $ac_status); }; }; then
23050   echo "$as_me:$LINENO: result: yes" >&5
23051 echo "${ECHO_T}yes" >&6
23052 else
23053   echo "$as_me: program exited with status $ac_status" >&5
23054 echo "$as_me: failed program was:" >&5
23055 sed 's/^/| /' conftest.$ac_ext >&5
23056
23057 ( exit $ac_status )
23058 echo "$as_me:$LINENO: result: no" >&5
23059 echo "${ECHO_T}no" >&6
23060   { { echo "$as_me:$LINENO: error: thread test program failed
23061 This platform is not thread-safe.  Check the file 'config.log'for the
23062 exact reason.
23063
23064 You can use the configure option --enable-thread-safety-force to force
23065 threads to be enabled.  But you must then run the program in
23066 src/test/thread and add locking function calls to your applications to
23067 guarantee thread safety." >&5
23068 echo "$as_me: error: thread test program failed
23069 This platform is not thread-safe.  Check the file 'config.log'for the
23070 exact reason.
23071
23072 You can use the configure option --enable-thread-safety-force to force
23073 threads to be enabled.  But you must then run the program in
23074 src/test/thread and add locking function calls to your applications to
23075 guarantee thread safety." >&2;}
23076    { (exit 1); exit 1; }; }
23077 fi
23078 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23079 fi
23080 CFLAGS="$_CFLAGS"
23081 LIBS="$_LIBS"
23082 else
23083 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
23084 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
23085 fi
23086 fi
23087
23088 # prepare build tree if outside source tree
23089 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
23090 # Note 2: /bin/pwd might be better than shell's built-in at getting
23091 #         a symlink-free name.
23092 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
23093   vpath_build=no
23094 else
23095   vpath_build=yes
23096   if test "$no_create" != yes; then
23097     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
23098     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
23099     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
23100       || { { echo "$as_me:$LINENO: error: failed" >&5
23101 echo "$as_me: error: failed" >&2;}
23102    { (exit 1); exit 1; }; }
23103     echo "$as_me:$LINENO: result: done" >&5
23104 echo "${ECHO_T}done" >&6
23105   fi
23106 fi
23107
23108
23109
23110                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
23111
23112
23113                                                             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}"
23114
23115
23116 if test "$PORTNAME" = "win32"; then
23117           ac_config_commands="$ac_config_commands check_win32_symlinks"
23118
23119 fi
23120
23121           ac_config_headers="$ac_config_headers src/include/pg_config.h"
23122
23123
23124           ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
23125
23126
23127 cat >confcache <<\_ACEOF
23128 # This file is a shell script that caches the results of configure
23129 # tests run on this system so they can be shared between configure
23130 # scripts and configure runs, see configure's option --config-cache.
23131 # It is not useful on other systems.  If it contains results you don't
23132 # want to keep, you may remove or edit it.
23133 #
23134 # config.status only pays attention to the cache file if you give it
23135 # the --recheck option to rerun configure.
23136 #
23137 # `ac_cv_env_foo' variables (set or unset) will be overridden when
23138 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23139 # following values.
23140
23141 _ACEOF
23142
23143 # The following way of writing the cache mishandles newlines in values,
23144 # but we know of no workaround that is simple, portable, and efficient.
23145 # So, don't put newlines in cache variables' values.
23146 # Ultrix sh set writes to stderr and can't be redirected directly,
23147 # and sets the high bit in the cache file unless we assign to the vars.
23148 {
23149   (set) 2>&1 |
23150     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23151     *ac_space=\ *)
23152       # `set' does not quote correctly, so add quotes (double-quote
23153       # substitution turns \\\\ into \\, and sed turns \\ into \).
23154       sed -n \
23155         "s/'/'\\\\''/g;
23156           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23157       ;;
23158     *)
23159       # `set' quotes correctly as required by POSIX, so do not add quotes.
23160       sed -n \
23161         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23162       ;;
23163     esac;
23164 } |
23165   sed '
23166      t clear
23167      : clear
23168      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23169      t end
23170      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23171      : end' >>confcache
23172 if diff $cache_file confcache >/dev/null 2>&1; then :; else
23173   if test -w $cache_file; then
23174     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23175     cat confcache >$cache_file
23176   else
23177     echo "not updating unwritable cache $cache_file"
23178   fi
23179 fi
23180 rm -f confcache
23181
23182 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23183 # Let make expand exec_prefix.
23184 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23185
23186 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23187 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23188 # trailing colons and then remove the whole line if VPATH becomes empty
23189 # (actually we leave an empty line to preserve line numbers).
23190 if test "x$srcdir" = x.; then
23191   ac_vpsub='/^[  ]*VPATH[        ]*=/{
23192 s/:*\$(srcdir):*/:/;
23193 s/:*\${srcdir}:*/:/;
23194 s/:*@srcdir@:*/:/;
23195 s/^\([^=]*=[     ]*\):*/\1/;
23196 s/:*$//;
23197 s/^[^=]*=[       ]*$//;
23198 }'
23199 fi
23200
23201 DEFS=-DHAVE_CONFIG_H
23202
23203 ac_libobjs=
23204 ac_ltlibobjs=
23205 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23206   # 1. Remove the extension, and $U if already installed.
23207   ac_i=`echo "$ac_i" |
23208          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
23209   # 2. Add them.
23210   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
23211   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
23212 done
23213 LIBOBJS=$ac_libobjs
23214
23215 LTLIBOBJS=$ac_ltlibobjs
23216
23217
23218
23219 : ${CONFIG_STATUS=./config.status}
23220 ac_clean_files_save=$ac_clean_files
23221 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23222 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23223 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23224 cat >$CONFIG_STATUS <<_ACEOF
23225 #! $SHELL
23226 # Generated by $as_me.
23227 # Run this file to recreate the current configuration.
23228 # Compiler output produced by configure, useful for debugging
23229 # configure, is in config.log if it exists.
23230
23231 debug=false
23232 ac_cs_recheck=false
23233 ac_cs_silent=false
23234 SHELL=\${CONFIG_SHELL-$SHELL}
23235 _ACEOF
23236
23237 cat >>$CONFIG_STATUS <<\_ACEOF
23238 ## --------------------- ##
23239 ## M4sh Initialization.  ##
23240 ## --------------------- ##
23241
23242 # Be Bourne compatible
23243 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23244   emulate sh
23245   NULLCMD=:
23246   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23247   # is contrary to our usage.  Disable this feature.
23248   alias -g '${1+"$@"}'='"$@"'
23249 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23250   set -o posix
23251 fi
23252 DUALCASE=1; export DUALCASE # for MKS sh
23253
23254 # Support unset when possible.
23255 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23256   as_unset=unset
23257 else
23258   as_unset=false
23259 fi
23260
23261
23262 # Work around bugs in pre-3.0 UWIN ksh.
23263 $as_unset ENV MAIL MAILPATH
23264 PS1='$ '
23265 PS2='> '
23266 PS4='+ '
23267
23268 # NLS nuisances.
23269 for as_var in \
23270   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23271   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23272   LC_TELEPHONE LC_TIME
23273 do
23274   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23275     eval $as_var=C; export $as_var
23276   else
23277     $as_unset $as_var
23278   fi
23279 done
23280
23281 # Required to use basename.
23282 if expr a : '\(a\)' >/dev/null 2>&1; then
23283   as_expr=expr
23284 else
23285   as_expr=false
23286 fi
23287
23288 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
23289   as_basename=basename
23290 else
23291   as_basename=false
23292 fi
23293
23294
23295 # Name of the executable.
23296 as_me=`$as_basename "$0" ||
23297 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23298          X"$0" : 'X\(//\)$' \| \
23299          X"$0" : 'X\(/\)$' \| \
23300          .     : '\(.\)' 2>/dev/null ||
23301 echo X/"$0" |
23302     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
23303           /^X\/\(\/\/\)$/{ s//\1/; q; }
23304           /^X\/\(\/\).*/{ s//\1/; q; }
23305           s/.*/./; q'`
23306
23307
23308 # PATH needs CR, and LINENO needs CR and PATH.
23309 # Avoid depending upon Character Ranges.
23310 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23311 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23312 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23313 as_cr_digits='0123456789'
23314 as_cr_alnum=$as_cr_Letters$as_cr_digits
23315
23316 # The user is always right.
23317 if test "${PATH_SEPARATOR+set}" != set; then
23318   echo "#! /bin/sh" >conf$$.sh
23319   echo  "exit 0"   >>conf$$.sh
23320   chmod +x conf$$.sh
23321   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23322     PATH_SEPARATOR=';'
23323   else
23324     PATH_SEPARATOR=:
23325   fi
23326   rm -f conf$$.sh
23327 fi
23328
23329
23330   as_lineno_1=$LINENO
23331   as_lineno_2=$LINENO
23332   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23333   test "x$as_lineno_1" != "x$as_lineno_2" &&
23334   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
23335   # Find who we are.  Look in the path if we contain no path at all
23336   # relative or not.
23337   case $0 in
23338     *[\\/]* ) as_myself=$0 ;;
23339     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23340 for as_dir in $PATH
23341 do
23342   IFS=$as_save_IFS
23343   test -z "$as_dir" && as_dir=.
23344   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23345 done
23346
23347        ;;
23348   esac
23349   # We did not find ourselves, most probably we were run as `sh COMMAND'
23350   # in which case we are not to be found in the path.
23351   if test "x$as_myself" = x; then
23352     as_myself=$0
23353   fi
23354   if test ! -f "$as_myself"; then
23355     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23356 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23357    { (exit 1); exit 1; }; }
23358   fi
23359   case $CONFIG_SHELL in
23360   '')
23361     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23362 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23363 do
23364   IFS=$as_save_IFS
23365   test -z "$as_dir" && as_dir=.
23366   for as_base in sh bash ksh sh5; do
23367          case $as_dir in
23368          /*)
23369            if ("$as_dir/$as_base" -c '
23370   as_lineno_1=$LINENO
23371   as_lineno_2=$LINENO
23372   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23373   test "x$as_lineno_1" != "x$as_lineno_2" &&
23374   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
23375              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23376              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
23377              CONFIG_SHELL=$as_dir/$as_base
23378              export CONFIG_SHELL
23379              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23380            fi;;
23381          esac
23382        done
23383 done
23384 ;;
23385   esac
23386
23387   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23388   # uniformly replaced by the line number.  The first 'sed' inserts a
23389   # line-number line before each line; the second 'sed' does the real
23390   # work.  The second script uses 'N' to pair each line-number line
23391   # with the numbered line, and appends trailing '-' during
23392   # substitution so that $LINENO is not a special case at line end.
23393   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23394   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
23395   sed '=' <$as_myself |
23396     sed '
23397       N
23398       s,$,-,
23399       : loop
23400       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23401       t loop
23402       s,-$,,
23403       s,^['$as_cr_digits']*\n,,
23404     ' >$as_me.lineno &&
23405   chmod +x $as_me.lineno ||
23406     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23407 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23408    { (exit 1); exit 1; }; }
23409
23410   # Don't try to exec as it changes $[0], causing all sort of problems
23411   # (the dirname of $[0] is not the place where we might find the
23412   # original and so on.  Autoconf is especially sensible to this).
23413   . ./$as_me.lineno
23414   # Exit status is that of the last command.
23415   exit
23416 }
23417
23418
23419 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23420   *c*,-n*) ECHO_N= ECHO_C='
23421 ' ECHO_T='      ' ;;
23422   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23423   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
23424 esac
23425
23426 if expr a : '\(a\)' >/dev/null 2>&1; then
23427   as_expr=expr
23428 else
23429   as_expr=false
23430 fi
23431
23432 rm -f conf$$ conf$$.exe conf$$.file
23433 echo >conf$$.file
23434 if ln -s conf$$.file conf$$ 2>/dev/null; then
23435   # We could just check for DJGPP; but this test a) works b) is more generic
23436   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23437   if test -f conf$$.exe; then
23438     # Don't use ln at all; we don't have any links
23439     as_ln_s='cp -p'
23440   else
23441     as_ln_s='ln -s'
23442   fi
23443 elif ln conf$$.file conf$$ 2>/dev/null; then
23444   as_ln_s=ln
23445 else
23446   as_ln_s='cp -p'
23447 fi
23448 rm -f conf$$ conf$$.exe conf$$.file
23449
23450 if mkdir -p . 2>/dev/null; then
23451   as_mkdir_p=:
23452 else
23453   test -d ./-p && rmdir ./-p
23454   as_mkdir_p=false
23455 fi
23456
23457 as_executable_p="test -f"
23458
23459 # Sed expression to map a string onto a valid CPP name.
23460 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
23461
23462 # Sed expression to map a string onto a valid variable name.
23463 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
23464
23465
23466 # IFS
23467 # We need space, tab and new line, in precisely that order.
23468 as_nl='
23469 '
23470 IFS="   $as_nl"
23471
23472 # CDPATH.
23473 $as_unset CDPATH
23474
23475 exec 6>&1
23476
23477 # Open the log real soon, to keep \$[0] and so on meaningful, and to
23478 # report actual input values of CONFIG_FILES etc. instead of their
23479 # values after options handling.  Logging --version etc. is OK.
23480 exec 5>>config.log
23481 {
23482   echo
23483   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23484 ## Running $as_me. ##
23485 _ASBOX
23486 } >&5
23487 cat >&5 <<_CSEOF
23488
23489 This file was extended by PostgreSQL $as_me 8.3devel, which was
23490 generated by GNU Autoconf 2.59.  Invocation command line was
23491
23492   CONFIG_FILES    = $CONFIG_FILES
23493   CONFIG_HEADERS  = $CONFIG_HEADERS
23494   CONFIG_LINKS    = $CONFIG_LINKS
23495   CONFIG_COMMANDS = $CONFIG_COMMANDS
23496   $ $0 $@
23497
23498 _CSEOF
23499 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23500 echo >&5
23501 _ACEOF
23502
23503 # Files that config.status was made for.
23504 if test -n "$ac_config_files"; then
23505   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23506 fi
23507
23508 if test -n "$ac_config_headers"; then
23509   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23510 fi
23511
23512 if test -n "$ac_config_links"; then
23513   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23514 fi
23515
23516 if test -n "$ac_config_commands"; then
23517   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23518 fi
23519
23520 cat >>$CONFIG_STATUS <<\_ACEOF
23521
23522 ac_cs_usage="\
23523 \`$as_me' instantiates files from templates according to the
23524 current configuration.
23525
23526 Usage: $0 [OPTIONS] [FILE]...
23527
23528   -h, --help       print this help, then exit
23529   -V, --version    print version number, then exit
23530   -q, --quiet      do not print progress messages
23531   -d, --debug      don't remove temporary files
23532       --recheck    update $as_me by reconfiguring in the same conditions
23533   --file=FILE[:TEMPLATE]
23534                    instantiate the configuration file FILE
23535   --header=FILE[:TEMPLATE]
23536                    instantiate the configuration header FILE
23537
23538 Configuration files:
23539 $config_files
23540
23541 Configuration headers:
23542 $config_headers
23543
23544 Configuration links:
23545 $config_links
23546
23547 Configuration commands:
23548 $config_commands
23549
23550 Report bugs to <bug-autoconf@gnu.org>."
23551 _ACEOF
23552
23553 cat >>$CONFIG_STATUS <<_ACEOF
23554 ac_cs_version="\\
23555 PostgreSQL config.status 8.3devel
23556 configured by $0, generated by GNU Autoconf 2.59,
23557   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23558
23559 Copyright (C) 2003 Free Software Foundation, Inc.
23560 This config.status script is free software; the Free Software Foundation
23561 gives unlimited permission to copy, distribute and modify it."
23562 srcdir=$srcdir
23563 _ACEOF
23564
23565 cat >>$CONFIG_STATUS <<\_ACEOF
23566 # If no file are specified by the user, then we need to provide default
23567 # value.  By we need to know if files were specified by the user.
23568 ac_need_defaults=:
23569 while test $# != 0
23570 do
23571   case $1 in
23572   --*=*)
23573     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23574     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23575     ac_shift=:
23576     ;;
23577   -*)
23578     ac_option=$1
23579     ac_optarg=$2
23580     ac_shift=shift
23581     ;;
23582   *) # This is not an option, so the user has probably given explicit
23583      # arguments.
23584      ac_option=$1
23585      ac_need_defaults=false;;
23586   esac
23587
23588   case $ac_option in
23589   # Handling of the options.
23590 _ACEOF
23591 cat >>$CONFIG_STATUS <<\_ACEOF
23592   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23593     ac_cs_recheck=: ;;
23594   --version | --vers* | -V )
23595     echo "$ac_cs_version"; exit 0 ;;
23596   --he | --h)
23597     # Conflict between --help and --header
23598     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23599 Try \`$0 --help' for more information." >&5
23600 echo "$as_me: error: ambiguous option: $1
23601 Try \`$0 --help' for more information." >&2;}
23602    { (exit 1); exit 1; }; };;
23603   --help | --hel | -h )
23604     echo "$ac_cs_usage"; exit 0 ;;
23605   --debug | --d* | -d )
23606     debug=: ;;
23607   --file | --fil | --fi | --f )
23608     $ac_shift
23609     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23610     ac_need_defaults=false;;
23611   --header | --heade | --head | --hea )
23612     $ac_shift
23613     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23614     ac_need_defaults=false;;
23615   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23616   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23617     ac_cs_silent=: ;;
23618
23619   # This is an error.
23620   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23621 Try \`$0 --help' for more information." >&5
23622 echo "$as_me: error: unrecognized option: $1
23623 Try \`$0 --help' for more information." >&2;}
23624    { (exit 1); exit 1; }; } ;;
23625
23626   *) ac_config_targets="$ac_config_targets $1" ;;
23627
23628   esac
23629   shift
23630 done
23631
23632 ac_configure_extra_args=
23633
23634 if $ac_cs_silent; then
23635   exec 6>/dev/null
23636   ac_configure_extra_args="$ac_configure_extra_args --silent"
23637 fi
23638
23639 _ACEOF
23640 cat >>$CONFIG_STATUS <<_ACEOF
23641 if \$ac_cs_recheck; then
23642   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23643   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23644 fi
23645
23646 _ACEOF
23647
23648
23649
23650
23651
23652 cat >>$CONFIG_STATUS <<\_ACEOF
23653 for ac_config_target in $ac_config_targets
23654 do
23655   case "$ac_config_target" in
23656   # Handling of arguments.
23657   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23658   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23659   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23660   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23661   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23662   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23663   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23664   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23665   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23666   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23667   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23668   "src/interfaces/ecpg/include/ecpg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
23669   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23670 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23671    { (exit 1); exit 1; }; };;
23672   esac
23673 done
23674
23675 # If the user did not use the arguments to specify the items to instantiate,
23676 # then the envvar interface is used.  Set only those that are not.
23677 # We use the long form for the default assignment because of an extremely
23678 # bizarre bug on SunOS 4.1.3.
23679 if $ac_need_defaults; then
23680   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23681   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23682   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23683   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23684 fi
23685
23686 # Have a temporary directory for convenience.  Make it in the build tree
23687 # simply because there is no reason to put it here, and in addition,
23688 # creating and moving files from /tmp can sometimes cause problems.
23689 # Create a temporary directory, and hook for its removal unless debugging.
23690 $debug ||
23691 {
23692   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23693   trap '{ (exit 1); exit 1; }' 1 2 13 15
23694 }
23695
23696 # Create a (secure) tmp directory for tmp files.
23697
23698 {
23699   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23700   test -n "$tmp" && test -d "$tmp"
23701 }  ||
23702 {
23703   tmp=./confstat$$-$RANDOM
23704   (umask 077 && mkdir $tmp)
23705 } ||
23706 {
23707    echo "$me: cannot create a temporary directory in ." >&2
23708    { (exit 1); exit 1; }
23709 }
23710
23711 _ACEOF
23712
23713 cat >>$CONFIG_STATUS <<_ACEOF
23714
23715 #
23716 # CONFIG_FILES section.
23717 #
23718
23719 # No need to generate the scripts if there are no CONFIG_FILES.
23720 # This happens for instance when ./config.status config.h
23721 if test -n "\$CONFIG_FILES"; then
23722   # Protect against being on the right side of a sed subst in config.status.
23723   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23724    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23725 s,@SHELL@,$SHELL,;t t
23726 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23727 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23728 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23729 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23730 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23731 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23732 s,@exec_prefix@,$exec_prefix,;t t
23733 s,@prefix@,$prefix,;t t
23734 s,@program_transform_name@,$program_transform_name,;t t
23735 s,@bindir@,$bindir,;t t
23736 s,@sbindir@,$sbindir,;t t
23737 s,@libexecdir@,$libexecdir,;t t
23738 s,@datadir@,$datadir,;t t
23739 s,@sysconfdir@,$sysconfdir,;t t
23740 s,@sharedstatedir@,$sharedstatedir,;t t
23741 s,@localstatedir@,$localstatedir,;t t
23742 s,@libdir@,$libdir,;t t
23743 s,@includedir@,$includedir,;t t
23744 s,@oldincludedir@,$oldincludedir,;t t
23745 s,@infodir@,$infodir,;t t
23746 s,@mandir@,$mandir,;t t
23747 s,@build_alias@,$build_alias,;t t
23748 s,@host_alias@,$host_alias,;t t
23749 s,@target_alias@,$target_alias,;t t
23750 s,@DEFS@,$DEFS,;t t
23751 s,@ECHO_C@,$ECHO_C,;t t
23752 s,@ECHO_N@,$ECHO_N,;t t
23753 s,@ECHO_T@,$ECHO_T,;t t
23754 s,@LIBS@,$LIBS,;t t
23755 s,@configure_args@,$configure_args,;t t
23756 s,@build@,$build,;t t
23757 s,@build_cpu@,$build_cpu,;t t
23758 s,@build_vendor@,$build_vendor,;t t
23759 s,@build_os@,$build_os,;t t
23760 s,@host@,$host,;t t
23761 s,@host_cpu@,$host_cpu,;t t
23762 s,@host_vendor@,$host_vendor,;t t
23763 s,@host_os@,$host_os,;t t
23764 s,@PORTNAME@,$PORTNAME,;t t
23765 s,@docdir@,$docdir,;t t
23766 s,@enable_nls@,$enable_nls,;t t
23767 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23768 s,@default_port@,$default_port,;t t
23769 s,@enable_shared@,$enable_shared,;t t
23770 s,@enable_rpath@,$enable_rpath,;t t
23771 s,@enable_debug@,$enable_debug,;t t
23772 s,@DTRACE@,$DTRACE,;t t
23773 s,@DTRACEFLAGS@,$DTRACEFLAGS,;t t
23774 s,@enable_dtrace@,$enable_dtrace,;t t
23775 s,@CC@,$CC,;t t
23776 s,@CFLAGS@,$CFLAGS,;t t
23777 s,@LDFLAGS@,$LDFLAGS,;t t
23778 s,@CPPFLAGS@,$CPPFLAGS,;t t
23779 s,@ac_ct_CC@,$ac_ct_CC,;t t
23780 s,@EXEEXT@,$EXEEXT,;t t
23781 s,@OBJEXT@,$OBJEXT,;t t
23782 s,@CPP@,$CPP,;t t
23783 s,@GCC@,$GCC,;t t
23784 s,@TAS@,$TAS,;t t
23785 s,@autodepend@,$autodepend,;t t
23786 s,@INCLUDES@,$INCLUDES,;t t
23787 s,@enable_thread_safety@,$enable_thread_safety,;t t
23788 s,@with_tcl@,$with_tcl,;t t
23789 s,@with_perl@,$with_perl,;t t
23790 s,@with_python@,$with_python,;t t
23791 s,@with_krb5@,$with_krb5,;t t
23792 s,@krb_srvtab@,$krb_srvtab,;t t
23793 s,@with_pam@,$with_pam,;t t
23794 s,@with_ldap@,$with_ldap,;t t
23795 s,@with_bonjour@,$with_bonjour,;t t
23796 s,@with_openssl@,$with_openssl,;t t
23797 s,@with_zlib@,$with_zlib,;t t
23798 s,@EGREP@,$EGREP,;t t
23799 s,@ELF_SYS@,$ELF_SYS,;t t
23800 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23801 s,@AWK@,$AWK,;t t
23802 s,@FLEX@,$FLEX,;t t
23803 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23804 s,@LN_S@,$LN_S,;t t
23805 s,@LD@,$LD,;t t
23806 s,@with_gnu_ld@,$with_gnu_ld,;t t
23807 s,@ld_R_works@,$ld_R_works,;t t
23808 s,@RANLIB@,$RANLIB,;t t
23809 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23810 s,@TAR@,$TAR,;t t
23811 s,@STRIP@,$STRIP,;t t
23812 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23813 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23814 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23815 s,@YACC@,$YACC,;t t
23816 s,@YFLAGS@,$YFLAGS,;t t
23817 s,@PERL@,$PERL,;t t
23818 s,@perl_archlibexp@,$perl_archlibexp,;t t
23819 s,@perl_privlibexp@,$perl_privlibexp,;t t
23820 s,@perl_useshrplib@,$perl_useshrplib,;t t
23821 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23822 s,@PYTHON@,$PYTHON,;t t
23823 s,@python_version@,$python_version,;t t
23824 s,@python_configdir@,$python_configdir,;t t
23825 s,@python_includespec@,$python_includespec,;t t
23826 s,@python_libdir@,$python_libdir,;t t
23827 s,@python_libspec@,$python_libspec,;t t
23828 s,@python_additional_libs@,$python_additional_libs,;t t
23829 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23830 s,@LIBOBJS@,$LIBOBJS,;t t
23831 s,@acx_pthread_config@,$acx_pthread_config,;t t
23832 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23833 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23834 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23835 s,@LDAP_LIBS_FE@,$LDAP_LIBS_FE,;t t
23836 s,@LDAP_LIBS_BE@,$LDAP_LIBS_BE,;t t
23837 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23838 s,@MSGFMT@,$MSGFMT,;t t
23839 s,@MSGMERGE@,$MSGMERGE,;t t
23840 s,@XGETTEXT@,$XGETTEXT,;t t
23841 s,@localedir@,$localedir,;t t
23842 s,@TCLSH@,$TCLSH,;t t
23843 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23844 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23845 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23846 s,@TCL_LIBS@,$TCL_LIBS,;t t
23847 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23848 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23849 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23850 s,@NSGMLS@,$NSGMLS,;t t
23851 s,@JADE@,$JADE,;t t
23852 s,@have_docbook@,$have_docbook,;t t
23853 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23854 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23855 s,@SGMLSPL@,$SGMLSPL,;t t
23856 s,@vpath_build@,$vpath_build,;t t
23857 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23858 CEOF
23859
23860 _ACEOF
23861
23862   cat >>$CONFIG_STATUS <<\_ACEOF
23863   # Split the substitutions into bite-sized pieces for seds with
23864   # small command number limits, like on Digital OSF/1 and HP-UX.
23865   ac_max_sed_lines=48
23866   ac_sed_frag=1 # Number of current file.
23867   ac_beg=1 # First line for current file.
23868   ac_end=$ac_max_sed_lines # Line after last line for current file.
23869   ac_more_lines=:
23870   ac_sed_cmds=
23871   while $ac_more_lines; do
23872     if test $ac_beg -gt 1; then
23873       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23874     else
23875       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23876     fi
23877     if test ! -s $tmp/subs.frag; then
23878       ac_more_lines=false
23879     else
23880       # The purpose of the label and of the branching condition is to
23881       # speed up the sed processing (if there are no `@' at all, there
23882       # is no need to browse any of the substitutions).
23883       # These are the two extra sed commands mentioned above.
23884       (echo ':t
23885   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23886       if test -z "$ac_sed_cmds"; then
23887         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23888       else
23889         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23890       fi
23891       ac_sed_frag=`expr $ac_sed_frag + 1`
23892       ac_beg=$ac_end
23893       ac_end=`expr $ac_end + $ac_max_sed_lines`
23894     fi
23895   done
23896   if test -z "$ac_sed_cmds"; then
23897     ac_sed_cmds=cat
23898   fi
23899 fi # test -n "$CONFIG_FILES"
23900
23901 _ACEOF
23902 cat >>$CONFIG_STATUS <<\_ACEOF
23903 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23904   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23905   case $ac_file in
23906   - | *:- | *:-:* ) # input from stdin
23907         cat >$tmp/stdin
23908         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23909         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23910   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23911         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23912   * )   ac_file_in=$ac_file.in ;;
23913   esac
23914
23915   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23916   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23917 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23918          X"$ac_file" : 'X\(//\)[^/]' \| \
23919          X"$ac_file" : 'X\(//\)$' \| \
23920          X"$ac_file" : 'X\(/\)' \| \
23921          .     : '\(.\)' 2>/dev/null ||
23922 echo X"$ac_file" |
23923     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23924           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23925           /^X\(\/\/\)$/{ s//\1/; q; }
23926           /^X\(\/\).*/{ s//\1/; q; }
23927           s/.*/./; q'`
23928   { if $as_mkdir_p; then
23929     mkdir -p "$ac_dir"
23930   else
23931     as_dir="$ac_dir"
23932     as_dirs=
23933     while test ! -d "$as_dir"; do
23934       as_dirs="$as_dir $as_dirs"
23935       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23936 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23937          X"$as_dir" : 'X\(//\)[^/]' \| \
23938          X"$as_dir" : 'X\(//\)$' \| \
23939          X"$as_dir" : 'X\(/\)' \| \
23940          .     : '\(.\)' 2>/dev/null ||
23941 echo X"$as_dir" |
23942     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23943           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23944           /^X\(\/\/\)$/{ s//\1/; q; }
23945           /^X\(\/\).*/{ s//\1/; q; }
23946           s/.*/./; q'`
23947     done
23948     test ! -n "$as_dirs" || mkdir $as_dirs
23949   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23950 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23951    { (exit 1); exit 1; }; }; }
23952
23953   ac_builddir=.
23954
23955 if test "$ac_dir" != .; then
23956   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23957   # A "../" for each directory in $ac_dir_suffix.
23958   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23959 else
23960   ac_dir_suffix= ac_top_builddir=
23961 fi
23962
23963 case $srcdir in
23964   .)  # No --srcdir option.  We are building in place.
23965     ac_srcdir=.
23966     if test -z "$ac_top_builddir"; then
23967        ac_top_srcdir=.
23968     else
23969        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23970     fi ;;
23971   [\\/]* | ?:[\\/]* )  # Absolute path.
23972     ac_srcdir=$srcdir$ac_dir_suffix;
23973     ac_top_srcdir=$srcdir ;;
23974   *) # Relative path.
23975     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23976     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23977 esac
23978
23979 # Do not use `cd foo && pwd` to compute absolute paths, because
23980 # the directories may not exist.
23981 case `pwd` in
23982 .) ac_abs_builddir="$ac_dir";;
23983 *)
23984   case "$ac_dir" in
23985   .) ac_abs_builddir=`pwd`;;
23986   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23987   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23988   esac;;
23989 esac
23990 case $ac_abs_builddir in
23991 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23992 *)
23993   case ${ac_top_builddir}. in
23994   .) ac_abs_top_builddir=$ac_abs_builddir;;
23995   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23996   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23997   esac;;
23998 esac
23999 case $ac_abs_builddir in
24000 .) ac_abs_srcdir=$ac_srcdir;;
24001 *)
24002   case $ac_srcdir in
24003   .) ac_abs_srcdir=$ac_abs_builddir;;
24004   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24005   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24006   esac;;
24007 esac
24008 case $ac_abs_builddir in
24009 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24010 *)
24011   case $ac_top_srcdir in
24012   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24013   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24014   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24015   esac;;
24016 esac
24017
24018
24019
24020   if test x"$ac_file" != x-; then
24021     { echo "$as_me:$LINENO: creating $ac_file" >&5
24022 echo "$as_me: creating $ac_file" >&6;}
24023     rm -f "$ac_file"
24024   fi
24025   # Let's still pretend it is `configure' which instantiates (i.e., don't
24026   # use $as_me), people would be surprised to read:
24027   #    /* config.h.  Generated by config.status.  */
24028   if test x"$ac_file" = x-; then
24029     configure_input=
24030   else
24031     configure_input="$ac_file.  "
24032   fi
24033   configure_input=$configure_input"Generated from `echo $ac_file_in |
24034                                      sed 's,.*/,,'` by configure."
24035
24036   # First look for the input files in the build tree, otherwise in the
24037   # src tree.
24038   ac_file_inputs=`IFS=:
24039     for f in $ac_file_in; do
24040       case $f in
24041       -) echo $tmp/stdin ;;
24042       [\\/$]*)
24043          # Absolute (can't be DOS-style, as IFS=:)
24044          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24045 echo "$as_me: error: cannot find input file: $f" >&2;}
24046    { (exit 1); exit 1; }; }
24047          echo "$f";;
24048       *) # Relative
24049          if test -f "$f"; then
24050            # Build tree
24051            echo "$f"
24052          elif test -f "$srcdir/$f"; then
24053            # Source tree
24054            echo "$srcdir/$f"
24055          else
24056            # /dev/null tree
24057            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24058 echo "$as_me: error: cannot find input file: $f" >&2;}
24059    { (exit 1); exit 1; }; }
24060          fi;;
24061       esac
24062     done` || { (exit 1); exit 1; }
24063 _ACEOF
24064 cat >>$CONFIG_STATUS <<_ACEOF
24065   sed "$ac_vpsub
24066 $extrasub
24067 _ACEOF
24068 cat >>$CONFIG_STATUS <<\_ACEOF
24069 :t
24070 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24071 s,@configure_input@,$configure_input,;t t
24072 s,@srcdir@,$ac_srcdir,;t t
24073 s,@abs_srcdir@,$ac_abs_srcdir,;t t
24074 s,@top_srcdir@,$ac_top_srcdir,;t t
24075 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
24076 s,@builddir@,$ac_builddir,;t t
24077 s,@abs_builddir@,$ac_abs_builddir,;t t
24078 s,@top_builddir@,$ac_top_builddir,;t t
24079 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
24080 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24081   rm -f $tmp/stdin
24082   if test x"$ac_file" != x-; then
24083     mv $tmp/out $ac_file
24084   else
24085     cat $tmp/out
24086     rm -f $tmp/out
24087   fi
24088
24089 done
24090 _ACEOF
24091 cat >>$CONFIG_STATUS <<\_ACEOF
24092
24093 #
24094 # CONFIG_HEADER section.
24095 #
24096
24097 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24098 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24099 #
24100 # ac_d sets the value in "#define NAME VALUE" lines.
24101 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
24102 ac_dB='[         ].*$,\1#\2'
24103 ac_dC=' '
24104 ac_dD=',;t'
24105 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24106 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24107 ac_uB='$,\1#\2define\3'
24108 ac_uC=' '
24109 ac_uD=',;t'
24110
24111 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24112   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24113   case $ac_file in
24114   - | *:- | *:-:* ) # input from stdin
24115         cat >$tmp/stdin
24116         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24117         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24118   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24119         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24120   * )   ac_file_in=$ac_file.in ;;
24121   esac
24122
24123   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
24124 echo "$as_me: creating $ac_file" >&6;}
24125
24126   # First look for the input files in the build tree, otherwise in the
24127   # src tree.
24128   ac_file_inputs=`IFS=:
24129     for f in $ac_file_in; do
24130       case $f in
24131       -) echo $tmp/stdin ;;
24132       [\\/$]*)
24133          # Absolute (can't be DOS-style, as IFS=:)
24134          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24135 echo "$as_me: error: cannot find input file: $f" >&2;}
24136    { (exit 1); exit 1; }; }
24137          # Do quote $f, to prevent DOS paths from being IFS'd.
24138          echo "$f";;
24139       *) # Relative
24140          if test -f "$f"; then
24141            # Build tree
24142            echo "$f"
24143          elif test -f "$srcdir/$f"; then
24144            # Source tree
24145            echo "$srcdir/$f"
24146          else
24147            # /dev/null tree
24148            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24149 echo "$as_me: error: cannot find input file: $f" >&2;}
24150    { (exit 1); exit 1; }; }
24151          fi;;
24152       esac
24153     done` || { (exit 1); exit 1; }
24154   # Remove the trailing spaces.
24155   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
24156
24157 _ACEOF
24158
24159 # Transform confdefs.h into two sed scripts, `conftest.defines' and
24160 # `conftest.undefs', that substitutes the proper values into
24161 # config.h.in to produce config.h.  The first handles `#define'
24162 # templates, and the second `#undef' templates.
24163 # And first: Protect against being on the right side of a sed subst in
24164 # config.status.  Protect against being in an unquoted here document
24165 # in config.status.
24166 rm -f conftest.defines conftest.undefs
24167 # Using a here document instead of a string reduces the quoting nightmare.
24168 # Putting comments in sed scripts is not portable.
24169 #
24170 # `end' is used to avoid that the second main sed command (meant for
24171 # 0-ary CPP macros) applies to n-ary macro definitions.
24172 # See the Autoconf documentation for `clear'.
24173 cat >confdef2sed.sed <<\_ACEOF
24174 s/[\\&,]/\\&/g
24175 s,[\\$`],\\&,g
24176 t clear
24177 : clear
24178 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
24179 t end
24180 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
24181 : end
24182 _ACEOF
24183 # If some macros were called several times there might be several times
24184 # the same #defines, which is useless.  Nevertheless, we may not want to
24185 # sort them, since we want the *last* AC-DEFINE to be honored.
24186 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
24187 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
24188 rm -f confdef2sed.sed
24189
24190 # This sed command replaces #undef with comments.  This is necessary, for
24191 # example, in the case of _POSIX_SOURCE, which is predefined and required
24192 # on some systems where configure will not decide to define it.
24193 cat >>conftest.undefs <<\_ACEOF
24194 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
24195 _ACEOF
24196
24197 # Break up conftest.defines because some shells have a limit on the size
24198 # of here documents, and old seds have small limits too (100 cmds).
24199 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
24200 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
24201 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
24202 echo '  :' >>$CONFIG_STATUS
24203 rm -f conftest.tail
24204 while grep . conftest.defines >/dev/null
24205 do
24206   # Write a limited-size here document to $tmp/defines.sed.
24207   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
24208   # Speed up: don't consider the non `#define' lines.
24209   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
24210   # Work around the forget-to-reset-the-flag bug.
24211   echo 't clr' >>$CONFIG_STATUS
24212   echo ': clr' >>$CONFIG_STATUS
24213   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
24214   echo 'CEOF
24215   sed -f $tmp/defines.sed $tmp/in >$tmp/out
24216   rm -f $tmp/in
24217   mv $tmp/out $tmp/in
24218 ' >>$CONFIG_STATUS
24219   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
24220   rm -f conftest.defines
24221   mv conftest.tail conftest.defines
24222 done
24223 rm -f conftest.defines
24224 echo '  fi # grep' >>$CONFIG_STATUS
24225 echo >>$CONFIG_STATUS
24226
24227 # Break up conftest.undefs because some shells have a limit on the size
24228 # of here documents, and old seds have small limits too (100 cmds).
24229 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
24230 rm -f conftest.tail
24231 while grep . conftest.undefs >/dev/null
24232 do
24233   # Write a limited-size here document to $tmp/undefs.sed.
24234   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
24235   # Speed up: don't consider the non `#undef'
24236   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
24237   # Work around the forget-to-reset-the-flag bug.
24238   echo 't clr' >>$CONFIG_STATUS
24239   echo ': clr' >>$CONFIG_STATUS
24240   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
24241   echo 'CEOF
24242   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
24243   rm -f $tmp/in
24244   mv $tmp/out $tmp/in
24245 ' >>$CONFIG_STATUS
24246   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
24247   rm -f conftest.undefs
24248   mv conftest.tail conftest.undefs
24249 done
24250 rm -f conftest.undefs
24251
24252 cat >>$CONFIG_STATUS <<\_ACEOF
24253   # Let's still pretend it is `configure' which instantiates (i.e., don't
24254   # use $as_me), people would be surprised to read:
24255   #    /* config.h.  Generated by config.status.  */
24256   if test x"$ac_file" = x-; then
24257     echo "/* Generated by configure.  */" >$tmp/config.h
24258   else
24259     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
24260   fi
24261   cat $tmp/in >>$tmp/config.h
24262   rm -f $tmp/in
24263   if test x"$ac_file" != x-; then
24264     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
24265       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
24266 echo "$as_me: $ac_file is unchanged" >&6;}
24267     else
24268       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
24269 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24270          X"$ac_file" : 'X\(//\)[^/]' \| \
24271          X"$ac_file" : 'X\(//\)$' \| \
24272          X"$ac_file" : 'X\(/\)' \| \
24273          .     : '\(.\)' 2>/dev/null ||
24274 echo X"$ac_file" |
24275     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24276           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24277           /^X\(\/\/\)$/{ s//\1/; q; }
24278           /^X\(\/\).*/{ s//\1/; q; }
24279           s/.*/./; q'`
24280       { if $as_mkdir_p; then
24281     mkdir -p "$ac_dir"
24282   else
24283     as_dir="$ac_dir"
24284     as_dirs=
24285     while test ! -d "$as_dir"; do
24286       as_dirs="$as_dir $as_dirs"
24287       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24288 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24289          X"$as_dir" : 'X\(//\)[^/]' \| \
24290          X"$as_dir" : 'X\(//\)$' \| \
24291          X"$as_dir" : 'X\(/\)' \| \
24292          .     : '\(.\)' 2>/dev/null ||
24293 echo X"$as_dir" |
24294     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24295           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24296           /^X\(\/\/\)$/{ s//\1/; q; }
24297           /^X\(\/\).*/{ s//\1/; q; }
24298           s/.*/./; q'`
24299     done
24300     test ! -n "$as_dirs" || mkdir $as_dirs
24301   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24302 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24303    { (exit 1); exit 1; }; }; }
24304
24305       rm -f $ac_file
24306       mv $tmp/config.h $ac_file
24307     fi
24308   else
24309     cat $tmp/config.h
24310     rm -f $tmp/config.h
24311   fi
24312   # Run the commands associated with the file.
24313   case $ac_file in
24314     src/include/pg_config.h )
24315 # Update timestamp for pg_config.h (see Makefile.global)
24316 echo >src/include/stamp-h
24317  ;;
24318   esac
24319 done
24320 _ACEOF
24321 cat >>$CONFIG_STATUS <<\_ACEOF
24322
24323 #
24324 # CONFIG_LINKS section.
24325 #
24326
24327 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
24328   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24329   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24330
24331   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
24332 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
24333
24334   if test ! -r $srcdir/$ac_source; then
24335     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
24336 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
24337    { (exit 1); exit 1; }; }
24338   fi
24339   rm -f $ac_dest
24340
24341   # Make relative symlinks.
24342   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
24343 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24344          X"$ac_dest" : 'X\(//\)[^/]' \| \
24345          X"$ac_dest" : 'X\(//\)$' \| \
24346          X"$ac_dest" : 'X\(/\)' \| \
24347          .     : '\(.\)' 2>/dev/null ||
24348 echo X"$ac_dest" |
24349     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24350           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24351           /^X\(\/\/\)$/{ s//\1/; q; }
24352           /^X\(\/\).*/{ s//\1/; q; }
24353           s/.*/./; q'`
24354   { if $as_mkdir_p; then
24355     mkdir -p "$ac_dest_dir"
24356   else
24357     as_dir="$ac_dest_dir"
24358     as_dirs=
24359     while test ! -d "$as_dir"; do
24360       as_dirs="$as_dir $as_dirs"
24361       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24362 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24363          X"$as_dir" : 'X\(//\)[^/]' \| \
24364          X"$as_dir" : 'X\(//\)$' \| \
24365          X"$as_dir" : 'X\(/\)' \| \
24366          .     : '\(.\)' 2>/dev/null ||
24367 echo X"$as_dir" |
24368     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24369           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24370           /^X\(\/\/\)$/{ s//\1/; q; }
24371           /^X\(\/\).*/{ s//\1/; q; }
24372           s/.*/./; q'`
24373     done
24374     test ! -n "$as_dirs" || mkdir $as_dirs
24375   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
24376 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
24377    { (exit 1); exit 1; }; }; }
24378
24379   ac_builddir=.
24380
24381 if test "$ac_dest_dir" != .; then
24382   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
24383   # A "../" for each directory in $ac_dir_suffix.
24384   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24385 else
24386   ac_dir_suffix= ac_top_builddir=
24387 fi
24388
24389 case $srcdir in
24390   .)  # No --srcdir option.  We are building in place.
24391     ac_srcdir=.
24392     if test -z "$ac_top_builddir"; then
24393        ac_top_srcdir=.
24394     else
24395        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24396     fi ;;
24397   [\\/]* | ?:[\\/]* )  # Absolute path.
24398     ac_srcdir=$srcdir$ac_dir_suffix;
24399     ac_top_srcdir=$srcdir ;;
24400   *) # Relative path.
24401     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24402     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24403 esac
24404
24405 # Do not use `cd foo && pwd` to compute absolute paths, because
24406 # the directories may not exist.
24407 case `pwd` in
24408 .) ac_abs_builddir="$ac_dest_dir";;
24409 *)
24410   case "$ac_dest_dir" in
24411   .) ac_abs_builddir=`pwd`;;
24412   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
24413   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
24414   esac;;
24415 esac
24416 case $ac_abs_builddir in
24417 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24418 *)
24419   case ${ac_top_builddir}. in
24420   .) ac_abs_top_builddir=$ac_abs_builddir;;
24421   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24422   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24423   esac;;
24424 esac
24425 case $ac_abs_builddir in
24426 .) ac_abs_srcdir=$ac_srcdir;;
24427 *)
24428   case $ac_srcdir in
24429   .) ac_abs_srcdir=$ac_abs_builddir;;
24430   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24431   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24432   esac;;
24433 esac
24434 case $ac_abs_builddir in
24435 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24436 *)
24437   case $ac_top_srcdir in
24438   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24439   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24440   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24441   esac;;
24442 esac
24443
24444
24445   case $srcdir in
24446   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
24447       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
24448   esac
24449
24450   # Try a symlink, then a hard link, then a copy.
24451   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
24452     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
24453     cp -p $srcdir/$ac_source $ac_dest ||
24454     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
24455 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
24456    { (exit 1); exit 1; }; }
24457 done
24458 _ACEOF
24459 cat >>$CONFIG_STATUS <<\_ACEOF
24460
24461 #
24462 # CONFIG_COMMANDS section.
24463 #
24464 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24465   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24466   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24467   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24468 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24469          X"$ac_dest" : 'X\(//\)[^/]' \| \
24470          X"$ac_dest" : 'X\(//\)$' \| \
24471          X"$ac_dest" : 'X\(/\)' \| \
24472          .     : '\(.\)' 2>/dev/null ||
24473 echo X"$ac_dest" |
24474     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24475           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24476           /^X\(\/\/\)$/{ s//\1/; q; }
24477           /^X\(\/\).*/{ s//\1/; q; }
24478           s/.*/./; q'`
24479   { if $as_mkdir_p; then
24480     mkdir -p "$ac_dir"
24481   else
24482     as_dir="$ac_dir"
24483     as_dirs=
24484     while test ! -d "$as_dir"; do
24485       as_dirs="$as_dir $as_dirs"
24486       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24487 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24488          X"$as_dir" : 'X\(//\)[^/]' \| \
24489          X"$as_dir" : 'X\(//\)$' \| \
24490          X"$as_dir" : 'X\(/\)' \| \
24491          .     : '\(.\)' 2>/dev/null ||
24492 echo X"$as_dir" |
24493     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24494           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24495           /^X\(\/\/\)$/{ s//\1/; q; }
24496           /^X\(\/\).*/{ s//\1/; q; }
24497           s/.*/./; q'`
24498     done
24499     test ! -n "$as_dirs" || mkdir $as_dirs
24500   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24501 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24502    { (exit 1); exit 1; }; }; }
24503
24504   ac_builddir=.
24505
24506 if test "$ac_dir" != .; then
24507   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24508   # A "../" for each directory in $ac_dir_suffix.
24509   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24510 else
24511   ac_dir_suffix= ac_top_builddir=
24512 fi
24513
24514 case $srcdir in
24515   .)  # No --srcdir option.  We are building in place.
24516     ac_srcdir=.
24517     if test -z "$ac_top_builddir"; then
24518        ac_top_srcdir=.
24519     else
24520        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24521     fi ;;
24522   [\\/]* | ?:[\\/]* )  # Absolute path.
24523     ac_srcdir=$srcdir$ac_dir_suffix;
24524     ac_top_srcdir=$srcdir ;;
24525   *) # Relative path.
24526     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24527     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24528 esac
24529
24530 # Do not use `cd foo && pwd` to compute absolute paths, because
24531 # the directories may not exist.
24532 case `pwd` in
24533 .) ac_abs_builddir="$ac_dir";;
24534 *)
24535   case "$ac_dir" in
24536   .) ac_abs_builddir=`pwd`;;
24537   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24538   *) ac_abs_builddir=`pwd`/"$ac_dir";;
24539   esac;;
24540 esac
24541 case $ac_abs_builddir in
24542 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24543 *)
24544   case ${ac_top_builddir}. in
24545   .) ac_abs_top_builddir=$ac_abs_builddir;;
24546   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24547   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24548   esac;;
24549 esac
24550 case $ac_abs_builddir in
24551 .) ac_abs_srcdir=$ac_srcdir;;
24552 *)
24553   case $ac_srcdir in
24554   .) ac_abs_srcdir=$ac_abs_builddir;;
24555   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24556   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24557   esac;;
24558 esac
24559 case $ac_abs_builddir in
24560 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24561 *)
24562   case $ac_top_srcdir in
24563   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24564   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24565   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24566   esac;;
24567 esac
24568
24569
24570   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24571 echo "$as_me: executing $ac_dest commands" >&6;}
24572   case $ac_dest in
24573     check_win32_symlinks )
24574 # Links sometimes fail undetected on Mingw -
24575 # so here we detect it and warn the user
24576 for FILE in $CONFIG_LINKS
24577  do
24578         # test -e works for symlinks in the MinGW console
24579         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
24580 echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
24581  done
24582  ;;
24583   esac
24584 done
24585 _ACEOF
24586
24587 cat >>$CONFIG_STATUS <<\_ACEOF
24588
24589 { (exit 0); exit 0; }
24590 _ACEOF
24591 chmod +x $CONFIG_STATUS
24592 ac_clean_files=$ac_clean_files_save
24593
24594
24595 # configure is writing to config.log, and then calls config.status.
24596 # config.status does its own redirection, appending to config.log.
24597 # Unfortunately, on DOS this fails, as config.log is still kept open
24598 # by configure, so config.status won't be able to write to it; its
24599 # output is simply discarded.  So we exec the FD to /dev/null,
24600 # effectively closing config.log, so it can be properly (re)opened and
24601 # appended to by config.status.  When coming back to configure, we
24602 # need to make the FD available again.
24603 if test "$no_create" != yes; then
24604   ac_cs_success=:
24605   ac_config_status_args=
24606   test "$silent" = yes &&
24607     ac_config_status_args="$ac_config_status_args --quiet"
24608   exec 5>/dev/null
24609   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24610   exec 5>>config.log
24611   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24612   # would make configure fail if this is the last instruction.
24613   $ac_cs_success || { (exit 1); exit 1; }
24614 fi
24615
24616
24617 # Warn about unknown options
24618 for pgac_var in `set | sed 's/=.*//' | $EGREP 'with_|enable_'`; do
24619   for pgac_arg in $pgac_args with_gnu_ld; do
24620     if test "$pgac_var" = "$pgac_arg"; then
24621       continue 2
24622     fi
24623   done
24624   pgac_txt=`echo $pgac_var | sed 's/_/-/g'`
24625   { echo "$as_me:$LINENO: WARNING: option ignored: --$pgac_txt" >&5
24626 echo "$as_me: WARNING: option ignored: --$pgac_txt" >&2;}
24627 done